public interface ResponsibilityService
A responsibility represents an action that a principal is requested to take. This is used for defining workflow actions (such as approve, acknowledge, fyi) that the principal has the responsibility to take. The workflow engine integrates with this service to provide responsibility-driven routing.
A responsibility is very similar to a permission in a couple of ways. First of all, responsibilities are always granted to a role, never assigned directly to a principal or group. Furthermore, in a similar fashion to permissions, a role has the concept of a responsibility template. The responsibility template specifies what additional responsibility details need to be defined when the responsibility is created.
Modifier and Type | Method and Description |
---|---|
Responsibility |
createResponsibility(Responsibility responsibility)
This will create a
Responsibility exactly like the responsibility passed in. |
Responsibility |
findRespByNamespaceCodeAndName(String namespaceCode,
String name)
Finds a
Responsibility for namespaceCode and name. |
ResponsibilityQueryResults |
findResponsibilities(QueryByCriteria queryByCriteria)
This method find Responsibilities based on a query criteria.
|
List<Responsibility> |
findResponsibilitiesByTemplate(String namespaceCode,
String templateName)
Return the responsibilities for the given unique combination of namespace,
and responsibility template name.
|
TemplateQueryResults |
findResponsibilityTemplates(QueryByCriteria queryByCriteria)
This method find Responsibility Templates based on a query criteria.
|
Template |
findRespTemplateByNamespaceCodeAndName(String namespaceCode,
String name)
Finds a
Template for namespaceCode and name. |
Responsibility |
getResponsibility(String id)
Gets a
Responsibility from an id. |
List<ResponsibilityAction> |
getResponsibilityActions(String namespaceCode,
String respName,
Map<String,String> qualification)
Gets a List of
ResponsibilityAction based on passed in responsibility information. |
List<ResponsibilityAction> |
getResponsibilityActionsByTemplate(String namespaceCode,
String respTemplateName,
Map<String,String> qualification,
Map<String,String> respDetails)
Gets a List of
ResponsibilityAction based on passed in responsibility template information. |
Template |
getResponsibilityTemplate(String id)
Gets a
Template from an id. |
List<String> |
getRoleIdsForResponsibility(String id)
Gets a List of roleIds that the responsibility is associated with.
|
boolean |
hasResponsibility(String principalId,
String namespaceCode,
String respName,
Map<String,String> qualification)
Checks in a given principal id has a responsibility using the passed in responsibility information.
|
boolean |
hasResponsibilityByTemplate(String principalId,
String namespaceCode,
String respTemplateName,
Map<String,String> qualification,
Map<String,String> respDetails)
Checks in a given principal id has a responsibility using the passed in responsibility template information.
|
Responsibility |
updateResponsibility(Responsibility responsibility)
This will up ev a
Responsibility . |
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/ResponsibilityType","http://rice.kuali.org/kim/v2_0/TemplateType{Responsibility}"}, allEntries=true) Responsibility createResponsibility(Responsibility responsibility) throws RiceIllegalArgumentException, RiceIllegalStateException
Responsibility
exactly like the responsibility passed in.responsibility
- the responsibility to createRiceIllegalArgumentException
- if the responsibility is nullRiceIllegalStateException
- if the responsibility is already existing in the system@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/ResponsibilityType","http://rice.kuali.org/kim/v2_0/TemplateType{Responsibility}"}, allEntries=true) Responsibility updateResponsibility(Responsibility responsibility) throws RiceIllegalArgumentException, RiceIllegalStateException
Responsibility
.responsibility
- the responsibility to updateRiceIllegalArgumentException
- if the responsibility is nullRiceIllegalStateException
- if the responsibility does not exist in the system@Cacheable(value="http://rice.kuali.org/kim/v2_0/ResponsibilityType", key="\'id=\' + #p0") Responsibility getResponsibility(String id) throws RiceIllegalArgumentException
Responsibility
from an id.
This method will return null if the responsibility does not exist.
id
- the unique id to retrieve the responsibility by. cannot be null or blank.Responsibility
or nullRiceIllegalArgumentException
- if the id is null or blank@Cacheable(value="http://rice.kuali.org/kim/v2_0/ResponsibilityType", key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") Responsibility findRespByNamespaceCodeAndName(String namespaceCode, String name) throws RiceIllegalArgumentException
Responsibility
for namespaceCode and name.namespaceCode
- the namespace code. cannot be null or blank.name
- the responsibility name. cannot be null or blank.Responsibility
or nullRiceIllegalArgumentException
- if the id or namespaceCode is null or blank@Cacheable(value="http://rice.kuali.org/kim/v2_0/TemplateType{Responsibility}", key="\'id=\' + #p0") Template getResponsibilityTemplate(String id) throws RiceIllegalArgumentException
Template
from an id.
This method will return null if the template does not exist.
id
- the unique id to retrieve the template by. cannot be null or blank.Template
or nullRiceIllegalArgumentException
- if the id is null or blank@Cacheable(value="http://rice.kuali.org/kim/v2_0/TemplateType{Responsibility}", key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") Template findRespTemplateByNamespaceCodeAndName(String namespaceCode, String name) throws RiceIllegalArgumentException
Template
for namespaceCode and name.namespaceCode
- the namespace code. cannot be null or blank.name
- the template name. cannot be null or blank.Template
or nullRiceIllegalArgumentException
- if the id or namespaceCode is null or blank@Cacheable(value="http://rice.kuali.org/kim/v2_0/ResponsibilityType", key="\'{hasResponsibility}\' + \'principalId=\' + #p0 + \'|\' + \'namespaceCode=\' + #p1 + \'|\' + \'respName=\' + #p2 + \'|\' + \'qualification=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).mapKey(#p3)", condition="!T(org.kuali.rice.kim.api.cache.KimCacheUtils).isResponsibilityAssignedToDynamicRole(#p1, #p2)") boolean hasResponsibility(String principalId, String namespaceCode, String respName, Map<String,String> qualification) throws RiceIllegalArgumentException
principalId
- the principal id to check. cannot be null or blank.namespaceCode
- the namespace code. cannot be null or blank.respName
- the responsibility name. cannot be null or blank.qualification
- the qualification for the responsibility. cannot be null.RiceIllegalArgumentException
- if the principalId, namespaceCode, respName is null or blankRiceIllegalArgumentException
- if the qualification is null@Cacheable(value="http://rice.kuali.org/kim/v2_0/ResponsibilityType", key="\'{hasResponsibilityByTemplate}\' + \'principalId=\' + #p0 + \'|\' + \'namespaceCode=\' + #p1 + \'|\' + \'respTemplateName=\' + #p2 + \'|\' + \'qualification=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).mapKey(#p3) + \'|\' + \'respDetails=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).mapKey(#p4)", condition="!T(org.kuali.rice.kim.api.cache.KimCacheUtils).isResponsibilityTemplateAssignedToDynamicRole(#p1, #p2)") boolean hasResponsibilityByTemplate(String principalId, String namespaceCode, String respTemplateName, Map<String,String> qualification, Map<String,String> respDetails) throws RiceIllegalArgumentException
principalId
- the principal id to check. cannot be null or blank.namespaceCode
- the namespace code. cannot be null or blank.respTemplateName
- the responsibility template name. cannot be null or blank.qualification
- the qualification for the responsibility. cannot be null.respDetails
- the responsibility details. cannot be null.RiceIllegalArgumentException
- if the principalId, namespaceCode, respName is null or blankRiceIllegalArgumentException
- if the qualification or responsibilityDetails is nullList<ResponsibilityAction> getResponsibilityActions(String namespaceCode, String respName, Map<String,String> qualification) throws RiceIllegalArgumentException
ResponsibilityAction
based on passed in responsibility information.namespaceCode
- the namespace code. cannot be null or blank.respName
- the responsibility name. cannot be null or blank.qualification
- the qualification for the responsibility. cannot be null.RiceIllegalArgumentException
- if the namespaceCode, respName is null or blankRiceIllegalArgumentException
- if the qualification or respDetails is nullList<ResponsibilityAction> getResponsibilityActionsByTemplate(String namespaceCode, String respTemplateName, Map<String,String> qualification, Map<String,String> respDetails) throws RiceIllegalArgumentException
ResponsibilityAction
based on passed in responsibility template information.namespaceCode
- the namespace code. cannot be null or blank.respTemplateName
- the responsibility name. cannot be null or blank.qualification
- the qualification for the responsibility. cannot be null.respDetails
- the responsibility details. can be null.RiceIllegalArgumentException
- if the namespaceCode, respName is null or blankRiceIllegalArgumentException
- if the qualification or respDetails is null@Cacheable(value="http://rice.kuali.org/kim/v2_0/ResponsibilityType", key="\'{getRoleIdsForResponsibility}\' + \'id=\' + #p0") List<String> getRoleIdsForResponsibility(String id) throws RiceIllegalArgumentException
id
- the unique id to retrieve the roleIds for. cannot be null or blank.RiceIllegalArgumentException
- if the id is null or blank or if the qualification is nullResponsibilityQueryResults findResponsibilities(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
queryByCriteria
- the criteria. Cannot be null.RiceIllegalArgumentException
- if the queryByCriteria is nullTemplateQueryResults findResponsibilityTemplates(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
queryByCriteria
- the criteria. Cannot be null.RiceIllegalArgumentException
- if the queryByCriteria is null@Cacheable(value="http://rice.kuali.org/kim/v2_0/ResponsibilityType", key="\'namespaceCode=\' + #p1 + \'|\' + \'templateName=\' + #p2") List<Responsibility> findResponsibilitiesByTemplate(String namespaceCode, String templateName) throws RiceIllegalArgumentException
namespaceCode
- namespace code for permission. cannot be null or blank.templateName
- name of permission template. cannot be null or blank.Permission
or nullRiceIllegalArgumentException
- if the namespaceCode or name is null or blankCopyright © 2005–2015 The Kuali Foundation. All rights reserved.