Interface ISourceFieldDataType

    • Method Detail

      • init

        void init​(ISourceContext sourceContext)
           throws PortalException
        Initializes this data type to be used in the given source context.
        Parameters:
        sourceContext - the source context where this data type will be used in.
        Throws:
        PortalException
        Since:
        4.0.4
      • getQueryDataType

        String getQueryDataType()
        Returns a QueryFieldTypes constant for a query data type the value of this source field data type is best suited to be kept in.
        Returns:
        a QueryFieldTypes constant.
        Since:
        4.0.4
      • getDocumentTypeFieldTemplates

        Map<String,​? extends IDocumentTypeFieldBuilder<?>> getDocumentTypeFieldTemplates()
        Returns the document type field templates to be used as a base by source fields to create their document type fields.

        The returned value is a map where the key is an identifier suffix to use on the document field identifier. This suffix will be appended to the source field's base identifier in the document. The key may be null to indicate that the source field's base identifier is to be used for the document field. The key must not be an empty string.

        The value of the map is a IDocumentTypeFieldBuilder to be used as a base to the respective document type field. The builder's id will be set by the source field and does not need to be specified. The IDocumentTypeFieldBuilder.setIncludeInGlobalSearch(boolean) is to be set to true if the document field may be included in global search. If it is set to true and the source field is searchable, then the final document type field generated will have this property set to true. Otherwise it will be false.

        Returns:
        a map where the key is a relative document field identifier and the value is a document type field builder to be used as a base to the respective document type field.
        Since:
        8.1.0
        See Also:
        getDocumentFieldValues(Object)
      • preAdd

        default void preAdd​(ISourceField field,
                            SourcePreAddDataEvent event)
                     throws PortalException
        Method called by default for each source field before data is added.
        Parameters:
        field - the field that is triggering this call.
        event - the event that contains information about the add operation.
        Throws:
        PortalException
        Since:
        10.4.0
        See Also:
        ISourceField#preAdd(ISourcePreAddDataEvent)
      • postAdd

        default void postAdd​(ISourceField field,
                             SourcePostAddDataEvent event)
                      throws PortalException
        Method called by default for each source field after data is added.
        Parameters:
        field - the field that is triggering this call.
        event - the event that contains information about the add operation.
        Throws:
        PortalException
        Since:
        10.4.0
        See Also:
        ISourceField#postAdd(ISourcePostAddDataEvent)
      • preUpdate

        default void preUpdate​(ISourceField field,
                               SourcePreUpdateDataEvent event)
                        throws PortalException
        Method called by default for each source field before data is updated.
        Parameters:
        field - the field that is triggering this call.
        event - the event that contains information about the update operation.
        Throws:
        PortalException
        Since:
        10.4.0
        See Also:
        ISourceField#preUpdate(ISourcePreUpdateDataEvent)
      • postUpdate

        default void postUpdate​(ISourceField field,
                                SourcePostUpdateDataEvent event)
                         throws PortalException
        Method called by default for each source field after data is updated.
        Parameters:
        field - the field that is triggering this call.
        event - the event that contains information about the update operation.
        Throws:
        PortalException
        Since:
        10.4.0
        See Also:
        ISourceField#postUpdate(ISourcePostUpdateDataEvent)
      • preDelete

        default void preDelete​(ISourceField field,
                               SourcePreDeleteDataEvent event)
                        throws PortalException
        Method called by default for each source field before data is deleted.
        Parameters:
        field - the field that is triggering this call.
        event - the event that contains information about the delete operation.
        Throws:
        PortalException
        Since:
        10.4.0
        See Also:
        ISourceField#preDelete(ISourcePreDeleteDataEvent)
      • postDelete

        default void postDelete​(ISourceField field,
                                SourcePostDeleteDataEvent event)
                         throws PortalException
        Method called by default for each source field after data is deleted.
        Parameters:
        field - the field that is triggering this call.
        event - the event that contains information about the delete operation.
        Throws:
        PortalException
        Since:
        10.4.0
        See Also:
        ISourceField#postDelete(ISourcePostDeleteDataEvent)