Blue Mind
Release 1.0

net.bluemind.core.api.services
Interface IAcl

All Known Implementing Classes:
AclClient

public interface IAcl

Manage Blue Mind entity ACLs.

An entity, or consumer, can be one of:

A consumer can be one of:

entityId and consumerId is ID of the corresponding Blue Mind Entity (ie: IEntity.getId() - eg: userbm.id)

An action can be one of:


Method Summary
 boolean canAccess(AccessToken at, java.lang.String consumer, java.lang.Integer consumerId, java.lang.String entity, java.lang.Integer entityId)
          Check if consumer has access right on entity
 boolean canAdmin(AccessToken at, java.lang.String consumer, java.lang.Integer consumerId, java.lang.String entity, java.lang.Integer entityId)
          Check if consumer has admin right on entity
 boolean canRead(AccessToken at, java.lang.String consumer, java.lang.Integer consumerId, java.lang.String entity, java.lang.Integer entityId)
          Check if consumer has read right on entity
 boolean canWrite(AccessToken at, java.lang.String consumer, java.lang.Integer consumerId, java.lang.String entity, java.lang.Integer entityId)
          Check if consumer has write right on entity
 void denyAll(AccessToken at, java.lang.String entity, java.lang.Integer entityId)
          Remove all ACLs on a Blue Mind entity
 java.util.List<AclEntity> getAllowedEntities(AccessToken at, java.lang.String entity, java.lang.Integer userId, java.lang.String right)
          Get user allowed entities.
 java.util.List<AclEntity> getEntityConsumers(AccessToken at, java.lang.String entity, java.lang.Integer entityId)
          Get entity consumer list
 void setConsumerRights(AccessToken at, java.lang.String consumer, java.lang.Integer consumerId, java.lang.String entity, java.lang.Integer entityId, Rights rights)
          Set Right on entity for consumer
 void setConsumersRights(AccessToken at, java.util.Collection<AclEntity> consumers, java.lang.String entity, java.lang.Integer entityId)
          Set consumer right on an entity
 void setRight(AccessToken at, java.lang.String consumer, java.lang.Integer consumerId, java.lang.String entity, java.lang.Integer entityId, java.lang.String action, java.lang.Integer right)
          Set action right on entity for consumer
 

Method Detail

denyAll

void denyAll(AccessToken at,
             java.lang.String entity,
             java.lang.Integer entityId)
             throws AuthFault,
                    ServerFault
Remove all ACLs on a Blue Mind entity

Parameters:
at - Blue Mind AccessToken
entity - entity string, check IAcl
entityId - entity ID, check IAcl
Throws:
AuthFault
ServerFault

setRight

void setRight(AccessToken at,
              java.lang.String consumer,
              java.lang.Integer consumerId,
              java.lang.String entity,
              java.lang.Integer entityId,
              java.lang.String action,
              java.lang.Integer right)
              throws AuthFault,
                     ServerFault
Set action right on entity for consumer

Parameters:
at - Blue Mind AccessToken
consumer - consumer string, check IAcl
consumerId - consumer ID, check IAcl
entity - entity string, check IAcl
entityId - entity ID, check IAcl
action - right action, check IAcl
right - set this right (1), unset this right (0)
Throws:
AuthFault
ServerFault

setConsumerRights

void setConsumerRights(AccessToken at,
                       java.lang.String consumer,
                       java.lang.Integer consumerId,
                       java.lang.String entity,
                       java.lang.Integer entityId,
                       Rights rights)
                       throws AuthFault,
                              ServerFault
Set Right on entity for consumer

Parameters:
at - Blue Mind AccessToken
consumer - consumer string, check IAcl
consumerId - consumer string, check IAcl
entity - entity string, check IAcl
entityId - entity ID, check IAcl
rights - Right
Throws:
AuthFault
ServerFault

canAccess

boolean canAccess(AccessToken at,
                  java.lang.String consumer,
                  java.lang.Integer consumerId,
                  java.lang.String entity,
                  java.lang.Integer entityId)
                  throws AuthFault,
                         ServerFault
Check if consumer has access right on entity

Parameters:
at - Blue Mind AccessToken
consumer - consumer string, check IAcl
consumerId - consumer string, check IAcl
entity - entity string, check IAcl
entityId - entity ID, check IAcl
Returns:
true if consumer has access right on entity, false otherwise
Throws:
AuthFault
ServerFault

canRead

boolean canRead(AccessToken at,
                java.lang.String consumer,
                java.lang.Integer consumerId,
                java.lang.String entity,
                java.lang.Integer entityId)
                throws AuthFault,
                       ServerFault
Check if consumer has read right on entity

Parameters:
at - Blue Mind AccessToken
consumer - consumer string, check IAcl
consumerId - consumer string, check IAcl
entity - entity string, check IAcl
entityId - entity ID, check IAcl
Returns:
true if consumer has read right on entity, false otherwise
Throws:
AuthFault
ServerFault

canWrite

boolean canWrite(AccessToken at,
                 java.lang.String consumer,
                 java.lang.Integer consumerId,
                 java.lang.String entity,
                 java.lang.Integer entityId)
                 throws AuthFault,
                        ServerFault
Check if consumer has write right on entity

Parameters:
at - Blue Mind AccessToken
consumer - consumer string, check IAcl
consumerId - consumer string, check IAcl
entity - entity string, check IAcl
entityId - entity ID, check IAcl
Returns:
true if consumer has write right on entity, false otherwise
Throws:
AuthFault
ServerFault

canAdmin

boolean canAdmin(AccessToken at,
                 java.lang.String consumer,
                 java.lang.Integer consumerId,
                 java.lang.String entity,
                 java.lang.Integer entityId)
                 throws AuthFault,
                        ServerFault
Check if consumer has admin right on entity

Parameters:
at - Blue Mind AccessToken
consumer - consumer string, check IAcl
consumerId - consumer string, check IAcl
entity - entity string, check IAcl
entityId - entity ID, check IAcl
Returns:
true if consumer has admin right on entity, false otherwise
Throws:
AuthFault
ServerFault

getEntityConsumers

java.util.List<AclEntity> getEntityConsumers(AccessToken at,
                                             java.lang.String entity,
                                             java.lang.Integer entityId)
                                             throws AuthFault,
                                                    ServerFault
Get entity consumer list

Parameters:
at - Blue Mind AccessToken
entity - entity string, check IAcl
entityId - entity ID, check IAcl
Returns:
consumer AclEntity list
Throws:
AuthFault
ServerFault

getAllowedEntities

java.util.List<AclEntity> getAllowedEntities(AccessToken at,
                                             java.lang.String entity,
                                             java.lang.Integer userId,
                                             java.lang.String right)
                                             throws AuthFault,
                                                    ServerFault
Get user allowed entities.

Parameters:
at - Blue Mind AccessToken
entity - entity string, check IAcl
userId - User ID
right - right string, check IAcl. Could be null to get allowed entities whatever user right on it
Returns:
entity AclEntity list for user
Throws:
AuthFault
ServerFault

setConsumersRights

void setConsumersRights(AccessToken at,
                        java.util.Collection<AclEntity> consumers,
                        java.lang.String entity,
                        java.lang.Integer entityId)
                        throws AuthFault,
                               ServerFault
Set consumer right on an entity

Parameters:
at - Blue Mind AccessToken
consumers - consumer AclEntity list
entity - entity string, check IAcl
entityId - User ID
Throws:
AuthFault
ServerFault

Blue Mind
Release 1.0