Class PublicationSettings
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<T>
-
- com.jalios.jcms.taglib.settings.SelectorSettings<T>
-
- com.jalios.jcms.taglib.settings.AbstractChooserSettings<T>
-
- com.jalios.jcms.taglib.settings.AbstractDataSettings<PublicationSettings>
-
- com.jalios.jcms.taglib.settings.impl.PublicationSettings
-
- All Implemented Interfaces:
ControlSettings<PublicationSettings>
,java.lang.Cloneable
public class PublicationSettings extends AbstractDataSettings<PublicationSettings>
Publication Settings- Author:
- Nicolas Dos Santos
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jalios.jcms.taglib.settings.SelectorSettings
SelectorSettings.SelectMode, SelectorSettings.SelectorType
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CATEGORIES
static java.lang.String
DOCUMENT_KINDS
static java.lang.String
DROPDOWN_DISABLED
static java.lang.String
EXACT_TYPE
static java.lang.String
FILE_INPUT_DISABLED
static java.lang.String
FILE_INPUT_ENABLED
static java.lang.String
NO_WORKSPACE_FILTER
static java.lang.String
PSTATUS
static java.lang.String
SUPER_TYPE
static java.lang.String
SUPER_TYPE_CLASS
-
Fields inherited from class com.jalios.jcms.taglib.settings.AbstractDataSettings
DATA_CLASS
-
Fields inherited from class com.jalios.jcms.taglib.settings.SelectorSettings
ENABLE_SEARCH, ENUM_DATA_ATTRIBUTES, ENUM_LABEL_APPENDS, ENUM_LABEL_PREPENDS, ENUM_LABELS, ENUM_VALUES, INLINE, MULTIPLE, REQUIRED, SELECT_ITEM_EMPTY_VALUE, SELECT_ITEM_EMPTY_VALUE_LABEL, SELECTOR_TYPE
-
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, TITLE, TRIGGER_ACTION, TRIGGER_EVENT, VALUE
-
-
Constructor Summary
Constructors Constructor Description PublicationSettings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicationSettings
category(Category[] categories)
Specify the categories to filter the Publications.PublicationSettings
category(Category category, Category... otherCategories)
Specify the categories to filter the Publications.PublicationSettings
category(java.lang.String[] categoryIds)
Specify the categories to filter the Publications.PublicationSettings
category(java.lang.String categoryId, java.lang.String... otherCategoryIds)
Specify the categories to filter the Publications.PublicationSettings
category(java.util.Collection<Category> categories)
Specify the categories to filter the Publications.PublicationSettings
clone()
Clone the current ControlSettings.PublicationSettings
disableDropdown()
Specify whether the dropdown menu is disabled.PublicationSettings
disableFileInput()
Specify whether the file input is disabled for Publications of type FileDocument.PublicationSettings
documentKinds(java.lang.String[] documentKinds)
Specify the document kinds to filter the Publications.PublicationSettings
documentKinds(java.lang.String documentKinds, java.lang.String... otherDocumentKinds)
PublicationSettings
documentKinds(java.util.Collection<java.lang.String> documentKinds)
Specify the document kinds to filter the Publications.PublicationSettings
enableFileInput()
Specify whether the file input is enabled for Publications of type FileDocument.PublicationSettings
exactType()
Specify whether it only retrieves Publications of the type defined by the superType, and not child classes.protected java.lang.String
getChooserIcon()
Property key whose value corresponds to the icon used for the chooser button.protected java.lang.String
getChooserName()
Chooser name used by the databroker when there is a click event in the chooser button.protected java.lang.String
getChooserOption(java.util.Map<java.lang.String,java.lang.String[]> customOptionMap)
Options used by the databroker when there is a click event in the chooser button.java.lang.Class<? extends Data>
getDataClass()
Data class supported by the currentControlSettings
static java.util.List<java.lang.String>
getDocumentKindsList()
Returns the list of document kinds defined in the properties.<V> V
getOption(java.lang.String optionName)
Returns the value of the specified option.protected PublicationSettings
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.PublicationSettings
noWorkspaceFilter()
Specify whether we don't filter on Workspace.PublicationSettings
pstatus(int pstatus)
Specify the pstatus to filter the Publications.void
resolveOptions(TypeFieldEntry tfe)
Set options from the specifiedTypeFieldEntry
.PublicationSettings
superType(java.lang.Class<?> clazz)
Specify the super type to filter the Publication.PublicationSettings
superType(java.lang.String className)
Specify the super type to filter the Publications.protected boolean
useCurrentWorkspace()
Override this method and return 'true' to add current Workspace in chooser option if not defined by WORKSPACE option.-
Methods inherited from class com.jalios.jcms.taglib.settings.AbstractChooserSettings
addAcChooserOption, addChooserOption, getAcChooserName, getAcChooserOption, getChooserTitle, popupHeight, popupWidth, superGetOption, workspace, workspace
-
Methods inherited from class com.jalios.jcms.taglib.settings.SelectorSettings
checkbox, chooser, disableInline, emptyValueLabel, enumDataAttribute, enumLabelAppends, enumLabelAppends, enumLabelAppends, enumLabelPreprends, enumLabelPreprends, enumLabelPreprends, enumLabels, enumLabels, enumLabels, enumValues, enumValues, enumValues, inline, multiple, radio, required, select, select, selectorType, single
-
Methods inherited from class com.jalios.jcms.taglib.settings.BasicSettings
addOption, append, aria, aria, autofocus, clearOption, 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_TYPE_CLASS
public static final java.lang.String SUPER_TYPE_CLASS
- See Also:
- Constant Field Values
-
PSTATUS
public static final java.lang.String PSTATUS
- See Also:
- Constant Field Values
-
CATEGORIES
public static final java.lang.String CATEGORIES
- See Also:
- Constant Field Values
-
NO_WORKSPACE_FILTER
public static final java.lang.String NO_WORKSPACE_FILTER
- See Also:
- Constant Field Values
-
DOCUMENT_KINDS
public static final java.lang.String DOCUMENT_KINDS
- See Also:
- Constant Field Values
-
EXACT_TYPE
public static final java.lang.String EXACT_TYPE
- See Also:
- Constant Field Values
-
FILE_INPUT_DISABLED
public static final java.lang.String FILE_INPUT_DISABLED
- See Also:
- Constant Field Values
-
FILE_INPUT_ENABLED
public static final java.lang.String FILE_INPUT_ENABLED
- See Also:
- Constant Field Values
-
DROPDOWN_DISABLED
public static final java.lang.String DROPDOWN_DISABLED
- 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 PublicationSettings 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<PublicationSettings>
- Returns:
- The exact type of the this reference
-
getDataClass
public java.lang.Class<? extends Data> getDataClass()
Description copied from class:AbstractDataSettings
Data class supported by the currentControlSettings
- Specified by:
getDataClass
in classAbstractDataSettings<PublicationSettings>
- Returns:
- The
Data
class
-
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<PublicationSettings>
- Overrides:
getOption
in classAbstractDataSettings<PublicationSettings>
- Parameters:
optionName
- Option name- Returns:
- Option value
-
resolveOptions
public void resolveOptions(TypeFieldEntry tfe)
Description copied from interface:ControlSettings
Set options from the specifiedTypeFieldEntry
.- Specified by:
resolveOptions
in interfaceControlSettings<PublicationSettings>
- Overrides:
resolveOptions
in classSelectorSettings<PublicationSettings>
- Parameters:
tfe
-TypeFieldEntry
-
getChooserName
protected java.lang.String getChooserName()
Description copied from class:AbstractChooserSettings
Chooser name used by the databroker when there is a click event in the chooser button.- Specified by:
getChooserName
in classAbstractChooserSettings<PublicationSettings>
- Returns:
- The chooser name
- See Also:
- "/js/jalios/core/jalios-widget-chooser.js"
-
getChooserOption
protected java.lang.String getChooserOption(java.util.Map<java.lang.String,java.lang.String[]> customOptionMap)
Description copied from class:AbstractChooserSettings
Options used by the databroker when there is a click event in the chooser button.- Overrides:
getChooserOption
in classAbstractDataSettings<PublicationSettings>
- Parameters:
customOptionMap
- Extra chooser options forwarded by the optionChooserConstants.EXTRA_CHOOSER_OPTION
and appended to the query string- Returns:
String
representing the options as query string
-
getChooserIcon
protected java.lang.String getChooserIcon()
Description copied from class:AbstractChooserSettings
Property key whose value corresponds to the icon used for the chooser button.Example:
If we declare the following icon property:icon.chooser-publication: glyph: icomoon-file-text2
chooser-publication
- Overrides:
getChooserIcon
in classAbstractChooserSettings<PublicationSettings>
- Returns:
- Property key representing the chooser button icon
-
useCurrentWorkspace
protected boolean useCurrentWorkspace()
Description copied from class:AbstractChooserSettings
Override this method and return 'true' to add current Workspace in chooser option if not defined by WORKSPACE option.- Overrides:
useCurrentWorkspace
in classAbstractChooserSettings<PublicationSettings>
- Returns:
true
to use the current workspace,false
instead
-
clone
public PublicationSettings clone() throws java.lang.CloneNotSupportedException
Description copied from interface:ControlSettings
Clone the current ControlSettings.- Specified by:
clone
in interfaceControlSettings<PublicationSettings>
- Overrides:
clone
in classBasicSettings<PublicationSettings>
- Returns:
- the new cloned ControlSettings
- Throws:
java.lang.CloneNotSupportedException
-
superType
public PublicationSettings superType(java.lang.Class<?> 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
-
superType
public PublicationSettings 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
-
pstatus
public PublicationSettings pstatus(int pstatus)
Specify the pstatus to filter the Publications.- Parameters:
pstatus
- pstatus- Returns:
- a reference to this object - used to chain calls
-
category
public PublicationSettings category(java.lang.String[] categoryIds)
Specify the categories to filter the Publications.- Parameters:
categoryIds
- IDs ofCategory
objects- Returns:
- a reference to this object - used to chain calls
-
category
public PublicationSettings category(Category[] categories)
Specify the categories to filter the Publications.- Parameters:
categories
- Array ofCategory
objects- Returns:
- a reference to this object - used to chain calls
-
category
public PublicationSettings category(java.util.Collection<Category> categories)
Specify the categories to filter the Publications.- Parameters:
categories
- Collection ofCategory
objects- Returns:
- a reference to this object - used to chain calls
-
category
public PublicationSettings category(Category category, Category... otherCategories)
Specify the categories to filter the Publications.
-
category
public PublicationSettings category(java.lang.String categoryId, java.lang.String... otherCategoryIds)
Specify the categories to filter the Publications.
-
noWorkspaceFilter
public PublicationSettings noWorkspaceFilter()
Specify whether we don't filter on Workspace.- Returns:
- a reference to this object - used to chain calls
-
documentKinds
public PublicationSettings documentKinds(java.lang.String[] documentKinds)
Specify the document kinds to filter the Publications.- Parameters:
documentKinds
- Array of document kinds- Returns:
- a reference to this object - used to chain calls
-
documentKinds
public PublicationSettings documentKinds(java.util.Collection<java.lang.String> documentKinds)
Specify the document kinds to filter the Publications.- Parameters:
documentKinds
- Collection of document kinds- Returns:
- a reference to this object - used to chain calls
-
documentKinds
public PublicationSettings documentKinds(java.lang.String documentKinds, java.lang.String... otherDocumentKinds)
-
getDocumentKindsList
public static java.util.List<java.lang.String> getDocumentKindsList()
Returns the list of document kinds defined in the properties.- Returns:
- List available document kinds
- See Also:
- "jcms.prop: properties with prefix 'file-document.kinds-group.'"
-
exactType
public PublicationSettings exactType()
Specify whether it only retrieves Publications of the type defined by the superType, and not child classes.- Returns:
- a reference to this object - used to chain calls
- See Also:
superType(Class)
,superType(String)
-
disableFileInput
public PublicationSettings disableFileInput()
Specify whether the file input is disabled for Publications of type FileDocument.- Returns:
- a reference to this object - used to chain calls
-
enableFileInput
public PublicationSettings enableFileInput()
Specify whether the file input is enabled for Publications of type FileDocument.- Returns:
- a reference to this object - used to chain calls
-
disableDropdown
public PublicationSettings disableDropdown()
Specify whether the dropdown menu is disabled.- Returns:
- a reference to this object - used to chain calls
-
-