org.kuali.rice.kim.api.responsibility
Interface ResponsibilityService

All Known Implementing Classes:
ResponsibilityServiceImpl

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.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 Responsibility createResponsibility(Responsibility responsibility)
          This will create a Responsibility exactly like the responsibility passed in.
 Responsibility findRespByNamespaceCodeAndName(String namespaceCode, String 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)
           
 Responsibility getResponsibility(String id)
          Gets a Responsibility from an id.
 List<ResponsibilityAction> getResponsibilityActions(String namespaceCode, String responsibilityName, Map<String,String> qualification, Map<String,String> responsibilityDetails)
           
 List<ResponsibilityAction> getResponsibilityActionsByTemplateName(String namespaceCode, String respTemplateName, Map<String,String> qualification, Map<String,String> responsibilityDetails)
           
 Template getResponsibilityTemplate(String id)
          Gets a Template from an id.
 List<String> getRoleIdsForResponsibility(String id, Map<String,String> qualification)
           
 boolean hasResponsibility(String principalId, String namespaceCode, String respName, Map<String,String> qualification, Map<String,String> responsibilityDetails)
           
 boolean hasResponsibilityByTemplateName(String principalId, String namespaceCode, String respTemplateName, Map<String,String> qualification, Map<String,String> responsibilityDetails)
           
 Responsibility updateResponsibility(Responsibility responsibility)
          This will update a Responsibility.
 

Method Detail

createResponsibility

Responsibility createResponsibility(Responsibility responsibility)
                                    throws RiceIllegalArgumentException,
                                           RiceIllegalStateException
This will create a Responsibility exactly like the responsibility passed in.

Parameters:
responsibility - the responsibility to create
Returns:
the id of the newly created object. will never be null.
Throws:
IllegalArgumentException - if the responsibility is null
IllegalStateException - if the responsibility is already existing in the system
RiceIllegalArgumentException
RiceIllegalStateException

updateResponsibility

Responsibility updateResponsibility(Responsibility responsibility)
                                    throws RiceIllegalArgumentException,
                                           RiceIllegalStateException
This will update a Responsibility.

Parameters:
responsibility - the responsibility to update
Throws:
IllegalArgumentException - if the responsibility is null
IllegalStateException - if the responsibility does not exist in the system
RiceIllegalArgumentException
RiceIllegalStateException

getResponsibility

Responsibility getResponsibility(String id)
Gets a Responsibility from an id.

This method will return null if the responsibility does not exist.

Parameters:
id - the unique id to retrieve the responsibility by. cannot be null.
Returns:
a Responsibility or null
Throws:
IllegalArgumentException - if the id is blank

findRespByNamespaceCodeAndName

Responsibility findRespByNamespaceCodeAndName(String namespaceCode,
                                              String name)

getResponsibilityTemplate

Template getResponsibilityTemplate(String id)
Gets a Template from an id.

This method will return null if the template does not exist.

Parameters:
id - the unique id to retrieve the template by. cannot be null.
Returns:
a Template or null
Throws:
IllegalArgumentException - if the id is blank

findRespTemplateByNamespaceCodeAndName

Template findRespTemplateByNamespaceCodeAndName(String namespaceCode,
                                                String name)

hasResponsibility

boolean hasResponsibility(String principalId,
                          String namespaceCode,
                          String respName,
                          Map<String,String> qualification,
                          Map<String,String> responsibilityDetails)

hasResponsibilityByTemplateName

boolean hasResponsibilityByTemplateName(String principalId,
                                        String namespaceCode,
                                        String respTemplateName,
                                        Map<String,String> qualification,
                                        Map<String,String> responsibilityDetails)

getResponsibilityActions

List<ResponsibilityAction> getResponsibilityActions(String namespaceCode,
                                                    String responsibilityName,
                                                    Map<String,String> qualification,
                                                    Map<String,String> responsibilityDetails)

getResponsibilityActionsByTemplateName

List<ResponsibilityAction> getResponsibilityActionsByTemplateName(String namespaceCode,
                                                                  String respTemplateName,
                                                                  Map<String,String> qualification,
                                                                  Map<String,String> responsibilityDetails)

getRoleIdsForResponsibility

List<String> getRoleIdsForResponsibility(String id,
                                         Map<String,String> qualification)

findResponsibilities

ResponsibilityQueryResults findResponsibilities(QueryByCriteria queryByCriteria)
This method find Responsibilities based on a query criteria. The criteria cannot be null.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
query results. will never return null.
Throws:
IllegalArgumentException - if the queryByCriteria is null

findResponsibilityTemplates

TemplateQueryResults findResponsibilityTemplates(QueryByCriteria queryByCriteria)
This method find Responsibility Templates based on a query criteria. The criteria cannot be null.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
query results. will never return null.
Throws:
IllegalArgumentException - if the queryByCriteria is null


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.