Class AuthorizationUtil
java.lang.Object
com.sas.services.information.metadata.AuthorizationUtil
- All Implemented Interfaces:
AuthorizationBaseInterface,AuthorizationUtilInterface,Serializable,Remote
Methods for managing authorizations on a protected object
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply an ACT to protect an objectvoidcommit()Commit Authorization Changes Any pending Authorization changes will be committed on the Server.voiddiscard()Discard Authorization Changes Any pending Authorization changes will be discarded on the Server.getACTs()Get ACTs that protect an objectList<String> Obtain permissions Applicable to a Protected Object or ACT Permission Pattern based on Object's PublicTypegetAuthorizations(IdentityInterface identity, List<String> permissions) Get AuthorizationsgetAuthorizations(List<IdentityInterface> identities, List<String> permissions) Get AuthorizationsGet Authorizations AllgetAuthorizationsExplained(IdentityInterface identity, List<String> permissions) Get Authorizations with Indirect Authorization Sources ExplainedgetAuthorizationsExplained(List<IdentityInterface> identities, List<String> permissions) Get Authorizations with Indirect Authorization Sources ExplainedGet Authorizations with Indirect Authorization Sources Explained AllbooleanObtains boolean indicating if Authorization changes are committed when the object is updatedList<AuthorizationIdentityInfoInterface> Get IdentitiesGet Inheritance Info for this objectvoidRemove an ACT from protecting an objectvoidsetAuthorizations(IdentityInterface identity, List<PermissionInfoInterface> permissionInfoList) Set AuthorizationsvoidsetAuthorizations(List<AuthorizationInfoInterface> authorizations) Set AuthorizationsvoidsetCommitOnUpdate(boolean commitOnUpdate) Set boolean indicating to Commit Authorization changes when the object is updatedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AuthorizationUtil
-
-
Method Details
-
getCommitOnUpdate
Obtains boolean indicating if Authorization changes are committed when the object is updated- Specified by:
getCommitOnUpdatein interfaceAuthorizationBaseInterface- Returns:
- boolean value indicating if Authorization changes are committed when the object is updated
- Throws:
com.sas.metadata.remote.MdExceptionRemoteException- In the event of remote object failure.ServiceException
-
setCommitOnUpdate
Set boolean indicating to Commit Authorization changes when the object is updated- Specified by:
setCommitOnUpdatein interfaceAuthorizationBaseInterface- Parameters:
boolean- value indicating to Commit Authorization changes when the object is updated- Throws:
com.sas.metadata.remote.MdExceptionRemoteException- In the event of remote object failure.ServiceException
-
getApplicablePermissions
Obtain permissions Applicable to a Protected Object or ACT Permission Pattern based on Object's PublicTypeWe do think it "fits" in this Interface because its useful to know the permissions applicable to an Object's PublicType prior to invoking
- Specified by:
getApplicablePermissionsin interfaceAuthorizationBaseInterface- Returns:
- String Comma delimited list of Permission names
- Throws:
ServiceExceptionRemoteException- In the event of remote object failure.
-
getIdentityInfo
public List<AuthorizationIdentityInfoInterface> getIdentityInfo() throws ServiceException, RemoteExceptionGet Identities- Specified by:
getIdentityInfoin interfaceAuthorizationBaseInterface- Returns:
- A List of
IdentityInterfaceobjects - Throws:
ServiceException- if a service level error occurs.RemoteException- In the event of remote object failure.
-
getAuthorizations
public AuthorizationInfoInterface getAuthorizations(IdentityInterface identity, List<String> permissions) throws IllegalArgumentException, ServiceException, RemoteException Get Authorizations- Specified by:
getAuthorizationsin interfaceAuthorizationBaseInterface- Parameters:
identity- A singleIdentityInterfaceobject to test permissions for. if identity is null then an empty List is returned.permissions- A List of String objects specifying the permissions to check. If null or an empty List, all applicable permissions for the object are returned.- Returns:
- A List of
AuthorizationInfoInterfaceobjects ' - Throws:
IllegalArgumentException- If the identity parameter reference is nullServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getAuthorizations
public List<AuthorizationInfoInterface> getAuthorizations(List<IdentityInterface> identities, List<String> permissions) throws ServiceException, RemoteException Get Authorizations- Specified by:
getAuthorizationsin interfaceAuthorizationBaseInterface- Parameters:
identities- A List ofIdentityInterfaceobjects to test permissions for. If null or an empty list then a List of AuthorizationInfoInterface objects for all identities are returned.permissions- A List of Strings specifying the permissions to check. If null or an empty List, all applicable permissions for all specified identities on the object represented by this AuthContext instance are returned.- Returns:
- A List of
AuthorizationInfoInterfaceobjects - Throws:
ServiceException- if a service level error occurs.RemoteException- in the event of remote object failure.
-
getAuthorizationsAll
public List<AuthorizationInfoInterface> getAuthorizationsAll() throws ServiceException, RemoteExceptionGet Authorizations All- Specified by:
getAuthorizationsAllin interfaceAuthorizationBaseInterface- Returns:
- A List of
AuthorizationInfoInterfaceobjects - Throws:
ServiceException- if a service level error occurs.RemoteException- in the event of remote object failure.
-
getInheritanceInfo
public AuthorizationInheritanceInfoInterface getInheritanceInfo() throws ServiceException, RemoteExceptionGet Inheritance Info for this object- Specified by:
getInheritanceInfoin interfaceAuthorizationUtilInterface- Returns:
- The List of
AuthorizationInheritanceInfoInterfaceobjects for the first level parents of this object. Each element on this list contains a nested list ofAuthorizationInheritanceInfoInterfaceobjects which collectively represent the authorization inheritance "tree" for this object. - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getAuthorizationsExplained
public AuthorizationExplainedInfoInterface getAuthorizationsExplained(IdentityInterface identity, List<String> permissions) throws IllegalArgumentException, ServiceException, RemoteException Get Authorizations with Indirect Authorization Sources Explained- Specified by:
getAuthorizationsExplainedin interfaceAuthorizationBaseInterface- Parameters:
identity- A singleIdentityInterfaceobject representing a User, Group, or Role for which permissions are sought.permissions- A List ofStringobjects where each string specifies a requested permissions. If the List is null or empty, all applicable permissions for all identities corresponding to authorizations on the object are returned.- Returns:
- A List of
PermissionExplainedInfoInterfaceobjects with the resulting authorization data. - Throws:
IllegalArgumentException- If theIdentityparameter reference is nullServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getAuthorizationsExplained
public List<AuthorizationExplainedInfoInterface> getAuthorizationsExplained(List<IdentityInterface> identities, List<String> permissions) throws ServiceException, RemoteException Get Authorizations with Indirect Authorization Sources Explained- Specified by:
getAuthorizationsExplainedin interfaceAuthorizationBaseInterface- Parameters:
identities- A List ofIdentityInterfaceobjects representing the Users, Groups, or Roles for which permissions are sought. If the List is null or empty, Permissions for all relevant identities are returned.permissions- A List ofStringobjects where each string specifies a requested permissions. If the List is null or empty, all applicable permissions for all identities corresponding to authorizations on the object are returned.- Returns:
- A List of
AuthorizationExplainedInfoInterfaceobjects with the resulting authorization data. - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getAuthorizationsExplainedAll
public List<AuthorizationExplainedInfoInterface> getAuthorizationsExplainedAll() throws ServiceException, RemoteExceptionGet Authorizations with Indirect Authorization Sources Explained All- Specified by:
getAuthorizationsExplainedAllin interfaceAuthorizationBaseInterface- Returns:
- A List of
AuthorizationExplainedInfoInterfaceobjects with the resulting authorization data. - Throws:
ServiceException- if a service level error occurs.RemoteException- in the event of remote object failure.
-
setAuthorizations
public void setAuthorizations(IdentityInterface identity, List<PermissionInfoInterface> permissionInfoList) throws IllegalArgumentException, ServiceException, RemoteException Set Authorizations- Specified by:
setAuthorizationsin interfaceAuthorizationBaseInterface- Parameters:
identity- An IdentityInterface object representing the Identity for which permissions are setpermissionInfoList- A List of one or morePermissionInfoInterfaceobjects defining the permission(s) to set.permissions- A List of PermissionInfoInterface instances describing the permission(s) to set- Throws:
IllegalArgumentException- If theIdentityparameter reference is null If the permissionInfoList parameter reference is nullServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setAuthorizations
public void setAuthorizations(List<AuthorizationInfoInterface> authorizations) throws ServiceException, RemoteException Set Authorizations- Specified by:
setAuthorizationsin interfaceAuthorizationBaseInterface- Parameters:
authorizations- A List ofAuthorizationInfoInterfaceobjects defining the authorizations to set on the object- Throws:
IllegalArgumentException- If the authorizations List parameter reference is nullServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getACTs
Get ACTs that protect an object- Specified by:
getACTsin interfaceAuthorizationUtilInterface- Returns:
- A List of
AccessControlTemplateInterfaceobjects representing the ACT's associated to the object. - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
applyACT
public void applyACT(AccessControlTemplateInterface act) throws IllegalArgumentException, ServiceException, RemoteException Apply an ACT to protect an object- Specified by:
applyACTin interfaceAuthorizationUtilInterface- Parameters:
act- AnAccessControlTemplateInterfaceobject for the ACT being applied.- Throws:
IllegalArgumentException- If the authorizations act parameter reference is nullServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
removeACT
public void removeACT(AccessControlTemplateInterface act) throws IllegalArgumentException, ServiceException, RemoteException Remove an ACT from protecting an object- Specified by:
removeACTin interfaceAuthorizationUtilInterface- Parameters:
act- AnAccessControlTemplateInterfaceobject for the ACT being removed.- Throws:
IllegalArgumentException- If the authorizations act parameter reference is nullServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
commit
Description copied from interface:AuthorizationBaseInterfaceCommit Authorization Changes Any pending Authorization changes will be committed on the Server. Current Authorization state will be reset for the corresponding object.- Specified by:
commitin interfaceAuthorizationBaseInterface- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
discard
Description copied from interface:AuthorizationBaseInterfaceDiscard Authorization Changes Any pending Authorization changes will be discarded on the Server. Current Authorization state will be reset for the corresponding object.- Specified by:
discardin interfaceAuthorizationBaseInterface- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-