org.eclipse.stardust.engine.api.runtime
Interface RuntimePermissions

All Superinterfaces:
Serializable

public interface RuntimePermissions
extends Serializable

RuntimePermissions present permissions that are changeable at runtime. While other permissions are bound to model elements in the process model RuntimePermissions can be set via the public API.

Author:
roland.stamm

Method Summary
 Set<String> getAllPermissionIds()
          Retrieves a set of all permissionIds which can be used to set and retrieve grants for.
 Set<ModelParticipantInfo> getDeniedGrants(String permissionId)
          Retrieves the currently set of denied grants for the Permission.
 Set<ModelParticipantInfo> getGrants(String permissionId)
          Retrieves the currently set grants for the Permission.
 boolean hasAllGrant(String permissionId)
          Allows to check if the all-grant is set for the specified permissionId.
 boolean isDefaultGrant(String permissionId)
          Allows to check if the currently set grants are the default grants for the specified.
 void setAllGrant(String permissionId)
          Sets the all-grant to the specified Permission.
 void setDeniedGrants(String permissionId, Set<ModelParticipantInfo> grants)
          Allows setting a set of ModelParticipantInfo corresponding to a denied grant to the specified Permission for certain Roles or Organizations.
 void setGrants(String permissionId, Set<ModelParticipantInfo> grants)
          Allows setting a set of ModelParticipantInfo.
 

Method Detail

getAllPermissionIds

Set<String> getAllPermissionIds()
Retrieves a set of all permissionIds which can be used to set and retrieve grants for.

Returns:
all permissionIds
See Also:
GlobalPermissionConstants

getGrants

Set<ModelParticipantInfo> getGrants(String permissionId)
Retrieves the currently set grants for the Permission. If the all-grant is set this set is empty.

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
Returns:
the currently set grants.
See Also:
GlobalPermissionConstants, hasAllGrant(String)

getDeniedGrants

Set<ModelParticipantInfo> getDeniedGrants(String permissionId)
Retrieves the currently set of denied grants for the Permission. If the all-grant is set this set is empty.

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
Returns:
the currently denied grants.
See Also:
GlobalPermissionConstants, hasAllGrant(String)

setGrants

void setGrants(String permissionId,
               Set<ModelParticipantInfo> grants)
Allows setting a set of ModelParticipantInfo. This can be used to grant the specified Permission for certain Roles or Organizations. The ModelParticipantInfo must not be scoped with a department.

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
grants - a set of grants which will replace the existing ones.
Throws:
IllegalArgumentException - If the ModelParticipantInfo is department scoped.
See Also:
GlobalPermissionConstants

setDeniedGrants

void setDeniedGrants(String permissionId,
                     Set<ModelParticipantInfo> grants)
Allows setting a set of ModelParticipantInfo corresponding to a denied grant to the specified Permission for certain Roles or Organizations. The ModelParticipantInfo must not be scoped with a department.

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
grants - a set of denied grants which will replace the existing ones.
Throws:
IllegalArgumentException - If the ModelParticipantInfo is department scoped.
See Also:
GlobalPermissionConstants

setAllGrant

void setAllGrant(String permissionId)
Sets the all-grant to the specified Permission. By doing this all other grants and denied grants will be removed.

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
See Also:
GlobalPermissionConstants

hasAllGrant

boolean hasAllGrant(String permissionId)
Allows to check if the all-grant is set for the specified permissionId.

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
Returns:
true if the all-grant is set for the specified permissionId.
See Also:
GlobalPermissionConstants

isDefaultGrant

boolean isDefaultGrant(String permissionId)
Allows to check if the currently set grants are the default grants for the specified. permissionId

Parameters:
permissionId - the id of the permission from GlobalPermissionConstants
Returns:
true if the specified permissionId currently has its default grant assigned.
See Also:
GlobalPermissionConstants


Copyright © 2017 Eclipse Stardust. All Rights Reserved.