public class AccessControlListField extends com.vaadin.ui.CustomField<AccessControlList>
AccessControlFields
, supporting addition and removal of entries.
New entries are created through the
Modifier and Type | Class and Description |
---|---|
class |
AccessControlListField.DefaultEntryFieldFactory
Default implementation creates a standard AccessControlField with validator.
|
static interface |
AccessControlListField.EntryFieldFactory
A factory creating individual fields for ACL entries.
|
static interface |
AccessControlListField.NewEntryHandler
The handler used to create new ACL entries.
|
com.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEvent
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
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
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
com.vaadin.server.Sizeable.Unit
com.vaadin.ui.Field.ValueChangeEvent
com.vaadin.data.Buffered.SourceException
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer
Constructor and Description |
---|
AccessControlListField(Map<Long,String> permissions,
AccessControlListField.NewEntryHandler newEntryHandler)
Creates an AccessControlListField with the given set of permissions.
|
Modifier and Type | Method and Description |
---|---|
protected com.vaadin.ui.Component |
buildEntryRow(com.vaadin.ui.Field<AccessControlList.Entry> entryField) |
protected List<com.vaadin.ui.Component> |
buildEntryRows(AccessControlList<AccessControlList.Entry> acl) |
String |
getAddButtonCaption() |
String |
getEmptyPlaceholderCaption() |
AccessControlListField.EntryFieldFactory |
getEntryFieldFactory() |
String |
getRemoveButtonCaption() |
Class<AccessControlList> |
getType() |
AccessControlList<AccessControlList.Entry> |
getValue() |
protected com.vaadin.ui.Component |
initContent() |
void |
setAddButtonCaption(String addButtonCaption) |
void |
setEmptyPlaceholderCaption(String emptyPlaceholderCaption) |
void |
setEntryFieldFactory(AccessControlListField.EntryFieldFactory entryFieldFactory) |
void |
setRemoveButtonCaption(String removeButtonCaption) |
void |
setValidationVisible(boolean validateAutomatically) |
protected void |
validate(AccessControlList fieldValue) |
attach, getContent, iterator, setHeight, setWidth
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getTabIndex, getValidators, isBuffered, isEmpty, isImmediate, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readDesign, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValue, setValue, setValue, shouldHideErrors, toString, validate, valueChange, writeDesign
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, 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, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthUndefined
forEach, spliterator
public AccessControlListField(Map<Long,String> permissions, AccessControlListField.NewEntryHandler newEntryHandler)
permissions
- a map whose keys are permission values, and whose values are the corresponding captions to display in the permission select.newEntryHandler
- the handler creating actual entries with default values, to append to this field.protected com.vaadin.ui.Component initContent()
initContent
in class com.vaadin.ui.CustomField<AccessControlList>
protected List<com.vaadin.ui.Component> buildEntryRows(AccessControlList<AccessControlList.Entry> acl)
protected com.vaadin.ui.Component buildEntryRow(com.vaadin.ui.Field<AccessControlList.Entry> entryField)
public String getAddButtonCaption()
public void setAddButtonCaption(String addButtonCaption)
public String getRemoveButtonCaption()
public void setRemoveButtonCaption(String removeButtonCaption)
public String getEmptyPlaceholderCaption()
public void setEmptyPlaceholderCaption(String emptyPlaceholderCaption)
public Class<AccessControlList> getType()
getType
in interface com.vaadin.data.Property<AccessControlList>
getType
in class com.vaadin.ui.AbstractField<AccessControlList>
public AccessControlList<AccessControlList.Entry> getValue()
getValue
in interface com.vaadin.data.Property<AccessControlList>
getValue
in class com.vaadin.ui.AbstractField<AccessControlList>
protected void validate(AccessControlList fieldValue) throws com.vaadin.data.Validator.InvalidValueException
validate
in class com.vaadin.ui.AbstractField<AccessControlList>
com.vaadin.data.Validator.InvalidValueException
public void setValidationVisible(boolean validateAutomatically)
setValidationVisible
in class com.vaadin.ui.AbstractField<AccessControlList>
public AccessControlListField.EntryFieldFactory getEntryFieldFactory()
public void setEntryFieldFactory(AccessControlListField.EntryFieldFactory entryFieldFactory)
Copyright © 2017 Magnolia International Ltd.. All rights reserved.