|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResponsibilityService
This service provides operations for determining what responsibility actions a principal has and for querying about responsibility data. It also provides several write operations.
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.
Method Summary | |
---|---|
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. |
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,
Map<String,String> respDetails)
Gets a List of ResponsibilityAction based on passed in responsibility information. |
List<ResponsibilityAction> |
getResponsibilityActionsByTemplateName(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,
Map<String,String> respDetails)
Checks in a given principal id has a responsibility using the passed in responsibility information. |
boolean |
hasResponsibilityByTemplateName(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 . |
Method Detail |
---|
@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 create
IllegalArgumentException
- if the responsibility is null
IllegalStateException
- if the responsibility is already existing in the system
RiceIllegalArgumentException
RiceIllegalStateException
@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 update
IllegalArgumentException
- if the responsibility is null
IllegalStateException
- if the responsibility does not exist in the system
RiceIllegalArgumentException
RiceIllegalStateException
@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 null
IllegalArgumentException
- if the id is null or blank
RiceIllegalArgumentException
@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 null
IllegalArgumentException
- if the id or namespaceCode is null or blank
RiceIllegalArgumentException
@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 null
IllegalArgumentException
- if the id is null or blank
RiceIllegalArgumentException
@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 null
IllegalArgumentException
- if the id or namespaceCode is null or blank
RiceIllegalArgumentException
boolean hasResponsibility(String principalId, String namespaceCode, String respName, 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.respName
- the responsibility name. cannot be null or blank.qualification
- the qualification for the responsibility. cannot be null.respDetails
- the responsibility details. cannot be null.
IllegalArgumentException
- if the principalId, namespaceCode, respName is null or blank
IllegalArgumentException
- if the qualification or responsibilityDetails is null
RiceIllegalArgumentException
boolean hasResponsibilityByTemplateName(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.
IllegalArgumentException
- if the principalId, namespaceCode, respName is null or blank
IllegalArgumentException
- if the qualification or responsibilityDetails is null
RiceIllegalArgumentException
List<ResponsibilityAction> getResponsibilityActions(String namespaceCode, String respName, Map<String,String> qualification, Map<String,String> respDetails) 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.respDetails
- the responsibility details. cannot be null.
IllegalArgumentException
- if the namespaceCode, respName is null or blank
IllegalArgumentException
- if the qualification or respDetails is null
RiceIllegalArgumentException
List<ResponsibilityAction> getResponsibilityActionsByTemplateName(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. cannot be null.
IllegalArgumentException
- if the namespaceCode, respName is null or blank
IllegalArgumentException
- if the qualification or respDetails is null
RiceIllegalArgumentException
List<String> getRoleIdsForResponsibility(String id) throws RiceIllegalArgumentException
id
- the unique id to retrieve the roleIds for. cannot be null or blank.
IllegalArgumentException
- if the id is null or blank or if the qualification is null
RiceIllegalArgumentException
ResponsibilityQueryResults findResponsibilities(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
queryByCriteria
- the criteria. Cannot be null.
IllegalArgumentException
- if the queryByCriteria is null
RiceIllegalArgumentException
TemplateQueryResults findResponsibilityTemplates(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
queryByCriteria
- the criteria. Cannot be null.
IllegalArgumentException
- if the queryByCriteria is null
RiceIllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |