Interface ISourceField

    • Method Detail

      • getDefinitionNode

        org.w3c.dom.Node getDefinitionNode()
        Deprecated.
        hopefully this should not be used.
        Returns:
        the field's definition node.
        Since:
        4.0.4
      • getId

        java.lang.String getId()
      • getName

        java.lang.String getName()
      • isDisplay

        boolean isDisplay()
      • isPrimaryName

        boolean isPrimaryName()
      • isIntroduction

        boolean isIntroduction()
      • isIntroductionImage

        boolean isIntroductionImage()
        Returns whether this field is the introduction image of the corresponding data.
        Returns:
        true if this field is the introduction image, false otherwise.
        Since:
        8.1.0
      • isPublishStartDate

        boolean isPublishStartDate()
        Returns whether this field is the publish start date of the corresponding data.
        Returns:
        true if this field is the publish start date, false otherwise.
        Since:
        8.1.0
      • isKeywords

        boolean isKeywords()
      • isExternalData

        boolean isExternalData()
      • isGetData

        boolean isGetData()
      • isRequired

        boolean isRequired()
      • isRequiredWhenVisible

        boolean isRequiredWhenVisible()
      • isParentId

        boolean isParentId()
      • getDefaultValue

        java.lang.Object getDefaultValue()
      • getMinimumValue

        java.lang.Object getMinimumValue()
      • getMaximumValue

        java.lang.Object getMaximumValue()
      • isReadOnly

        boolean isReadOnly()
        Returns true if this field is read-only and should not be rendered editable.
        Returns:
        true if this field is read-only, false otherwise.
        Since:
        4.0.8
      • isSearchable

        boolean isSearchable()
        Returns whether this field included to be found in a simple search (search without specifying a field).
        Returns:
        true if this field is included in simple search, false otherwise.
        Since:
        8.1.0
      • init

        void init​(Source<?> source,
                  org.w3c.dom.Node fieldNode)
           throws PortalException
        Initializes this source field. This method is called by the source after the field is created and before it is used. The implementation of this method must initialize all of this instance's attributes.
        Parameters:
        source - the source this field will belong to.
        fieldNode - the xml node that contains this field's definition.
        Throws:
        PortalException - if this field could not be initialized.
        Since:
        4.0.4
      • getValueClass

        java.lang.Class<?> getValueClass()
        Returns the class this field's possible values are assignable to.
        Returns:
        the class this field's possible values are assignable to.
        Since:
        4.0.4
        See Also:
        IDouiDataType.getValueClass()
      • getConverter

        IConverter getConverter()
        Returns the default converter for this field's values.
        Returns:
        the default converter for this field's values.
        Since:
        4.0.4
      • addDocumentTypeFields

        void addDocumentTypeFields​(IDocumentTypeBuilder<?> documentTypeBuilder)
        Adds document type fields relative to this field to a document type.
        Parameters:
        documentType - the document type builder where the fields are to be added to.
        Since:
        8.1.0
        See Also:
        addDocumentFields(Document, ISourceData)
      • addDocumentFields

        void addDocumentFields​(Document document,
                               ISourceData data)
        Adds document fields values relative to this field to a document.
        Parameters:
        document - the document.
        data - the source data to be used to obtain the field value.
        Since:
        8.1.0
        See Also:
        addDocumentTypeFields(IDocumentTypeBuilder)
      • preAdd

        default void preAdd​(SourcePreAddDataEvent event)
                     throws PortalException
        Method called for each source field before data is added.
        Parameters:
        event - the event that contains information about the add operation.
        Throws:
        PortalException
        Since:
        10.4.0
      • postAdd

        default void postAdd​(SourcePostAddDataEvent event)
                      throws PortalException
        Method called for each source field after data is added.
        Parameters:
        event - the event that contains information about the add operation.
        Throws:
        PortalException
        Since:
        10.4.0
      • preUpdate

        default void preUpdate​(SourcePreUpdateDataEvent event)
                        throws PortalException
        Method called for each source field before data is updated.
        Parameters:
        event - the event that contains information about the update operation.
        Throws:
        PortalException
        Since:
        10.4.0
      • postUpdate

        default void postUpdate​(SourcePostUpdateDataEvent event)
                         throws PortalException
        Method called for each source field after data is updated.
        Parameters:
        event - the event that contains information about the update operation.
        Throws:
        PortalException
        Since:
        10.4.0
      • prepareValueForDataCloning

        default java.lang.Object prepareValueForDataCloning​(java.lang.Object currentValue)
                                                     throws PortalException
        Prepares the given data for content cloning.
        Parameters:
        currentValue - the current value
        Returns:
        the prepared value
        Throws:
        PortalException
        Since:
        17.0.0