Package com.ads.api.util
Class ResourceManagerUtil
java.lang.Object
com.ads.api.util.BaseUtil
com.ads.api.util.ResourceManagerUtil
public class ResourceManagerUtil
extends com.ads.api.util.BaseUtil
Contains the methods related to perform the operations such as creation,
update, deletion and retrieval of Users, Roles, etc.
RequestStatus return type methods will result in being returned as either true or false as its status.
RequestStatus return type methods will result in being returned as either true or false as its status.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ads.api.util.BaseUtil
com.ads.api.util.BaseUtil.TokenType -
Field Summary
Fields inherited from class com.ads.api.util.BaseUtil
AUTH_TOKEN, AUTH_TOKEN_TYPE -
Method Summary
Modifier and TypeMethodDescriptionReturns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName, roleId ,roleDescription and auditHistory.Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName,roleId, roleDescription, auditHistory and also returns list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName,roleId, roleDescription, auditHistory and also returns list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName,roleId,roleDescription and auditHistory.getRoles()Returns the list of Role objects where each Role object contains details like roleName,roleId,roleDescription and auditHistory.getRoles(int fillOptions) Returns the list of Role objects where each Role object contains details like roleName,roleId,roleDescription,auditHistory and list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.getRolesAs(int fillOptions, String outputFormat) Returns the list of Role objects where each Role object contains details like roleName,roleId,roleDescription,auditHistory and list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.getRolesAs(String outputFormat) Returns the list of Role objects where each Role object contains details like roleName, roleDescription,roleId and auditHistory.getUserRoles(String userId) Returns the list of Role objects for the specified userId where each Role object contains all the respective details such as id,name, description, auditHistory etc..getUserRolesAs(String userId, String outputFormat) Returns the list of Role objects for the specified userId where each Role object contains all the respective details such as id,name, description, auditHistory etc..Methods inherited from class com.ads.api.util.BaseUtil
getAccessToken, getAccessTokenType, getTokenType, getUserDetails, permissionDeniedMessage, permissionDeniedStatus, setAccessToken, setAccessTokenType
-
Method Details
-
getRole
Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName, roleId ,roleDescription and auditHistory.
Specifying the roleName is mandatory.- Parameters:
roleName- String- Returns:
- Role Object
- Throws:
Exception
-
getRole
Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName,roleId, roleDescription, auditHistory and also returns list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.
Here fillOptions parameter takes value of eitherAPIConstants.RSMFillOptions.ROLE_PERMISSIONSorAPIConstants.RSMFillOptions.NONE. If the fillOptions takes value ofAPIConstants.RSMFillOptions.ROLE_PERMISSIONSi.e 2 then the returned Role object contains role details and the list of role permissions. If the fillOptions takes value ofAPIConstants.RSMFillOptions.NONEi.e 0 then the returned Role object contains only role details. Specifying the roleName and fillOptions are mandatory.- Parameters:
roleName- StringfillOptions-APIConstants.RSMFillOptionsint- Returns:
- Role Object
- Throws:
Exception
-
getRoles
Returns the list of Role objects where each Role object contains details like roleName,roleId,roleDescription and auditHistory.- Returns:
- List
- role Objects
-
getUserRoles
Returns the list of Role objects for the specified userId where each Role object contains all the respective details such as id,name, description, auditHistory etc..- Parameters:
userId- - String- Returns:
- List
- role Objects - Throws:
Exception- Since:
- 11.0
-
getRoles
Returns the list of Role objects where each Role object contains details like roleName,roleId,roleDescription,auditHistory and list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.
Here fillOptions parameter takes value of eitherAPIConstants.RSMFillOptions.ROLE_PERMISSIONSorAPIConstants.RSMFillOptions.NONE.
If the fillOptions takes value ofAPIConstants.RSMFillOptions.ROLE_PERMISSIONSi.e 2 then the each Role object contains role details and the list of role permissions. If the fillOptions takes value ofAPIConstants.RSMFillOptions.NONEi.e 0 then the each Role object contains only role details.
Specifying the fillOptions is mandatory.- Parameters:
fillOptions-APIConstants.RSMFillOptionsint- Returns:
- List
- role Objects
-
getRoleAs
Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName,roleId,roleDescription and auditHistory. Specifying the roleName is mandatory.
OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.- Parameters:
roleName- StringoutputFormat- String- Returns:
- String - role Object in the form of JSON or XML String
-
getRoleAs
Returns the Role object for the specified roleName i.e all the respective details regarding the role,such as roleName,roleId, roleDescription, auditHistory and also returns list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.
Here fillOptions parameter takes value of eitherAPIConstants.RSMFillOptions.ROLE_PERMISSIONSorAPIConstants.RSMFillOptions.NONE. If the fillOptions takes value ofAPIConstants.RSMFillOptions.ROLE_PERMISSIONSi.e 2 then the returned Role object contains role details and the list of role permissions. If the fillOptions takes value ofAPIConstants.RSMFillOptions.NONEi.e 0 then the returned Role object contains only role details. Specifying the roleName and fillOptions are mandatory.
OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.- Parameters:
roleName- StringoutputFormat- StringfillOptions-APIConstants.RSMFillOptionsint- Returns:
- String - role Object in the form of JSON or XML String
-
getRolesAs
Returns the list of Role objects where each Role object contains details like roleName, roleDescription,roleId and auditHistory.
OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.- Parameters:
outputFormat-- Returns:
- String - role Objects in the form of JSON or XML String
-
getRolesAs
Returns the list of Role objects where each Role object contains details like roleName,roleId,roleDescription,auditHistory and list of permissions that the role has based on the fillOptions parameter value passed with reference ofAPIConstants.RSMFillOptions.
Here fillOptions parameter takes value of eitherAPIConstants.RSMFillOptions.ROLE_PERMISSIONSorAPIConstants.RSMFillOptions.NONE.
If the fillOptions takes value ofAPIConstants.RSMFillOptions.ROLE_PERMISSIONSi.e 2 then the each Role object contains role details and the list of role permissions. If the fillOptions takes value ofAPIConstants.RSMFillOptions.NONEi.e 0 then the each Role object contains only role details.
Specifying the fillOptions is mandatory.
OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.- Parameters:
outputFormat-fillOptions-APIConstants.RSMFillOptionsint- Returns:
- String - role Objects in the form of JSON or XML String
-
getUserRolesAs
Returns the list of Role objects for the specified userId where each Role object contains all the respective details such as id,name, description, auditHistory etc..
OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.- Parameters:
userId- - StringoutputFormat- - String- Returns:
- String - role Object in the form of JSON or XML String
- Since:
- 11.0
-