Class Data

    • Field Detail

      • channel

        protected static final Channel channel
      • DISPLAY_URL_EXTRA_INFO

        public static final java.lang.String DISPLAY_URL_EXTRA_INFO
        Extra info to key to override default display URL String.

        Use your custom display URL String as the value (need to be done only once).

        Example :

        data.setExtraInfo(Data.DISPLAY_URL_EXTRA_INFO, "customDisplay.jsp?id=" + data.getId());
        Later, any invokation of data.getDisplayUrl() returns "customDisplay.jsp?id=...".
        See Also:
        Constant Field Values
      • WRITE_IN_PROGRESS_EXTRA_INFO

        public static final java.lang.String WRITE_IN_PROGRESS_EXTRA_INFO
        Flag set before beforeWrite and afterWrite, which indicates if the data received in DataControllers or StoreListener is "up-to-date" or maybe has modifications in progress.

        Such modifications could require custom code to be compliant with "non up-to-date" indexes for example, and should work with received fresh Data instead.

        Since:
        jcms-10.0.6
        See Also:
        Constant Field Values
      • author

        protected Member author
      • authorDBID

        protected java.lang.String authorDBID
      • opAuthor

        protected Member opAuthor
      • opDelegate

        protected Member opDelegate
      • importMap

        protected java.util.HashMap<java.lang.String,​java.lang.Object> importMap
      • extraDataMap

        protected java.util.HashMap<java.lang.String,​java.lang.String> extraDataMap
      • extraDBDataMapToSaveOnOp

        protected transient java.util.Map<java.lang.String,​java.lang.String> extraDBDataMapToSaveOnOp
    • Constructor Detail

      • Data

        public Data()
      • Data

        public Data​(Data other)
    • Method Detail

      • getDataName

        public java.lang.String getDataName​(java.lang.String language)
        Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.
        • The Title (multi-language) for a Publication.
        • The Name (multi-language) for a Category.
        • The Name for a Group, a Member.
        • The Title (multi-language) for a Workspace.
        Can be seen as a smart multi-language toString(), but never returning null.
        Default behaviour is to return toFullString() of Data or empty string if toFullString is null.
        Parameters:
        language - the language in which to return the name if multilang available for the data.
        Returns:
        a String, MUST NOT return null.
      • getLangPropertyValue

        public java.lang.String getLangPropertyValue​(java.lang.String language)
        Retrieve the string value of this object in the specified language, when being used inside a language property.

        This method is the implementation of LangPropertyArgument.getLangPropertyValue(String) for automatic translation of Object in language properties.

        You should not invoke this method directly, use getDataName(String) instead.

        Specified by:
        getLangPropertyValue in interface LangPropertyArgument
        Parameters:
        language - the ISO-639 language code to be used to retrieve the localized Object's name
        Returns:
        this object as a string value in the specified language
      • getDataImage

        public java.lang.String getDataImage()
        Retrieves the image path of this data in the channel's main language.

        This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
        Default behaviour is to return empty string.

        Returns:
        a path relative to the webapp root.
        Since:
        jcms-6.0.0
      • getDataImage

        public java.lang.String getDataImage​(java.lang.String lang,
                                             boolean useDefault)
        Retrieves the image path of this data.

        This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
        Default behaviour is to return empty string.

        Parameters:
        lang - the user language (ISO-639 language code)
        useDefault - should the default language be used if no value is found for the specified language
        Returns:
        a path relative to the webapp root.
        Since:
        jcms-6.0.0
      • getDataImage

        public java.lang.String getDataImage​(java.lang.String lang)
        Retrieves the image path of this data in the specified language.
        Parameters:
        lang - the user language (ISO-639 language code)
        Returns:
        a path relative to the webapp root.
        Since:
        jcms-6.0.0
      • getGenericThumbnail

        public java.lang.String getGenericThumbnail()
        Returns a generic thumbnail for this Data. As defined by properties types.{short-class-name}.thumb.

        If no property was defined for the class of this Data, the thumbnail specified in property types.unknown.thumb is used.

        FileDocument uses its own implementation, see FileDocument.getGenericThumbnail().

        Returns:
        a thumbnail path relative to the webapp root, eg images/jalios/icons/data/article.gif
        Since:
        jcms-6.1.1
      • getGenericThumbnail

        public java.lang.String getGenericThumbnail​(java.lang.String defaultThumb)
        Returns a generic thumbnail for this Data. As defined by properties types.{short-class-name}.thumb.

        If no property was defined for the class of this Data, the thumbnail specified in property types.unknown.thumb is used.

        FileDocument uses its own implementation, see FileDocument.getGenericThumbnail().

        Parameters:
        defaultThumb - the default thumbnail to use (can be null)
        Returns:
        a thumbnail path relative to the webapp root, eg images/jalios/icons/data/article.gif
        Since:
        jcms-10.0.5
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toFullString

        public java.lang.String toFullString()
      • toCSV

        public java.lang.String toCSV​(java.lang.String lang)
        Returns a CSV view of this object
        Parameters:
        lang - the output language
        Returns:
        a CSV view of this object
        Since:
        jcms-5.0.0
      • getCSVHeader

        public static java.lang.String getCSVHeader​(java.lang.String lang)
        Returns the CSV header of this object
        Parameters:
        lang - the output language
        Returns:
        the CSV header of this object
        Since:
        jcms-5.0.0
      • getLinkIndexedDataSet

        public <T> java.util.TreeSet<T> getLinkIndexedDataSet​(java.lang.Class<T> clazz)
        Returns all the JStore data, instance of the specified class, that references this Data directly through a dedicated field.

        Included in results:

        • JStore Publication instance that references this Data through a dedicated field.

        Excluded from results (non exhaustive list):

        • DBData.
        • JStore data that references this Publication through wiki and wysiwyg fields,
        • ...

        This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).

        See online documentation on data links and referrers : https://community.jalios.com/doc/referrer

        Type Parameters:
        T - class of wanted objects
        Parameters:
        clazz - the class to search the referring instances
        Returns:
        a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
        Since:
        jcms-3.0
        See Also:
        getLinkIndexedDataSet(Class, String)
      • getLinkIndexedDataSet

        public <T> java.util.TreeSet<T> getLinkIndexedDataSet​(java.lang.Class<T> clazz,
                                                              java.lang.String field)
        Returns all the JStore data, instance of the specified class, that references this Data directly through a dedicated field of the specified name.

        Included in results:

        • JStore Publication instance that references this Data through a dedicated field.

        Excluded from results (non exhaustive list):

        • DBData.
        • JStore data that references this Data through wiki and wysiwyg fields,
        • ...

        This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).

        See online documentation on data links and referrers : https://community.jalios.com/doc/referrer

        Type Parameters:
        T - class of wanted objects
        Parameters:
        clazz - the class to search the referring instances
        field - the name of the field which contains the reference, return empty result if null
        Returns:
        a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
        Since:
        jcms-4.1
        See Also:
        getLinkIndexedDataSet(Class)
      • getLinkCount

        public int getLinkCount()
        Returns:
        the number of instances referring this data
        Since:
        jcms-3.0
      • getReferrerSet

        public java.util.Set getReferrerSet()
        Returns the referrer set of this data.

        See online documentation on data links and referrers : https://community.jalios.com/doc/referrer

        Returns:
        the referrer set of this data.
        Since:
        jcms-9.0.0
      • getAllReferrerSet

        public java.util.TreeSet getAllReferrerSet​(java.lang.Class referrerClass)
        Returns all the JStore data, instance of the specified class, that references this Data directly or indirectly through a dedicated field.

        Included in results:

        • JStore Publication instance that references this Data through a dedicated field.
        • JStore Publication instance that references a JStore Data that reference this Data through a dedicated field (and recursively...).

        Excluded from results (non exhaustive list):

        • DBData.
        • JStore data that references this Data through wiki and wysiwyg fields,
        • ...

        This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).

        See online documentation on data links and referrers : https://community.jalios.com/doc/referrer

        Implementation note: recursively invoke getLinkIndexedDataSet(Class)

        Parameters:
        referrerClass - the class to search the referring instances
        Returns:
        a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
        Since:
        jcms-4.1
        See Also:
        getLinkIndexedDataSet(Class, String), getLinkIndexedDataSet(Class), getAllReferrerSet()
      • getAllReferrerSet

        public java.util.TreeSet getAllReferrerSet()
        Returns all the JStore data that references this Data directly or indirectly through a dedicated field.

        Included in results:

        • JStore Publication instance that references this Data through a dedicated field.
        • JStore Publication instance that references a JStore Data that reference this Data through a dedicated field (and recursively...).

        Excluded from results (non exhaustive list):

        • DBData.
        • JStore data that references this Data through wiki and wysiwyg fields,
        • ...

        This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).

        See online documentation on data links and referrers : https://community.jalios.com/doc/referrer

        Implementation note: recursively invoke getLinkIndexedDataSet(Class)

        Returns:
        a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
        Since:
        jcms-4.1
        See Also:
        getLinkIndexedDataSet(Class, String), getLinkIndexedDataSet(Class), getAllReferrerSet(Class)
      • fillExportXmlFieldAttributes

        public void fillExportXmlFieldAttributes​(java.lang.StringBuffer sb)
        Fill the given string buffer with specific attributes of this data.
        Parameters:
        sb - the StringBuffer
        Since:
        jcms-5.7.1
      • getExportXmlDataValue

        public java.lang.String getExportXmlDataValue()
        Returns a string representation of this data used by exportXml().
        Returns:
        a string representation of this data used by exportXml().
        Since:
        jcms-5.7.2
      • importXml

        public void importXml​(org.jdom.Element elt,
                              ImportOptions options)
        Fill this data with the values contains in the JDOM element.
        Parameters:
        elt - the JDOM element
        options - the ImportOptions
        Since:
        jcms-5.7.0
      • importXmlReferences

        public void importXmlReferences​(org.jdom.Element elt,
                                        ImportOptions options)
        Resolves imported references for this data.
        Parameters:
        elt - the JDOM element
        options - the ImportOptions
        Since:
        jcms-6.0.0
      • importXmlFieldsWithReferences

        protected void importXmlFieldsWithReferences​(org.jdom.Element elt,
                                                     ImportOptions options)
      • importXmlFiles

        public void importXmlFiles​(java.util.Map fieldFileMap,
                                   ImportOptions options)
      • exportXml

        public java.lang.String exportXml()
        Returns the XML export this data.
        Returns:
        the XML export for the given data. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-5.7.2
      • exportXml

        public java.lang.String exportXml​(java.lang.String[] relateds)
        Returns the XML export this data.
        Parameters:
        relateds - possible relateds to be added to the export
        Returns:
        the XML export for the given data. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-5.7.2
      • exportXml

        public java.lang.StringBuffer exportXml​(java.lang.StringBuffer sb,
                                                java.lang.String[] relateds)
        Fill the given StringBuffer with the XML export this data. The StringBuffer does not contain the XML declaration (<?xml>).
        Parameters:
        sb - the StringBuffer
        relateds - possible relateds to be added to the export
        Returns:
        the given in parameter sb parameter with content added
        Since:
        jcms-5.7.2
      • exportXml

        public java.lang.StringBuffer exportXml​(java.lang.StringBuffer sb,
                                                java.lang.String[] relateds,
                                                int indentLevel)
        Fill the given StringBuffer with the XML export this data. The StringBuffer does not contain the XML declaration (<?xml>).
        Parameters:
        sb - the StringBuffer.
        relateds - possible relateds to be added to the export
        indentLevel - indentation level to be used.
        Returns:
        the given in parameter sb parameter with content added
        Since:
        jcms-5.7.2
      • exportXmlField

        public void exportXmlField​(java.lang.StringBuffer sb,
                                   int indentLevel)
        Fills the given StringBuffer with Xml export of fields of this data.
        Parameters:
        sb - the StringBuffer
        indentLevel - the indent level
        Since:
        jcms-5.7.2
      • exportXmlRelated

        public void exportXmlRelated​(java.lang.StringBuffer sb,
                                     java.lang.String[] relateds,
                                     int indentLevel)
        Fills the given StringBuffer with Xml export of related of this data. Related are data computed or stored in memory (index), but not persisted as is. Only invoked related are given (through relateds parameter).
        Parameters:
        sb - the StringBuffer
        relateds - possible relateds to be added to the export
        indentLevel - the indent level
        Since:
        JCMS-6.1
      • exportXmlRelated

        protected void exportXmlRelated​(java.lang.StringBuffer sb,
                                        java.lang.String related,
                                        int indentLevel)
      • isImported

        public boolean isImported()
        Returns true if this data has been imported.
        Returns:
        true if this data has been imported.
        Since:
        jcms-5.7.2
      • setMdate

        public void setMdate​(java.util.Date v)
        Set the value of mdate
        Specified by:
        setMdate in interface Storable
        Overrides:
        setMdate in class BasicStorable
        Parameters:
        v - Value to assign to mdate.
        Since:
        jcms-5.7.2
      • markNewImport

        public void markNewImport()
        Internal method used to mark an imported data. Use with care.
        Since:
        jcms-5.7.2
      • unmarkNewImport

        public void unmarkNewImport()
        Internal method used to unmark an imported data. Use with care.
        Since:
        jcms-6.0.0
      • getImportMap

        public java.util.HashMap<java.lang.String,​java.lang.Object> getImportMap()
        Get the value of importMap.
        Returns:
        Value of importMap.
        Since:
        jcms-5.7.2
      • setImportMap

        public void setImportMap​(java.util.HashMap<java.lang.String,​java.lang.Object> v)
        Set the value of importMap.
        Parameters:
        v - Value to assign to importMap.
        Since:
        jcms-5.7.2
      • getImportId

        public java.lang.String getImportId()
        Get the value of importId.
        Returns:
        Value of importId.
        Since:
        jcms-5.7.2
      • setImportId

        public void setImportId​(java.lang.String v)
        Set the value of importId.
        Parameters:
        v - Value to assign to importId.
        Since:
        jcms-5.7.2
      • getImportDate

        public java.util.Date getImportDate()
        Get the value of importDate.
        Returns:
        Value of importDate.
        Since:
        jcms-5.7.2
      • setImportDate

        public void setImportDate​(java.util.Date v)
        Set the value of importDate.
        Parameters:
        v - Value to assign to importDate.
        Since:
        jcms-5.7.2
      • getImportMdate

        public java.util.Date getImportMdate()
        Get the value of importMdate.
        Returns:
        Value of importMdate.
        Since:
        jcms-5.7.2
      • setImportMdate

        public void setImportMdate​(java.util.Date v)
        Set the value of importMdate.
        Parameters:
        v - Value to assign to importMdate.
        Since:
        jcms-5.7.2
      • getImportBatch

        public java.lang.String getImportBatch()
        Get the value of importBatch.
        Returns:
        Value of importBatch.
        Since:
        jcms-5.7.2
      • setImportBatch

        public void setImportBatch​(java.lang.String v)
        Set the value of importBatch.
        Parameters:
        v - Value to assign to importBatch.
        Since:
        jcms-5.7.2
      • isImportUpdated

        public boolean isImportUpdated()
        Get the value of isImportUpdated.
        Returns:
        Value of isImportUpdated.
        Since:
        jcms-5.7.2
      • setImportUpdated

        public void setImportUpdated​(boolean v)
        Set the value of isImportUpdated.
        Parameters:
        v - Value to assign to isImportUpdated.
        Since:
        jcms-5.7.2
      • getImportSignature

        public java.lang.String getImportSignature()
        Get the value of importSignature.
        Returns:
        Value of importSignature.
        Since:
        jcms-5.7.2
      • setImportSignature

        public void setImportSignature​(java.lang.String v)
        Set the value of importSignature.
        Parameters:
        v - Value to assign to importSignature.
        Since:
        jcms-5.7.2
      • getImportSource

        public java.lang.String getImportSource()
        Get the value of importSource.
        Returns:
        Value of importSource.
        Since:
        jcms-5.7.2
      • setImportSource

        public void setImportSource​(java.lang.String v)
        Set the value of importSource.
        Parameters:
        v - Value to assign to importSource.
        Since:
        jcms-5.7.2
      • getImportSourceUrl

        public java.lang.String getImportSourceUrl()
        Get the value of importSourceUrl.
        Returns:
        Value of importSourceUrl.
        Since:
        jcms-5.7.2
      • setImportSourceUrl

        public void setImportSourceUrl​(java.lang.String v)
        Set the value of importSourceUrl.
        Parameters:
        v - Value to assign to importSourceUrl.
        Since:
        jcms-5.7.2
      • getImportAuthor

        public java.lang.String getImportAuthor()
        Get the value of importAuthor.
        Returns:
        Value of importAuthor.
        Since:
        jcms-5.7.2
      • setImportAuthor

        public void setImportAuthor​(java.lang.String v)
        Set the value of importAuthor.
        Parameters:
        v - Value to assign to importAuthor.
        Since:
        jcms-5.7.2
      • getImportDisplayUrl

        public java.lang.String getImportDisplayUrl()
        Get the value of importDisplayUrl.
        Returns:
        Value of importDisplayUrl.
        Since:
        jcms-5.7.2
      • setImportDisplayUrl

        public void setImportDisplayUrl​(java.lang.String v)
        Set the value of importAuthor.
        Parameters:
        v - Value to assign to importAuthor.
        Since:
        jcms-5.7.2
      • getImportUrl

        public java.lang.String getImportUrl()
        Returns the import URL of this publication, i.e. the XML export URL of the original data.
        Returns:
        the import URL of this publication.
        Since:
        jcms-5.7.2
      • getAuthor

        public Member getAuthor()
        Returns the author of this Data. If the author is a DBMember it is loaded. This method must not be called before the database as been initialized (e.g. it must not be called by a StoreListener). The author returned by method must not be kept in data structures that are longer than the DB transaction (e.g. an index). In those cases, call getAuthor(false).
        Returns:
        the author of this Data.
        See Also:
        getAuthor(boolean)
      • getAuthor

        public Member getAuthor​(boolean queryDB)
        Returns the author of this Data. If queryDB is true query the DB to find the author from authorDBID.
        Parameters:
        queryDB - indicates if the database must be queried.
        Returns:
        the author of this Data.
        Since:
        jcms-6.1.0
      • setAuthor

        public void setAuthor​(Member v)
        Sets the author of this Data
        Parameters:
        v - the author
        Since:
        jcms-6.1.0
      • getAuthorDBID

        public java.lang.String getAuthorDBID()
        Returns a JCMS ID of the author if it is persisted in the DB.
        Returns:
        a JCMS ID.
        Since:
        jcms-6.1.0
      • setAuthorDBID

        public void setAuthorDBID​(java.lang.String v)
        Sets the authorDBID of this Data.
        Parameters:
        v - the authorDBID
        Since:
        jcms-6.1.0
      • getOpAuthor

        public Member getOpAuthor()
        Get the value of opAuthor.
        Returns:
        Value of opAuthor.
        Since:
        jcms-4.0
      • setOpAuthor

        public void setOpAuthor​(Member v)
        Set the value of opAuthor.
        Parameters:
        v - Value to assign to opAuthor.
        Since:
        jcms-4.0
      • getOpAuthorId

        public java.lang.String getOpAuthorId()
        Returns the JStore ID of the op author (only for DBData)
        Returns:
        the JStore ID of the op author (only for DBData)
        Since:
        jcms-10.0.5 / JCMS-8387
      • setOpAuthorId

        public void setOpAuthorId​(java.lang.String opAuthorId)
        Sets the JStore ID of the op author (only for DBData).
        Parameters:
        opAuthorId - the JStore op author id
        Since:
        jcms-10.0.5 / JCMS-8387
      • getOpDelegate

        public Member getOpDelegate()
        Retrieves the Member who is really doing the operation (through right delegation) as opposed to the opAuthor, who is the Member having the right to do it.
        Returns:
        Value of opDelegate.
        Since:
        jcms-5.7.0
      • setOpDelegate

        public void setOpDelegate​(Member mbr)
        Defines the Member who is really doing the operation (through right delegation) as opposed to the opAuthor, who is the Member having the right to do it.
        Parameters:
        mbr - Value to assign to opDelegate.
        Since:
        jcms-5.7.0
      • getExtension

        public DataExtension getExtension()
        Get the value of extension.
        Returns:
        Value of extension.
      • setExtension

        public void setExtension​(DataExtension v)
        Set the value of extension.
        Parameters:
        v - Value to assign to extension.
      • getDate

        public java.util.Date getDate​(java.lang.String dateType)
        Return the date corresponding to the given parameter : date/cdate, mdate or null if nothing match or the matching date is null.
        Parameters:
        dateType - the date type
        Returns:
        the date
        Since:
        jcms-4.0
      • getDate

        public java.util.Date getDate​(java.lang.String dateType,
                                      java.util.Date defaultDate)
        Return the date corresponding to the given parameter : date/cdate, mdate, or null if nothing match or the matching date is null.
        Parameters:
        dateType - the date type
        defaultDate - the default date
        Returns:
        the date
        Since:
        jcms-4.0
      • getCdateSelector

        public static Data.CdateSelector getCdateSelector​(java.util.Date begin,
                                                          java.util.Date end)
      • getMdateSelector

        public static Data.MdateSelector getMdateSelector​(java.util.Date begin,
                                                          java.util.Date end)
      • getImportSelector

        public static DataSelector getImportSelector()
      • getDeletableSelector

        public static DataSelector getDeletableSelector​(Member opAuthor)
      • getCaddyComparator

        public static <T extends Data> java.util.Comparator<T> getCaddyComparator()
        Type Parameters:
        T - subclass of Data
        Returns:
        a new instance of CaddyComparator.
        Since:
        jcms-5.7
      • getAuthorComparator

        public static <T extends Data> java.util.Comparator<T> getAuthorComparator​(java.util.Comparator<Member> memberComparator)
        Type Parameters:
        T - subclass of Data
        Parameters:
        memberComparator - a member comparator
        Returns:
        a new instance of Data.AuthorComparator built with the given member comparator, usually a Member.getNameComparator().
      • getOpAuthorComparator

        public static <T extends Data> java.util.Comparator<T> getOpAuthorComparator​(java.util.Comparator<Member> memberComparator)
        Type Parameters:
        T - subclass of Data
        Parameters:
        memberComparator - a Member comparator
        Returns:
        a new instance of Data.OpAuthorComparator built with the given member comparator, usually a Member.getNameComparator().
        Since:
        jcms-4.0
      • getDataNameComparator

        public static <T extends Data> java.util.Comparator<T> getDataNameComparator​(java.lang.String language)
        Type Parameters:
        T - subclass of Data
        Parameters:
        language - the language that will be used by the DataNameComparator
        Returns:
        a new DataNameComparator built with the given language.
        Since:
        jcms-5.5.0
      • getRowIdComparator

        public static <T extends Data> java.util.Comparator<T> getRowIdComparator()
        Type Parameters:
        T - subclass of Data
        Returns:
        a new RowIdComparator
        Since:
        jcms-6.2.0
      • getStrongLockSelector

        public static DataSelector getStrongLockSelector()
        Retrieves a new instance of DataSelector based on the strong lock status of the data.
        Returns:
        a new instance of Data.StrongLockSelector
        Since:
        jcms-6.2.0
      • setExtraInfo

        public java.lang.Object setExtraInfo​(java.lang.String name,
                                             java.lang.Object obj)
        Stores an extra information in this Data.
        If the object passed in is null, the effect is the same as calling removeExtraInfo(java.lang.String).
        Data's extra information are transient (not stored upon a site restart).
        Parameters:
        name - a String specifying the name of the extra info
        obj - the Object to be stored
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Since:
        jcms-5.5.0
      • removeExtraInfo

        public java.lang.Object removeExtraInfo​(java.lang.String name)
        Removes an extra information from this Data.
        Parameters:
        name - a String specifying the name of the extra info
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Since:
        jcms-5.5.0
      • getExtraInfo

        public java.lang.Object getExtraInfo​(java.lang.String name)
        Returns the value of the named extra info as an Object, or null if no extra info of the given name exists.
        Parameters:
        name - the name of the extrainfo to retrieve
        Returns:
        previous value associated with specified name, or null if there is no mapping for name. A null return can also indicate that null was associated with the specified name.
        Since:
        jcms-5.5.0
      • getExtraInfoMap

        public java.util.Map<java.lang.String,​java.lang.Object> getExtraInfoMap()
        Returns a java.util.Map of the extra infos of this results.
        Returns:
        the internal Map used by this results, modify with care.
        Since:
        jcms-5.5.0
      • getExtraDataMap

        public java.util.HashMap<java.lang.String,​java.lang.String> getExtraDataMap()
        Returns a java.util.Map of the extra infos of this results.
        Returns:
        the internal Map used by this results, modify with care.
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
        Since:
        jcms-5.7.1
      • setExtraDataMap

        public void setExtraDataMap​(java.util.HashMap<java.lang.String,​java.lang.String> extraDataMap)
        Override the current extraDataMap with the given one
        Parameters:
        extraDataMap - the new extraDataMap
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
        Since:
        jcms-5.7.1
      • getExtraData

        public java.lang.String getExtraData​(java.lang.String name)
        Returns the value of the named extra data as an String, or null if no extra info of the given name exists.
        Parameters:
        name - a String specifying the name of the extra data to retrieve
        Returns:
        previous value associated with specified name, or null if there is no mapping for name. A null return can also indicate that null was associated with the specified name.
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
        Since:
        jcms-5.7.1
      • setExtraData

        public java.lang.String setExtraData​(java.lang.String name,
                                             java.lang.String value)
        Stores an extra data in this Data.
        If the object passed in is null, the effect is the same as calling removeExtraData(java.lang.String).
        Parameters:
        name - a String specifying the name of the extra data
        value - the String to be stored
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
        Since:
        jcms-5.7.1
      • removeExtraData

        public java.lang.String removeExtraData​(java.lang.String name)
        Removes an extra data from this Data.
        Parameters:
        name - a String specifying the name of the extra data
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
        Since:
        jcms-5.7.1
      • getNewDefaultExtraDataMap

        @Deprecated
        public static java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDataMap​(java.lang.Class<? extends Data> clazz,
                                                                                                           boolean shortKey)
        Returns a TreeMap representing the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted
        Parameters:
        clazz - the class to work with
        shortKey - if true, returns a Map using short properties (someprop instead of someprop.boolean)
        Returns:
        TreeMap object
        Since:
        jcms-5.7.1
      • getNewDefaultExtraDataMap

        public static java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDataMap​(java.lang.Class<? extends Data> clazz,
                                                                                                           java.lang.String suffix,
                                                                                                           boolean shortKey)
        Returns a TreeMap representing the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted
        Parameters:
        clazz - the class to work with
        suffix - a suffix to the properties
        shortKey - if true, returns a Map using short properties (someprop instead of someprop.boolean)
        Returns:
        TreeMap object
        Since:
        jcms-5.7.4
      • getNewDefaultExtraDataMap

        public static java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDataMap​(java.lang.Class<? extends Data> clazz,
                                                                                                           java.lang.String suffix,
                                                                                                           boolean shortKey,
                                                                                                           boolean useSuperClasses)
        Returns a TreeMap representing the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted
        Parameters:
        clazz - the class to work with
        suffix - a suffix to the properties
        shortKey - return a Map using short properties
        useSuperClasses - true to retrieve default extradata for super classes of the specified class
        Returns:
        TreeMap object
        Since:
        jcms-5.7.5
      • getNewDefaultExtraDataMap

        public java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDataMap​(boolean shortKey)
        Returns a LangProperties representing the Extra Data description and default values.
        Parameters:
        shortKey - if true, returns a Map using short properties (someprop instead of someprop.boolean)
        Returns:
        LangProperties object
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
        Since:
        jcms-5.7.1
      • updateExtraDataMap

        public void updateExtraDataMap​(java.lang.String[] keys,
                                       java.lang.String[] values)
        Update editable ExtraDBData of this data with the updated/new specified key/value

        This method will NOT allow add/modification of non-editable extradbdata, ie : extradata which are not explicitely declared in properties.

        This method is meant to be invoked on a working data (new object before its creation or updateinstance before its update).

        It is used Edit Handlers of all Data.

        Implementation detail : this method creates a new Map to simplify update of a cloned JStore object (fix issue when extraDataMap has not been cloned prior update)

        Parameters:
        keys - String[] representing authorized properties
        values - String[] representing new values of properties
        Throws:
        java.lang.IllegalStateException - if this method is invoked on instance of DBData
      • getExtraDBDataMap

        public java.util.Map<java.lang.String,​java.lang.String> getExtraDBDataMap()
        Returns a java.util.Map of the extra infos of this results.
        Returns:
        the internal and unmodifiable Map.
        Since:
        jcms-6.0
      • setExtraDBDataMap

        public void setExtraDBDataMap​(java.util.Map<java.lang.String,​java.lang.String> extraDBDataMap)
        Override the current extraDBDataMap with the given one
        Parameters:
        extraDBDataMap - the new extraDBDataMap
        Since:
        jcms-6.0
      • setExtraDBDataMap

        public void setExtraDBDataMap​(java.util.Map<java.lang.String,​java.lang.String> extraDBDataMap,
                                      boolean inMemoryOnly)
        Override the current extraDBDataMap with the given one
        Parameters:
        extraDBDataMap - the new extraDBDataMap
        inMemoryOnly - if specified to true, the map will be kept in memory (as a ariable of this Data) variable and will only be saved if invoking performupdate later
        Since:
        jcms-7.0.1
      • getExtraDBData

        public java.lang.String getExtraDBData​(java.lang.String name)
        Returns the value of the named extra data as an String, or null if no extra info of the given name exists.
        Parameters:
        name - a String specifying the name of the extra data to retrieve
        Returns:
        value associated with specified name, or null if there is no mapping for name.
        Since:
        jcms-6.0
      • setExtraDBData

        public java.lang.String setExtraDBData​(java.lang.String name,
                                               java.lang.String value)
        Stores an extra data in this Data.
        If the object passed in is null, the effect is the same as calling removeExtraDBData(String).
        Parameters:
        name - a String specifying the name of the extra data
        value - the String to be stored
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Since:
        jcms-6.0
      • removeExtraDBData

        public java.lang.String removeExtraDBData​(java.lang.String name)
        Removes an extra data from this Data.
        Parameters:
        name - a String specifying the name of the extra data
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Since:
        jcms-6.0
      • getNewDefaultExtraDBDataMap

        @Deprecated
        public static java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDBDataMap​(java.lang.Class<? extends Data> clazz,
                                                                                                             boolean shortKey)
        Returns a TreeMap representing the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted
        Parameters:
        clazz - the class to work with
        shortKey - if true, returns a Map using short properties (someprop instead of someprop.boolean)
        Returns:
        TreeMap object
        Since:
        jcms-6.0
      • getNewDefaultExtraDBDataMap

        public static java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDBDataMap​(java.lang.Class<? extends Data> clazz,
                                                                                                             java.lang.String suffix,
                                                                                                             boolean shortKey)
        Returns a TreeMap representing the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted
        Parameters:
        clazz - the class to work with
        suffix - a suffix to the properties
        shortKey - if true, returns a Map using short properties (someprop instead of someprop.boolean)
        Returns:
        TreeMap object
        Since:
        jcms-6.0
      • getNewDefaultExtraDBDataMap

        public static java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDBDataMap​(java.lang.Class<? extends Data> clazz,
                                                                                                             java.lang.String suffix,
                                                                                                             boolean shortKey,
                                                                                                             boolean useSuperClasses)
        Returns a TreeMap representing the Extra DB Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted
        Parameters:
        clazz - the class to work with
        suffix - a suffix to the properties
        shortKey - return a Map using short properties
        useSuperClasses - true to retrieve default extradbdata for super classes of the specified class
        Returns:
        TreeMap object
        Since:
        jcms-6.0
      • getNewDefaultExtraDBDataMap

        public java.util.TreeMap<java.lang.String,​java.lang.String> getNewDefaultExtraDBDataMap​(boolean shortKey)
        Returns a LangProperties representing the Extra Data description and default values.
        Parameters:
        shortKey - if true, returns a Map using short properties (someprop instead of someprop.boolean)
        Returns:
        LangProperties object
        Since:
        jcms-6.0
      • updateExtraDBDataMap

        public void updateExtraDBDataMap​(java.lang.String[] keys,
                                         java.lang.String[] values)
        Update editable ExtraDBData of this data with the updated/new specified key/value

        .

        This method will NOT allow add/modification of non-editable extradbdata, ie : extradata which are not explicitely declared in properties.

        This method is meant to be invoked on a working data (new object before its creation or updateinstance before its update).

        It is used Edit Handlers of all Data.

        Parameters:
        keys - String[] representing authorized properties
        values - String[] representing new values of properties
        Since:
        jcms-6.0
      • lock

        public void lock​(Member mbr)
        Locks this data for a given member.
        Parameters:
        mbr - the member who locks this data
        Since:
        jcms-5.5.0
      • unlock

        public void unlock​(Member mbr)
        Unlocks this data if lock has been put by the given member.
        Parameters:
        mbr - the member who locked this data
        Since:
        jcms-5.5.0
      • unlock

        public void unlock()
        Unlocks this data.
        Since:
        jcms-5.5.0
      • getLockMember

        public Member getLockMember()
        Return the member who locked this data
        Returns:
        the member who locked this data
        Since:
        jcms-5.5.0
      • getLockDate

        public java.util.Date getLockDate()
        Returns the lock date.
        Returns:
        the lock date
        Since:
        jcms-5.5.0
      • isLocked

        public boolean isLocked()
        Returns true if this data is locked.
        Returns:
        true if this data is locked.
        Since:
        jcms-5.5.0
      • checkLockMember

        public boolean checkLockMember​(Member mbr)
        Returns true if the given member has locked the given data or if the data is not locked.
        Parameters:
        mbr - the member
        Returns:
        true if the given member has locked the given data or if the data is not locked.
        Since:
        jcms-7.0.0
      • getStrongLockMember

        public Member getStrongLockMember()
        Returns the member who has strongly locked this Data.
        Returns:
        the member who has strongly locked this Data.
        Since:
        jcms-7.0.0
      • getStrongLockDate

        public java.util.Date getStrongLockDate()
        Returns the date of the strong lock.
        Returns:
        the date of the strong lock.
        Since:
        jcms-7.0.0
      • getStrongLockContextData

        public java.lang.String getStrongLockContextData()
        Return the StrongLock context data (if available)
        Returns:
        the StrongLock context data
      • getStrongLockContext

        public java.lang.String getStrongLockContext()
        Return the StrongLock context (if available)
        Returns:
        the StrongLock context
      • putStrongLock

        public void putStrongLock​(Member mbr)
        Put (and save) a strong lock on this Data.
        Parameters:
        mbr - the member who puts the strong lock.
        Since:
        jcms-7.0.0
      • putStrongLock

        public void putStrongLock​(Member mbr,
                                  java.lang.String context,
                                  java.lang.String contextData)
        Put (and save) a strong lock on this Data.
        Parameters:
        mbr - the member who puts the strong lock.
        context - the lock context
        contextData - the lock context data (custom data used by context manager)
        Since:
        jcms-10.0.2
      • releaseStrongLock

        public void releaseStrongLock​(Member mbr)
        Release the lock on this Data
        Parameters:
        mbr - the member who releases the lock (only the member who has locked and the admin can release the lock).
        Since:
        jcms-7.0.0
      • releaseStrongLock

        public void releaseStrongLock()
        Releases the strong lock, without checking the member.
        Since:
        jcms-7.0.0
      • getStrongLockInfo

        public java.lang.String getStrongLockInfo​(java.util.Locale locale)
        Returns a string which explains who has the lock (return "" if this Data has no strong lock)
        Parameters:
        locale - the locale
        Returns:
        a string which explains who has the lock.
        Since:
        jcms-7.0.0
      • canRequestUnlock

        public boolean canRequestUnlock​(Member mbr)
        Returns true if the given member can request to unlock this data.
        Parameters:
        mbr - the member who request the lock
        Returns:
        true if the given member can request to unlock this data.
        Since:
        jcms-8.0.0
      • canBeUnlockedBy

        public boolean canBeUnlockedBy​(Member mbr)
        Returns true if the given member can unlock this data.
        Parameters:
        mbr - the member
        Returns:
        true if the given member can unlock this data.
        Since:
        jcms-9.0.0
      • getStrongLock

        public StrongLock getStrongLock()
        Returns the StrongLock bound to this Data, if any.
        Returns:
        the StrongLock instance if there is any for this Data, null otherwise
        Since:
        jcms-6.2.0
        See Also:
        StrongLockManager.getStrongLock(Data)
      • isStrongLocked

        public boolean isStrongLocked()
        Check if this data is strongly locked.
        Returns:
        true if this Data has a StrongLock, false otherwise
        Since:
        jcms-6.2.0
        See Also:
        StrongLockManager.isLocked(Data)
      • checkStrongLockMember

        public boolean checkStrongLockMember​(Member mbr)
        Check if the specified member has locked this Data or if the Data is not locked.
        Parameters:
        mbr - the member to check
        Returns:
        true if the given member has locked the given data or if the data is not locked.
        Since:
        jcms-6.2.0
        See Also:
        StrongLockManager.checkLockMember(Data, Member)
      • checkStrongLockMember

        public boolean checkStrongLockMember​(Member mbr,
                                             boolean useCache)
        Check if the specified member has locked this Data or if the Data is not locked.
        Parameters:
        mbr - the member to check
        useCache - indicate if the cache can be used
        Returns:
        true if the given member has locked the given data or if the data is not locked.
        Since:
        jcms-10.0.1
        See Also:
        StrongLockManager.checkLockMember(Data, Member)
      • getLockInfo

        public java.lang.String getLockInfo​(java.lang.String userLang,
                                            java.util.Locale userLocale,
                                            boolean confirm)
        Returns an information message about the lock state.
        Parameters:
        userLang - the user language
        userLocale - the user locale
        confirm - true for a confirm message
        Returns:
        an information message about the lock state.
        Since:
        jcms-6.2.0
      • canBeReadBy

        public final boolean canBeReadBy​(Member member)
        Checks if the specified member is authorized to read this Data.

        This method is a convenient invocation of canBeReadBy(Member, boolean, RightInfo), in which searchInGroups is requested a new RightInfo instance is systematically provided.

        Parameters:
        member - the member to check (may be null for anonymous user)
        Returns:
        true if the member can read this Data, false otherwise
        Since:
        jcms-10.0.0, JCMS-6017
        See Also:
        canBeReadBy(Member, boolean, RightInfo)
      • canBeReadBy

        public boolean canBeReadBy​(Member member,
                                   boolean searchInGroups,
                                   RightInfo rightInfo)
        Checks if the specified member is authorized to read this Data.
        Parameters:
        member - the member to check (may be null for anonymous user)
        searchInGroups - set to true to check for read right authorization using Member's group(s).
        rightInfo - a RightInfo instance in which explanation of read right authorization acceptance or refusal will be indicated. Value is required and cannot be null.
        Returns:
        true if the member can read this Data, false otherwise
        Since:
        jcms-10.0.0, JCMS-6017
      • getUpdateInstance

        public Data getUpdateInstance()
        Returns an instance of this object to update it.
        Returns:
        an instance of this object to update it.
        Since:
        jcms-6.0.0
      • checkIntegrity

        public ControllerStatus checkIntegrity()
        Checks whether or not data integrity constraints are respected.
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkIntegrity

        public ControllerStatus checkIntegrity​(java.util.Map context)
        Checks whether or not data integrity constraints are respected.
        Parameters:
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-6.1.0
      • getFieldStatusMap

        public java.util.Map<java.lang.String,​FieldStatus> getFieldStatusMap​(Member mbr)
        Returns the FieldStatus map of this data for the given member (currently only works for Publication).
        Parameters:
        mbr - the member
        Returns:
        the FieldStatus map (the field names are the keys)
        Since:
        jcms-6.0.1
      • checkWrite

        public ControllerStatus checkWrite​(int op,
                                           Member mbr,
                                           boolean checkIntegrity,
                                           java.util.Map context)
        Checks if the given write operation can be performed
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        checkIntegrity - if true, requires the constraints integrity to be checked
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkMember

        public ControllerStatus checkMember​(int op,
                                            Member mbr,
                                            java.util.Map context)
        Checks if the given member can perform the given operation. This method is called by checkWrite. It should be overrided by sub-classes.
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkCreate

        public ControllerStatus checkCreate​(Member mbr)
        Checks if the creation can be performed
        Parameters:
        mbr - the member which requests the write operation
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkCreate

        public ControllerStatus checkCreate​(Member mbr,
                                            java.util.Map context)
        Checks if the creation can be performed
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkUpdate

        public ControllerStatus checkUpdate​(Member mbr)
        Checks if the update can be performed
        Parameters:
        mbr - the member which requests the write operation
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkUpdate

        public ControllerStatus checkUpdate​(Member mbr,
                                            java.util.Map context)
        Checks if the update can be performed
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkDelete

        public ControllerStatus checkDelete​(Member mbr)
        Checks if the deletion can be performed
        Parameters:
        mbr - the member which requests the write operation
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkDelete

        public ControllerStatus checkDelete​(Member mbr,
                                            java.util.Map context)
        Checks if the deletion can be performed
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • getVirtualIDSet

        public java.util.Set<java.lang.String> getVirtualIDSet()
        Returns the set of virtual ID bound to this data (or null if it does not exist).
        Returns:
        the set of virtual ID bound to this data (or null if it does not exist).
        Since:
        jcms-8.0.0
      • checkAndPerformCreate

        public final ControllerStatus checkAndPerformCreate​(Member mbr)
        Checks if the creation can be performed, and performs data creation. This method cannot be overridden.
        Parameters:
        mbr - the member which requests the write operation
        Returns:
        a ControllerStatus
      • checkAndPerformCreate

        public ControllerStatus checkAndPerformCreate​(Member mbr,
                                                      java.util.Map<?,​?> context)
        Checks if the creation can be performed, and performs data creation.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
      • performCreate

        public final void performCreate​(Member mbr)
        Performs data creation. This method cannot be overridden.
        Parameters:
        mbr - the member which requests the write operation
        Since:
        jcms-5.0.0
      • performCreate

        public void performCreate​(Member mbr,
                                  java.util.Map context)
        Performs data creation.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.0.0
      • checkAndPerformUpdate

        public final ControllerStatus checkAndPerformUpdate​(Member mbr)
        Checks if the update can be performed, and performs data update. This method cannot be overridden.
        Parameters:
        mbr - the member which requests the write operation
        Returns:
        a ControllerStatus
      • checkAndPerformUpdate

        public ControllerStatus checkAndPerformUpdate​(Member mbr,
                                                      java.util.Map<?,​?> context)
        Checks if the update can be performed, and performs data update.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
      • performUpdate

        public final void performUpdate​(Member mbr)
        Performs data update. This method cannot be overridden.
        Parameters:
        mbr - the member which requests the write operation
        Since:
        jcms-5.0.0
      • performUpdate

        public void performUpdate​(Member mbr,
                                  java.util.Map context)
        Performs data update.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.0.0
      • prepareUpdateContext

        public void prepareUpdateContext​(java.util.Map context)
      • checkAndPerformDelete

        public final ControllerStatus checkAndPerformDelete​(Member mbr)
        Checks if the deletion can be performed, and performs data deletion. This method cannot be overridden.
        Parameters:
        mbr - the member which requests the write operation
        Returns:
        a ControllerStatus
      • checkAndPerformDelete

        public ControllerStatus checkAndPerformDelete​(Member mbr,
                                                      java.util.Map<?,​?> context)
        Checks if the deletion can be performed, and performs data deletion.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
      • performDelete

        public final void performDelete​(Member mbr)
        Performs data deletion. This method cannot be overridden.
        Parameters:
        mbr - the member which requests the write operation
        Since:
        jcms-5.0.0
      • performDelete

        public void performDelete​(Member mbr,
                                  java.util.Map context)
        Performs data deletion.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.0.0
      • performBeforeWrite

        protected void performBeforeWrite​(int op,
                                          Member mbr,
                                          java.util.Map context)
        Called to perform some action before the write.
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.7.2
      • splitHybridCollections

        protected void splitHybridCollections​(Data previousData)
        This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.
        Parameters:
        previousData - the previous data (provided for update only)
        Since:
        jcms-10.0.2
      • cleanHybridCollections

        protected void cleanHybridCollections()
        This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.
        Since:
        jcms-10.0.1
      • performAfterWrite

        protected void performAfterWrite​(int op,
                                         Member mbr,
                                         java.util.Map context)
        Called to perform some action after the write.
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-6.0.0
      • getTypeEntry

        public static TypeEntry getTypeEntry()
        Returns the TypeEntry bound to Data.

        Default implementation for Data will propably return null as no TypeEntry is available for Data, this method is available mainly to be overriden by subclasses.
        Returns:
        the TypeEntry bound to Data.
        Since:
        jcms-5.5
        See Also:
        Channel.getTypeEntry(Class)
      • getTypeFieldsEntries

        public static TypeFieldEntry[] getTypeFieldsEntries()
        Return an array of TypeFieldEntry bound to Data.
        This array does not contain inherited TypeFieldEntry from super classes of Data.

        Default implementation for Data will propably return an empty array as no TypeFieldEntry is available for Data, this method is available mainly to be overriden by subclasses.
        Returns:
        an array of TypeFieldEntry containing all Field used by Data or an empty array (never return null)
        Since:
        jcms-5.5
        See Also:
        Channel.getTypeFieldEntries(Class)
      • getAllTypeFieldEntry

        public static TypeFieldEntry[] getAllTypeFieldEntry()
        Return an array of TypeFieldEntry bound to Data.
        This array does contain inherited TypeFieldEntry from super classes of Data.

        Default implementation for Data will propably return an empty array as no TypeFieldEntry is available for Data, this method is available mainly to be overriden by subclasses.
        Returns:
        an array of TypeFieldEntry containing all Field used by Data or an empty array (never return null)
        Since:
        jcms-5.5
        See Also:
        Channel.getAllTypeFieldEntries(Class)
      • getIntFieldValue

        public int getIntFieldValue​(java.lang.String fieldName)
                             throws java.lang.NoSuchFieldException
        Gets the value of the given int field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the int field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
      • setIntFieldValue

        public void setIntFieldValue​(java.lang.String fieldName,
                                     int value)
                              throws java.lang.NoSuchFieldException
        Sets the value of the given int field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - the int field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
        Since:
        jcms-7.0.0
      • getLongFieldValue

        public long getLongFieldValue​(java.lang.String fieldName)
                               throws java.lang.NoSuchFieldException
        Gets the value of the given long field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the long field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
      • setLongFieldValue

        public void setLongFieldValue​(java.lang.String fieldName,
                                      long value)
                               throws java.lang.NoSuchFieldException
        Sets the value of the given long field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - the long field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
        Since:
        jcms-7.0.0
      • getDoubleFieldValue

        public double getDoubleFieldValue​(java.lang.String fieldName)
                                   throws java.lang.NoSuchFieldException
        Gets the value of the given double field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the double field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
      • setDoubleFieldValue

        public void setDoubleFieldValue​(java.lang.String fieldName,
                                        double value)
                                 throws java.lang.NoSuchFieldException
        Sets the value of the given double field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - the double field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
        Since:
        jcms-7.0.0
      • getBooleanFieldValue

        public boolean getBooleanFieldValue​(java.lang.String fieldName)
                                     throws java.lang.NoSuchFieldException
        Gets the value of the given boolean field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the boolean field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
      • setBooleanFieldValue

        public void setBooleanFieldValue​(java.lang.String fieldName,
                                         boolean value)
                                  throws java.lang.NoSuchFieldException
        Sets the value of the given boolean field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - the boolean field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found.
        Since:
        jcms-7.0.0
      • getCategoryFieldValue

        public java.util.TreeSet<Category> getCategoryFieldValue​(java.lang.String fieldName,
                                                                 Member mbr)
                                                          throws java.lang.NoSuchFieldException
        Gets the value of the given Category field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        mbr - the member used to check rigth access to categories.
        Returns:
        a TreeSet of Category
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
      • setCategoryFieldValue

        public void setCategoryFieldValue​(java.lang.String fieldName,
                                          java.util.TreeSet value)
                                   throws java.lang.NoSuchFieldException
        Sets the value of the given Category field name for the current Data.
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - TreeSet of Category
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-7.0.0
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName)
                                       throws java.lang.NoSuchFieldException
        Gets the value of the given Object field name for the current Data.
        If the field is multilingual, the default language will be used. If the field value is not available (empty) in the given language, the field value in the main language of this publication is return.
        Do not retrieve Category fields, see #getCategoryFieldValue(Member).
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the Object field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        See Also:
        getFieldValue(String, String, boolean)
      • setFieldValue

        public void setFieldValue​(java.lang.String fieldName,
                                  java.lang.Object value)
                           throws java.lang.NoSuchFieldException
        Sets the value of the given Object field name for the current Data.
        If the field is multilingual, the default language will be used.
        Do not set Category fields, see #setCategoryFieldValue(String, TreeSet).
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - the Object field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-7.0.0
        See Also:
        setFieldValue(String, Object, String)
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName,
                                              java.lang.String lang)
                                       throws java.lang.NoSuchFieldException
        Gets the value of the given Object field name for the current Data.
        If the field is multilingual, the given language will be used. If the field value is not available (empty) in the given language, the field value in the main language of this publication is return.
        Do not retrieve Category fields, see #getCategoryFieldValue(String, Member).
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
        Returns:
        the Object field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        See Also:
        getFieldValue(String, String, boolean)
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName,
                                              java.lang.String lang,
                                              boolean useDefault)
                                       throws java.lang.NoSuchFieldException
        Gets the value of the given Object field name for the current Data.
        If the field is multilingual, the given language will be used.
        Do not retrieve Category fields, see #getCategoryFieldValue(String, Member).
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
        useDefault - whether to use the publication main language if the field value is not available in the requested language (used only for multilingual fields).
        Returns:
        the Object field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
      • setFieldValue

        public void setFieldValue​(java.lang.String fieldName,
                                  java.lang.Object value,
                                  java.lang.String lang)
                           throws java.lang.NoSuchFieldException
        Sets the value of the given Object field name for the current Data.
        If the field is multilingual, the given language will be used.
        Do not set Category fields, see #getCategoryFieldValue(String, Member).
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - the Object field value
        lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-7.0.0
      • getFieldValue

        public java.lang.Object getFieldValue​(JcmsJspContext ctxt,
                                              java.lang.String fieldName)
                                       throws java.lang.NoSuchFieldException
        Gets the value of the given Object field name for this Data.
        Do not retrieve Category fields and primitive fields values.
        Parameters:
        ctxt - the current context in which this field's value is request.
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the Object field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        See Also:
        PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
      • getIntFieldValue

        public int getIntFieldValue​(JcmsJspContext ctxt,
                                    java.lang.String fieldName)
                             throws java.lang.NoSuchFieldException
        Gets the integer value of the specified field name for this Data.
        Parameters:
        ctxt - the current context in which this field's value is request.
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the int field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-6.0.0
        See Also:
        PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
      • getLongFieldValue

        public long getLongFieldValue​(JcmsJspContext ctxt,
                                      java.lang.String fieldName)
                               throws java.lang.NoSuchFieldException
        Gets the long value of the specified field name for this Data.
        Parameters:
        ctxt - the current context in which this field's value is request.
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the long field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-6.0.2, jcms-6.1.1
        See Also:
        PortalPolicyFilter.getLongFieldValue(JcmsJspContext, String, Data, long)
      • getDoubleFieldValue

        public double getDoubleFieldValue​(JcmsJspContext ctxt,
                                          java.lang.String fieldName)
                                   throws java.lang.NoSuchFieldException
        Gets the double value of the specified field name for this Data.
        Parameters:
        ctxt - the current context in which this field's value is request.
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the double field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-6.0.2, jcms-6.1.1
        See Also:
        PortalPolicyFilter.getDoubleFieldValue(JcmsJspContext, String, Data, double)
      • getBooleanFieldValue

        public boolean getBooleanFieldValue​(JcmsJspContext ctxt,
                                            java.lang.String fieldName)
                                     throws java.lang.NoSuchFieldException
        Gets the boolean value of the specified field name for this Data.
        Parameters:
        ctxt - the current context in which this field's value is request.
        fieldName - the field name from which to retrieve the field value.
        Returns:
        the boolean field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-6.0.2, jcms-6.1.1
        See Also:
        PortalPolicyFilter.getBooleanFieldValue(JcmsJspContext, String, Data, boolean)
      • getCategoryFieldValue

        public java.util.TreeSet<Category> getCategoryFieldValue​(JcmsJspContext ctxt,
                                                                 java.lang.String fieldName)
                                                          throws java.lang.NoSuchFieldException
        Gets the Category value of the specified field name for this Data.
        Parameters:
        ctxt - the current context in which this field's value is request.
        fieldName - the field name from which to retrieve the field value.
        Returns:
        a TreeSet of Category field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-6.0.2, jcms-6.1.1
        See Also:
        PortalPolicyFilter.getCategoryFieldValue(JcmsJspContext, String, Data, TreeSet)
      • getDisplayUrl

        public java.lang.String getDisplayUrl​(java.util.Locale locale)
        Return the URL to access this data in the front office.
        If descriptive URLs are enabled in JCMS (DescriptiveURLs) the url will be generated using DescriptiveURLs.getDescriptiveURL(Data, Locale) otherwise, a standard "display.jsp?id=" URL is generated.

        Warning: The return url may or may not contains a query string
        Parameters:
        locale - the Locale to use for I18N and localized operations
        Returns:
        a path relative to the webapp path, (no '/' at begining).
        Since:
        jcms-5.7.0
        See Also:
        JcmsUtil.getDisplayUrl(Data, Locale)
      • getDisplayLink

        public java.lang.String getDisplayLink​(java.util.Locale locale)
        Retrieve an HTML a tag suitable to display this Data
        Parameters:
        locale - the current Locale to use for I18N of the URL and other title information
        Returns:
        an HTML fragment
        Since:
        jcms-7.1.0
      • getDisplayLink

        public java.lang.String getDisplayLink​(java.util.Locale locale,
                                               java.lang.String baseURL)
        Retrieve an HTML a tag suitable to display this Data
        Parameters:
        locale - the current Locale to use for I18N of the URL and other title information
        baseURL - optional baseURL to use in the URL *
        Returns:
        an HTML fragment
        Since:
        jcms-8.0.0
      • getDisplayLink

        public java.lang.String getDisplayLink​(java.util.Locale locale,
                                               java.lang.String baseURL,
                                               java.lang.String params,
                                               java.lang.String anchor,
                                               java.lang.String title,
                                               java.lang.String accessibilityInfo,
                                               java.lang.String css,
                                               java.lang.String htmlAttributes)
        Retrieve an HTML a tag suitable to display this Data
        Parameters:
        locale - the current Locale to use for I18N of the URL and other title information
        baseURL - optional baseURL to use in the URL
        params - optional additionnal params to in the URL (eg foo=bar&zig=42)
        anchor - optional anchor to print in the URL (eg #foobar
        title - the value to use in the title attribute (highly recommended, do not encode)
        css - optional classname to use in the tag
        accessibilityInfo - a string indicating where to print accessibility information of FileDocument : "title" to print them in title attribute, "content" to print them in the body of the a tag, anything else will not print additionnal accessibility information
        htmlAttributes - optional additionnal html attributes to use in the tag (must no be href, title and class)
        Returns:
        an HTML fragment
        Since:
        jcms-7.1.0
      • updateDisplayLinkHtmlAttributes

        public java.lang.StringBuilder updateDisplayLinkHtmlAttributes​(java.lang.StringBuilder builder)
        Returns a StringBuilder which contains html attributes, whom you can modify or replace in your subclasses
        Parameters:
        builder - the StringBuilder
        Returns:
        a StringBuilder which contains html attributes of display link
        Since:
        jcms-10.0.3
      • updateDisplayLinkCss

        public java.lang.StringBuilder updateDisplayLinkCss​(java.lang.StringBuilder builder)
        Returns a StringBuilder which contains css, whom you can modify or replace in your subclasses
        Parameters:
        builder - the StringBuilder
        Returns:
        a StringBuilder which contains css of display link
        Since:
        jcms-10.0.3
      • updateDisplayLinkDataAttribute

        public DataAttribute updateDisplayLinkDataAttribute​(DataAttribute dataAttribute)
        Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclasses
        Parameters:
        dataAttribute - the DataAttribute
        Returns:
        a DataAttribute which contains data attributes of display link
        Since:
        jcms-10.0.3
      • printDisplayLinkStart

        public void printDisplayLinkStart​(java.lang.StringBuilder sb,
                                          java.util.Locale locale,
                                          java.lang.String baseURL,
                                          java.lang.String params,
                                          java.lang.String anchor,
                                          java.lang.String title,
                                          java.lang.String accessibilityInfo,
                                          java.lang.String css,
                                          java.lang.String htmlAttributes,
                                          javax.servlet.http.HttpServletRequest request,
                                          boolean update,
                                          java.lang.String[] paramNames,
                                          java.lang.String[] paramValues,
                                          java.lang.String[] paramRemove)
        Print opening tag <a... href attribute with URL and other attributes.
        Parameters:
        sb - the StringBuilder in which start of a tag will be appended
        locale - the user Locale
        baseURL - optional baseURL to use in the URL
        params - optional additionnal params to in the URL (eg foo=bar&zig=42)
        anchor - optional anchor to print in the URL (eg #foobar
        title - the value to use in the title attribute (highly recommended, do not encode)
        accessibilityInfo - a string indicating where to print accessibility information of FileDocument : "title" to print them in title attribute, anything else will not print additionnal accessibility information
        css - optional classname to use in the tag
        htmlAttributes - optional additionnal html attributes to use in the tag (must no be href, title and class)
        request - the HttpRequest. Requested if update or paramNames is provided.
        update - specify this parameter to true to generate a display URL for the given data while keeping all the current others parameters.
        paramNames - optional request parameters names to be updated from the current request parameters. You must specify the 'values' attributes with an array of the same dimension. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        paramValues - Request parameters values to be updated from the current request parameters. This array must match the correponding names array specified in the 'names' attribute. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        paramRemove - Request parameters names to be removed from the current request parameters. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        Since:
        jcms-7.1.0 (was in LinkTag before)
      • printDisplayLinkStart

        public void printDisplayLinkStart​(java.lang.StringBuilder sb,
                                          java.util.Locale locale,
                                          java.lang.String baseURL,
                                          java.lang.String params,
                                          java.lang.String anchor,
                                          java.lang.String title,
                                          java.lang.String accessibilityInfo,
                                          java.lang.String css,
                                          java.lang.String htmlAttributes,
                                          DataAttribute dataAttribute,
                                          javax.servlet.http.HttpServletRequest request,
                                          boolean update,
                                          java.lang.String[] paramNames,
                                          java.lang.String[] paramValues,
                                          java.lang.String[] paramRemove)
        Print opening tag <a... href attribute with URL and other attributes.
        Parameters:
        sb - the StringBuilder in which start of a tag will be appended
        locale - the user Locale
        baseURL - optional baseURL to use in the URL
        params - optional additionnal params to in the URL (eg foo=bar&zig=42)
        anchor - optional anchor to print in the URL (eg #foobar
        title - the value to use in the title attribute (highly recommended, do not encode)
        accessibilityInfo - a string indicating where to print accessibility information of FileDocument : "title" to print them in title attribute, anything else will not print additionnal accessibility information
        css - optional classname to use in the tag
        htmlAttributes - optional additionnal html attributes to use in the tag (must no be href, title and class)
        dataAttribute - optional additionnal data attributes to use in the tag
        request - the HttpRequest. Requested if update or paramNames is provided.
        update - specify this parameter to true to generate a display URL for the given data while keeping all the current others parameters.
        paramNames - optional request parameters names to be updated from the current request parameters. You must specify the 'values' attributes with an array of the same dimension. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        paramValues - Request parameters values to be updated from the current request parameters. This array must match the correponding names array specified in the 'names' attribute. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        paramRemove - Request parameters names to be removed from the current request parameters. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        Since:
        jcms-7.1.0 (was in LinkTag before)
      • getDisplayLinkHtmlAttributes

        public java.lang.String getDisplayLinkHtmlAttributes()
        Returns:
        the html attributes for display link of current Data
        Since:
        jcms-10.0.3
      • getDisplayLinkCss

        public java.lang.String getDisplayLinkCss()
        Returns:
        the css classes for display link of current Data
        Since:
        jcms-10.0.3
      • getDisplayLinkDataAttribute

        public DataAttribute getDisplayLinkDataAttribute()
        Returns:
        the DataAttribute for display link of current Data
        Since:
        jcms-10.0.3
      • printDataName

        public void printDataName​(java.lang.StringBuilder sb,
                                  java.util.Locale locale,
                                  java.lang.String accessibilityInfo)
        Print the data name in the specified StringBuilder.
        Parameters:
        sb - the StringBuilder
        locale - the user Locale
        accessibilityInfo - if "content" print accessibility info for FileDocument
        Since:
        jcms-7.1.0 (was in LinkTag before)
      • printDisplayLinkEnd

        public void printDisplayLinkEnd​(java.lang.StringBuilder sb)
        Print closing tag </a>.
        Parameters:
        sb - the StringBuilder
        Since:
        jcms-7.1.0 (was in LinkTag before)
      • printDisplayUrl

        public void printDisplayUrl​(java.lang.StringBuilder sb,
                                    java.util.Locale locale,
                                    java.lang.String baseURL,
                                    java.lang.String params,
                                    java.lang.String anchor)
        Prints URL using parameter of this tag.
        Parameters:
        sb - the StringBuilder
        locale - the user Locale
        baseURL - optional baseURL to use in the URL
        params - optional additionnal params to in the URL (eg foo=bar&zig=42)
        anchor - optional anchor to print in the URL (eg #foobar
        Since:
        jcms-7.1.0 (was in LinkTag before)
      • printDisplayUrl

        public void printDisplayUrl​(java.lang.StringBuilder sb,
                                    java.util.Locale locale,
                                    java.lang.String baseURL,
                                    java.lang.String params,
                                    java.lang.String anchor,
                                    javax.servlet.http.HttpServletRequest request,
                                    boolean update,
                                    java.lang.String[] paramNames,
                                    java.lang.String[] paramValues,
                                    java.lang.String[] paramRemove)
        Prints URL using parameter of this tag.
        Parameters:
        sb - the StringBuilder
        locale - the user Locale
        baseURL - optional baseURL to use in the URL
        params - optional additionnal params to in the URL (eg foo=bar&zig=42)
        anchor - optional anchor to print in the URL (eg #foobar
        request - the HttpRequest. Requested if update or paramNames is provided.
        update - specify this parameter to true to generate a display URL for the given data while keeping all the current others parameters.
        paramNames - optional request parameters names to be updated from the current request parameters. You must specify the 'values' attributes with an array of the same dimension. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        paramValues - Request parameters values to be updated from the current request parameters. This array must match the correponding names array specified in the 'names' attribute. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        paramRemove - Request parameters names to be removed from the current request parameters. Trigger the same url generation behavior as when specifying the 'update' attribute to true.
        Since:
        jcms-7.1.0 (was in LinkTag before)
      • getDataIcon

        public java.lang.String getDataIcon()
        Returns source information for the icon associated to this Data, either a relative path or sprite classes name.

        If this method behavior has not been overriden by subclass, the default icon can be declared using property types.{Type}.icon, where {Type} is the short class name of the type concerned.

        • Either by specifying a relative image path :
          types.Article.icon: images/jalios/icon/abstract.gif 
        • or else by using a sprite icon :
          types.Article.icon: ss_sprite ss_date
        Returns:
        a relative path (eg images/jalios/icon/abstract.gif) or sprite classes name (eg ss_sprite ss_date).
        Since:
        jcms-8.0.0
        See Also:
        getDataIconHtml(String)
      • getDataIconAlt

        public java.lang.String getDataIconAlt​(java.lang.String lang)
        Returns the alternative text (alt attribute) to use in the HTML IMG tag of this Data's icon.

        If this method behavior has not been overriden by subclass, the default alternative text can be declared using language property types.{Type}.alt, where {Type} is the short class name of the type concerned.

        For example :

        • [en.prop] types.Workspace.alt: Workspace
        • [fr.prop] types.Workspace.alt: Espace de travail
        Parameters:
        lang - the user language
        Returns:
        the alt Html attribute for the IMG Html tag, or empty string if non alternative text was define in property.
        Since:
        jcms-8.0.0
        See Also:
        getDataIconHtml(String)
      • getDataIconTitle

        public java.lang.String getDataIconTitle​(java.lang.String lang)
        Returns the icon's tooltip.

        If this method behavior has not been overriden by subclass, the default alternative text can be declared using language property types.{Type}.title, where {Type} is the short class name of the type concerned.

        Parameters:
        lang - the user language.
        Returns:
        the title Html attribute for the IMG Html tag
        Since:
        jcms-8.0.0
        See Also:
        getDataIconHtml(String)
      • getDataIconCSS

        public java.lang.String getDataIconCSS()
        Returns the CSS for the data icon.
        Returns:
        the CSS for the data icon.
        Since:
        jcms-9.0.0
      • getRowId

        public java.lang.Long getRowId()
        Returns the value of rowId (DBData ID).
        Returns:
        the value of rowId (DBData ID).
        Since:
        jcms-6.0.0
      • setRowId

        public void setRowId​(java.lang.Long rowId)
        Sets the value of rowId (DBData ID).
        Parameters:
        rowId - the rowId
        Since:
        jcms-6.0.0
      • getAuthorId

        public java.lang.String getAuthorId()
        Returns the JStore ID of the author (only for DBData)
        Returns:
        the JStore ID of the author (only for DBData)
        Since:
        jcms-6.0.0
      • setAuthorId

        public void setAuthorId​(java.lang.String authorId)
        Sets the JStore ID of the author (only for DBData).

        If the specified authorId is an invalid ID (non existing Member), the author will be set to the Member specified by property channel.default-author (or left null if this property has not been set).

        Parameters:
        authorId - the JStore author id
        Since:
        jcms-6.0.0
      • isDBData

        public boolean isDBData()
        Returns true if this objet is an instance of DBData.
        Returns:
        true if this objet is an instance of DBData.
        Since:
        jcms-6.2.0
      • isInDatabase

        public boolean isInDatabase()
        Returns true if this data is stored in the database (false if it is stored in JStore).
        Returns:
        true if this data is stored in the database (false if it is stored in JStore).
        Since:
        jcms-6.0.0
      • isPersisted

        public boolean isPersisted()
        Returns true if this data has been persisted (either in JStore or in the database).
        Returns:
        true if this data has been persisted (either in JStore or in the database).
        Since:
        jcms-6.0.0
      • setId

        public void setId​(java.lang.String id)
        Description copied from class: BasicStorable
        Set the value of id.
        Specified by:
        setId in interface Storable
        Overrides:
        setId in class BasicStorable
        Parameters:
        id - Value to assign to id.
      • mergeHybridLink

        protected <T extends Data> T[] mergeHybridLink​(java.lang.Class<T> clazz,
                                                       T[] storableArray,
                                                       java.lang.String[] dbidArray)
        Returns the merge from the given array of storable with the given array of DBID.
        Type Parameters:
        T - Any Data type
        Parameters:
        clazz - the class of the data contains in the returned array.
        storableArray - the array of storable data
        dbidArray - the array of DBID
        Returns:
        the merge from the given array of storable with the given array of DBID.
        Since:
        jcms-6.1.0
      • mergeHybridLink

        protected <T extends Data> java.util.Set<T> mergeHybridLink​(java.lang.Class<T> clazz,
                                                                    java.util.Set<? extends Data> storableSet,
                                                                    java.util.Set<java.lang.String> dbidSet)
        Returns the merge from the given set of storable with the given set of DBID.
        Type Parameters:
        T - Any Data type
        Parameters:
        clazz - the class of the data contains in the returned array.
        storableSet - the set of storable
        dbidSet - the set of DBID
        Returns:
        the merge from the given set of storable with the given set of DBID.
        Since:
        jcms-10.0.1
      • computeDBIDArray

        protected java.lang.String[] computeDBIDArray​(Data[] dataArray)
        Extract the DBData from the given array and return an array of identifier of those DBData. The given array is cleaned.
        Parameters:
        dataArray - the array to clean.
        Returns:
        an array of DBID
        Since:
        jcms-6.1.0
      • cleanHybridCollection

        protected void cleanHybridCollection​(Data[] array)
      • computeDBIDSet

        protected java.util.HashSet<java.lang.String> computeDBIDSet​(java.util.Set<? extends Data> dataSet)
        Extract and remove the DBData from the given set and return a set of identifier of those DBData. The given set is cleaned.
        Parameters:
        dataSet - the set to extract the DBData.
        Returns:
        a set of DBID
        Since:
        jcms-10.0.1
      • cleanHybridCollection

        protected void cleanHybridCollection​(java.util.Set<? extends Data> set)
      • computeDBIDList

        protected java.util.ArrayList<java.lang.String> computeDBIDList​(java.util.List<? extends Data> dataList)
        Extract and remove the DBData from the given list and return a list of identifier of those DBData. The given set is cleaned.
        Parameters:
        dataList - the list to extract the DBData.
        Returns:
        a list of DBID
        Since:
        jcms-10.0.1
      • cleanHybridCollection

        protected void cleanHybridCollection​(java.util.List<? extends Data> list)
      • initializeDBDataCollections

        public void initializeDBDataCollections()
        This methods force the collections of the DBData to be initialized()
        Since:
        jcms-6.2.0