public final class TucsonACCTool
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
activateContext(java.lang.String agentAid,
java.util.UUID agentUUID,
java.lang.String agentClass,
TupleCentreId tid,
EnhancedACC acc)
Activates a coordination context for a given agent.
|
static Role |
activateRole(java.lang.String agentAid,
java.util.UUID accUUID,
java.lang.String agentClass,
java.lang.String roleName,
TupleCentreId tid,
EnhancedACC acc)
Activates a given role for the given agent.
|
static Role |
activateRoleWithPolicy(java.lang.String agentAid,
java.util.UUID accUUID,
java.lang.String agentClass,
Policy policy,
TupleCentreId tid,
EnhancedACC acc)
Activates a RBAC role given its policy for a given agent.
|
static java.lang.String |
encrypt(java.lang.String password)
Encrypts the given String using standard Java security library and
cryptography algorithms, such as SHA-256.
|
static java.util.List<Policy> |
getPoliciesList(java.lang.String agentClass,
TupleCentreId tid,
EnhancedACC acc)
Gets the list of policies available for the given RBAC agent class.
|
public static boolean activateContext(java.lang.String agentAid, java.util.UUID agentUUID, java.lang.String agentClass, TupleCentreId tid, EnhancedACC acc)
agentAid
- the ID of the agentagentUUID
- the UUID assigned to the agentagentClass
- the RBAC agent class of the agenttid
- the tuple centre bookeeping activationsacc
- the ACC used to perform the activationtrue
or false
depending on whether activation is
successful or notpublic static Role activateRole(java.lang.String agentAid, java.util.UUID accUUID, java.lang.String agentClass, java.lang.String roleName, TupleCentreId tid, EnhancedACC acc) throws AgentNotAllowedException
agentAid
- the ID of the agentaccUUID
- the UUID assigned to the agentagentClass
- the RBAC agent class of the agentroleName
- the name of the role to activatetid
- the tuple centre bookeeping activationsacc
- the ACC used to perform the activationAgentNotAllowedException
- if the agent is not allowed to activate the given rolepublic static Role activateRoleWithPolicy(java.lang.String agentAid, java.util.UUID accUUID, java.lang.String agentClass, Policy policy, TupleCentreId tid, EnhancedACC acc)
agentAid
- the ID of the agentaccUUID
- the UUID assigned to the agentagentClass
- the RBAC agent class of the agentpolicy
- the policy whose role should be activatedtid
- the tuple centre bookeeping activationsacc
- the ACC used to perform the activationpublic static java.lang.String encrypt(java.lang.String password)
password
- the String to encryptpublic static java.util.List<Policy> getPoliciesList(java.lang.String agentClass, TupleCentreId tid, EnhancedACC acc)
agentClass
- the RBAC agent class whose associated policies should be
retrievedtid
- the tuple centre bookeeping associationsacc
- the ACC used to perform the query