Class TypeSettings
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<TypeSettings>
-
- com.jalios.jcms.taglib.settings.impl.TypeSettings
-
- All Implemented Interfaces:
ControlSettings<TypeSettings>,java.lang.Cloneable
public class TypeSettings extends BasicSettings<TypeSettings>
Hidden Settings
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACCEPT_SUPER_TYPEstatic java.lang.StringIS_UNIQUE_VALUEstatic java.lang.StringMULTIPLEstatic java.lang.StringOPTIONSstatic java.lang.StringSUPER_TYPEstatic java.lang.StringSUPER_TYPESstatic java.lang.StringTYPESstatic java.lang.StringUNIQUE_VALUE_NAMEstatic java.lang.StringUNIQUE_VALUE_SEPARATORstatic java.lang.StringWORKSPACE-
Fields inherited from class com.jalios.jcms.taglib.settings.BasicSettings
APPEND, ARIA_ATTR_PREFIX, ARIA_ATTRIBUTES, AUTOFOCUS, CLEAR_BUTTON, CSS, DATA_ATTR_PREFIX, DATA_ATTRIBUTES, DISABLED, HIDE_CLEAR_BUTTON, HTML_ATTRIBUTES, ID, LANGUAGE_CHOOSER, MAX_LENGTH, NAME, PLACEHOLDER, PREPEND, READONLY, REQUIRED, TITLE, TRIGGER_ACTION, TRIGGER_EVENT, VALUE
-
-
Constructor Summary
Constructors Constructor Description TypeSettings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeSettingsacceptSuperType()TypeSettingsaddCustomOptions(java.util.Map<java.lang.String,java.lang.Object> options)static voidaddFrontEndDependencies(JcmsJspContext context)static java.lang.StringbuildOptions(java.util.Map<java.lang.String,java.lang.Object> options)static java.util.Set<java.lang.Class<? extends Publication>>getClassValues(java.util.List<java.lang.String> fieldValues)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)<V> VgetOption(java.lang.String optionName)Returns the value of the specified option.static java.lang.StringgetPlaceHolderDefaultProp(java.lang.Class superClass)protected TypeSettingsgetThis()Returns the exact type of the this reference.
It's a way to recover the type of thethisobject in a class hierarchy (cf.ControlTypegetType()Returns theControlTyperelated to the currentControlSettingsimplementation.static java.util.Set<java.lang.Class>getTypes(java.lang.Class superClass, Workspace workspace, java.lang.String userLang, boolean acceptSuperType)static java.lang.StringgetUniqueValue(java.util.List<java.lang.String> values, java.lang.String separator)TypeSettingsmultiple()Specify whether multiple items can be selected.voidresolveOptions(TypeFieldEntry tfe)Set options from the specifiedTypeFieldEntry.static booleanshowAllPublicationTypesOption(java.util.List<java.lang.Class<? extends Publication>> superTypeClasses, boolean acceptSuperType)TypeSettingssuperType(java.lang.Class<? extends Publication> clazz)Specify the super type to filter the Publication.TypeSettingssuperType(java.lang.Class<? extends Publication>... clazzes)Specify the super type to filter the Publication.TypeSettingssuperType(java.lang.String className)Specify the super type to filter the Publications.TypeSettingssuperType(java.lang.String... classNames)Specify the super type to filter the Publications.TypeSettingssuperType(java.util.Collection<java.lang.Class<? extends Publication>> clazzes)Specify the super type to filter the Publication.TypeSettingstypes(java.lang.Class<? extends Publication>... types)TypeSettingstypes(java.util.Collection<java.lang.Class<? extends Publication>> types)TypeSettingsuniqueValue(java.lang.String separator)Specify this if you need an unique input when using multiple caseTypeSettingsworkspace(Workspace workspace)Sets the workspace, publish rights will be checked to filter types-
Methods inherited from class com.jalios.jcms.taglib.settings.BasicSettings
addOption, append, aria, aria, autofocus, clearOption, clone, css, dataAttribute, dataAttribute, dataAttributes, disable, getOptionNames, htmlAttributes, htmlAttributes, id, isChannelReady, maxLength, merge, name, onChange, onFocusOut, placeholder, prepend, readonly, removeOption, require, showLanguageChooser, sortSet, title, toStringArray, toStringArray, toStringArray, toStringArray, toStringArray, trigger, value
-
-
-
-
Field Detail
-
SUPER_TYPE
public static final java.lang.String SUPER_TYPE
- See Also:
- Constant Field Values
-
SUPER_TYPES
public static final java.lang.String SUPER_TYPES
- See Also:
- Constant Field Values
-
TYPES
public static final java.lang.String TYPES
- See Also:
- Constant Field Values
-
MULTIPLE
public static final java.lang.String MULTIPLE
- See Also:
- Constant Field Values
-
WORKSPACE
public static final java.lang.String WORKSPACE
- See Also:
- Constant Field Values
-
OPTIONS
public static final java.lang.String OPTIONS
- See Also:
- Constant Field Values
-
ACCEPT_SUPER_TYPE
public static final java.lang.String ACCEPT_SUPER_TYPE
- See Also:
- Constant Field Values
-
UNIQUE_VALUE_NAME
public static final java.lang.String UNIQUE_VALUE_NAME
- See Also:
- Constant Field Values
-
UNIQUE_VALUE_SEPARATOR
public static final java.lang.String UNIQUE_VALUE_SEPARATOR
- See Also:
- Constant Field Values
-
IS_UNIQUE_VALUE
public static final java.lang.String IS_UNIQUE_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public ControlType getType()
Description copied from interface:ControlSettingsReturns theControlTyperelated to the currentControlSettingsimplementation.- Returns:
ControlType
-
getThis
protected TypeSettings getThis()
Description copied from class:BasicSettingsReturns the exact type of the this reference.
It's a way to recover the type of thethisobject in a class hierarchy (cf. getThis "trick").- Specified by:
getThisin classBasicSettings<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 valuesseparator- 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- theWorkspace- 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 superClassworkspace- theWorkspaceuserLang- the user langacceptSuperType- 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)
-
getOption
public <V> V getOption(java.lang.String optionName)
Description copied from interface:ControlSettingsReturns the value of the specified option.- Specified by:
getOptionin interfaceControlSettings<TypeSettings>- Overrides:
getOptionin classBasicSettings<TypeSettings>- Parameters:
optionName- Option name- Returns:
- Option value
-
getPlaceHolderDefaultProp
public static java.lang.String getPlaceHolderDefaultProp(java.lang.Class superClass)
-
showAllPublicationTypesOption
public static boolean showAllPublicationTypesOption(java.util.List<java.lang.Class<? extends Publication>> superTypeClasses, boolean acceptSuperType)
-
resolveOptions
public void resolveOptions(TypeFieldEntry tfe)
Description copied from interface:ControlSettingsSet options from the specifiedTypeFieldEntry.- Specified by:
resolveOptionsin interfaceControlSettings<TypeSettings>- Overrides:
resolveOptionsin classBasicSettings<TypeSettings>- Parameters:
tfe-TypeFieldEntry
-
-