Class 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
      • 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
    • 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
      • 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
    • Method Detail

      • 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<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 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

        public java.lang.String getRequiredError()
        Specified by:
        getRequiredError in interface com.vaadin.v7.ui.Field<java.lang.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 java.lang.Class<? extends java.lang.String> getType()
        Specified by:
        getType in interface com.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 interface com.vaadin.v7.data.Validatable
        See Also:
        com.vaadin.data.Validatable#getValidators()
      • getValue

        public java.lang.String getValue()
        Specified by:
        getValue in interface com.vaadin.v7.data.Property<java.lang.String>
        See Also:
        Property.getValue()
      • 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<java.lang.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<java.lang.String>
        Overrides:
        isReadOnly in class com.vaadin.ui.AbstractComponent
      • isRequired

        public boolean isRequired()
        Specified by:
        isRequired in interface com.vaadin.v7.ui.Field<java.lang.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 java.lang.UnsupportedOperationException
        Specified by:
        setInvalidAllowed in interface com.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 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​(java.lang.String ou)
        Set the ou.
        Parameters:
        ou - to choose principals for
      • 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 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<java.lang.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<java.lang.String>
        See Also:
        Field.setRequired(boolean)
      • setRequiredError

        public void setRequiredError​(java.lang.String requiredMessage)
        Specified by:
        setRequiredError in interface com.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
      • 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​(java.lang.String newValue)
                      throws com.vaadin.v7.data.Property.ReadOnlyException
        Specified by:
        setValue in interface com.vaadin.v7.data.Property<java.lang.String>
        Throws:
        com.vaadin.v7.data.Property.ReadOnlyException
        See Also:
        Property.setValue(java.lang.Object)
      • 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,
                                    java.lang.String principalName)
        Sets the principal type and name.

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