Class TypeSettings

    • Constructor Detail

      • TypeSettings

        public TypeSettings()
    • Method Detail

      • getThis

        protected TypeSettings getThis()
        Description copied from class: BasicSettings
        Returns the exact type of the this reference.
        It's a way to recover the type of the this object in a class hierarchy (cf. getThis "trick").
        Specified by:
        getThis in class BasicSettings<TypeSettings>
        Returns:
        The exact type of the this reference
      • superType

        public TypeSettings superType​(java.util.Collection<java.lang.Class<? extends Publication>> clazzes)
        Specify the super type to filter the Publication.
        Parameters:
        clazzes - Class of super type
        Returns:
        a reference to this object - used to chain calls
      • superType

        public TypeSettings superType​(java.lang.Class<? extends Publication>... clazzes)
        Specify the super type to filter the Publication.
        Parameters:
        clazzes - an array of Class
        Returns:
        a reference to this object - used to chain calls
      • superType

        public TypeSettings superType​(java.lang.Class<? extends Publication> clazz)
        Specify the super type to filter the Publication.
        Parameters:
        clazz - Class of super type
        Returns:
        a reference to this object - used to chain calls
      • multiple

        public TypeSettings multiple()
        Specify whether multiple items can be selected.
        Returns:
        a reference to this object - used to chain calls
      • uniqueValue

        public TypeSettings uniqueValue​(java.lang.String separator)
        Specify this if you need an unique input when using multiple case
        Parameters:
        separator - the separator between id values
        Returns:
        a reference to this object - used to chain calls
      • getUniqueValue

        public static java.lang.String getUniqueValue​(java.util.List<java.lang.String> values,
                                                      java.lang.String separator)
        Parameters:
        values - the List of values
        separator - the separator between values
        Returns:
        the unique value based on List of values and separator
      • workspace

        public TypeSettings workspace​(Workspace workspace)
        Sets the workspace, publish rights will be checked to filter types
        Parameters:
        workspace - the Workspace
        Returns:
        a reference to this object - used to chain calls
      • superType

        public TypeSettings superType​(java.lang.String className)
        Specify the super type to filter the Publications.
        Parameters:
        className - Class name of super type
        Returns:
        a reference to this object - used to chain calls
      • superType

        public TypeSettings superType​(java.lang.String... classNames)
        Specify the super type to filter the Publications.
        Parameters:
        classNames - Class name of super type
        Returns:
        a reference to this object - used to chain calls
      • types

        public TypeSettings types​(java.lang.Class<? extends Publication>... types)
        Parameters:
        types - an array of types
        Returns:
        a reference to this object - used to chain calls
      • types

        public TypeSettings types​(java.util.Collection<java.lang.Class<? extends Publication>> types)
        Parameters:
        types - a collection of types
        Returns:
        a reference to this object - used to chain calls
      • acceptSuperType

        public TypeSettings acceptSuperType()
        Returns:
        a reference to this object - used to chain calls
      • getTypes

        public static java.util.Set<java.lang.Class> getTypes​(java.lang.Class superClass,
                                                              Workspace workspace,
                                                              java.lang.String userLang,
                                                              boolean acceptSuperType)
        Parameters:
        superClass - the superClass
        workspace - the Workspace
        userLang - the user lang
        acceptSuperType - if superType should be removed from the list
        Returns:
        a sorted set of classes based on given parameters
      • getClassValues

        public static java.util.Set<java.lang.Class<? extends Publication>> getClassValues​(java.util.List<java.lang.String> fieldValues)
      • getClassValues

        public static java.util.Set<java.lang.Class<? extends Publication>> getClassValues​(java.util.List<java.lang.String> fieldValues,
                                                                                           java.lang.String fieldValue,
                                                                                           java.lang.String separator)
      • addFrontEndDependencies

        public static void addFrontEndDependencies​(JcmsJspContext context)
      • addCustomOptions

        public TypeSettings addCustomOptions​(java.util.Map<java.lang.String,​java.lang.Object> options)
      • buildOptions

        public static java.lang.String buildOptions​(java.util.Map<java.lang.String,​java.lang.Object> options)
      • getPlaceHolderDefaultProp

        public static java.lang.String getPlaceHolderDefaultProp​(java.lang.Class superClass)