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.String
ACCEPT_SUPER_TYPE
static java.lang.String
IS_UNIQUE_VALUE
static java.lang.String
MULTIPLE
static java.lang.String
OPTIONS
static java.lang.String
SUPER_TYPE
static java.lang.String
SUPER_TYPES
static java.lang.String
TYPES
static java.lang.String
UNIQUE_VALUE_NAME
static java.lang.String
UNIQUE_VALUE_SEPARATOR
static java.lang.String
WORKSPACE
-
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 TypeSettings
acceptSuperType()
TypeSettings
addCustomOptions(java.util.Map<java.lang.String,java.lang.Object> options)
static void
addFrontEndDependencies(JcmsJspContext context)
static java.lang.String
buildOptions(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> V
getOption(java.lang.String optionName)
Returns the value of the specified option.static java.lang.String
getPlaceHolderDefaultProp(java.lang.Class superClass)
protected TypeSettings
getThis()
Returns the exact type of the this reference.
It's a way to recover the type of thethis
object in a class hierarchy (cf.ControlType
getType()
Returns theControlType
related to the currentControlSettings
implementation.static java.util.Set<java.lang.Class>
getTypes(java.lang.Class superClass, Workspace workspace, java.lang.String userLang, boolean acceptSuperType)
static java.lang.String
getUniqueValue(java.util.List<java.lang.String> values, java.lang.String separator)
TypeSettings
multiple()
Specify whether multiple items can be selected.void
resolveOptions(TypeFieldEntry tfe)
Set options from the specifiedTypeFieldEntry
.TypeSettings
superType(java.lang.Class<? extends Publication> clazz)
Specify the super type to filter the Publication.TypeSettings
superType(java.lang.Class<? extends Publication>... clazzes)
Specify the super type to filter the Publication.TypeSettings
superType(java.lang.String className)
Specify the super type to filter the Publications.TypeSettings
superType(java.lang.String... classNames)
Specify the super type to filter the Publications.TypeSettings
superType(java.util.Collection<java.lang.Class<? extends Publication>> clazzes)
Specify the super type to filter the Publication.TypeSettings
types(java.lang.Class<? extends Publication>... types)
TypeSettings
types(java.util.Collection<java.lang.Class<? extends Publication>> types)
TypeSettings
uniqueValue(java.lang.String separator)
Specify this if you need an unique input when using multiple caseTypeSettings
workspace(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, 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:ControlSettings
Returns theControlType
related to the currentControlSettings
implementation.- Returns:
ControlType
-
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 thethis
object in a class hierarchy (cf. getThis "trick").- Specified by:
getThis
in 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
- theWorkspace
userLang
- 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:ControlSettings
Returns the value of the specified option.- Specified by:
getOption
in interfaceControlSettings<TypeSettings>
- Overrides:
getOption
in classBasicSettings<TypeSettings>
- Parameters:
optionName
- Option name- Returns:
- Option value
-
getPlaceHolderDefaultProp
public static java.lang.String getPlaceHolderDefaultProp(java.lang.Class superClass)
-
resolveOptions
public void resolveOptions(TypeFieldEntry tfe)
Description copied from interface:ControlSettings
Set options from the specifiedTypeFieldEntry
.- Specified by:
resolveOptions
in interfaceControlSettings<TypeSettings>
- Overrides:
resolveOptions
in classBasicSettings<TypeSettings>
- Parameters:
tfe
-TypeFieldEntry
-
-