Package org.gitana.platform.client.support

# Interface AccessControllable

All Known Subinterfaces:
  `Application`, `Archive`, `AssociationDefinition`, `BillingProviderConfiguration`, `Branch`, `Client`, `Cluster`, `ClusterDataStore`, `DataStore`, `Definition`, `Directory`, `Domain`, `DomainGroup`, `DomainPrincipal`, `DomainUser`, `FeatureDefinition`, `Form`, `Group`, `Node`, `NodeList`, `Person`, `Platform`, `PlatformDataStore`, `Project`, `Registrar`, `Release`, `Repository`, `Rule`, `Stack`, `TypeDefinition`, `Vault`, `WebHost`

All Known Implementing Classes:
  `AbstractClusterDataStoreImpl`, `AbstractDataStoreImpl`, `AbstractDefinitionImpl`, `AbstractDomainPrincipalImpl`, `AbstractPlatformDataStoreImpl`, `ApplicationImpl`, `ArchiveImpl`, `AssociationDefinitionImpl`, `BillingProviderConfigurationImpl`, `BranchImpl`, `ClientImpl`, `ClusterImpl`, `DirectoryImpl`, `DomainGroupImpl`, `DomainImpl`, `DomainUserImpl`, `FeatureDefinitionImpl`, `FormImpl`, `GroupImpl`, `NodeImpl`, `NodeListImpl`, `PersonImpl`, `PlatformImpl`, `ProjectImpl`, `RegistrarImpl`, `ReleaseImpl`, `RepositoryImpl`, `RuleImpl`, `StackImpl`, `TypeDefinitionImpl`, `VaultImpl`, `WebHostImpl`

public interface AccessControllable

Author:
  uzi

## Method Summary

Modifier and Type
Method
Description
`ACL`
`getACL()`
`List<String>`
`getACL(String principalId)`
Retrieve the authorities that a principal has.
`Map<String,Map<String,org.gitana.platform.services.authority.AuthorityGrant>>`
`getAuthorityGrants(List<String> principalIds)`
Acquires a map of authority grants for a set of principals.
`void`
`grant(String principalId, String authorityId)`
Grants an authority to a principal.
`void`
`grant(DomainPrincipal principal, String authorityId)`
`boolean`
`hasAuthority(String principalId, String authorityId)`
Checks whether the principal has the given authority over this object.
`boolean`
`hasAuthority(DomainPrincipal principal, String authorityId)`
`boolean`
`hasPermission(String principalId, String permissionId)`
Checks whether the principal has the given permission over this object.
`boolean`
`hasPermission(DomainPrincipal principal, String permissionId)`
`void`
`revoke(String principalId, String authorityId)`
Revokes an authority for a principal.
`void`
`revoke(DomainPrincipal principal, String authorityId)`
`void`
`revokeAll(String principalId)`
Revoke all authorities for a principal.
`void`
`revokeAll(DomainPrincipal principal)`

## Method Details

### getACL

ACL getACL()

Returns:
  access control list

### getACL

List<String> getACL(String principalId)
Retrieve the authorities that a principal has.

Parameters:
  `principalId` -
Returns:
  list

### grant

void grant(String principalId, String authorityId)
Grants an authority to a principal.

Parameters:
  `principalId` -
  `authorityId` -

### grant

void grant(DomainPrincipal principal, String authorityId)

### revoke

void revoke(String principalId, String authorityId)
Revokes an authority for a principal.

Parameters:
  `principalId` -
  `authorityId` -

### revoke

void revoke(DomainPrincipal principal, String authorityId)

### revokeAll

void revokeAll(String principalId)
Revoke all authorities for a principal.

Parameters:
  `principalId` -

### revokeAll

void revokeAll(DomainPrincipal principal)

### hasAuthority

boolean hasAuthority(String principalId, String authorityId)
Checks whether the principal has the given authority over this object.

Parameters:
  `principalId` -
  `authorityId` -
Returns:

### hasAuthority

boolean hasAuthority(DomainPrincipal principal, String authorityId)

### getAuthorityGrants

Map<String,Map<String,org.gitana.platform.services.authority.AuthorityGrant>> getAuthorityGrants(List<String> principalIds)
Acquires a map of authority grants for a set of principals.

Parameters:
  `principalIds` -
Returns:

### hasPermission

boolean hasPermission(String principalId, String permissionId)
Checks whether the principal has the given permission over this object.

Parameters:
  `principalId` -
  `permissionId` -
Returns:

### hasPermission

boolean hasPermission(DomainPrincipal principal, String permissionId)