Coverage Report - org.kuali.rice.kim.service.ResponsibilityService
 
Classes in this File Line Coverage Branch Coverage Complexity
ResponsibilityService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2008 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kim.service;
 17  
 
 18  
 import java.util.List;
 19  
 import java.util.Map;
 20  
 
 21  
 import javax.jws.WebParam;
 22  
 import javax.jws.WebService;
 23  
 import javax.jws.soap.SOAPBinding;
 24  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 25  
 
 26  
 import org.kuali.rice.core.util.AttributeSet;
 27  
 import org.kuali.rice.core.util.jaxb.AttributeSetAdapter;
 28  
 import org.kuali.rice.core.util.jaxb.MapStringStringAdapter;
 29  
 import org.kuali.rice.kim.bo.role.dto.KimResponsibilityInfo;
 30  
 import org.kuali.rice.kim.bo.role.dto.KimResponsibilityTemplateInfo;
 31  
 import org.kuali.rice.kim.bo.role.dto.ResponsibilityActionInfo;
 32  
 import org.kuali.rice.kim.util.KIMWebServiceConstants;
 33  
 
 34  
 /**
 35  
  * 
 36  
  * This service provides operations for determining what responsibility actions
 37  
  * a principal has and for querying about responsibility data.
 38  
  * 
 39  
  * <p>A responsibility represents an action that a principal is requested to
 40  
  * take.  This is used for defining workflow actions (such as approve, 
 41  
  * acknowledge, fyi) that the principal has the responsibility to take.  The
 42  
  * workflow engine integrates with this service to provide
 43  
  * responsibility-driven routing.
 44  
  * 
 45  
  * <p>A responsibility is very similar to a permission in a couple of ways.
 46  
  * First of all, responsibilities are always granted to a role, never assigned
 47  
  * directly to a principal or group.  Furthermore, in a similar fashion to
 48  
  * permissions, a role has the concept of a responsibility template.  The
 49  
  * responsibility template specifies what additional responsibility details
 50  
  * need to be defined when the responsibility is created.
 51  
  * 
 52  
  * <p>This service provides read-only operations.  For write operations, see
 53  
  * {@link ResponsibilityUpdateService}.
 54  
  * 
 55  
  * @see ResponsibilityUpdateService
 56  
  * 
 57  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 58  
  *
 59  
  */
 60  
 @WebService(name = KIMWebServiceConstants.ResponsibilityService.WEB_SERVICE_NAME, targetNamespace = KIMWebServiceConstants.MODULE_TARGET_NAMESPACE)
 61  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 62  
 public interface ResponsibilityService {
 63  
 
 64  
     // --------------------
 65  
     // Responsibility Methods
 66  
     // --------------------
 67  
 
 68  
     /**
 69  
      * Get the responsibility object with the given ID.
 70  
      */
 71  
     KimResponsibilityInfo getResponsibility(@WebParam(name="responsibilityId") String responsibilityId);
 72  
     
 73  
          /** 
 74  
           * Return the responsibility object for the given unique combination of namespace,
 75  
           * component and responsibility name.
 76  
           */
 77  
     List<KimResponsibilityInfo> getResponsibilitiesByName( @WebParam(name="namespaceCode") String namespaceCode, 
 78  
                                                                                                                @WebParam(name="responsibilityName") String responsibilityName );
 79  
     
 80  
     KimResponsibilityTemplateInfo getResponsibilityTemplate( @WebParam(name="responsibilityTemplateId") String responsibilityTemplateId );
 81  
 
 82  
     KimResponsibilityTemplateInfo getResponsibilityTemplateByName( 
 83  
                     @WebParam(name="namespaceCode") String namespaceCode, 
 84  
                         @WebParam(name="responsibilityTemplateName") String responsibilityTemplateName );
 85  
     
 86  
     /**
 87  
      * Check whether the principal has the given responsibility within the passed qualifier.
 88  
      */
 89  
     boolean hasResponsibility( @WebParam(name="principalId") String principalId, 
 90  
                                                        @WebParam(name="namespaceCode") String namespaceCode, 
 91  
                                                        @WebParam(name="responsibilityName") String responsibilityName, 
 92  
                                                        @WebParam(name="qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, 
 93  
                                                        @WebParam(name="responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails );
 94  
 
 95  
     /**
 96  
      * Check whether the principal has the given responsibility within the passed qualifier.
 97  
      */
 98  
     boolean hasResponsibilityByTemplateName( @WebParam(name="principalId") String principalId, 
 99  
                                                                                      @WebParam(name="namespaceCode") String namespaceCode, 
 100  
                                                                                      @WebParam(name="responsibilityTemplateName") String responsibilityTemplateName, 
 101  
                                                                                      @WebParam(name="qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, 
 102  
                                                                                      @WebParam(name="responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails );
 103  
     
 104  
            List<ResponsibilityActionInfo> getResponsibilityActions( @WebParam(name="namespaceCode") String namespaceCode, 
 105  
                                                                                                                             @WebParam(name="responsibilityName") String responsibilityName, 
 106  
                                                                                                                             @WebParam(name="qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, 
 107  
                                                                                                                             @WebParam(name="responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails);
 108  
            
 109  
            List<ResponsibilityActionInfo> getResponsibilityActionsByTemplateName( @WebParam(name="namespaceCode") String namespaceCode, 
 110  
                                                                                                                                                       @WebParam(name="responsibilityTemplateName") String responsibilityTemplateName,        
 111  
                                                                                                                                                       @WebParam(name="qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, 
 112  
                                                                                                                                                       @WebParam(name="responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails);
 113  
            
 114  
     /**
 115  
      * Lets the system know (mainly for UI purposes) whether this responsibility expects RoleResponsibilityAction
 116  
      * records to be given at the assignment level or are global to the responsibility.  (I.e., they apply
 117  
      * to any member assigned to the responsibility.) 
 118  
      */
 119  
            boolean areActionsAtAssignmentLevelById( @WebParam(name="responsibilityId") String responsibilityId );
 120  
 
 121  
     /**
 122  
      * Lets the system know (mainly for UI purposes) whether this responsibility expects RoleResponsibilityAction
 123  
      * records to be given at the assignment level or are global to the responsibility.  (I.e., they apply
 124  
      * to any member assigned to the responsibility.) 
 125  
      */
 126  
            boolean areActionsAtAssignmentLevel( @WebParam(name="responsibility") KimResponsibilityInfo responsibility );
 127  
            
 128  
            /**
 129  
             * Lookup responsibility objects.
 130  
             */
 131  
            List<? extends KimResponsibilityInfo> lookupResponsibilityInfo( @WebParam(name="searchCriteria") @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) Map<String,String> searchCriteria, 
 132  
                                                                                                                                            @WebParam(name="unbounded") boolean unbounded );
 133  
            
 134  
            /**
 135  
             * Get the role IDs associated with the given responsibility.
 136  
             */
 137  
            List<String> getRoleIdsForResponsibility( @WebParam(name="responsibility") KimResponsibilityInfo responsibility, 
 138  
                                                                                              @WebParam(name="qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification );
 139  
 }