Class DataExtension

    • Field Detail

      • extendedData

        protected transient Data extendedData
    • Constructor Detail

      • DataExtension

        public DataExtension()
    • Method Detail

      • getExtendedData

        public Data getExtendedData()
        Get the value of extendedData.
        Returns:
        Value of extendedData.
      • setExtendedData

        public void setExtendedData​(Data v)
        Set the value of extendedData.
        Parameters:
        v - Value to assign to extendedData.
      • duplicate

        public static DataExtension duplicate​(DataExtension ext,
                                              Member mbr)
        Duplicate the given extension and create it in the store
        Parameters:
        ext - the extension to be duplicated
        mbr - the member which requests the write operation
        Returns:
        the duplicated extension or null if the ext == null.
        Since:
        jcms-5.0.0
      • getFieldInMainLanguage

        public java.lang.Object getFieldInMainLanguage​(java.lang.Object field,
                                                       java.util.HashMap fieldML)
      • getMainLanguage

        public java.lang.String getMainLanguage()
        Get main language of the extended Data.
        If the extended data is a publication return its main language, otherwise use the channel default language.
        Returns:
        value of main language.
      • isDataExtension

        public static boolean isDataExtension​(java.lang.Class<?> clazz)
        Checks if the specified clazz in a DataExtension class.

        Example :

        • isDataExtension(Member.class) returns false
        • isDataExtension(MemberExtension.class) returns true
        Parameters:
        clazz - the Class to check
        Returns:
        true if the class is a DataExension, false otherwise
      • getExtendedClass

        public static java.lang.Class<?> getExtendedClass​(java.lang.Class<?> dataExtensionClass)
        Retrieves the Class of the Data being extend by the specified Class.

        Example : getExtendedClass(MemberExtension.class) returns Member.class

        Parameters:
        dataExtensionClass - the Class of the DataExtension
        Returns:
        the extended Class, or null if the extended class could not be found.