Coverage Report - org.kuali.rice.kew.peopleflow.PeopleFlowTypeService
 
Classes in this File Line Coverage Branch Coverage Complexity
PeopleFlowTypeService
N/A
N/A
1
 
 1  
 package org.kuali.rice.kew.peopleflow;
 2  
 
 3  
 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
 4  
 import org.kuali.rice.core.api.uif.RemotableAttributeError;
 5  
 import org.kuali.rice.core.api.uif.RemotableAttributeField;
 6  
 import org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter;
 7  
 import org.kuali.rice.kew.api.KewApiConstants;
 8  
 import org.kuali.rice.kew.api.document.Document;
 9  
 import org.kuali.rice.kew.api.document.DocumentContent;
 10  
 
 11  
 import javax.jws.WebMethod;
 12  
 import javax.jws.WebParam;
 13  
 import javax.jws.WebResult;
 14  
 import javax.jws.WebService;
 15  
 import javax.jws.soap.SOAPBinding;
 16  
 import javax.xml.bind.annotation.XmlElement;
 17  
 import javax.xml.bind.annotation.XmlElementWrapper;
 18  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 19  
 import java.util.List;
 20  
 import java.util.Map;
 21  
 
 22  
 /**
 23  
  * <p>Interface for services that implement the type-specific behaviors of people flows.</p>
 24  
  */
 25  
 @WebService(name = "PeopleFlowTypeService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
 26  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 27  
 public interface PeopleFlowTypeService {
 28  
 
 29  
     /**
 30  
      * <p>Allows for the people flow to restrict the roles that can be selected when adding members to it.</p>
 31  
      *
 32  
      * @param kewTypeId the people flow type identifier.  Must not be null or blank.
 33  
      * @param roleIds the set of ids to filter down.  Must not be null.
 34  
      * @return the roleIds from the above list that are valid to select.  Will not return null.
 35  
      */
 36  
     @WebMethod(operationName="filterToSelectableRoleIds")
 37  
     @WebResult(name = "selectableRoleIds")
 38  
     List<String> filterToSelectableRoleIds(
 39  
             @WebParam(name = "kewTypeId") String kewTypeId,
 40  
             @WebParam(name = "roleIds") List<String> roleIds
 41  
     );
 42  
 
 43  
     /**
 44  
      * <p>Resolve any role qualifiers for the given roleId, and document (along with documentContent).</p>
 45  
      *
 46  
      * @param kewTypeId the people flow type identifier.  Must not be null or blank.
 47  
      * @param roleId the role that the qualifiers are specific to.  Must not be null or blank.
 48  
      * @param document the document that the qualifiers are being resolved against.  Must not be null.
 49  
      * @param documentContent the contents for the document that the qualifiers are being resolved against.
 50  
      * Must not be null.
 51  
      * @return the resolved role qualifiers.  Will not return null.
 52  
      */
 53  
     @WebMethod(operationName="resolveRoleQualifiers")
 54  
     @WebResult(name = "roleQualifiers")
 55  
     @XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
 56  
     Map<String,String> resolveRoleQualifiers(
 57  
             @WebParam(name = "kewTypeId") String kewTypeId,
 58  
             @WebParam(name = "roleId") String roleId,
 59  
             @WebParam(name = "document") Document document,
 60  
             @WebParam(name = "documentContent") DocumentContent documentContent
 61  
     );
 62  
 
 63  
     /**
 64  
      * <p>get the attributes supported by the people flow type with the given kewTypeId.</p>
 65  
      *
 66  
      * @param kewTypeId the people flow type identifier.  Must not be null or blank.
 67  
      * @return the {@link RemotableAttributeField}s that the PeopleFlow type with the given id supports.
 68  
      * Will not return null.
 69  
      */
 70  
     @WebMethod(operationName="getAttributeFields")
 71  
     @WebResult(name = "attributeFields")
 72  
     List<RemotableAttributeField> getAttributeFields( @WebParam(name = "kewTypeId") String kewTypeId );
 73  
 
 74  
     /**
 75  
      * <p>This method validates the passed in attributes for a kewTypeId generating a List of
 76  
      * {@link RemotableAttributeError}s.</p>
 77  
      *
 78  
      * @param kewTypeId the people flow type identifier.  Must not be null or blank.
 79  
      * @param attributes the attributes to validate. Cannot be null.
 80  
      * @return any errors that are discovered during validation.  Will not return null.
 81  
      * @throws RiceIllegalArgumentException
 82  
      */
 83  
     @WebMethod(operationName="validateAttributes")
 84  
     @XmlElementWrapper(name = "attributeErrors", required = true)
 85  
     @XmlElement(name = "attributeError", required = false)
 86  
     @WebResult(name = "attributeErrors")
 87  
     List<RemotableAttributeError> validateAttributes(
 88  
 
 89  
             @WebParam(name = "kewTypeId") String kewTypeId,
 90  
 
 91  
             @WebParam(name = "attributes")
 92  
             @XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
 93  
             Map<String, String> attributes
 94  
 
 95  
     )  throws RiceIllegalArgumentException;
 96  
 
 97  
     /**
 98  
      * <p>This method validates the passed in attributes for a kewTypeId generating a List of
 99  
      * {@link RemotableAttributeError}s.  This method used the oldAttributes to aid in validation.  This is useful for
 100  
      * validating "new" or "updated" attributes.</p>
 101  
      *
 102  
      * @param kewTypeId the people flow type identifier.  Must not be null or blank.
 103  
      * @param newAttributes the kim type attributes to validate. Cannot be null.
 104  
      * @param oldAttributes the old attributes to use for validation. Cannot be null.
 105  
      * @return any errors that are discovered during validation.  Will not return null.
 106  
      * @throws RiceIllegalArgumentException
 107  
      */
 108  
     @WebMethod(operationName="validateAttributesAgainstExisting")
 109  
     @XmlElementWrapper(name = "attributeErrors", required = true)
 110  
     @XmlElement(name = "attributeError", required = false)
 111  
     @WebResult(name = "attributeErrors")
 112  
     List<RemotableAttributeError> validateAttributesAgainstExisting(
 113  
 
 114  
             @WebParam(name = "kewTypeId") String kewTypeId,
 115  
 
 116  
             @WebParam(name = "newAttributes")
 117  
             @XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
 118  
             Map<String, String> newAttributes,
 119  
 
 120  
             @WebParam(name = "oldAttributes")
 121  
             @XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
 122  
             Map<String, String> oldAttributes
 123  
 
 124  
     ) throws RiceIllegalArgumentException;
 125  
 
 126  
 }