Package com.sun.identity.cli.entitlement
Class ApplicationPrivilegeBase
- java.lang.Object
-
- com.sun.identity.cli.CLICommandBase
-
- com.sun.identity.cli.AuthenticatedCommand
-
- com.sun.identity.cli.entitlement.ApplicationPrivilegeBase
-
- All Implemented Interfaces:
CLICommand
- Direct Known Subclasses:
CreateApplicationPrivilege,DeleteApplicationPrivilege,ListApplicationPrivileges,RemoveApplicationPrivilegeResources,RemoveApplicationPrivilegeSubjects,SetApplicationPrivilegeResources,SetApplicationPrivilegeSubjects,ShowApplicationPrivilege,UpdateApplicationPrivilege
public abstract class ApplicationPrivilegeBase extends AuthenticatedCommand
- Author:
- dennis
-
-
Field Summary
Fields Modifier and Type Field Description static StringPARAM_ACTION_ALLstatic StringPARAM_ACTION_DELEGATEstatic StringPARAM_ACTION_MODIFYstatic StringPARAM_ACTION_READstatic StringPARAM_ACTIONSstatic StringPARAM_ADDstatic StringPARAM_APPL_NAMEstatic StringPARAM_DESCRIPTIONstatic StringPARAM_NAMEstatic StringPARAM_RESOURCESstatic StringPARAM_SUBJECT_GROUPstatic StringPARAM_SUBJECT_TYPEstatic StringPARAM_SUBJECT_USERstatic StringPARAM_SUBJECTS-
Fields inherited from class com.sun.identity.cli.AuthenticatedCommand
ssoToken
-
-
Constructor Summary
Constructors Constructor Description ApplicationPrivilegeBase(ResourceTypeService resourceTypeService, ApplicationServiceFactory applicationServiceFactory)Create an instance ofApplicationPrivilegeBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ApplicationPrivilege.PossibleActiongetActions()protected Map<String,Set<String>>getApplicationResourcesMap(RequestContext rc, String realm)protected Map<String,Set<String>>getApplicationToResources(ApplicationPrivilege appPrivilege)protected StringgetDisplayAction(ApplicationPrivilege appPrivilege)protected Set<SubjectImplementation>getSubjects(RequestContext rc)protected Map<String,Set<String>>getSubjects(ApplicationPrivilege appPrivilege)voidhandleRequest(RequestContext rc)Services a Commandline Request.protected Map<String,Set<String>>mergeMap(Map<String,Set<String>> map1, Map<String,Set<String>> map2)protected voidremoveFromMap(Map<String,Set<String>> map1, Map<String,Set<String>> map2)-
Methods inherited from class com.sun.identity.cli.AuthenticatedCommand
getAdminID, getAdminPassword, getAdminSSOToken, ldapLogin, processFileAttributes, writeLog
-
Methods inherited from class com.sun.identity.cli.CLICommandBase
debugError, debugError, debugMessage, debugWarning, getCommandManager, getOutputWriter, getResourceString, getStringOptionValue, getStringOptionValue, isOptionSet, isVerbose, tokenize
-
-
-
-
Field Detail
-
PARAM_NAME
public static final String PARAM_NAME
- See Also:
- Constant Field Values
-
PARAM_DESCRIPTION
public static final String PARAM_DESCRIPTION
- See Also:
- Constant Field Values
-
PARAM_ADD
public static final String PARAM_ADD
- See Also:
- Constant Field Values
-
PARAM_ACTIONS
public static final String PARAM_ACTIONS
- See Also:
- Constant Field Values
-
PARAM_SUBJECT_TYPE
public static final String PARAM_SUBJECT_TYPE
- See Also:
- Constant Field Values
-
PARAM_SUBJECTS
public static final String PARAM_SUBJECTS
- See Also:
- Constant Field Values
-
PARAM_APPL_NAME
public static final String PARAM_APPL_NAME
- See Also:
- Constant Field Values
-
PARAM_RESOURCES
public static final String PARAM_RESOURCES
- See Also:
- Constant Field Values
-
PARAM_ACTION_READ
public static final String PARAM_ACTION_READ
- See Also:
- Constant Field Values
-
PARAM_ACTION_MODIFY
public static final String PARAM_ACTION_MODIFY
- See Also:
- Constant Field Values
-
PARAM_ACTION_DELEGATE
public static final String PARAM_ACTION_DELEGATE
- See Also:
- Constant Field Values
-
PARAM_ACTION_ALL
public static final String PARAM_ACTION_ALL
- See Also:
- Constant Field Values
-
PARAM_SUBJECT_USER
public static final String PARAM_SUBJECT_USER
- See Also:
- Constant Field Values
-
PARAM_SUBJECT_GROUP
public static final String PARAM_SUBJECT_GROUP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ApplicationPrivilegeBase
public ApplicationPrivilegeBase(ResourceTypeService resourceTypeService, ApplicationServiceFactory applicationServiceFactory)
Create an instance ofApplicationPrivilegeBase.- Parameters:
resourceTypeService- Instance ofResourceTypeService.applicationServiceFactory- Instance ofApplicationServiceFactory.
-
-
Method Detail
-
handleRequest
public void handleRequest(RequestContext rc) throws CLIException
Services a Commandline Request.- Specified by:
handleRequestin interfaceCLICommand- Overrides:
handleRequestin classAuthenticatedCommand- Parameters:
rc- Request Context.- Throws:
CLIException- if the request cannot serviced.
-
getActions
protected ApplicationPrivilege.PossibleAction getActions() throws CLIException
- Throws:
CLIException
-
getSubjects
protected Set<SubjectImplementation> getSubjects(RequestContext rc) throws CLIException
- Throws:
CLIException
-
getApplicationResourcesMap
protected Map<String,Set<String>> getApplicationResourcesMap(RequestContext rc, String realm) throws CLIException, EntitlementException
- Throws:
CLIExceptionEntitlementException
-
getDisplayAction
protected String getDisplayAction(ApplicationPrivilege appPrivilege)
-
getApplicationToResources
protected Map<String,Set<String>> getApplicationToResources(ApplicationPrivilege appPrivilege)
-
getSubjects
protected Map<String,Set<String>> getSubjects(ApplicationPrivilege appPrivilege)
-
removeFromMap
protected void removeFromMap(Map<String,Set<String>> map1, Map<String,Set<String>> map2)
-
-