Interface WSEntityHandler


  • public interface WSEntityHandler
    Extension point for custom web service entity.
    • Method Detail

      • setEntity

        void setEntity​(WSEntity entity)
        Passes entity to the handler.
        Parameters:
        entity - web service entity
      • getFieldDefinitions

        List<WSFieldDefinition> getFieldDefinitions()
        Retrieves definition for all web service fields.
        Returns:
        list of web service field definitions
      • getAllIds

        List<Comparable<?>> getAllIds()
        Retrieves all row IDs. If web service doesn't support such operation, an empty list can be returned.
        Returns:
        all row ids
      • createWSDao

        com.im.df.api.support.DFDao createWSDao()
        Creates DFDao data interface. Interface should at least implement DFDao.getRowCount(DFEnvironmentRO) and both DFDao.getData(Collection) and DFDao.getData(Collection, List).
        Returns:
        data interface
      • createFieldType

        default WSFieldDataType createFieldType​(String fieldType,
                                                List<com.im.ijcs.api.ddl.dto.PropInfo> xAttrs)
        Enables to define custom field types - other than WSFieldDefinition.FIELD_TYPE.
        Parameters:
        fieldType - custom field type - e.g. HELM, etc.
        xAttrs - extra attributes
        Returns:
        web service field custom data type
      • findFieldIcon

        default Image findFieldIcon​(String fieldType,
                                    int iconKind)
        Enables to define icon for given custom field type.
        Parameters:
        fieldType - custom field type - e.g. HELM, etc.
        iconKind - The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16 or ICON_MONO_32x32.
        Returns:
        An image object representing the requested icon. May return null if no suitable icon is available.