com.metamatrix.console.models
Class EntitlementManager
java.lang.Object
com.metamatrix.console.models.Manager
com.metamatrix.console.models.EntitlementManager
- All Implemented Interfaces:
- EntitlementsDataInterface
public class EntitlementManager
- extends Manager
- implements EntitlementsDataInterface
The EntitlementManager handles all calls to the MetaMatrix server for viewing and modifying
entitlements.
Method Summary |
void |
changeAPolicy(PermissionDataNodeTreeView treeView,
AuthorizationPolicy policy,
java.lang.String newDescription,
java.util.Collection addedGroupPrincipals,
java.util.Collection removedGroupPrincipals,
java.util.List changedPermissions)
|
void |
createNewEntitlement(java.lang.String entitlementName,
java.lang.String entitlementDescription,
java.lang.String vdbName,
int vdbVersion,
EntitlementsTableRowData dataNodesSameAsEntitlement,
EntitlementsTableRowData principalsSameAsEntitlement)
|
void |
deleteEntitlement(AuthorizationPolicyID id)
|
boolean |
doesEntitlementExist(java.lang.String entName,
java.lang.String vdbName,
int vdbVersion)
|
java.util.Collection |
getAllEntitlements()
|
java.util.Collection |
getAllVDBs()
|
EntitlementInfo |
getEntitlementInfo(java.lang.String entName,
java.lang.String vdbName,
int vdbVersion)
|
EntitlementsTableRowData[] |
getEntitlements()
|
java.util.List |
getEntitlementsForVDB(java.lang.String vdbName,
int vdbVersion)
|
AuthorizationPolicy |
getPolicy(AuthorizationPolicyID policyID)
Obtains an AuthorizationPolicy. |
java.util.List |
getPolicyIDs()
|
java.util.Collection |
getPrincipalsForEntitlement(AuthorizationPolicyID policyID)
|
PermissionDataNodeTreeView |
getTreeViewForData(java.lang.String vdbName,
int vdbVersion,
AuthorizationPolicyID policyID)
|
int[] |
getVersionsForVDB(java.lang.String vdbName)
|
void |
init()
Needs to be called by subclasses - sets up event
listening. |
void |
setPermissionNodeAuths(java.util.Collection changedPermissions)
Internal private methods |
Methods inherited from class com.metamatrix.console.models.Manager |
addManagerListener, fireModelChangedEvent, fireModelChangedEvent, getConnection, getConnection, getEncryptor, getEventListeners, getIsStale, refresh, removeManagerListener, setIsStale |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntitlementManager
public EntitlementManager(ConnectionInfo connection)
init
public void init()
- Description copied from class:
Manager
- Needs to be called by subclasses - sets up event
listening. (Subclasses should call super.init() in the body of their
init() method.)
TODO: Perhaps this superclass should set itself to stale as
part of the initialization process (see commented code in method body).
That would broadcast an event to listeners which would prompt them to
begin calling methods on a Manager - or perhaps a start() method
with this code should
be defined that will be called after init() (allowing subclasses to
extend init() before start() would be called)
- Overrides:
init
in class Manager
deleteEntitlement
public void deleteEntitlement(AuthorizationPolicyID id)
throws ExternalException,
ComponentNotFoundException,
AuthorizationException
- Specified by:
deleteEntitlement
in interface EntitlementsDataInterface
- Throws:
ExternalException
ComponentNotFoundException
AuthorizationException
getPrincipalsForEntitlement
public java.util.Collection getPrincipalsForEntitlement(AuthorizationPolicyID policyID)
throws ExternalException,
AuthorizationException,
ComponentNotFoundException
- Returns:
- the Principals that are inside the AuthorizationPolicy for the specified Entitlement.
- Throws:
ExternalException
AuthorizationException
ComponentNotFoundException
getPolicy
public AuthorizationPolicy getPolicy(AuthorizationPolicyID policyID)
throws AuthorizationException,
ComponentNotFoundException,
ExternalException
- Obtains an AuthorizationPolicy.
- Parameters:
policyID
- the AuthorizationPolicyID - exposed only as Object outside this manager
- Returns:
- the AuthorizationPolicy for the specified ID
- Throws:
AuthorizationException
ComponentNotFoundException
ExternalException
getAllEntitlements
public java.util.Collection getAllEntitlements()
throws ExternalException,
AuthorizationException
- Throws:
ExternalException
AuthorizationException
getEntitlements
public EntitlementsTableRowData[] getEntitlements()
throws AuthorizationException,
ExternalException
- Specified by:
getEntitlements
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
getPolicyIDs
public java.util.List getPolicyIDs()
throws AuthorizationException,
ExternalException
- Specified by:
getPolicyIDs
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
getAllVDBs
public java.util.Collection getAllVDBs()
throws AuthorizationException,
ExternalException,
ComponentNotFoundException
- Specified by:
getAllVDBs
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
ComponentNotFoundException
getVersionsForVDB
public int[] getVersionsForVDB(java.lang.String vdbName)
throws AuthorizationException,
ExternalException,
ComponentNotFoundException
- Specified by:
getVersionsForVDB
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
ComponentNotFoundException
createNewEntitlement
public void createNewEntitlement(java.lang.String entitlementName,
java.lang.String entitlementDescription,
java.lang.String vdbName,
int vdbVersion,
EntitlementsTableRowData dataNodesSameAsEntitlement,
EntitlementsTableRowData principalsSameAsEntitlement)
throws AuthorizationException,
ExternalException
- Throws:
AuthorizationException
ExternalException
doesEntitlementExist
public boolean doesEntitlementExist(java.lang.String entName,
java.lang.String vdbName,
int vdbVersion)
throws AuthorizationException,
ExternalException,
ComponentNotFoundException
- Specified by:
doesEntitlementExist
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
ComponentNotFoundException
getEntitlementInfo
public EntitlementInfo getEntitlementInfo(java.lang.String entName,
java.lang.String vdbName,
int vdbVersion)
throws AuthorizationException,
ExternalException,
ComponentNotFoundException
- Specified by:
getEntitlementInfo
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
ComponentNotFoundException
changeAPolicy
public void changeAPolicy(PermissionDataNodeTreeView treeView,
AuthorizationPolicy policy,
java.lang.String newDescription,
java.util.Collection addedGroupPrincipals,
java.util.Collection removedGroupPrincipals,
java.util.List changedPermissions)
throws AuthorizationException,
ExternalException
- Throws:
AuthorizationException
ExternalException
getTreeViewForData
public PermissionDataNodeTreeView getTreeViewForData(java.lang.String vdbName,
int vdbVersion,
AuthorizationPolicyID policyID)
throws AuthorizationException,
ExternalException
- Specified by:
getTreeViewForData
in interface EntitlementsDataInterface
- Throws:
AuthorizationException
ExternalException
getEntitlementsForVDB
public java.util.List getEntitlementsForVDB(java.lang.String vdbName,
int vdbVersion)
throws AuthorizationException,
ExternalException
- Throws:
AuthorizationException
ExternalException
setPermissionNodeAuths
public void setPermissionNodeAuths(java.util.Collection changedPermissions)
- Internal private methods
Copyright © 2009. All Rights Reserved.