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<java.lang.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<java.lang.String>
,java.io.Serializable
,java.lang.Iterable<com.vaadin.ui.Component>
,java.util.EventListener
,I_CmsPrincipalSelect
public class CmsPrincipalSelect extends com.vaadin.ui.CustomComponent implements com.vaadin.v7.ui.Field<java.lang.String>, I_CmsPrincipalSelect
The principal select widget.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CmsPrincipalSelect.I_PrincipalSelectHandler
Handles the principal selection.static class
CmsPrincipalSelect.PrincipalType
Type of principal.static class
CmsPrincipalSelect.WidgetType
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 java.lang.Object>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
-
-
Constructor Summary
Constructors Constructor Description CmsPrincipalSelect()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
closeWindow()
Closes the principal select dialog window if present.void
commit()
void
discard()
void
focus()
com.vaadin.v7.data.Property
getPropertyDataSource()
java.lang.String
getRequiredError()
int
getTabIndex()
java.lang.Class<? extends java.lang.String>
getType()
java.util.Collection<com.vaadin.v7.data.Validator>
getValidators()
java.lang.String
getValue()
void
handlePrincipal(I_CmsPrincipal principal)
Handles a selected principal.boolean
isBuffered()
boolean
isEmpty()
boolean
isInvalidAllowed()
boolean
isInvalidCommitted()
boolean
isModified()
boolean
isReadOnly()
boolean
isRequired()
boolean
isValid()
void
removeAllValidators()
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
setOU(java.lang.String ou)
Set the ou.void
setOuChangeEnabled(boolean enabled)
protected void
setPrincipal(int type, java.lang.String principalName)
Sets the principal type and name.void
setPrincipalType(java.lang.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(java.lang.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
setValue(java.lang.String newValue)
void
setWidgetType(CmsPrincipalSelect.WidgetType type)
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
-
-
-
-
Constructor Detail
-
CmsPrincipalSelect
public CmsPrincipalSelect()
Constructor.
-
-
Method Detail
-
addListener
public void addListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
addListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
Property.ValueChangeNotifier.addListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
addValidator
public void addValidator(com.vaadin.v7.data.Validator validator)
- Specified by:
addValidator
in interfacecom.vaadin.v7.data.Validatable
- See Also:
com.vaadin.data.Validatable#addValidator(com.vaadin.data.Validator)
-
addValueChangeListener
public void addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
addValueChangeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
Property.ValueChangeNotifier.addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
clear
public void clear()
- Specified by:
clear
in interfacecom.vaadin.v7.ui.Field<java.lang.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
public void discard() throws com.vaadin.v7.data.Buffered.SourceException
- Specified by:
discard
in interfacecom.vaadin.v7.data.Buffered
- Throws:
com.vaadin.v7.data.Buffered.SourceException
- See Also:
Buffered.discard()
-
focus
public void focus()
- Specified by:
focus
in interfacecom.vaadin.ui.Component.Focusable
- Overrides:
focus
in classcom.vaadin.ui.AbstractComponent
- See Also:
AbstractComponent.focus()
-
getPropertyDataSource
public com.vaadin.v7.data.Property getPropertyDataSource()
- Specified by:
getPropertyDataSource
in interfacecom.vaadin.v7.data.Property.Viewer
- See Also:
Property.Viewer.getPropertyDataSource()
-
getRequiredError
public java.lang.String getRequiredError()
- Specified by:
getRequiredError
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
- See Also:
Field.getRequiredError()
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndex
in interfacecom.vaadin.ui.Component.Focusable
- See Also:
Component.Focusable.getTabIndex()
-
getType
public java.lang.Class<? extends java.lang.String> getType()
- Specified by:
getType
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- See Also:
Property.getType()
-
getValidators
public java.util.Collection<com.vaadin.v7.data.Validator> getValidators()
- Specified by:
getValidators
in interfacecom.vaadin.v7.data.Validatable
- See Also:
com.vaadin.data.Validatable#getValidators()
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- See Also:
Property.getValue()
-
handlePrincipal
public void handlePrincipal(I_CmsPrincipal principal)
Description copied from interface:I_CmsPrincipalSelect
Handles a selected principal.- Specified by:
handlePrincipal
in interfaceI_CmsPrincipalSelect
- Parameters:
principal
- which were selected- See Also:
I_CmsPrincipalSelect.handlePrincipal(org.opencms.security.I_CmsPrincipal)
-
isBuffered
public boolean isBuffered()
- Specified by:
isBuffered
in interfacecom.vaadin.v7.data.Buffered
- See Also:
Buffered.isBuffered()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
- See Also:
Field.isEmpty()
-
isInvalidAllowed
public boolean isInvalidAllowed()
- Specified by:
isInvalidAllowed
in interfacecom.vaadin.v7.data.Validatable
- See Also:
com.vaadin.data.Validatable#isInvalidAllowed()
-
isInvalidCommitted
public boolean isInvalidCommitted()
- Specified by:
isInvalidCommitted
in interfacecom.vaadin.v7.data.BufferedValidatable
- See Also:
BufferedValidatable.isInvalidCommitted()
-
isModified
public boolean isModified()
- Specified by:
isModified
in interfacecom.vaadin.v7.data.Buffered
- See Also:
Buffered.isModified()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- Overrides:
isReadOnly
in classcom.vaadin.ui.AbstractComponent
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
- See Also:
Field.isRequired()
-
isValid
public boolean isValid()
- Specified by:
isValid
in interfacecom.vaadin.v7.data.Validatable
- See Also:
com.vaadin.data.Validatable#isValid()
-
removeAllValidators
public void removeAllValidators()
- Specified by:
removeAllValidators
in interfacecom.vaadin.v7.data.Validatable
- See Also:
com.vaadin.data.Validatable#removeAllValidators()
-
removeListener
public void removeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
removeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
Property.ValueChangeNotifier.removeListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
removeValidator
public void removeValidator(com.vaadin.v7.data.Validator validator)
- Specified by:
removeValidator
in interfacecom.vaadin.v7.data.Validatable
- See Also:
com.vaadin.data.Validatable#removeValidator(com.vaadin.data.Validator)
-
removeValueChangeListener
public void removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
removeValueChangeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
- See Also:
Property.ValueChangeNotifier.removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)
-
setBuffered
public void setBuffered(boolean buffered)
- Specified by:
setBuffered
in interfacecom.vaadin.v7.data.Buffered
- See Also:
Buffered.setBuffered(boolean)
-
setIncludeWebOus
public void setIncludeWebOus(boolean include)
Set if web Ous should be included. Default behavior is true.- Parameters:
include
- boolean
-
setInvalidAllowed
public void setInvalidAllowed(boolean invalidValueAllowed) throws java.lang.UnsupportedOperationException
- Specified by:
setInvalidAllowed
in interfacecom.vaadin.v7.data.Validatable
- Throws:
java.lang.UnsupportedOperationException
- See Also:
com.vaadin.data.Validatable#setInvalidAllowed(boolean)
-
setInvalidCommitted
public void setInvalidCommitted(boolean isCommitted)
- Specified by:
setInvalidCommitted
in interfacecom.vaadin.v7.data.BufferedValidatable
- See Also:
com.vaadin.data.BufferedValidatable#setInvalidCommitted(boolean)
-
setMargin
public void setMargin(boolean enabled)
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
public void setOU(java.lang.String ou)
Set the ou.- Parameters:
ou
- to choose principals for
-
setOuChangeEnabled
public void setOuChangeEnabled(boolean enabled)
-
setPrincipalType
public void setPrincipalType(java.lang.String type)
Sets the principal type and clears the name.- Parameters:
type
- the principal type
-
setPropertyDataSource
public void setPropertyDataSource(com.vaadin.v7.data.Property newDataSource)
- Specified by:
setPropertyDataSource
in interfacecom.vaadin.v7.data.Property.Viewer
- See Also:
Property.Viewer.setPropertyDataSource(com.vaadin.v7.data.Property)
-
setReadOnly
public void setReadOnly(boolean readOnly)
- Specified by:
setReadOnly
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- Overrides:
setReadOnly
in classcom.vaadin.ui.AbstractComponent
-
setRealPrincipalsOnly
public void setRealPrincipalsOnly(boolean realOnly)
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
public void setRequired(boolean required)
- Specified by:
setRequired
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
- See Also:
Field.setRequired(boolean)
-
setRequiredError
public void setRequiredError(java.lang.String requiredMessage)
- Specified by:
setRequiredError
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
- See Also:
Field.setRequiredError(java.lang.String)
-
setRoleSelectionAllowed
public void setRoleSelectionAllowed(boolean editRoles)
Enables/disables selection of the 'Roles' prinipal type.- Parameters:
editRoles
- true if the user should be allowed to select roles
-
setSelectHandler
public void setSelectHandler(CmsPrincipalSelect.I_PrincipalSelectHandler selectHandler)
Sets the principal select handler.- Parameters:
selectHandler
- the principal select handler
-
setTabIndex
public void setTabIndex(int tabIndex)
- Specified by:
setTabIndex
in interfacecom.vaadin.ui.Component.Focusable
- See Also:
Component.Focusable.setTabIndex(int)
-
setValue
public void setValue(java.lang.String newValue) throws com.vaadin.v7.data.Property.ReadOnlyException
- Specified by:
setValue
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- Throws:
com.vaadin.v7.data.Property.ReadOnlyException
- See Also:
Property.setValue(java.lang.Object)
-
setWidgetType
public void setWidgetType(CmsPrincipalSelect.WidgetType type)
Sets the widget type.- Parameters:
type
- the widget type
-
validate
public void validate() throws com.vaadin.v7.data.Validator.InvalidValueException
- Specified by:
validate
in interfacecom.vaadin.v7.data.Validatable
- Throws:
com.vaadin.v7.data.Validator.InvalidValueException
- See Also:
com.vaadin.data.Validatable#validate()
-
valueChange
public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event)
- Specified by:
valueChange
in interfacecom.vaadin.v7.data.Property.ValueChangeListener
- See Also:
Property.ValueChangeListener.valueChange(com.vaadin.v7.data.Property.ValueChangeEvent)
-
closeWindow
protected void closeWindow()
Closes the principal select dialog window if present.
-
setPrincipal
protected void setPrincipal(int type, java.lang.String principalName)
Sets the principal type and name.- Parameters:
type
- the principal typeprincipalName
- the principal name
-
-