Class CapabilityServiceImpl
java.lang.Object
org.alfresco.module.org_alfresco_module_rm.capability.CapabilityServiceImpl
- All Implemented Interfaces:
CapabilityService
- Since:
- 2.0
- Author:
- Roy Wetherall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a group to the list of groupsGet a list of all the assignable capabilities.getCapabilities(boolean includePrivate) Get a list of all the capabilities, optionally including those that are non-assignable.getCapabilitiesAccessState(NodeRef nodeRef) Get all the capabilities access state based on the current user for the assignable capabilities.getCapabilitiesAccessState(NodeRef nodeRef, boolean includePrivate) Get all the capabilities access state based on the current user.getCapabilitiesAccessState(NodeRef nodeRef, List<String> capabilityNames) getCapabilitiesByGroup(Group group) Get a list of capabilities for the given groupgetCapabilitiesByGroupId(String groupId) Gets a list of capabilities for the given group idgetCapability(String name) Get a named capability.getCapabilityAccessState(NodeRef nodeRef, String capabilityName) Helper method to get the access state for a single capability.Gets a group from it's idGets the list of all the capability groups (in index order)booleanhasCapability(NodeRef nodeRef, String capabilityName) Check if the current user has the given capability.voidregisterCapability(Capability capability) Register a capabilityvoidremoveGroup(Group group) Removes a group from the list of groups
-
Constructor Details
-
CapabilityServiceImpl
public CapabilityServiceImpl()
-
-
Method Details
-
getCapability
Description copied from interface:CapabilityServiceGet a named capability.- Specified by:
getCapabilityin interfaceCapabilityService- Parameters:
name- capability name- Returns:
Capabilitycapability or null if not found- See Also:
-
registerCapability
Description copied from interface:CapabilityServiceRegister a capability- Specified by:
registerCapabilityin interfaceCapabilityService- Parameters:
capability- capability- See Also:
-
getCapabilities
Description copied from interface:CapabilityServiceGet a list of all the assignable capabilities.- Specified by:
getCapabilitiesin interfaceCapabilityService- Returns:
Set<Capability> set of all the assignable capabilities- See Also:
-
getCapabilities
Description copied from interface:CapabilityServiceGet a list of all the capabilities, optionally including those that are non-assignable.- Specified by:
getCapabilitiesin interfaceCapabilityService- Parameters:
includePrivate- indicates that the private, or non-assignable capabilities are included in the result- Returns:
Set<Capability> set of capabilities- See Also:
-
getCapabilitiesAccessState
Description copied from interface:CapabilityServiceGet all the capabilities access state based on the current user for the assignable capabilities.- Specified by:
getCapabilitiesAccessStatein interfaceCapabilityService- Parameters:
nodeRef- node reference- Returns:
- See Also:
-
getCapabilitiesAccessState
public Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef, boolean includePrivate) Description copied from interface:CapabilityServiceGet all the capabilities access state based on the current user.- Specified by:
getCapabilitiesAccessStatein interfaceCapabilityService- Parameters:
nodeRef- node reference- Returns:
- See Also:
-
getCapabilitiesAccessState
public Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef, List<String> capabilityNames) - Specified by:
getCapabilitiesAccessStatein interfaceCapabilityService- Returns:
- See Also:
-
getCapabilityAccessState
Description copied from interface:CapabilityServiceHelper method to get the access state for a single capability.- Specified by:
getCapabilityAccessStatein interfaceCapabilityService- Returns:
- See Also:
-
getGroups
Description copied from interface:CapabilityServiceGets the list of all the capability groups (in index order)- Specified by:
getGroupsin interfaceCapabilityService- Returns:
List<Group> List of all the capability groups (in index order)- See Also:
-
getCapabilitiesByGroupId
Description copied from interface:CapabilityServiceGets a list of capabilities for the given group id- Specified by:
getCapabilitiesByGroupIdin interfaceCapabilityService- Parameters:
groupId- The id of a group for which the list of capabilities should be retrieved- Returns:
List<Capability> List of capabilities for the given group- See Also:
-
getCapabilitiesByGroup
Description copied from interface:CapabilityServiceGet a list of capabilities for the given group- Specified by:
getCapabilitiesByGroupin interfaceCapabilityService- Parameters:
group- The group for which the list of capabilities should be retrieved- Returns:
List<Capability> List of capabilities for the given group- See Also:
-
getGroup
Description copied from interface:CapabilityServiceGets a group from it's id- Specified by:
getGroupin interfaceCapabilityService- Parameters:
groupId- The id of the group which should be retrieved- Returns:
- Group The group with the id groupId
- See Also:
-
addGroup
Description copied from interface:CapabilityServiceAdds a group to the list of groups- Specified by:
addGroupin interfaceCapabilityService- Parameters:
group- The group which should be added- See Also:
-
removeGroup
Description copied from interface:CapabilityServiceRemoves a group from the list of groups- Specified by:
removeGroupin interfaceCapabilityService- Parameters:
group- The group which should be removed- See Also:
-
hasCapability
Description copied from interface:CapabilityServiceCheck if the current user has the given capability.- Specified by:
hasCapabilityin interfaceCapabilityService- Returns:
- See Also:
-