Package org.opencms.widgets
Class CmsSelectGroupWidget
java.lang.Object
org.opencms.widgets.A_CmsWidget
org.opencms.widgets.A_CmsSelectWidget
org.opencms.widgets.CmsSelectWidget
org.opencms.widgets.CmsSelectGroupWidget
- All Implemented Interfaces:
I_CmsADEWidget,I_CmsWidget
- Direct Known Subclasses:
CmsMultiSelectGroupWidget
Provides a widget for group selection select boxes.
This widget is configurable with the following options:
groupfilter: regular expression to filter available groupsgroups: comma separated list of group names to show in the select box. Note: if this configuration option if used,groupfilterandincludesubousare not considered anymore.includesubous: boolean flag to indicate if sub OUs should be scanned for groups to selectoufqn: the fully qualified name of the OU to read the groups from
<mapping element="..." mapto="permission:GROUP:+r+v|GROUP.ALL_OTHERS:|GROUP.Projectmanagers:+r+v+w+c" />
This means that the +r+v permission is written for the principal GROUP on the resource.
Additionally two permissions are written as default: for ALL_OTHERS, no allowed permission is set,
for Projectmanagers, "+r+v+w+c" is set.
- Since:
- 8.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsWidget
A_CmsWidget.CmsDummyWidgetDialog -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringConfiguration option key: group filter.protected static final StringConfiguration option key: groups.protected static final StringConfiguration option key: include sub OUs.protected static final StringConfiguration option key: OU fully qualified name.Fields inherited from class org.opencms.widgets.A_CmsSelectWidget
CONFIGURATION_HEIGHTFields inherited from class org.opencms.widgets.A_CmsWidget
HELP_POSTFIX, LABEL_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new group select widget.CmsSelectGroupWidget(String configuration) Creates a group select widget with the specified select options. -
Method Summary
Modifier and TypeMethodDescriptiongetConfiguration(CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, Locale contentLocale) Returns the configuration string for the ADE content editor widget.Returns a list of CSS resources required by the widget.Returns the java script initialization call.Returns a list of java script resources required by the widget.booleanReturns if this is an internal widget.Creates a duplicate of this widget instance.protected List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, CmsMessages messages, I_CmsWidgetParameter param) Returns the list of configured select options, parsing the configuration String if required.protected List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Returns the list of configured select options, parsing the configuration String if required.Methods inherited from class org.opencms.widgets.CmsSelectWidget
getDialogWidget, getWidgetName, getWidgetStringValueMethods inherited from class org.opencms.widgets.A_CmsSelectWidget
addSelectOption, getConfiguration, getDefaultDisplayType, getHeight, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, setConfiguration, setSelectOptionsMethods inherited from class org.opencms.widgets.A_CmsWidget
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencms.widgets.I_CmsWidget
getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, isCompactViewEnabled, setEditorValue
-
Field Details
-
CONFIGURATION_GROUPFILTER
Configuration option key: group filter.- See Also:
-
CONFIGURATION_GROUPS
Configuration option key: groups.- See Also:
-
CONFIGURATION_INCLUDESUBOUS
Configuration option key: include sub OUs.- See Also:
-
CONFIGURATION_OUFQN
Configuration option key: OU fully qualified name.- See Also:
-
-
Constructor Details
-
CmsSelectGroupWidget
public CmsSelectGroupWidget()Creates a new group select widget. -
CmsSelectGroupWidget
Creates a group select widget with the specified select options.- Parameters:
configuration- the configuration (possible options) for the group select box
-
-
Method Details
-
getConfiguration
public String getConfiguration(CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, Locale contentLocale) Description copied from interface:I_CmsADEWidgetReturns the configuration string for the ADE content editor widget.- Specified by:
getConfigurationin interfaceI_CmsADEWidget- Overrides:
getConfigurationin classA_CmsSelectWidget- Parameters:
cms- the OpenCms contextschemaType- the schema typemessages- the messagesresource- the edited resourcecontentLocale- the content locale- Returns:
- the configuration string
- See Also:
-
getCssResourceLinks
Description copied from class:A_CmsSelectWidgetReturns a list of CSS resources required by the widget.- Specified by:
getCssResourceLinksin interfaceI_CmsADEWidget- Overrides:
getCssResourceLinksin classA_CmsSelectWidget- Parameters:
cms- the current OpenCms context- Returns:
- the required CSS resource links
- See Also:
-
getInitCall
Description copied from class:A_CmsSelectWidgetReturns the java script initialization call.- Specified by:
getInitCallin interfaceI_CmsADEWidget- Overrides:
getInitCallin classA_CmsSelectWidget- Returns:
- the java script initialization call
- See Also:
-
getJavaScriptResourceLinks
Description copied from class:A_CmsSelectWidgetReturns a list of java script resources required by the widget.- Specified by:
getJavaScriptResourceLinksin interfaceI_CmsADEWidget- Overrides:
getJavaScriptResourceLinksin classA_CmsSelectWidget- Parameters:
cms- the current OpenCms context- Returns:
- the required java script resource links
- See Also:
-
isInternal
Description copied from class:A_CmsSelectWidgetReturns if this is an internal widget.Only widgets belonging to the OpenCms core should be marked as internal.
- Specified by:
isInternalin interfaceI_CmsADEWidget- Overrides:
isInternalin classA_CmsSelectWidget- Returns:
trueif this is an internal widget- See Also:
-
newInstance
Description copied from interface:I_CmsWidgetCreates a duplicate of this widget instance.- Specified by:
newInstancein interfaceI_CmsWidget- Overrides:
newInstancein classCmsSelectWidget- Returns:
- a duplicate of this widget instance
- See Also:
-
parseSelectOptions
protected List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, CmsMessages messages, I_CmsWidgetParameter param) Returns the list of configured select options, parsing the configuration String if required.The list elements are of type
. The configuration String is parsed only once and then stored internally.CmsSelectWidgetOption- Parameters:
cms- the current users OpenCms contextmessages- the messages of this dialogparam- the widget parameter of this dialog- Returns:
- the list of select options
- See Also:
-
parseSelectOptions
protected List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Description copied from class:A_CmsSelectWidgetReturns the list of configured select options, parsing the configuration String if required.The list elements are of type
. The configuration String is parsed only once and then stored internally.CmsSelectWidgetOption- Overrides:
parseSelectOptionsin classA_CmsSelectWidget- Parameters:
cms- the current users OpenCms contextwidgetDialog- the dialog of this widgetparam- the widget parameter of this dialog- Returns:
- the list of select options
- See Also:
-