public interface Permissions extends ValueChangeNotifier
Permissions
represents the persistence object of PermissionEditorValue
.PermissionEditorValue
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(de.espirit.common.event.ValueChangeListener listener)
Adds a listener being informed on changes within these permissions.
|
Element |
get()
Provides the permissions definition element.
|
List<String> |
getActivityNames()
Provides a list of names for defined activities.
|
Set<String> |
getAllowed(String operation)
Returns all allowed group IDs, if the permissions are not inherited.
|
Set<String> |
getAllowedExplicit(String operation)
Returns all explicitly allowed group paths, if the permissions are not inherited.
|
Set<String> |
getForbidden(String operation)
Returns all forbidden group IDs, if the permissions are not inherited.
|
Set<String> |
getForbiddenExplicit(String operation)
Returns all explicitly forbidden group paths, if the permissions are not inherited.
|
String |
getGroupsName()
Provides the name of groups.
|
de.espirit.common.event.SimpleValueChangeNotifier |
getNotifier()
Provides a notifier on changes within these permissions.
|
Priority |
getPriority()
Provides the priority setting for this permissions.
|
boolean |
isEmpty()
Indicates that no permissions are defined.
|
boolean |
isInherited()
Indicates that permissions of this container are inherited.
|
void |
removeChangeListener(de.espirit.common.event.ValueChangeListener listener)
Removes a listener.
|
void |
set(Element element)
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.
|
@ApiDoc(comment="Indicates that no permissions are defined.", since="4.1.9") boolean isEmpty()
true
, if no permissions are defined.@ApiDoc(comment="Provides the permissions definition element.", since="4.1.9") Element get()
@ApiDoc(comment="Set the permission definition element.", since="4.1.9") void set(Element element)
element
- A permissions element.@ApiDoc(comment="Sets the connection to be used for permissions.", since="4.1.9") void setConnection(Connection connection)
connection
- A connection.@ApiDoc(comment="Provides the name of groups.", since="4.1.9") String getGroupsName()
@ApiDoc(comment="Provides a list of names for defined activities.", since="4.1.9") List<String> getActivityNames()
@ApiDoc(comment="Indicates that permissions of this container are inherited.", since="4.1.9") boolean isInherited()
true
, if inherited.@ApiDoc(comment="Defines the permissions to be inherited.", since="4.1.9") void setInherited(boolean inherited)
inherited
- true
, defining the permissions as inherited.@ApiDoc(comment="Provides the priority setting for this permissions.", since="4.1.9") @NotNull Priority getPriority()
@ApiDoc(comment="Set the priorities for this permissions.", since="4.1.9") void setPriority(Priority priority)
priority
- Some priorities.@ApiDoc(comment="Returns all allowed group IDs, if the permissions are not inherited.", since="4.1.9") Set<String> getAllowed(String operation)
All groups explicitly set to allowed
are allowed, as well as their respective child groups.
operation
- The operation name.@ApiDoc(comment="Returns all explicitly allowed group paths, if the permissions are not inherited.", since="4.1.9") Set<String> getAllowedExplicit(String operation)
operation
- The operation name.@ApiDoc(comment="Sets the allowed groups for the given operation.", since="4.1.9") void setAllowed(String operation, Collection<String> groups)
operation
- The operation name.groups
- The groups targeted.@ApiDoc(comment="Returns all forbidden group IDs, if the permissions are not inherited.", since="4.1.9") Set<String> getForbidden(String operation)
Groups that is not explicitly allowed
are forbidden, as well as groups that
are explicitly set to forbidden
and their respective child groups.
operation
- The operation name.@ApiDoc(comment="Returns all explicitly forbidden group paths, if the permissions are not inherited.", since="4.1.9") Set<String> getForbiddenExplicit(String operation)
operation
- The operation name.@ApiDoc(comment="Sets the forbidden groups for the given operation.", since="4.1.9") void setForbidden(String operation, Collection<String> groups)
operation
- The operation name.groups
- The groups targeted.@ApiDoc(comment="Provides a notifier on changes within these permissions.", since="4.1.9") de.espirit.common.event.SimpleValueChangeNotifier getNotifier()
@ApiDoc(comment="Adds a listener being informed on changes within these permissions.", since="4.1.9") void addChangeListener(de.espirit.common.event.ValueChangeListener listener)
addChangeListener
in interface ValueChangeNotifier
listener
- A listener.@ApiDoc(comment="Removes a listener.", since="4.1.9") void removeChangeListener(de.espirit.common.event.ValueChangeListener listener)
removeChangeListener
in interface ValueChangeNotifier
listener
- A listener.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210