Class CmsPrincipalSelect
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.CustomComponent
org.opencms.ui.dialogs.permissions.CmsPrincipalSelect
- All Implemented Interfaces:
com.vaadin.event.ContextClickEvent.ContextClickNotifier
,com.vaadin.event.MethodEventSource
,com.vaadin.event.SerializableEventListener
,com.vaadin.server.ClientConnector
,com.vaadin.server.Sizeable
,com.vaadin.shared.Connector
,com.vaadin.ui.Component
,com.vaadin.ui.Component.Focusable
,com.vaadin.ui.HasComponents
,com.vaadin.v7.data.Buffered
,com.vaadin.v7.data.BufferedValidatable
,com.vaadin.v7.data.Property<String>
,com.vaadin.v7.data.Property.Editor
,com.vaadin.v7.data.Property.ValueChangeListener
,com.vaadin.v7.data.Property.ValueChangeNotifier
,com.vaadin.v7.data.Property.Viewer
,com.vaadin.v7.data.Validatable
,com.vaadin.v7.ui.Field<String>
,Serializable
,Iterable<com.vaadin.ui.Component>
,EventListener
,I_CmsPrincipalSelect
public class CmsPrincipalSelect
extends com.vaadin.ui.CustomComponent
implements com.vaadin.v7.ui.Field<String>, I_CmsPrincipalSelect
The principal select widget.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Handles the principal selection.static enum
Type of principal.static enum
The widget types.Nested classes/interfaces inherited from interface com.vaadin.v7.data.Buffered
com.vaadin.v7.data.Buffered.SourceException
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
Nested classes/interfaces inherited from interface com.vaadin.v7.ui.Field
com.vaadin.v7.ui.Field.ValueChangeEvent
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Property
com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T extends Object>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
-
Field Summary
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(com.vaadin.v7.data.Property.ValueChangeListener listener) void
addValidator
(com.vaadin.v7.data.Validator validator) void
addValueChangeListener
(com.vaadin.v7.data.Property.ValueChangeListener listener) void
clear()
protected void
Closes the principal select dialog window if present.void
commit()
void
discard()
void
focus()
com.vaadin.v7.data.Property
int
getType()
Collection<com.vaadin.v7.data.Validator>
getValue()
void
handlePrincipal
(I_CmsPrincipal principal) Handles a selected principal.boolean
boolean
isEmpty()
boolean
boolean
boolean
boolean
boolean
boolean
isValid()
void
void
removeListener
(com.vaadin.v7.data.Property.ValueChangeListener listener) void
removeValidator
(com.vaadin.v7.data.Validator validator) void
removeValueChangeListener
(com.vaadin.v7.data.Property.ValueChangeListener listener) void
setBuffered
(boolean buffered) void
setIncludeWebOus
(boolean include) Set if web Ous should be included.void
setInvalidAllowed
(boolean invalidValueAllowed) void
setInvalidCommitted
(boolean isCommitted) void
setMargin
(boolean enabled) Enable layout margins.void
Set the ou.void
setOuChangeEnabled
(boolean enabled) protected void
setPrincipal
(int type, String principalName) Sets the principal type and name.void
setPrincipalType
(String type) Sets the principal type and clears the name.void
setPropertyDataSource
(com.vaadin.v7.data.Property newDataSource) void
setReadOnly
(boolean readOnly) void
setRealPrincipalsOnly
(boolean realOnly) Controls whether only real users/groups or also pseudo-principals like ALL_OTHERS should be shown.void
setRequired
(boolean required) void
setRequiredError
(String requiredMessage) void
setRoleSelectionAllowed
(boolean editRoles) Enables/disables selection of the 'Roles' prinipal type.void
setSelectHandler
(CmsPrincipalSelect.I_PrincipalSelectHandler selectHandler) Sets the principal select handler.void
setTabIndex
(int tabIndex) void
void
Sets the widget type.void
validate()
void
valueChange
(com.vaadin.v7.data.Property.ValueChangeEvent event) Methods inherited from class com.vaadin.ui.CustomComponent
getComponentCount, getCompositionRoot, getState, getState, iterator, setCompositionRoot
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined, writeDesign
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Constructor Details
-
CmsPrincipalSelect
public CmsPrincipalSelect()Constructor.
-
-
Method Details
-
addListener
- Specified by:
addListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
-
Property.ValueChangeNotifier.addListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
addValidator
- Specified by:
addValidator
in interfacecom.vaadin.v7.data.Validatable
- See Also:
-
com.vaadin.data.Validatable#addValidator(com.vaadin.data.Validator)
-
addValueChangeListener
- Specified by:
addValueChangeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
-
Property.ValueChangeNotifier.addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
clear
- Specified by:
clear
in interfacecom.vaadin.v7.ui.Field<String>
- See Also:
-
Field.clear()
-
commit
public void commit() throws com.vaadin.v7.data.Buffered.SourceException, com.vaadin.v7.data.Validator.InvalidValueException- Specified by:
commit
in interfacecom.vaadin.v7.data.Buffered
- Throws:
com.vaadin.v7.data.Buffered.SourceException
com.vaadin.v7.data.Validator.InvalidValueException
- See Also:
-
Buffered.commit()
-
discard
- Specified by:
discard
in interfacecom.vaadin.v7.data.Buffered
- Throws:
com.vaadin.v7.data.Buffered.SourceException
- See Also:
-
Buffered.discard()
-
focus
- Specified by:
focus
in interfacecom.vaadin.ui.Component.Focusable
- Overrides:
focus
in classcom.vaadin.ui.AbstractComponent
- See Also:
-
AbstractComponent.focus()
-
getPropertyDataSource
- Specified by:
getPropertyDataSource
in interfacecom.vaadin.v7.data.Property.Viewer
- See Also:
-
Property.Viewer.getPropertyDataSource()
-
getRequiredError
- Specified by:
getRequiredError
in interfacecom.vaadin.v7.ui.Field<String>
- See Also:
-
Field.getRequiredError()
-
getTabIndex
- Specified by:
getTabIndex
in interfacecom.vaadin.ui.Component.Focusable
- See Also:
-
Component.Focusable.getTabIndex()
-
getType
- Specified by:
getType
in interfacecom.vaadin.v7.data.Property<String>
- See Also:
-
Property.getType()
-
getValidators
- Specified by:
getValidators
in interfacecom.vaadin.v7.data.Validatable
- See Also:
-
com.vaadin.data.Validatable#getValidators()
-
getValue
- Specified by:
getValue
in interfacecom.vaadin.v7.data.Property<String>
- See Also:
-
Property.getValue()
-
handlePrincipal
Description copied from interface:I_CmsPrincipalSelect
Handles a selected principal.- Specified by:
handlePrincipal
in interfaceI_CmsPrincipalSelect
- Parameters:
principal
- which were selected- See Also:
-
isBuffered
- Specified by:
isBuffered
in interfacecom.vaadin.v7.data.Buffered
- See Also:
-
Buffered.isBuffered()
-
isEmpty
- Specified by:
isEmpty
in interfacecom.vaadin.v7.ui.Field<String>
- See Also:
-
Field.isEmpty()
-
isInvalidAllowed
- Specified by:
isInvalidAllowed
in interfacecom.vaadin.v7.data.Validatable
- See Also:
-
com.vaadin.data.Validatable#isInvalidAllowed()
-
isInvalidCommitted
- Specified by:
isInvalidCommitted
in interfacecom.vaadin.v7.data.BufferedValidatable
- See Also:
-
BufferedValidatable.isInvalidCommitted()
-
isModified
- Specified by:
isModified
in interfacecom.vaadin.v7.data.Buffered
- See Also:
-
Buffered.isModified()
-
isReadOnly
- Specified by:
isReadOnly
in interfacecom.vaadin.v7.data.Property<String>
- Overrides:
isReadOnly
in classcom.vaadin.ui.AbstractComponent
-
isRequired
- Specified by:
isRequired
in interfacecom.vaadin.v7.ui.Field<String>
- See Also:
-
Field.isRequired()
-
isValid
- Specified by:
isValid
in interfacecom.vaadin.v7.data.Validatable
- See Also:
-
com.vaadin.data.Validatable#isValid()
-
removeAllValidators
- Specified by:
removeAllValidators
in interfacecom.vaadin.v7.data.Validatable
- See Also:
-
com.vaadin.data.Validatable#removeAllValidators()
-
removeListener
- Specified by:
removeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
-
Property.ValueChangeNotifier.removeListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
removeValidator
- Specified by:
removeValidator
in interfacecom.vaadin.v7.data.Validatable
- See Also:
-
com.vaadin.data.Validatable#removeValidator(com.vaadin.data.Validator)
-
removeValueChangeListener
- Specified by:
removeValueChangeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
-
Property.ValueChangeNotifier.removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
setBuffered
- Specified by:
setBuffered
in interfacecom.vaadin.v7.data.Buffered
- See Also:
-
Buffered.setBuffered(boolean)
-
setIncludeWebOus
Set if web Ous should be included. Default behavior is true.- Parameters:
include
- boolean
-
setInvalidAllowed
- Specified by:
setInvalidAllowed
in interfacecom.vaadin.v7.data.Validatable
- Throws:
UnsupportedOperationException
- See Also:
-
com.vaadin.data.Validatable#setInvalidAllowed(boolean)
-
setInvalidCommitted
- Specified by:
setInvalidCommitted
in interfacecom.vaadin.v7.data.BufferedValidatable
- See Also:
-
com.vaadin.data.BufferedValidatable#setInvalidCommitted(boolean)
-
setMargin
Enable layout margins. Affects all four sides of the layout. This will tell the client-side implementation to leave extra space around the layout. The client-side implementation decides the actual amount, and it can vary between themes.- Parameters:
enabled
-true
if margins should be enabled on all sides, false to disable all margins
-
setOU
Set the ou.- Parameters:
ou
- to choose principals for
-
setOuChangeEnabled
-
setPrincipalType
Sets the principal type and clears the name.- Parameters:
type
- the principal type
-
setPropertyDataSource
- Specified by:
setPropertyDataSource
in interfacecom.vaadin.v7.data.Property.Viewer
- See Also:
-
Property.Viewer.setPropertyDataSource(com.vaadin.v7.data.Property)
-
setReadOnly
- Specified by:
setReadOnly
in interfacecom.vaadin.v7.data.Property<String>
- Overrides:
setReadOnly
in classcom.vaadin.ui.AbstractComponent
-
setRealPrincipalsOnly
Controls whether only real users/groups or also pseudo-principals like ALL_OTHERS should be shown.- Parameters:
realOnly
- if true, only real users / groups will be shown
-
setRequired
- Specified by:
setRequired
in interfacecom.vaadin.v7.ui.Field<String>
- See Also:
-
Field.setRequired(boolean)
-
setRequiredError
- Specified by:
setRequiredError
in interfacecom.vaadin.v7.ui.Field<String>
- See Also:
-
Field.setRequiredError(java.lang.String)
-
setRoleSelectionAllowed
Enables/disables selection of the 'Roles' prinipal type.- Parameters:
editRoles
- true if the user should be allowed to select roles
-
setSelectHandler
Sets the principal select handler.- Parameters:
selectHandler
- the principal select handler
-
setTabIndex
- Specified by:
setTabIndex
in interfacecom.vaadin.ui.Component.Focusable
- See Also:
-
Component.Focusable.setTabIndex(int)
-
setValue
- Specified by:
setValue
in interfacecom.vaadin.v7.data.Property<String>
- Throws:
com.vaadin.v7.data.Property.ReadOnlyException
- See Also:
-
Property.setValue(java.lang.Object)
-
setWidgetType
Sets the widget type.- Parameters:
type
- the widget type
-
validate
- Specified by:
validate
in interfacecom.vaadin.v7.data.Validatable
- Throws:
com.vaadin.v7.data.Validator.InvalidValueException
- See Also:
-
com.vaadin.data.Validatable#validate()
-
valueChange
- Specified by:
valueChange
in interfacecom.vaadin.v7.data.Property.ValueChangeListener
- See Also:
-
Property.ValueChangeListener.valueChange(com.vaadin.v7.data.Property.ValueChangeEvent)
-
closeWindow
Closes the principal select dialog window if present. -
setPrincipal
Sets the principal type and name.- Parameters:
type
- the principal typeprincipalName
- the principal name
-