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

    Nested Classes
    Modifier and Type
    Class
    Description
    static 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

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    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
     
    protected void
    Closes the principal select dialog window if present.
    void
     
    void
     
    void
     
    com.vaadin.v7.data.Property
     
     
    int
     
    Class<? extends String>
     
    Collection<com.vaadin.v7.data.Validator>
     
     
    void
    Handles a selected principal.
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    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
    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
    Sets the principal select handler.
    void
    setTabIndex(int tabIndex)
     
    void
    setValue(String newValue)
     
    void
    Sets the widget type.
    void
     
    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

  • Method Details

    • addListener

      public void addListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
      Specified by:
      addListener in interface com.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 interface com.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 interface com.vaadin.v7.data.Property.ValueChangeNotifier
      See Also:
      • Property.ValueChangeNotifier.addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)
    • clear

      public void clear()
      Specified by:
      clear in interface com.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 interface com.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 interface com.vaadin.v7.data.Buffered
      Throws:
      com.vaadin.v7.data.Buffered.SourceException
      See Also:
      • Buffered.discard()
    • focus

      public void focus()
      Specified by:
      focus in interface com.vaadin.ui.Component.Focusable
      Overrides:
      focus in class com.vaadin.ui.AbstractComponent
      See Also:
      • AbstractComponent.focus()
    • getPropertyDataSource

      public com.vaadin.v7.data.Property getPropertyDataSource()
      Specified by:
      getPropertyDataSource in interface com.vaadin.v7.data.Property.Viewer
      See Also:
      • Property.Viewer.getPropertyDataSource()
    • getRequiredError

      Specified by:
      getRequiredError in interface com.vaadin.v7.ui.Field<String>
      See Also:
      • Field.getRequiredError()
    • getTabIndex

      public int getTabIndex()
      Specified by:
      getTabIndex in interface com.vaadin.ui.Component.Focusable
      See Also:
      • Component.Focusable.getTabIndex()
    • getType

      public Class<? extends String> getType()
      Specified by:
      getType in interface com.vaadin.v7.data.Property<String>
      See Also:
      • Property.getType()
    • getValidators

      public Collection<com.vaadin.v7.data.Validator> getValidators()
      Specified by:
      getValidators in interface com.vaadin.v7.data.Validatable
      See Also:
      • com.vaadin.data.Validatable#getValidators()
    • getValue

      public String getValue()
      Specified by:
      getValue in interface com.vaadin.v7.data.Property<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 interface I_CmsPrincipalSelect
      Parameters:
      principal - which were selected
      See Also:
    • isBuffered

      public boolean isBuffered()
      Specified by:
      isBuffered in interface com.vaadin.v7.data.Buffered
      See Also:
      • Buffered.isBuffered()
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface com.vaadin.v7.ui.Field<String>
      See Also:
      • Field.isEmpty()
    • isInvalidAllowed

      public boolean isInvalidAllowed()
      Specified by:
      isInvalidAllowed in interface com.vaadin.v7.data.Validatable
      See Also:
      • com.vaadin.data.Validatable#isInvalidAllowed()
    • isInvalidCommitted

      public boolean isInvalidCommitted()
      Specified by:
      isInvalidCommitted in interface com.vaadin.v7.data.BufferedValidatable
      See Also:
      • BufferedValidatable.isInvalidCommitted()
    • isModified

      public boolean isModified()
      Specified by:
      isModified in interface com.vaadin.v7.data.Buffered
      See Also:
      • Buffered.isModified()
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface com.vaadin.v7.data.Property<String>
      Overrides:
      isReadOnly in class com.vaadin.ui.AbstractComponent
    • isRequired

      public boolean isRequired()
      Specified by:
      isRequired in interface com.vaadin.v7.ui.Field<String>
      See Also:
      • Field.isRequired()
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface com.vaadin.v7.data.Validatable
      See Also:
      • com.vaadin.data.Validatable#isValid()
    • removeAllValidators

      public void removeAllValidators()
      Specified by:
      removeAllValidators in interface com.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 interface com.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 interface com.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 interface com.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 interface com.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 UnsupportedOperationException
      Specified by:
      setInvalidAllowed in interface com.vaadin.v7.data.Validatable
      Throws:
      UnsupportedOperationException
      See Also:
      • com.vaadin.data.Validatable#setInvalidAllowed(boolean)
    • setInvalidCommitted

      public void setInvalidCommitted(boolean isCommitted)
      Specified by:
      setInvalidCommitted in interface com.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(String ou)
      Set the ou.
      Parameters:
      ou - to choose principals for
    • setOuChangeEnabled

      public void setOuChangeEnabled(boolean enabled)
    • setPrincipalType

      public void setPrincipalType(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 interface com.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 interface com.vaadin.v7.data.Property<String>
      Overrides:
      setReadOnly in class com.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 interface com.vaadin.v7.ui.Field<String>
      See Also:
      • Field.setRequired(boolean)
    • setRequiredError

      public void setRequiredError(String requiredMessage)
      Specified by:
      setRequiredError in interface com.vaadin.v7.ui.Field<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

      Sets the principal select handler.

      Parameters:
      selectHandler - the principal select handler
    • setTabIndex

      public void setTabIndex(int tabIndex)
      Specified by:
      setTabIndex in interface com.vaadin.ui.Component.Focusable
      See Also:
      • Component.Focusable.setTabIndex(int)
    • setValue

      public void setValue(String newValue) throws com.vaadin.v7.data.Property.ReadOnlyException
      Specified by:
      setValue in interface com.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

      public void validate() throws com.vaadin.v7.data.Validator.InvalidValueException
      Specified by:
      validate in interface com.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 interface com.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, String principalName)
      Sets the principal type and name.

      Parameters:
      type - the principal type
      principalName - the principal name