Class RolesManagerImpl
java.lang.Object
ru.cg.webbpm.studio.subsystems.bpmn.role.impl.registry.RolesManagerImpl
- All Implemented Interfaces:
RolesManager
- Author:
- Tim Urmancheev
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.cg.webbpm.studio.subsystems.bpmn.role.api.registry.RolesManager
RolesManager.RolesChangedCallback
-
Field Summary
Fields inherited from interface ru.cg.webbpm.studio.subsystems.bpmn.role.api.registry.RolesManager
NON_UNIQUE_ROLE_NAME_EXCEPTION
-
Constructor Summary
ConstructorsConstructorDescriptionRolesManagerImpl
(Console console, ProjectManager projectManager, RolesSerializer serializer, FileBasedIndex fileBasedIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
createRole
(Role role) Creates new role.getResourcesUsingRole
(String role) getUsedRoles
(WebbpmProcess process) getUsedRoles
(XmlComponent component) getUsedRoles
(XmlPage page) void
void
void
removeRole
(Role role) void
updateRole
(String prevName, Role role) Updates existing role.
-
Constructor Details
-
RolesManagerImpl
@Autowired public RolesManagerImpl(Console console, ProjectManager projectManager, RolesSerializer serializer, FileBasedIndex fileBasedIndex)
-
-
Method Details
-
getAllRoles
- Specified by:
getAllRoles
in interfaceRolesManager
-
createRole
Description copied from interface:RolesManager
Creates new role.- Specified by:
createRole
in interfaceRolesManager
- Parameters:
role
- - role needed to create- Throws:
ProjectOperationException
- if any exception happens. Will be with codeRolesManager.NON_UNIQUE_ROLE_NAME_EXCEPTION
code if role with same name already exists.
-
updateRole
Description copied from interface:RolesManager
Updates existing role.- Specified by:
updateRole
in interfaceRolesManager
- Parameters:
prevName
- - name of changed role before updaterole
- - changed role- Throws:
ProjectOperationException
- if any exception happens. Will be with codeRolesManager.NON_UNIQUE_ROLE_NAME_EXCEPTION
code if role name has been modified and role with new name already exists.
-
removeRole
- Specified by:
removeRole
in interfaceRolesManager
- Throws:
ProjectOperationException
-
reloadRoles
public void reloadRoles()- Specified by:
reloadRoles
in interfaceRolesManager
-
getRole
- Specified by:
getRole
in interfaceRolesManager
- Throws:
ProjectOperationException
-
checkThatRolesFileExists
- Specified by:
checkThatRolesFileExists
in interfaceRolesManager
- Throws:
ProjectOperationException
-
addChangeListener
- Specified by:
addChangeListener
in interfaceRolesManager
-
removeChangeListener
- Specified by:
removeChangeListener
in interfaceRolesManager
-
getUsedRoles
- Specified by:
getUsedRoles
in interfaceRolesManager
- Parameters:
process
- where the roles will look- Returns:
- a set of roles used for the process
-
getUsedRoles
- Specified by:
getUsedRoles
in interfaceRolesManager
- Parameters:
page
- where the roles will look- Returns:
- a set of roles used for the page
-
getUsedRoles
- Specified by:
getUsedRoles
in interfaceRolesManager
- Parameters:
component
- where the roles will look- Returns:
- a set of roles used for the component
-
getResourcesUsingRole
- Specified by:
getResourcesUsingRole
in interfaceRolesManager
- Parameters:
role
- which will look in resources- Returns:
- a list of resources using the role
-