Coverage Report - org.kuali.student.r2.common.versionmanagement.service.VersionManagementService
 
Classes in this File Line Coverage Branch Coverage Complexity
VersionManagementService
N/A
N/A
1
 
 1  
 package org.kuali.student.r2.common.versionmanagement.service;
 2  
 
 3  
 import org.kuali.student.r2.common.dto.ContextInfo;
 4  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 5  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 6  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 7  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 8  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 9  
 import org.kuali.student.r2.common.util.constants.VersionManagementServiceConstants;
 10  
 import org.kuali.student.r2.common.versionmanagement.dto.VersionDisplayInfo;
 11  
 
 12  
 import javax.jws.WebParam;
 13  
 import javax.jws.WebService;
 14  
 import javax.jws.soap.SOAPBinding;
 15  
 import java.util.Date;
 16  
 import java.util.List;
 17  
 
 18  
 /**
 19  
  * Version Management Service supports the management of object versions
 20  
  *
 21  
  * @Version 2.0
 22  
  * @Author Sri komandur@uw.edu
 23  
  */
 24  
 
 25  
 @WebService(name = "VersionManagementService", targetNamespace = VersionManagementServiceConstants.NAMESPACE)
 26  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 27  
 public interface VersionManagementService {
 28  
     /**
 29  
      * Retrieves a list of versions associated with the objectId.
 30  
      *
 31  
      * @param refObjectTypeURI reference object type URI
 32  
      * @param refObjectId      reference object Id
 33  
      * @param contextInfo      context information containing the principalId
 34  
      *                         and locale information about the caller of
 35  
      *                         service operation
 36  
      * @return a list of versions
 37  
      * @throws DoesNotExistException     refObjectTypeURI or refObjectId not
 38  
      *                                   found
 39  
      * @throws InvalidParameterException invalid contextInfo
 40  
      * @throws MissingParameterException refObjectTypeURI, refObjectId or
 41  
      *                                   contextInfo is missing or null
 42  
      * @throws OperationFailedException  unable to complete request
 43  
      * @throws PermissionDeniedException an authorization failure occurred
 44  
      */
 45  
     public List<VersionDisplayInfo> getVersions(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 46  
 
 47  
     /**
 48  
      * Retrieves first version associated with the objectId.
 49  
      *
 50  
      * @param refObjectTypeURI reference object type URI
 51  
      * @param refObjectId      reference object Id
 52  
      * @param contextInfo      context information containing the principalId
 53  
      *                         and locale information about the caller of
 54  
      *                         service operation
 55  
      * @return first version
 56  
      * @throws DoesNotExistException     refObjectTypeURI or refObjectId not
 57  
      *                                   found
 58  
      * @throws InvalidParameterException contextInfo is not valid
 59  
      * @throws MissingParameterException refObjectTypeURI, refObjectId or
 60  
      *                                   contextInfo is missing or null
 61  
      * @throws OperationFailedException  unable to complete request
 62  
      * @throws PermissionDeniedException an authorization failure occurred
 63  
      */
 64  
     public VersionDisplayInfo getFirstVersion(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 65  
 
 66  
     /**
 67  
      * Retrieves latest version associated with the objectId. This is not always
 68  
      * the current version.  A current version is what is being used by the
 69  
      * system right now, but there could be draft version created after the
 70  
      * current version.
 71  
      *
 72  
      * @param refObjectTypeURI reference object type URI
 73  
      * @param refObjectId      reference object Id
 74  
      * @param contextInfo      context information containing the principalId
 75  
      *                         and locale information about the caller of
 76  
      *                         service operation
 77  
      * @return latest version
 78  
      * @throws DoesNotExistException     specified refObjectId and refObjectTypeURI
 79  
      *                                   not found
 80  
      * @throws InvalidParameterException contextInfo is not valid
 81  
      * @throws MissingParameterException refObjectTypeURI, refObjectId or
 82  
      *                                   contextInfo is missing or null
 83  
      * @throws OperationFailedException  unable to complete request
 84  
      * @throws PermissionDeniedException an authorization failure occurred
 85  
      */
 86  
     public VersionDisplayInfo getLatestVersion(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 87  
 
 88  
     /**
 89  
      * Retrieves current version associated with the objectId.
 90  
      *
 91  
      * @param refObjectTypeURI reference object type URI
 92  
      * @param refObjectId      reference object Id
 93  
      * @param contextInfo      context information containing the principalId
 94  
      *                         and locale information about the caller of
 95  
      *                         service operation
 96  
      * @return current version
 97  
      * @throws DoesNotExistException     specified refObjectTypeURI and
 98  
      *                                   refObjectId not found
 99  
      * @throws InvalidParameterException contextInfo is not valid
 100  
      * @throws MissingParameterException refObjectTypeURI, refObjectId or
 101  
      *                                   contextInfo is missing or null
 102  
      * @throws OperationFailedException  unable to complete request
 103  
      * @throws PermissionDeniedException an authorization failure occurred
 104  
      */
 105  
     public VersionDisplayInfo getCurrentVersion(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 106  
 
 107  
     /**
 108  
      * Retrieves the version associated with the objectId and the sequence
 109  
      * number.
 110  
      *
 111  
      * @param refObjectTypeURI reference object type URI
 112  
      * @param refObjectId      reference object Id
 113  
      * @param sequence         sequence number
 114  
      * @param contextInfo      context information containing the principalId
 115  
      *                         and locale information about the caller of
 116  
      *                         service operation
 117  
      * @return version matching the sequence
 118  
      * @throws DoesNotExistException     specified refObjectTypeURI, refObjectId
 119  
      *                                   or sequence not found
 120  
      * @throws InvalidParameterException sequence or contextInfo is not valid
 121  
      * @throws MissingParameterException refObjectTypeURI, refObjectId, sequence
 122  
      *                                   or contextInfo is missing or null
 123  
      * @throws OperationFailedException  unable to complete request
 124  
      * @throws PermissionDeniedException an authorization failure occurred
 125  
      */
 126  
     public VersionDisplayInfo getVersionBySequenceNumber(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "sequence") Long sequence, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 127  
 
 128  
     /**
 129  
      * Retrieves the current version associated with the objectId on a given
 130  
      * date.
 131  
      *
 132  
      * @param refObjectTypeURI reference object type URI
 133  
      * @param refObjectId      reference object Id
 134  
      * @param date             date
 135  
      * @param contextInfo      context information containing the principalId
 136  
      *                         and locale information about the caller of
 137  
      *                         service operation
 138  
      * @return current version on given date
 139  
      * @throws DoesNotExistException     specified refObjectId and refObjectTypeURI
 140  
      *                                   not found
 141  
      * @throws InvalidParameterException date or contextInfo is not valid
 142  
      * @throws MissingParameterException refObjectTypeURI, refObjectId, date or
 143  
      *                                   contextInfo is missing or null
 144  
      * @throws OperationFailedException  unable to complete request
 145  
      * @throws PermissionDeniedException an authorization failure occurred
 146  
      */
 147  
     public VersionDisplayInfo getCurrentVersionOnDate(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "date") Date date, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 148  
 
 149  
     /**
 150  
      * Retrieves the current version associated with the objectId in a given
 151  
      * date range
 152  
      *
 153  
      * @param refObjectTypeURI reference object type URI
 154  
      * @param refObjectId      reference object Id
 155  
      * @param from             from date
 156  
      * @param to               to date
 157  
      * @param contextInfo      context information containing the principalId
 158  
      *                         and locale information about the caller of
 159  
      *                         service operation
 160  
      * @return current version in given date range
 161  
      * @throws DoesNotExistException     specified refObjectId and refObjectTypeURI
 162  
      *                                   not found
 163  
      * @throws InvalidParameterException from, to or contextInfo is not valid
 164  
      * @throws MissingParameterException refObjectTypeURI, refObjectId, from, to
 165  
      *                                   or contextInfo is missing or null
 166  
      * @throws OperationFailedException  unable to complete request
 167  
      * @throws PermissionDeniedException an authorization failure occurred
 168  
      */
 169  
     public List<VersionDisplayInfo> getVersionsInDateRange(@WebParam(name = "refObjectTypeURI") String refObjectTypeURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "from") Date from, @WebParam(name = "to") Date to, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 170  
 }