Interface Permissions
- All Superinterfaces:
ValueChangeNotifier
Permissions
represents the persistence object of PermissionEditorValue
.- Since:
- 4.1.9
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(de.espirit.common.event.ValueChangeListener listener) Adds a listener being informed on changes within these permissions.get()
Provides the permissions definition element.Provides a list of names for defined activities.getAllowed
(String operation) Returns all allowed group IDs, if the permissions are not inherited.getAllowedExplicit
(String operation) Returns all explicitly allowed group paths, if the permissions are not inherited.getForbidden
(String operation) Returns all forbidden group IDs, if the permissions are not inherited.getForbiddenExplicit
(String operation) Returns all explicitly forbidden group paths, if the permissions are not inherited.Provides the name of groups.de.espirit.common.event.SimpleValueChangeNotifier
Provides a notifier on changes within these permissions.@NotNull Priority
Provides the priority setting for this permissions.boolean
isEmpty()
Indicates that no permissions are defined.boolean
Indicates that permissions of this container are inherited.void
removeChangeListener
(de.espirit.common.event.ValueChangeListener listener) Removes a listener.void
Set the permission definition element.void
setAllowed
(String operation, Collection<String> groups) Sets the allowed groups for the given operation.void
setConnection
(Connection connection) Sets the connection to be used for permissions.void
setForbidden
(String operation, Collection<String> groups) Sets the forbidden groups for the given operation.void
setInherited
(boolean inherited) Defines the permissions to be inherited.void
setPriority
(Priority priority) Set the priorities for this permissions.
-
Method Details
-
isEmpty
Indicates that no permissions are defined.- Returns:
true
, if no permissions are defined.- Since:
- 4.1.9
-
get
Provides the permissions definition element.- Returns:
- The permissions element.
- Since:
- 4.1.9
-
set
Set the permission definition element.- Parameters:
element
- A permissions element.- Since:
- 4.1.9
-
setConnection
@ApiDoc(comment="Sets the connection to be used for permissions.", since="4.1.9") void setConnection(Connection connection) Sets the connection to be used for permissions.- Parameters:
connection
- A connection.- Since:
- 4.1.9
-
getGroupsName
Provides the name of groups.- Returns:
- The groups name.
- Since:
- 4.1.9
-
getActivityNames
@ApiDoc(comment="Provides a list of names for defined activities.", since="4.1.9") List<String> getActivityNames()Provides a list of names for defined activities.- Returns:
- A list of activity names.
- Since:
- 4.1.9
-
isInherited
@ApiDoc(comment="Indicates that permissions of this container are inherited.", since="4.1.9") boolean isInherited()Indicates that permissions of this container are inherited.- Returns:
true
, if inherited.- Since:
- 4.1.9
-
setInherited
@ApiDoc(comment="Defines the permissions to be inherited.", since="4.1.9") void setInherited(boolean inherited) Defines the permissions to be inherited.- Parameters:
inherited
-true
, defining the permissions as inherited.- Since:
- 4.1.9
-
getPriority
@ApiDoc(comment="Provides the priority setting for this permissions.", since="4.1.9") @NotNull @NotNull Priority getPriority()Provides the priority setting for this permissions.- Returns:
- The priorities.
- Since:
- 4.1.9
-
setPriority
@ApiDoc(comment="Set the priorities for this permissions.", since="4.1.9") void setPriority(Priority priority) Set the priorities for this permissions.- Parameters:
priority
- Some priorities.- Since:
- 4.1.9
-
getAllowed
@ApiDoc(comment="Returns all allowed group IDs, if the permissions are not inherited.", since="4.1.9") Set<String> getAllowed(String operation) Returns all allowed group IDs, if the permissions are not inherited. Otherwise, the method returns an empty set.All groups explicitly set to
allowed
are allowed, as well as their respective child groups.- Parameters:
operation
- The operation name.- Returns:
- The set of group IDs that are allowed for the given operation.
- Since:
- 4.1.9
-
getAllowedExplicit
@ApiDoc(comment="Returns all explicitly allowed group paths, if the permissions are not inherited.", since="4.1.9") Set<String> getAllowedExplicit(String operation) Returns all explicitly allowed group paths, if the permissions are not inherited. Otherwise, the method returns an empty set.- Parameters:
operation
- The operation name.- Returns:
- A set of groups.
- Since:
- 4.1.9
-
setAllowed
@ApiDoc(comment="Sets the allowed groups for the given operation.", since="4.1.9") void setAllowed(String operation, Collection<String> groups) Sets the allowed groups for the given operation.- Parameters:
operation
- The operation name.groups
- The groups targeted.- Since:
- 4.1.9
-
getForbidden
@ApiDoc(comment="Returns all forbidden group IDs, if the permissions are not inherited.", since="4.1.9") Set<String> getForbidden(String operation) Returns all forbidden group IDs, if the permissions are not inherited. Otherwise, the method returns an empty set.Groups that is not explicitly
allowed
are forbidden, as well as groups that are explicitly set toforbidden
and their respective child groups.- Parameters:
operation
- The operation name.- Returns:
- The set of group IDs that are forbidden for the given operation.
- Since:
- 4.1.9
-
getForbiddenExplicit
@ApiDoc(comment="Returns all explicitly forbidden group paths, if the permissions are not inherited.", since="4.1.9") Set<String> getForbiddenExplicit(String operation) Returns all explicitly forbidden group paths, if the permissions are not inherited. Otherwise, the method returns an empty set.- Parameters:
operation
- The operation name.- Returns:
- A set of groups.
- Since:
- 4.1.9
-
setForbidden
@ApiDoc(comment="Sets the forbidden groups for the given operation.", since="4.1.9") void setForbidden(String operation, Collection<String> groups) Sets the forbidden groups for the given operation.- Parameters:
operation
- The operation name.groups
- The groups targeted.- Since:
- 4.1.9
-
getNotifier
@ApiDoc(comment="Provides a notifier on changes within these permissions.", since="4.1.9") de.espirit.common.event.SimpleValueChangeNotifier getNotifier()Provides a notifier on changes within these permissions.- Returns:
- A notifier.
- Since:
- 4.1.9
-
addChangeListener
@ApiDoc(comment="Adds a listener being informed on changes within these permissions.", since="4.1.9") void addChangeListener(de.espirit.common.event.ValueChangeListener listener) Adds a listener being informed on changes within these permissions.- Specified by:
addChangeListener
in interfaceValueChangeNotifier
- Parameters:
listener
- A listener.- Since:
- 4.1.9
-
removeChangeListener
@ApiDoc(comment="Removes a listener.", since="4.1.9") void removeChangeListener(de.espirit.common.event.ValueChangeListener listener) Removes a listener.- Specified by:
removeChangeListener
in interfaceValueChangeNotifier
- Parameters:
listener
- A listener.- Since:
- 4.1.9
-