Interface Role.Service
-
- All Superinterfaces:
Maskable
,ResultLimitable
,Service
- Enclosing class:
- Role
@ApiService("SoftLayer_User_Permission_Role") public static interface Role.Service extends Service
The SoftLayer_User_Permission_Role class is one of several classes that make up the customer permission system. The system is a role-based system that includes defined actions which can be "grouped" together using a SoftLayer_User_Permission_Group class. These groups of actions are then used to define roles, and the roles are assigned to users.
When a [[SoftLayer_User_Customer]] is created, a SoftLayer_User_Permission_Role is created for the user with a group type of SYSTEM. This role is linked to the SYSTEM SoftLayer_User_Permission_Group that was also created specifically for this user. When the UI is used to alter the permissions of a customer user, the actions are added or removed from this group. The api can not be used to alter the permissions in this group. If an account wants to create their own unique permission groups and roles, the UI can not be used to manage them.
User Customers can be assigned to multiple roles but it is recommended to either use the UI for managing account users permissions or only use the api. Mixing the two will lead to confusing results as the UI will not show any permissions assigned to a user via a customer created role/group combination.
Proceed with caution.
One or more [[SoftLayer_User_Permission_Action]] are assigned to one or more [[SoftLayer_User_Permission_Group]] Objects. One ore more SoftLayer_User_Permission_Group objects can be linked to a [[SoftLayer_User_Permission_Role]]. A single SoftLayer_User_Permission_Group object can be linked to multiple SoftLayer_User_Permission_Role objects. The SoftLayer_User_Permission_Role is assigned to one or more [[SoftLayer_User_Customer]]. A single SoftLayer_User_Customer can be assigned to one or more roles.
The SoftLayer_User_Permission_Action class defines the permissions that are required in order for a SoftLayer_User_Customer to perform certain actions within IMS.- See Also:
- SoftLayer_User_Permission_Role
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Void
addUser(Customer user)
Assigns a SoftLayer_User_Customer object to the role.Role.ServiceAsync
asAsync()
Get an async version of this serviceRole
createObject(Role templateObject)
Customer created permission roles must set the systemFlag attribute to false.Boolean
deleteObject()
Customer users can only delete permission roles with systemFlag set to false.Role
editObject(Role templateObject)
Allows a user to modify the name and description of an existing customer permission role.Account
getAccount()
List<Action>
getActions()
List<Group>
getGroups()
Role
getObject()
List<Customer>
getUsers()
Void
linkGroup(Group group)
Links a SoftLayer_User_Permission_Group object to the role.Void
removeUser(Customer user)
Unassigns a SoftLayer_User_Customer object from the role.void
setMask(Role.Mask mask)
Void
unlinkGroup(Group group)
Unlinks a SoftLayer_User_Permission_Group object to the role.Role.Mask
withMask()
Use the existing mask on this service or create it if not presentRole.Mask
withNewMask()
Overwrite the existing mask on this service with a new one and return it-
Methods inherited from interface com.softlayer.api.ResultLimitable
getLastResponseTotalItemCount, getResultLimit, setResultLimit
-
-
-
-
Method Detail
-
asAsync
Role.ServiceAsync asAsync()
Description copied from interface:Service
Get an async version of this service
-
withNewMask
Role.Mask withNewMask()
Description copied from interface:Maskable
Overwrite the existing mask on this service with a new one and return it- Specified by:
withNewMask
in interfaceMaskable
-
withMask
Role.Mask withMask()
Description copied from interface:Maskable
Use the existing mask on this service or create it if not present
-
setMask
void setMask(Role.Mask mask)
-
addUser
@ApiMethod(instanceRequired=true) Void addUser(Customer user)
Assigns a SoftLayer_User_Customer object to the role.- See Also:
- SoftLayer_User_Permission_Role::addUser
-
createObject
@ApiMethod Role createObject(Role templateObject)
Customer created permission roles must set the systemFlag attribute to false. The SYSTEM type is reserved for internal use. The account id supplied in the template permission group must match account id of the user who is creating the permission group. The user who is creating the permission group must have the permission to manage users.
-
deleteObject
@ApiMethod(instanceRequired=true) Boolean deleteObject()
Customer users can only delete permission roles with systemFlag set to false. The SYSTEM type is reserved for internal use. The user who is creating the permission role must have the permission to manage users.
-
editObject
@ApiMethod(instanceRequired=true) Role editObject(Role templateObject)
Allows a user to modify the name and description of an existing customer permission role. Customer permission roles must set the systemFlag attribute to false. The SYSTEM type is reserved for internal use. The account id supplied in the template permission role must match account id of the user who is creating the permission role. The user who is creating the permission role must have the permission to manage users.
-
getObject
@ApiMethod(instanceRequired=true) Role getObject()
-
linkGroup
@ApiMethod(instanceRequired=true) Void linkGroup(Group group)
Links a SoftLayer_User_Permission_Group object to the role.
-
removeUser
@ApiMethod(instanceRequired=true) Void removeUser(Customer user)
Unassigns a SoftLayer_User_Customer object from the role.
-
unlinkGroup
@ApiMethod(instanceRequired=true) Void unlinkGroup(Group group)
Unlinks a SoftLayer_User_Permission_Group object to the role.
-
getAccount
@ApiMethod(instanceRequired=true) Account getAccount()
-
getActions
@ApiMethod(instanceRequired=true) List<Action> getActions()
-
getGroups
@ApiMethod(instanceRequired=true) List<Group> getGroups()
-
getUsers
@ApiMethod(instanceRequired=true) List<Customer> getUsers()
- See Also:
- SoftLayer_User_Permission_Role::getUsers
-
-