]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3779, CSPACE-3770: Adding "wf_delete" workflow deleted query param. Also...
authorRichard Millet <richard.millet@berkeley.edu>
Fri, 8 Apr 2011 21:51:04 +0000 (21:51 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Fri, 8 Apr 2011 21:51:04 +0000 (21:51 +0000)
58 files changed:
services/JaxRsServiceProvider/pom.xml
services/account/client/src/main/java/org/collectionspace/services/client/AccountProxy.java
services/account/client/src/main/java/org/collectionspace/services/client/AccountRoleProxy.java
services/account/client/src/test/java/org/collectionspace/services/account/client/test/AccountServiceTest.java
services/acquisition/client/pom.xml
services/acquisition/client/src/main/java/org/collectionspace/services/client/AcquisitionProxy.java
services/authorization-mgt/client/src/main/java/org/collectionspace/services/client/PermissionProxy.java
services/authorization-mgt/client/src/main/java/org/collectionspace/services/client/PermissionRoleProxy.java
services/authorization-mgt/client/src/main/java/org/collectionspace/services/client/RolePermissionProxy.java
services/authorization-mgt/client/src/main/java/org/collectionspace/services/client/RoleProxy.java
services/blob/client/pom.xml
services/build.xml
services/client/src/main/java/org/collectionspace/services/client/AbstractPoxServiceClientImpl.java
services/client/src/main/java/org/collectionspace/services/client/AbstractServiceClientImpl.java
services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java
services/client/src/main/java/org/collectionspace/services/client/CollectionSpacePoxClient.java
services/client/src/main/java/org/collectionspace/services/client/CollectionSpacePoxProxy.java
services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceProxy.java
services/client/src/main/java/org/collectionspace/services/client/TestServiceProxy.java
services/client/src/main/java/org/collectionspace/services/client/test/AbstractServiceTestImpl.java
services/collectionobject/client/pom.xml
services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectClient.java
services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectProxy.java
services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java
services/common/src/main/cspace/config/services/tenants/collectionspace/tenant-bindings.xml
services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameUtils.java [moved from services/authority/src/main/java/org/collectionspace/services/common/vocabulary/RefNameUtils.java with 100% similarity]
services/common/src/main/java/org/collectionspace/services/common/workflow/service/nuxeo/WorkflowDocumentModelHandler.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java
services/contact/service/pom.xml
services/dimension/client/src/main/java/org/collectionspace/services/client/DimensionClient.java
services/dimension/client/src/test/java/org/collectionspace/services/client/test/DimensionServiceTest.java
services/dimension/service/src/main/java/org/collectionspace/services/dimension/DimensionResource.java
services/id/client/src/main/java/org/collectionspace/services/client/IdProxy.java
services/intake/client/pom.xml
services/intake/client/src/main/java/org/collectionspace/services/client/IntakeProxy.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/IntakeServiceTest.java
services/loanin/client/src/main/java/org/collectionspace/services/client/LoaninProxy.java
services/loanin/pom.xml
services/loanout/client/pom.xml
services/location/client/src/main/java/org/collectionspace/services/client/LocationAuthorityProxy.java
services/location/pom.xml
services/media/client/pom.xml
services/movement/client/pom.xml
services/movement/client/src/main/java/org/collectionspace/services/client/MovementProxy.java
services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java
services/note/client/pom.xml
services/note/client/src/main/java/org/collectionspace/services/client/NoteProxy.java
services/objectexit/client/pom.xml
services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java
services/organization/client/pom.xml
services/organization/jaxb/pom.xml
services/organization/service/pom.xml
services/person/pom.xml
services/pom.xml
services/report/service/pom.xml
services/vocabulary/client/pom.xml
services/vocabulary/pom.xml
services/workflow/client/src/test/java/org/collectionspace/services/client/test/WorkflowServiceTest.java

index c3a86268312c939c9a15fa9f8c502adc678400ba..5be05bf91f88f5457a186257f3493bd4bdd8cbd9 100644 (file)
             <scope>test</scope>\r
         </dependency>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.authorization.service</artifactId>\r
index 2988a7f942918cdef3a421c49411d7cd74149b00..dd13fe7c0f979b0e3d85c6c5e0f48a0049d27f0b 100644 (file)
@@ -27,7 +27,6 @@
 package org.collectionspace.services.client;
 
 import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
@@ -37,20 +36,17 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Response;
 
-
 import org.collectionspace.services.account.AccountsCommon;
 import org.collectionspace.services.account.AccountsCommonList;
 import org.jboss.resteasy.client.ClientResponse;
 
-
-
 /**
  * @version $Revision:$
  */
 @Path("/accounts/")
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface AccountProxy extends CollectionSpaceProxy {
+public interface AccountProxy extends CollectionSpaceProxy<AccountsCommonList> {
 
     @GET
     @Produces({"application/xml"})
@@ -72,5 +68,5 @@ public interface AccountProxy extends CollectionSpaceProxy {
     //(U)pdate
     @PUT
     @Path("/{csid}")
-    ClientResponse<AccountsCommon> update(@PathParam("csid") String csid, AccountsCommon multipart);
+    ClientResponse<AccountsCommon> update(@PathParam("csid") String csid, AccountsCommon multipart);    
 }
index d757d32aa082572c3091f575fdbfa44a3bf187a4..4ad266d31a62f23d7294b30a412cd66d28e4694e 100644 (file)
@@ -46,7 +46,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/accounts")
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface AccountRoleProxy extends CollectionSpaceProxy {
+public interface AccountRoleProxy extends CollectionSpaceProxy<AccountRole> {
 
     //(C)reate
     @POST
index 9e75092ac116836e5d71f613e61e1190f9ec40dc..e0e96c80182474dcf21e91f36c15b6ec1a829d13 100644 (file)
@@ -99,7 +99,8 @@ public class AccountServiceTest extends AbstractServiceTestImpl {
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readPaginatedList(java.lang.String)
      */
-    @Test(dataProvider = "testName")
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+           dependsOnMethods = {"readList"})
     @Override
     public void readPaginatedList(String testName) throws Exception {
         //FIXME: http://issues.collectionspace.org/browse/CSPACE-1697
index 962a2619c710463479d5ad5f6daab2104b70a6f6..c79526a90460587e9792752f88f72326bd4ad295 100644 (file)
             <scope>test</scope>\r
         </dependency>\r
         <!-- CollectionSpace Dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.jaxb</artifactId>\r
index db55b3b283870a0b2816e0c54c2c5ac854923545..d6f676c518746d0e3ae9f6a03aa7eaead8b6008a 100644 (file)
@@ -4,7 +4,9 @@ import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.jboss.resteasy.client.ClientResponse;
 
@@ -17,4 +19,10 @@ import org.jboss.resteasy.client.ClientResponse;
 public interface AcquisitionProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
     @GET
     ClientResponse<AbstractCommonList> readList();
+    
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
 }
index dae1aa4753c8f5a768e13827df56b0eccd3daf82..54eb5c43ef0bdb48abd4219491892020e474cbcd 100644 (file)
@@ -46,7 +46,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/authorization/permissions")
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface PermissionProxy extends CollectionSpaceProxy {
+public interface PermissionProxy extends CollectionSpaceProxy<PermissionsList> {
 
     @GET
     @Produces({"application/xml"})
index 8bbd98310bfd4e17de94a8abfc75f89fc1e16314..bfaa5a316f48d88e0ab37718b66d490f1b81b6f2 100644 (file)
@@ -46,7 +46,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/authorization/permissions")
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface PermissionRoleProxy extends CollectionSpaceProxy {
+public interface PermissionRoleProxy extends CollectionSpaceProxy<PermissionRole> {
     //(C)reate
     @POST
     @Path("/{csid}/permroles")
index 757a99ea9e7055632e91ddc82e4a32269e88a122..08623912f94ef28c626cbf6ffe633faddac38ae9 100644 (file)
@@ -46,7 +46,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/authorization/roles")
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface RolePermissionProxy extends CollectionSpaceProxy {
+public interface RolePermissionProxy extends CollectionSpaceProxy<PermissionRole> {
 
     //(C)reate
     @POST
index e6004143fcdbc62912369c16a7c82b274053b270..8360bee9526603bf3a5bad71ac5ec267c7c14724 100644 (file)
@@ -47,7 +47,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/authorization/roles")
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface RoleProxy extends CollectionSpaceProxy {
+public interface RoleProxy extends CollectionSpaceProxy<RolesList> {
 
     @GET
     @Produces({"application/xml"})
index 4beda62d213c1e72df87e06bde23847bb0566047..ccf91ec6e52f2f84998e5a204bc398600653e107 100644 (file)
             <scope>test</scope>
         </dependency>
 <!-- CollectionSpace dependencies -->
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
index d814e0b7b91ee3ca8551abb3288101e78166ad53..b1176efc16cde68fcda43cb2daa379ed9a035b88 100644 (file)
             description="deploy services in ${jboss.server.cspace}">\r
         <ant antfile="authentication/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="authorization/build.xml" target="deploy" inheritAll="false"/>\r
+        <ant antfile="authority/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="blob/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="workflow/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="common/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="media/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="blob/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="workflow/build.xml" target="undeploy" inheritAll="false"/>\r
+        <ant antfile="authority/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="authorization/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="authentication/build.xml" target="undeploy" inheritAll="false"/>\r
     </target>\r
             description="create distribution for services">\r
         <ant antfile="authentication/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="authorization/build.xml" target="dist" inheritAll="false"/>\r
+        <ant antfile="authority/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="account/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="blob/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="workflow/build.xml" target="dist" inheritAll="false"/>\r
index a3b9f2dc4ad24d8bc7594df94b14a1c5a2198104..7224d5039498087ebc9ed09e3b438a38b9be693e 100644 (file)
@@ -26,4 +26,10 @@ public abstract class AbstractPoxServiceClientImpl<LT extends AbstractCommonList
     public ClientResponse<String> update(String csid, PoxPayloadOut xmlPayload) {\r
         return getProxy().update(csid, xmlPayload.getBytes());\r
     }\r
+    \r
+    @Override\r
+    public ClientResponse<LT> readIncludeDeleted(Boolean includeDeleted) {\r
+       CollectionSpacePoxProxy<LT> proxy = getProxy();\r
+       return proxy.readIncludeDeleted(includeDeleted.toString());\r
+    }        \r
 }\r
index 84e01ee70131bd5bd3b82dfa9e060818c89f2ea5..15f958f8e4faf698cd02734939489d036c377a07 100644 (file)
@@ -53,7 +53,7 @@ import org.slf4j.LoggerFactory;
  * @param <CommonListType> \r
  * @param <ListType> \r
  */\r
-public abstract class AbstractServiceClientImpl<LT, P extends CollectionSpaceProxy>\r
+public abstract class AbstractServiceClientImpl<LT, P extends CollectionSpaceProxy<LT>>\r
        implements CollectionSpaceClient<LT, P> {\r
 \r
     /** The logger. */\r
index b20be1d4dcfdd466ce187364a1487c0356be7cd5..68d6601e63719bf1ed750f562eb3fca408ae3d60 100644 (file)
@@ -32,7 +32,7 @@ import org.jboss.resteasy.client.ClientResponse;
 /**
  *
  */
-public interface CollectionSpaceClient<LT, P extends CollectionSpaceProxy> {
+public interface CollectionSpaceClient<LT, P extends CollectionSpaceProxy<LT>> {
 
     public static final String AUTH_PROPERTY = "cspace.auth";
     public static final String PASSWORD_PROPERTY = "cspace.password";
index 71918c9378257c542e71cac332d166e93b185208..a0dbb2fbca8612c6c1ca4d02c1a6b8c3f15625e4 100644 (file)
@@ -19,4 +19,6 @@ public interface CollectionSpacePoxClient<LT extends AbstractCommonList, P exten
     public ClientResponse<String> read(String csid);\r
 \r
     public ClientResponse<String> update(String csid, PoxPayloadOut xmlPayload);\r
+    \r
+    public ClientResponse<LT> readIncludeDeleted(Boolean includeDeleted);\r
 }\r
index 4518e3af8858be4840704468bbb48406ead23be7..bc1630a550ab72eb2e5060ac2e35c3c133f28f5a 100644 (file)
@@ -13,7 +13,7 @@ import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.jboss.resteasy.client.ClientResponse;\r
 \r
-public interface CollectionSpacePoxProxy<LT extends AbstractCommonList> extends CollectionSpaceProxy {\r
+public interface CollectionSpacePoxProxy<LT extends AbstractCommonList> extends CollectionSpaceProxy<LT> {\r
     //(C)reate\r
     @POST\r
     ClientResponse<Response> create(byte[] payload);\r
index fd1f667baf4bf039b5abf36d4a74301faa5afedd..df3b30ade1b495deb08e047aede0d63f601c17eb 100644 (file)
@@ -46,7 +46,7 @@ import org.jboss.resteasy.client.ClientResponse;
  * The Interface CollectionSpaceProxy.\r
  * FIXME: http://issues.collectionspace.org/browse/CSPACE-1684\r
  */\r
-public interface CollectionSpaceProxy {\r
+public interface CollectionSpaceProxy<LT> {\r
 \r
     //(D)elete\r
     @DELETE\r
@@ -87,7 +87,7 @@ public interface CollectionSpaceProxy {
     ClientResponse<AbstractCommonList> readList(\r
             @QueryParam(IClientQueryParams.PAGE_SIZE_PARAM) Long pageSize,\r
            @QueryParam(IClientQueryParams.START_PAGE_PARAM) Long pageNumber);\r
-       \r
+        \r
     /**\r
      * Read list.\r
      * @param sortBy \r
index 2483ee826ca2b3c6a2233a51b6033b841c04c393..2d3f53c446c61bcc25bf00b57c30bbf4b8e14ccc 100644 (file)
@@ -1,5 +1,5 @@
 package org.collectionspace.services.client;\r
 \r
-public interface TestServiceProxy extends CollectionSpaceProxy {\r
+public interface TestServiceProxy extends CollectionSpaceProxy<Object> {\r
 \r
 }\r
index 9f2a6686995dfb3e93811373d8b53d757622716d..6aff198cedcc61fa630bc9ca17548980b055941e 100644 (file)
@@ -31,6 +31,7 @@ import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.workflow.WorkflowCommon;
 import org.collectionspace.services.client.AbstractPoxServiceClientImpl;
 import org.collectionspace.services.client.CollectionSpaceClient;
+import org.collectionspace.services.client.CollectionSpacePoxClient;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
@@ -455,9 +456,11 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      */
     private AbstractCommonList readList(String testName,
                     CollectionSpaceClient client,
-                    long pageSize, long pageNumber) throws Exception {
+                    long pageSize,
+                    long pageNumber,
+                    int expectedStatus) throws Exception {
 
-        return readList(testName, client, EMPTY_SORT_BY_ORDER, pageSize, pageNumber);
+        return readList(testName, client, EMPTY_SORT_BY_ORDER, pageSize, pageNumber, expectedStatus);
 
     }
     /**
@@ -472,8 +475,11 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      * @throws Exception the exception
      */
     private AbstractCommonList readList(String testName,
-                    CollectionSpaceClient client, String sortBy,
-                    long pageSize, long pageNumber) throws Exception {
+                    CollectionSpaceClient client,
+                    String sortBy,
+                    long pageSize,
+                    long pageNumber,
+                    int expectedStatus) throws Exception {
         ClientResponse<AbstractCommonList> response =
                 client.readList(sortBy, pageSize, pageNumber);
         AbstractCommonList result = null;
@@ -485,9 +491,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
             if (getLogger().isDebugEnabled()) {
                     getLogger().debug(testName + ": status = " + statusCode);
             }
-            Assert.assertTrue(this.REQUEST_TYPE.isValidStatusCode(statusCode),
-                            invalidStatusCodeMessage(this.REQUEST_TYPE, statusCode));
-            Assert.assertEquals(statusCode, this.EXPECTED_STATUS_CODE);
+            Assert.assertEquals(statusCode, expectedStatus);
 
             result = this.getAbstractCommonList(response);
         } finally {
@@ -563,10 +567,19 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
 
         // Get the current total number of items.
         // If there are no items then create some
-        AbstractCommonList list = (AbstractCommonList) this.readList(testName, client, 1 /*pgSz*/, 0 /*pgNum*/);
+        AbstractCommonList list = (AbstractCommonList) this.readList(testName,
+                       client,
+                       1 /*pgSz*/,
+                       0 /*pgNum*/,
+                       EXPECTED_STATUS_CODE);
         if (list == null || list.getTotalItems() == 0) {
                this.createPaginatedList(testName, DEFAULT_PAGINATEDLIST_SIZE);
-               list = (AbstractCommonList) this.readList(testName, client, 1 /*pgSz*/, 0 /*pgNum*/);
+            setupReadList();
+               list = (AbstractCommonList) this.readList(testName,
+                               client,
+                               1 /*pgSz*/,
+                               0 /*pgNum*/,
+                               EXPECTED_STATUS_CODE);
         }
 
         // Print out the current list size to be paginated
@@ -581,7 +594,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         long pageSize = totalItems / 3; //create up to 3 pages to iterate over
         long pagesTotal = pageSize > 0 ? (totalItems / pageSize) : 0;
         for (int i = 0; i < pagesTotal; i++) {
-               list = (AbstractCommonList) this.readList(testName, client, pageSize, i);
+               list = (AbstractCommonList) this.readList(testName, client, pageSize, i, EXPECTED_STATUS_CODE);
                assertPaginationInfo(testName,
                                list,
                                i,                      //expected page number
@@ -593,7 +606,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         // if there are any remainders be sure to paginate them as well
         long mod = pageSize != 0 ? totalItems % pageSize : totalItems;
         if (mod != 0) {
-               list = (AbstractCommonList) this.readList(testName, client, pageSize, pagesTotal);
+               list = (AbstractCommonList) this.readList(testName, client, pageSize, pagesTotal, EXPECTED_STATUS_CODE);
                assertPaginationInfo(testName,
                                list,
                                pagesTotal, //expected page number
@@ -642,16 +655,121 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         Assert.assertEquals(updatedWorkflowCommons.getCurrentLifeCycleState(), lifeCycleState);
     }
     
-    /*
-     * Sub-classes must override for the workflow tests.
-     */
+       protected long readIncludeDeleted(String testName, Boolean includeDeleted) {
+               long result = 0;
+        // Perform setup.
+        setupReadList();
+
+        //
+        // Check to see if we have a POX client
+        //
+        CollectionSpaceClient clientCandidate = this.getClientInstance();
+        if (CollectionSpacePoxClient.class.isInstance(clientCandidate) != true) {  //FIXME: REM - We should remove this check and instead make CollectionSpaceClient support the readIncludeDeleted() method.
+               String msg = "Workflow tests are incomplete because " +
+               clientCandidate.getClass().getName() + " does not support readIncludeDeleted() method.";
+               logger.warn(msg);
+               throw new UnsupportedOperationException();
+        }
+        
+        //
+        // Ask for a list of all resources filtered by the incoming 'includeDeleted' workflow param
+        //
+        CollectionSpacePoxClient client = (CollectionSpacePoxClient)clientCandidate;
+        ClientResponse<AbstractCommonList> res = client.readIncludeDeleted(includeDeleted);
+        AbstractCommonList list = res.getEntity();
+        int statusCode = res.getStatus();
+        //
+        // Check the status code of the response: does it match
+        // the expected response(s)?
+        //
+        if (logger.isDebugEnabled()) {
+            logger.debug(testName + ": status = " + statusCode);
+        }
+        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        //
+        // Now check that list size is correct
+        //
+        /*
+        List<AbstractCommonList.ListItem> items =
+            list.getListItem();
+        result = items.size();
+        */
+        result = list.getTotalItems();
+        
+        return result;
+       }
+       
+       /*
+        * This test assumes that no objects exist yet.
+        * 
+        * http://localhost:8180/cspace-services/intakes?wf_deleted=false
+        */
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+       public void readWorkflow(String testName) throws Exception {
+       try {
+               //
+               // Get the total count of non-deleted existing records
+               //
+               long existingRecords = readIncludeDeleted(testName, Boolean.FALSE);
+
+               //
+               // Create 3 new objects
+               //
+               final int OBJECTS_TO_CREATE = 3;
+               for (int i = 0; i < OBJECTS_TO_CREATE; i++) {
+                       this.createWorkflowTarget(testName);
+               }
+
+               //
+               // Mark one as soft deleted
+               //
+               int existingTestCreated = allResourceIdsCreated.size(); // assumption is that no other test created records were soft deleted
+               String csid = allResourceIdsCreated.get(existingTestCreated - 1); //0-based index to get the last one added
+               this.setupUpdate();
+               this.updateLifeCycleState(testName, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
+               //
+               // Read the list of existing non-deleted records
+               //
+               long updatedTotal = readIncludeDeleted(testName, Boolean.FALSE);
+               Assert.assertEquals(updatedTotal, existingRecords + OBJECTS_TO_CREATE - 1, "Deleted items seem to be returned in list results.");
+       } catch (UnsupportedOperationException e) {
+               logger.warn(this.getClass().getName() + " did not implement createWorkflowTarget() method.  No workflow tests performed.");
+               return;
+       }
+       }
+
+    protected String createTestObject(String testName) throws Exception {
+               String result = null;
+               
+               CollectionSpacePoxClient client = (CollectionSpacePoxClient)getClientInstance();
+        String identifier = createIdentifier();
+        PoxPayloadOut multipart = createInstance(identifier);
+        ClientResponse<Response> res = client.create(multipart);
+
+        int statusCode = res.getStatus();
+        Assert.assertEquals(statusCode, STATUS_CREATED);
+
+        result = extractId(res);
+        allResourceIdsCreated.add(result);
+
+        return result;
+       }
     
     protected String createWorkflowTarget(String testName) throws Exception {
-       logger.warn("Sub-class test clients should override this method");
-       throw new UnsupportedOperationException();
+       String result = null;
+       
+       result = createTestObject(testName);
+       
+       return result;
     }
     
-    protected String createTestObject(String testName) throws Exception {
+    /*
+     * Sub-classes must override for the workflow tests.
+     */
+    
+    protected PoxPayloadOut createInstance(String identifier) {
        logger.warn("Sub-class test clients should override this method");
        throw new UnsupportedOperationException();
     }
index ade79135e81ccdf8c49bdf601fde342f66308847..2e41a33091e245934fd205ad2cbb71d1e7fd83a2 100644 (file)
             <optional>true</optional>\r
             <version>${project.version}</version>\r
         </dependency>        \r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.client</artifactId>\r
index f61514c8f3239ab3fab3f6522b4b4b936799be78..0f3ffdc266379279de37b3c37e35ffcdb395732a 100644 (file)
@@ -40,6 +40,7 @@ public class CollectionObjectClient extends AbstractPoxServiceClientImpl<Collect
        public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT; 
        public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";             
        public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
+       public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
     
        @Override
        public String getServiceName() {
index 5beac8cafcd018d9ec08690d21a457ff0150ee35..8c5dadc66e73990f897172790761e891dea9888c 100644 (file)
@@ -35,6 +35,7 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.collectionobject.CollectionobjectsCommonList;
 
 /**
@@ -66,6 +67,12 @@ public interface CollectionObjectProxy extends CollectionSpacePoxProxy<Collectio
     @Produces({"application/xml"})
     ClientResponse<CollectionobjectsCommonList> readList();
     
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<CollectionobjectsCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+    
     /**
      * Keyword search.
      *
index 6175bb650704ba9cb4d6f727d4f843b057ecadc7..037820678704a0ebccd50f9c16a6e9d8f9678b42 100644 (file)
@@ -1208,6 +1208,12 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
                 "objectNumber-" + identifier,
                 "objectName-" + identifier);
     }
+    
+    @Override
+    protected PoxPayloadOut createInstance(String identifier) {
+       String commonPartName = CollectionObjectClient.SERVICE_COMMON_PART_NAME;
+       return createCollectionObjectInstance(commonPartName, identifier);
+    }
 
     /**
      * Creates the collection object instance.
index e2644c40751fbfd1ae9ca1cd1586e67d81af3e64..f1ee390f0af84f604869ea0f63c825e3560a37d1 100644 (file)
             Repository workspace so we have to configure that.
         -->
         <tenant:serviceBindings name="Vocabularyitems" version="0.1">
+                       <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+                               /vocabularyitems/*/workflow/
+            </service:uriPath>
             <!-- other URI paths using which this service could be accessed -->
                        <!--            
                        <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
index 8e39057d44864fb33ef68263eb0cc508fd65ff33..60339293c6da89aefdb3c39d441332b462112048 100644 (file)
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
 
 import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
@@ -36,6 +37,7 @@ import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.common.context.MultipartServiceContext;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
 import org.collectionspace.services.common.document.DocumentUtils;
 import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.document.DocumentHandler.Action;
@@ -45,6 +47,7 @@ import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
 import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
 import org.collectionspace.services.workflow.WorkflowCommon;
 import org.dom4j.Element;
+import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.DocumentModel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -53,7 +56,7 @@ public class WorkflowDocumentModelHandler
        extends DocHandlerBase<WorkflowCommon> {
 
     /** The logger. */
-    private final Logger logger = LoggerFactory.getLogger(WorkflowDocumentModelHandler.class);
+    private static final Logger logger = LoggerFactory.getLogger(WorkflowDocumentModelHandler.class);
     
     /*
      * Workflow transitions
@@ -122,7 +125,6 @@ public class WorkflowDocumentModelHandler
                throws Exception {
                WorkflowCommon workflowsCommon = (WorkflowCommon)part.getBody();
                docModel.followTransition(getTransitionFromState(workflowsCommon.getCurrentLifeCycleState()));
-    }
-
+    }    
 }
 
index 2c07e9173eeafc9e8724a112424951f308990522..5324fab52204b8b8065e111c06c69d89779bec58 100644 (file)
@@ -24,13 +24,17 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
+import javax.ws.rs.core.MultivaluedMap;
+
 import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.query.QueryContext;
 import org.collectionspace.services.common.repository.RepositoryClient;
+import org.collectionspace.services.common.workflow.service.nuxeo.WorkflowDocumentModelHandler;
 import org.collectionspace.services.common.profile.Profiler;
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;
 
@@ -79,12 +83,36 @@ public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn,
        
     }
 
+    public void assertWorkflowState(ServiceContext ctx,
+               DocumentModel docModel) throws DocumentNotFoundException, ClientException {
+       MultivaluedMap<String, String> queryParams = ctx.getQueryParams();
+       if (queryParams != null) {
+               //
+               // Look for the workflow "delete" query param and see if we need to assert that the
+               // docModel is in a non-deleted workflow state.
+               //
+               String currentState = docModel.getCurrentLifeCycleState();
+               String includeDeletedStr = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_NONDELETED);
+               boolean includeDeleted = Boolean.parseBoolean(includeDeletedStr);
+               if (includeDeleted == false) {
+                       //
+                       // We don't wanted soft-deleted object, so throw an exception if this one is soft-deleted.
+                       //
+                       if (currentState.equalsIgnoreCase(WorkflowClient.WORKFLOWSTATE_DELETED)) {
+                               String msg = "GET assertion that docModel not be in 'deleted' workflow state failed.";
+                               logger.debug(msg);
+                               throw new DocumentNotFoundException(msg);
+                       }
+               }
+       }
+    }
+    
     /**
      * Sets the collection space core values.
      *
      * @param ctx the ctx
      * @param documentModel the document model
-     * @throws ClientException the client exception
+     * @throws ClientException the client exception    //FIXME: REM - This behavior needs to be part of the base DocumentHandler classes, so our JPA services get this behavior as well
      */
     private void setCollectionSpaceCoreValues(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
             DocumentModel documentModel,
@@ -222,17 +250,18 @@ public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn,
             handler.prepare(Action.GET);
             repoSession = getRepositorySession();
             DocumentRef docRef = NuxeoUtils.createPathRef(ctx, id);
-            DocumentModel doc = null;
+            DocumentModel docModel = null;
             try {
-                doc = repoSession.getDocument(docRef);
+               docModel = repoSession.getDocument(docRef);
+                assertWorkflowState(ctx, docModel);
             } catch (ClientException ce) {
-                String msg = "could not find document with id=" + id;
+                String msg = "Could not find document with id=" + id;
                 logger.error(msg, ce);
                 throw new DocumentNotFoundException(msg, ce);
             }
             //set reposession to handle the document
             ((DocumentModelHandler) handler).setRepositorySession(repoSession);
-            DocumentWrapper<DocumentModel> wrapDoc = new DocumentWrapperImpl<DocumentModel>(doc);
+            DocumentWrapper<DocumentModel> wrapDoc = new DocumentWrapperImpl<DocumentModel>(docModel);
             handler.handle(Action.GET, wrapDoc);
             handler.complete(Action.GET, wrapDoc);
         } catch (IllegalArgumentException iae) {
index 83c50411966a8b22f1f1c059c3cec22ee0888974..ac144b0c01ccd9164ffffaabea5b5152dace6a48 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.common</artifactId>
index a5251b492daeb69d4e2e3e5354b77bb79bb1ed18..e65cee3632750e91482542a01e0cc4ed7587a751 100644 (file)
@@ -63,10 +63,5 @@ public class DimensionClient extends AbstractPoxServiceClientImpl<DimensionsComm
     public ClientResponse<DimensionsCommonList> readList() {
        DimensionProxy proxy = (DimensionProxy)getProxy();
        return proxy.readList();
-    } 
-       
-    public ClientResponse<DimensionsCommonList> readIncludeDeleted(Boolean includeDeleted) { //FIXME: REM - This should be defined in the base class with a generic return list type
-       DimensionProxy proxy = (DimensionProxy)getProxy();
-       return proxy.readIncludeDeleted(includeDeleted.toString());
-    } 
+    }  
 }
index 9437bd290041a22d1318cb653558351043042bb0..b66866c7abeee213309aa2b6d7af640bd6cdd59b 100644 (file)
@@ -757,15 +757,6 @@ public class DimensionServiceTest extends AbstractServiceTestImpl {
 
         return multipart;
     }
-
-    @Override
-    protected String createWorkflowTarget(String testName) throws Exception {
-       String result = null;
-       
-       result = createTestObject(testName);
-       
-       return result;
-    }
        
        @Override
     protected String createTestObject(String testName) throws Exception {
index 5b54df800c62bda75eb6fe3d820e506f741d8447..d05c0a33b9b39c49d6099eeeddb9f06c5785d04f 100644 (file)
@@ -156,6 +156,7 @@ public class DimensionResource extends
     @GET
     @Path("{csid}")
     public byte[] getDimension(
+               @Context UriInfo ui,
             @PathParam("csid") String csid) {
         if (logger.isDebugEnabled()) {
             logger.debug("getDimension with csid=" + csid);
@@ -169,7 +170,8 @@ public class DimensionResource extends
         }
         PoxPayloadOut result = null;
         try {
-            ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+            MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+            ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
             DocumentHandler handler = createDocumentHandler(ctx);
             getRepositoryClient(ctx).get(ctx, csid, handler);
             result = ctx.getOutput();
index ca016c6d9f1be8e2a105001111e57acb41ae4059..b74014732ab64962290a4ff34db9903f2630b315 100644 (file)
@@ -11,7 +11,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/idgenerators/")
 @Produces({"application/xml"})
 @Consumes({"text/plain"})
-public interface IdProxy extends CollectionSpaceProxy {
+public interface IdProxy extends CollectionSpaceProxy<String> {
 
     @GET
     @Produces({"application/xml"})
index 14421caed4fdb74cfa1f1450c4377c208eab51b5..66fedde5069f2cc1bb752eb35f35497ca443b0ec 100644 (file)
             <scope>test</scope>\r
         </dependency>\r
 <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.jaxb</artifactId>\r
index 82920583490163f5019c884948b81be91533bebd..8bd496edf34f293b85dfb8bdbba14bf9eaef6e32 100644 (file)
@@ -31,7 +31,9 @@ import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.intake.IntakesCommonList;
 
 /**
@@ -50,4 +52,10 @@ public interface IntakeProxy extends CollectionSpacePoxProxy<IntakesCommonList>
     @GET
     @Produces({"application/xml"})
     ClientResponse<IntakesCommonList> readList();
+    
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<IntakesCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
 }
index 33432c500f47b06a2388554bf78fded34b1e242e..ca97537e73f05cdd23c5a19d4a075b35d335c91b 100644 (file)
@@ -108,7 +108,7 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
         // Submit the request to the service and store the response.
         IntakeClient client = new IntakeClient();
         String identifier = createIdentifier();
-        PoxPayloadOut multipart = createIntakeInstance(identifier);
+        PoxPayloadOut multipart = createInstance(identifier);
         ClientResponse<Response> res = client.create(multipart);
 
         int statusCode = res.getStatus();
@@ -668,7 +668,7 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
         // Note: The ID used in this 'create' call may be arbitrary.
         // The only relevant ID may be the one used in update(), below.
         IntakeClient client = new IntakeClient();
-        PoxPayloadOut multipart = createIntakeInstance(NON_EXISTENT_ID);
+        PoxPayloadOut multipart = createInstance(NON_EXISTENT_ID);
         ClientResponse<String> res =
                 client.update(NON_EXISTENT_ID, multipart);
         int statusCode = res.getStatus();
@@ -715,7 +715,7 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
-
+    
     // Failure outcomes
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
@@ -791,7 +791,8 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
      * @param identifier the identifier
      * @return the multipart output
      */
-    private PoxPayloadOut createIntakeInstance(String identifier) {
+    @Override
+    protected PoxPayloadOut createInstance(String identifier) {
         return createIntakeInstance(
                 "entryNumber-" + identifier,
                 "entryDate-" + identifier,
index 00fb97df076e153362bdf1bbe059429d3365d3e8..6a9bd91590406b432e821e1f5ab28bb47cc0207b 100644 (file)
@@ -5,7 +5,9 @@ import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 
 /**
@@ -18,4 +20,10 @@ public interface LoaninProxy extends CollectionSpacePoxProxy<AbstractCommonList>
     // List
     @GET
     ClientResponse<AbstractCommonList> readList();
+    
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
 }
index a2bfe225f90a41bfec8ea6a98661def86eecaefc..6d3d397a3a31a42c189acea852a2a1af24036269 100644 (file)
     <name>services.loanin</name>
     <packaging>pom</packaging>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>    
+    </dependencies>
+
     <modules>
         <module>jaxb</module>
         <module>service</module>
index c207af9be60c52e9b9acb343772aba069c3d6ad4..b9c7d79cab1a4a55a57466f0d79e3daa9a49142b 100644 (file)
             <scope>test</scope>
         </dependency>
 <!-- CollectionSpace dependencies -->
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
index 2beea9c969d7971eb25798787d9162162ba0276c..02bd6ce02d46111bee3e8a84b507a7a6d9349c2a 100644 (file)
@@ -8,6 +8,7 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.location.LocationauthoritiesCommonList;
 import org.collectionspace.services.location.LocationsCommonList;
 
@@ -49,4 +50,10 @@ public interface LocationAuthorityProxy extends AuthorityProxy<Locationauthoriti
             @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
             @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
     
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<LocationauthoritiesCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+    
 }
index cf37dd3a41368f65b2087c3b5094e9f33f4033eb..82f0e1f23f24b66f3b896d01492251061908ab7c 100644 (file)
     <name>services.location</name>\r
     <packaging>pom</packaging>\r
 \r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>    \r
+    </dependencies>\r
+\r
     <modules>\r
         <module>jaxb</module>\r
         <module>service</module>\r
index 511e1df38f2c05bdf038c231000d02459aa446ad..06050975dc99021b642e0e2f4c344a53d2815f3d 100644 (file)
             <scope>test</scope>
         </dependency>
 <!-- CollectionSpace dependencies -->
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
index 6b00acfe324f42a5541926d1d67d0a1ab33c6749..849004b6a6dd78cb79bf45e53c40be21f40d8c19 100644 (file)
             <scope>provided</scope>
         </dependency>
 <!-- CollectionSpace dependencies -->
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
index cadf819dfc6c0474d3bd941efdf9324892bc980c..ef0a39114d4d9163e79c26f03c7f5c461dfbedec 100644 (file)
@@ -31,6 +31,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.movement.MovementsCommonList;
 
 /**
@@ -54,6 +55,12 @@ public interface MovementProxy extends CollectionSpacePoxProxy<MovementsCommonLi
     @Produces({"application/xml"})
     ClientResponse<MovementsCommonList> readListSortedBy(
         @QueryParam(IClientQueryParams.SORT_BY_PARAM) String sortFieldName);
+    
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<MovementsCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
 
     @GET
     @Produces({"application/xml"})
index 181f4f2b78265d7a52e0b9dff3fd00bb0b5222f3..c550bedb33a7a7314adb29863e56a5679fd08b97 100644 (file)
@@ -808,7 +808,8 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
      * @return Multipart output suitable for use as a payload
      *     in a create or update request.
      */
-    private PoxPayloadOut createInstance(String movementReferenceNumber) {
+    @Override
+    public PoxPayloadOut createInstance(String movementReferenceNumber) {
         MovementsCommon movementCommon = new MovementsCommon();
         // FIXME: Values of currentLocation, normalLocation,
         // and movementContact should be refNames.
index 79807417a5a48a4e8879ac8db4156fbb6e5221a8..0d84e671ef15c7e485a62674b3a69f3ff99ce47b 100644 (file)
             <artifactId>slf4j-log4j12</artifactId>\r
         </dependency>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.note.jaxb</artifactId>\r
index b5788776af2996a247b0938cbc8cc2f7fada07de..a3f9da4c8cf21646661864cdd5841ee0827fc383 100644 (file)
@@ -19,7 +19,7 @@ import org.jboss.resteasy.client.ClientResponse;
 @Path("/notes/")\r
 @Produces({"application/xml;charset=UTF-8"})\r
 @Consumes({"application/xml"})\r
-public interface NoteProxy extends CollectionSpaceProxy {\r
+public interface NoteProxy extends CollectionSpaceProxy<NotesCommonList> {\r
 \r
     @GET\r
     @Produces({"application/xml"})\r
index ee0861c31fc031b827b56faa19affc8af89020d6..db7a0d18c44116360b22a8f56efea72d055e03c2 100644 (file)
             <scope>test</scope>
         </dependency>
 <!-- CollectionSpace dependencies -->
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
index 4c1f362d82cf55f4c35287047cb6fc7cbd47c0c7..c969f0a486f896fbfd5c306aa1b6189be7911cd8 100644 (file)
@@ -5,7 +5,9 @@ import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 
+import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 
 /**
@@ -18,4 +20,10 @@ public interface ObjectExitProxy extends CollectionSpacePoxProxy<AbstractCommonL
     // List
     @GET
     ClientResponse<AbstractCommonList> readList();
+    
+    @Override
+       @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> readIncludeDeleted(
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index 72507768b8d83fe5828db1ecba601b255731a417..beee66b473e17ea010ff7eaf85fa0fb1435ebd97 100644 (file)
             <scope>provided</scope>\r
         </dependency>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.organization.jaxb</artifactId>\r
index b6b970922bfcb3fe930bd3e0da3495947dbbafaa..f6564b2fa17d30730735072e80905a61c27d590e 100644 (file)
     <name>services.organization.jaxb</name>
     
     <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>        
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.common</artifactId>
index 4e465b82982c867b4fb2e4266d800d0bc705a13e..f20c688f4c9fe13875992c67fdfa0018aeeb267b 100644 (file)
             <artifactId>slf4j-log4j12</artifactId>\r
         </dependency>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.common</artifactId>\r
index 522dd54e041554890d85c8686eaa21660384e4a2..414054fe36f4c59ff5c40c78af5a7bf42277b161 100644 (file)
     <name>services.person</name>\r
     <packaging>pom</packaging>\r
 \r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>    \r
+    </dependencies>\r
+\r
     <modules>\r
         <module>jaxb</module>\r
         <module>service</module>\r
index c25091c1446a1fd688b5ed9e97adc5b84c60e6ca..4af57ba5d7d17bd44014fc39e054766e22da5087 100644 (file)
@@ -28,6 +28,7 @@
         <module>jaxb</module>
         <module>hyperjaxb</module>
         <module>common</module>
+               <module>authority</module>
         <module>authorization-mgt</module> <!-- relies on authorization -->
         <module>common-test</module>
         <module>account</module> <!-- relies on authorization-mgt.import -->
index 1fb1fb16123779c0b34a8fcfd11c9a92713ea86b..6dc7700ea7d27c88b7768181c44b65d1c3adf9b7 100644 (file)
     <packaging>jar</packaging>       \r
 \r
     <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.common</artifactId>\r
index 9019091f2a7c27efc840d8fe0421a313b1ae6d99..8569a57edc8dc62be4d2a4a8c4e7166ac763b7c0 100644 (file)
             <artifactId>slf4j-log4j12</artifactId>\r
         </dependency>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.vocabulary.jaxb</artifactId>\r
index 2daec72ef4d40485d7aadb238b1986ff37cdcdef..2ac08fc50142b69ec3f283d0e2a7c31018a5f950 100644 (file)
     <name>services.vocabulary</name>\r
     <packaging>pom</packaging>\r
 \r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authority</artifactId>\r
+            <optional>true</optional>\r
+            <version>${project.version}</version>\r
+        </dependency>    \r
+    </dependencies>\r
+\r
     <modules>\r
         <module>jaxb</module>\r
         <module>service</module>\r
index 30f23585bac227cb400bb0905a51111485f2cd06..63e4967f78e6757eda19131e9687b6d4ddd3aa7a 100644 (file)
@@ -297,74 +297,11 @@ public class WorkflowServiceTest extends AbstractServiceTestImpl {
                this.createTestObject(testName);
        }
 
-       private int readIncludeDeleted(String testName, Boolean includeDeleted) {
-               int result = 0;
-        // Perform setup.
-        setupReadList();
-
-        // Submit the request to the service and store the response.
-        DimensionClient client = new DimensionClient();
-        ClientResponse<DimensionsCommonList> res = client.readIncludeDeleted(includeDeleted);
-        DimensionsCommonList list = res.getEntity();
-        int statusCode = res.getStatus();
-        //
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        //
-        if (logger.isDebugEnabled()) {
-            logger.debug(testName + ": status = " + statusCode);
-        }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-        //
-        // Now check that list size is correct
-        //
-        List<DimensionsCommonList.DimensionListItem> items =
-            list.getDimensionListItem();
-        result = items.size();
-        
-        return result;
-       }
        
        @Override
        public void readList(String testName) throws Exception {
        }       
-       
-       /*
-        * This test assumes that no objects exist yet.
-        * 
-        * http://localhost:8180/cspace-services/intakes?wf_deleted=false
-        */
-    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, dependsOnMethods = {"update"})
-       public void readWorkflow(String testName) throws Exception {
-       //
-       // Get the total count of non-deleted existing records
-       //
-       int existingRecords = readIncludeDeleted(testName, Boolean.FALSE);
-
-       //
-       // Create 3 new objects
-       //
-       final int OBJECTS_TO_CREATE = 3;
-       for (int i = 0; i < OBJECTS_TO_CREATE; i++) {
-               this.createWorkflowTarget(testName);
-       }
-       
-       //
-       // Mark one as soft deleted
-       //
-       int existingTestCreated = allResourceIdsCreated.size(); // assumption is that no other test created records were soft deleted
-       String csid = allResourceIdsCreated.get(existingTestCreated - 1); //0-based index to get the last one added
-       this.setupUpdate();
-       this.updateLifeCycleState(testName, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
-       //
-       // Read the list of existing non-deleted records
-       //
-       int updatedTotal = readIncludeDeleted(testName, Boolean.FALSE);
-       Assert.assertEquals(updatedTotal, existingRecords + OBJECTS_TO_CREATE - 1, "Deleted items seem to be returned in list results.");
-       }
-       
+               
        @Override
     public void readPaginatedList(String testName) throws Exception {
                //empty N/A