]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3782: Added client tests to ensure that keyword searches respect the value...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 20 Apr 2011 02:37:38 +0000 (02:37 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 20 Apr 2011 02:37:38 +0000 (02:37 +0000)
33 files changed:
services/account/client/src/test/java/org/collectionspace/services/account/client/test/AccountRoleServiceTest.java
services/account/client/src/test/java/org/collectionspace/services/account/client/test/AccountServiceTest.java
services/acquisition/client/src/main/java/org/collectionspace/services/client/AcquisitionProxy.java
services/authorization-mgt/client/src/test/java/org/collectionspace/services/authorization/client/test/PermissionRoleServiceTest.java
services/authorization-mgt/client/src/test/java/org/collectionspace/services/authorization/client/test/PermissionServiceTest.java
services/authorization-mgt/client/src/test/java/org/collectionspace/services/authorization/client/test/RolePermissionServiceTest.java
services/authorization-mgt/client/src/test/java/org/collectionspace/services/authorization/client/test/RoleServiceTest.java
services/blob/client/src/main/java/org/collectionspace/services/client/BlobProxy.java
services/client/src/main/java/org/collectionspace/services/client/AbstractPoxServiceClientImpl.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/test/AbstractServiceTestImpl.java
services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectProxy.java
services/contact/client/src/main/java/org/collectionspace/services/client/ContactProxy.java
services/dimension/client/src/main/java/org/collectionspace/services/client/DimensionProxy.java
services/dimension/client/src/test/java/org/collectionspace/services/client/test/DimensionServiceTest.java
services/intake/client/src/main/java/org/collectionspace/services/client/IntakeProxy.java
services/loanin/client/src/main/java/org/collectionspace/services/client/LoaninProxy.java
services/loanout/client/src/main/java/org/collectionspace/services/client/LoanoutProxy.java
services/location/client/src/main/java/org/collectionspace/services/client/LocationAuthorityProxy.java
services/media/client/src/main/java/org/collectionspace/services/client/MediaProxy.java
services/movement/client/src/main/java/org/collectionspace/services/client/MovementProxy.java
services/note/client/src/test/java/org/collectionspace/services/client/test/NoteServiceTest.java
services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java
services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityProxy.java
services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityProxy.java
services/relation/client/src/main/java/org/collectionspace/services/client/RelationProxy.java
services/report/client/src/main/java/org/collectionspace/services/client/ReportProxy.java
services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthenticationServiceTest.java
services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthorizationServiceTest.java
services/security/client/src/test/java/org/collectionspace/services/security/client/test/MultiTenancyTest.java
services/vocabulary/client/src/main/java/org/collectionspace/services/client/VocabularyProxy.java
services/workflow/client/src/test/java/org/collectionspace/services/client/test/WorkflowServiceTest.java

index b3fbbeef7139db52ee7c37b83a41fb8f6d932a7b..d0c553cb020688f01fc6624fa5fd3cef6ce2c3c7 100644 (file)
@@ -496,6 +496,16 @@ public class AccountRoleServiceTest extends AbstractServiceTestImpl {
         //ignoring this test as the service side returns 200 now even if it does
         //not find a record in the db
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }    
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index e0e96c80182474dcf21e91f36c15b6ec1a829d13..dac8a35861738d7688e4d638676774ab35d54718 100644 (file)
@@ -1172,6 +1172,16 @@ public class AccountServiceTest extends AbstractServiceTestImpl {
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
 
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }
+    
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
     // ---------------------------------------------------------------
index d6f676c518746d0e3ae9f6a03aa7eaead8b6008a..c37c86a0d786a086d1e988fe387309478221cc97 100644 (file)
@@ -24,5 +24,12 @@ public interface AcquisitionProxy extends CollectionSpacePoxProxy<AbstractCommon
        @GET
     @Produces({"application/xml"})
     ClientResponse<AbstractCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> keywordSearchIncludeDeleted(
+           @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index 6e60ccf78b0bd4d97134ce3a0077ded222c64bb8..b896bb8627e40bb388b9d93c0356b0d79d2c7c96 100644 (file)
@@ -529,6 +529,16 @@ public class PermissionRoleServiceTest extends AbstractServiceTestImpl {
         //ignoring this test as the service side returns 200 now even if it does
         //not find a record in the db
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
@@ -742,4 +752,5 @@ public class PermissionRoleServiceTest extends AbstractServiceTestImpl {
             res.releaseConnection();
         }
     }
+    
 }
index 438213e6e1497b092877913cb6fc5b5db345f636..5965c49cc37ae5dcf6cb337772e390c57e5e1175 100644 (file)
@@ -697,6 +697,16 @@ public class PermissionServiceTest extends AbstractServiceTestImpl {
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index 73fe14f62aaaccc8014df8ee135718c3497b08d1..5142e0eb32274c699feaaeec0a92b396ceb198f5 100644 (file)
@@ -504,6 +504,16 @@ public class RolePermissionServiceTest extends AbstractServiceTestImpl {
         //ignoring this test as the service side returns 200 now even if it does
         //not find a record in the db
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index f670f16a2bc8d4a928219a88a42cde4aa37e0312..29c30f900733ed267d9aeaf34b9f91d7ae38132e 100644 (file)
@@ -767,6 +767,16 @@ public class RoleServiceTest extends AbstractServiceTestImpl {
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }    
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index e1c80a1f45f894aea30e3f680ab274bb93b02ac8..5dc06a0dbd2ce8ef00eb32d24c7ea2817b06c16c 100644 (file)
@@ -42,4 +42,11 @@ public interface BlobProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
     @Produces({"application/xml"})
     ClientResponse<AbstractCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index 5b59e3630f35c93b44c742436f491fac00d0b4ff..ea0d973638d2778e1f97b5f23471d55636eab096 100644 (file)
@@ -12,8 +12,9 @@ import org.jboss.resteasy.client.ClientResponse;
 public abstract class AbstractPoxServiceClientImpl<LT extends AbstractCommonList, P extends CollectionSpacePoxProxy<LT>>\r
        extends AbstractServiceClientImpl<LT, P> \r
        implements CollectionSpacePoxClient<LT, P> {\r
-       @Override\r
-       public ClientResponse<Response> create(PoxPayloadOut xmlPayload) {\r
+       \r
+    @Override\r
+    public ClientResponse<Response> create(PoxPayloadOut xmlPayload) {\r
         return getProxy().create(xmlPayload.getBytes());\r
     }\r
                \r
@@ -36,5 +37,12 @@ public abstract class AbstractPoxServiceClientImpl<LT extends AbstractCommonList
     public ClientResponse<LT> readIncludeDeleted(Boolean includeDeleted) {\r
        CollectionSpacePoxProxy<LT> proxy = getProxy();\r
        return proxy.readIncludeDeleted(includeDeleted.toString());\r
-    }        \r
+    }\r
+\r
+    @Override\r
+    public ClientResponse<LT> keywordSearchIncludeDeleted(String keywords, Boolean includeDeleted) {\r
+        CollectionSpacePoxProxy<LT> proxy = getProxy();\r
+        return proxy.keywordSearchIncludeDeleted(keywords, includeDeleted.toString());\r
+    }\r
+\r
 }\r
index 060b8d2e3e983afa078f3ef5f7216124c119da8c..1ca54dfe19858443394c448851a14180d7660eae 100644 (file)
@@ -29,4 +29,6 @@ public interface CollectionSpacePoxClient<LT extends AbstractCommonList, P exten
      * GET list with workflow 'deleted' state\r
      */\r
     public ClientResponse<LT> readIncludeDeleted(Boolean includeDeleted);\r
+\r
+    public ClientResponse<LT> keywordSearchIncludeDeleted(String keywords, Boolean includeDeleted);\r
 }\r
index 79622d7d19d28420c374560b49301917307eab16..9de3e19a3e24066b27206d22333a236292cd30a9 100644 (file)
@@ -14,6 +14,7 @@ import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.jboss.resteasy.client.ClientResponse;\r
 \r
 public interface CollectionSpacePoxProxy<LT extends AbstractCommonList> extends CollectionSpaceProxy<LT> {\r
+\r
     //(C)reate\r
     @POST\r
     ClientResponse<Response> create(byte[] payload);\r
@@ -39,4 +40,20 @@ public interface CollectionSpacePoxProxy<LT extends AbstractCommonList> extends
     @Produces({"application/xml"})\r
     ClientResponse<LT> readIncludeDeleted(\r
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);\r
+\r
+\r
+    /**\r
+     * Keyword search.\r
+     *\r
+     * @param keywords keywords on which to search\r
+     * @param includeDeleted\r
+     * @return the client response\r
+     */\r
+    @GET\r
+    @Produces({"application/xml"})\r
+    ClientResponse<LT> keywordSearchIncludeDeleted(\r
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,\r
+                @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);\r
+\r
+\r
 }\r
index 697f8fb6ec0ad8914201e67a0de2c4d69ab56ba9..f48155d362e685f41e91dd279ce1d6e9ee509c16 100644 (file)
@@ -51,7 +51,6 @@ import org.testng.annotations.Test;
 import javax.activation.MimetypesFileTypeMap;
 import javax.ws.rs.core.Response;
 
-
 /**
  * AbstractServiceTestImpl
  *
@@ -63,39 +62,35 @@ import javax.ws.rs.core.Response;
  * $LastChangedRevision$
  * $LastChangedDate$
  */
-
 // FIXME: http://issues.collectionspace.org/browse/CSPACE-1685
-
 public abstract class AbstractServiceTestImpl extends BaseServiceTest implements ServiceTest {
 
     /** The logger. */
     private final Logger logger = LoggerFactory.getLogger(AbstractServiceTestImpl.class);
-
     // A non-existent logger.
     static private final Logger LOGGER_NULL = null;
-
     /** The Constant DEFAULT_LIST_SIZE. */
     static protected final int DEFAULT_LIST_SIZE = 10;
     static protected final int DEFAULT_PAGINATEDLIST_SIZE = 10;
-    static protected final String RESOURCE_PATH = "src" + File.separator +
-       "test" + File.separator +
-       "resources";
+    static protected final String RESOURCE_PATH = "src" + File.separator
+            + "test" + File.separator
+            + "resources";
     protected static final String BLOBS_DIR = "blobs";
-
     static protected final String DEFAULT_MIME = "application/octet-stream; charset=ISO-8859-1";
     static private final String NO_TEST_CLEANUP = "noTestCleanup";
     static protected final String NO_BLOB_CLEANUP = "noBlobCleanup";
     static protected final String NO_MEDIA_CLEANUP = "noMediaCleanup";
+    final static String NON_EXISTENT_KEYWORD = "jlmbsoqjlmbsoq";
 
     protected String getMimeType(File theFile) {
-       String result = null;
-       result = new MimetypesFileTypeMap().getContentType(theFile);
-       if (result == null) {
-               logger.debug("Could not get MIME type for file at: " + theFile.getAbsolutePath());
-               result = DEFAULT_MIME;
-       }
-       
-       return result;
+        String result = null;
+        result = new MimetypesFileTypeMap().getContentType(theFile);
+        if (result == null) {
+            logger.debug("Could not get MIME type for file at: " + theFile.getAbsolutePath());
+            result = DEFAULT_MIME;
+        }
+
+        return result;
 
     }
     /* Use this to keep track of resources to delete */
@@ -111,24 +106,21 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      * @return the logger
      */
     private Logger getLogger() {
-       return this.logger;
+        return this.logger;
     }
 
     protected String getResourceDir() {
-       String result = null;
+        String result = null;
         String currentDirectory = System.getProperty("user.dir");
         result = currentDirectory + File.separator + RESOURCE_PATH;
         return result;
     }
-    
-    
-    
+
     // ---------------------------------------------------------------
     // CRUD tests : CREATE tests
     //
     // (See below for utility methods in support of create list tests.)
     // ---------------------------------------------------------------
-
     // Success outcomes
 
     /* (non-Javadoc)
@@ -145,7 +137,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         REQUEST_TYPE = ServiceRequestType.CREATE;
         testSetup(EXPECTED_STATUS_CODE, REQUEST_TYPE);
     }
-    
+
     /**
      * Checks if 'theFile' is something we can turn into a Blob instance.  It can't
      * be read-protected, hidden, or a directory.
@@ -154,11 +146,11 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      * @return true, if is blobable
      */
     protected boolean isBlobbable(File theFile) {
-       boolean result = true;
-       if (theFile.isDirectory() || theFile.isHidden() || !theFile.canRead()) {
-               result = false;
-       }
-       return result;
+        boolean result = true;
+        if (theFile.isDirectory() || theFile.isHidden() || !theFile.canRead()) {
+            result = false;
+        }
+        return result;
     }
 
     /* (non-Javadoc)
@@ -169,7 +161,6 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
 
     // Note: No setup is required for createList(), as it currently
     // just invokes create() multiple times.
-
     // Failure outcomes
 
     /* (non-Javadoc)
@@ -187,7 +178,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         REQUEST_TYPE = ServiceRequestType.CREATE;
         testSetup(EXPECTED_STATUS_CODE, REQUEST_TYPE);
     }
-    
+
     /**
      * Sets up create tests with empty entity body.
      */
@@ -196,7 +187,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         REQUEST_TYPE = ServiceRequestType.CREATE;
         testSetup(EXPECTED_STATUS_CODE, REQUEST_TYPE);
     }
-    
+
 
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.ServiceTest#createWithMalformedXml(java.lang.String)
@@ -231,7 +222,6 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
     // ---------------------------------------------------------------
     // CRUD tests : READ tests
     // ---------------------------------------------------------------
-
     // Success outcomes
 
     /* (non-Javadoc)
@@ -271,12 +261,11 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
     //
     // (See below for utility methods in support of list tests.)
     // ---------------------------------------------------------------
-
     // Success outcomes
 
     /* (non-Javadoc)
-        * @see org.collectionspace.services.client.test.ServiceTest#readList(java.lang.String)
-        */
+     * @see org.collectionspace.services.client.test.ServiceTest#readList(java.lang.String)
+     */
     @Override
     public abstract void readList(String testName) throws Exception;
 
@@ -290,13 +279,10 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
     }
 
     // Failure outcomes
-
     // None tested at present.
-
     // ---------------------------------------------------------------
     // CRUD tests : UPDATE tests
     // ---------------------------------------------------------------
-
     // Success outcomes
 
     /* (non-Javadoc)
@@ -360,14 +346,13 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         REQUEST_TYPE = ServiceRequestType.UPDATE;
         testSetup(EXPECTED_STATUS_CODE, REQUEST_TYPE);
     }
-    
+
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.ServiceTest#updateNonExistent(java.lang.String)
      */
     @Override
     public abstract void updateNonExistent(String testName) throws Exception;
 
-
     /**
      * Sets up update non existent tests
      */
@@ -380,7 +365,6 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
     // ---------------------------------------------------------------
     // CRUD tests : DELETE tests
     // ---------------------------------------------------------------
-
     // Success outcomes
 
     /* (non-Javadoc)
@@ -418,7 +402,6 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
     // ---------------------------------------------------------------
     // Utility methods to clean up resources created during tests.
     // ---------------------------------------------------------------
-
     /**
      * Deletes all resources created by tests, after all tests have been run.
      *
@@ -427,15 +410,15 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      * at any point during testing, even if some of those resources
      * may be expected to be deleted by certain tests.
      */
-    @AfterClass(alwaysRun=true)
+    @AfterClass(alwaysRun = true)
     public void cleanUp() {
         String noTestCleanup = System.getProperty(NO_TEST_CLEANUP);
-       if(Boolean.TRUE.toString().equalsIgnoreCase(noTestCleanup)) {
+        if (Boolean.TRUE.toString().equalsIgnoreCase(noTestCleanup)) {
             if (logger.isDebugEnabled()) {
                 logger.debug("Skipping Cleanup phase ...");
             }
             return;
-       }
+        }
         if (logger.isDebugEnabled()) {
             logger.debug("Cleaning up temporary resources created for testing ...");
         }
@@ -444,13 +427,13 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         // First, check to see if we need to cleanup any authority items
         //
         if (this.isAuthorityClient(client) == true) {
-               AuthorityClient authorityClient = (AuthorityClient)client;
-               for (Map.Entry<String, String> entry : allResourceItemIdsCreated.entrySet()) {
-                   String itemResourceId = entry.getKey();
-                   String authorityResourceId = entry.getValue();
-                   // Note: Any non-success responses are ignored and not reported.
-                   authorityClient.deleteItem(authorityResourceId, itemResourceId).releaseConnection();
-               }
+            AuthorityClient authorityClient = (AuthorityClient) client;
+            for (Map.Entry<String, String> entry : allResourceItemIdsCreated.entrySet()) {
+                String itemResourceId = entry.getKey();
+                String authorityResourceId = entry.getValue();
+                // Note: Any non-success responses are ignored and not reported.
+                authorityClient.deleteItem(authorityResourceId, itemResourceId).releaseConnection();
+            }
         }
         //
         // Next, delete all other entities include possible authorities.
@@ -464,7 +447,6 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
     // ---------------------------------------------------------------
     // Utility methods in support of list tests.
     // ---------------------------------------------------------------
-
     /**
      * Read list.
      *
@@ -476,14 +458,15 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      * @throws Exception the exception
      */
     private AbstractCommonList readList(String testName,
-                    CollectionSpaceClient client,
-                    long pageSize,
-                    long pageNumber,
-                    int expectedStatus) throws Exception {
+            CollectionSpaceClient client,
+            long pageSize,
+            long pageNumber,
+            int expectedStatus) throws Exception {
 
         return readList(testName, client, EMPTY_SORT_BY_ORDER, pageSize, pageNumber, expectedStatus);
 
     }
+
     /**
      * Read list.
      *
@@ -496,11 +479,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,
-                    int expectedStatus) 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;
@@ -510,7 +493,7 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
             // Check the status code of the response: does it match
             // the expected response(s)?
             if (getLogger().isDebugEnabled()) {
-                    getLogger().debug(testName + ": status = " + statusCode);
+                getLogger().debug(testName + ": status = " + statusCode);
             }
             Assert.assertEquals(statusCode, expectedStatus);
 
@@ -537,40 +520,39 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
 
     /*@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
     public void leafCreate(String testName) throws Exception {
-       this.create(testName);
+    this.create(testName);
     }*/
-
     private void assertPaginationInfo(String testName,
-               AbstractCommonList list,
-               long expectedPageNum,
-               long expectedPageSize,
-               long expectedListSize,
-               long expectedTotalItems) {
-       Assert.assertNotNull(list);
-
-       long pageNum = list.getPageNum();
-       Assert.assertEquals(pageNum, expectedPageNum);
-       if (getLogger().isDebugEnabled() == true) {
-               getLogger().debug(testName + ":" + "page number is " + pageNum);
-       }
-
-       long pageSizeReturned = list.getPageSize();
-       Assert.assertEquals(pageSizeReturned, expectedPageSize);
-       if (getLogger().isDebugEnabled() == true) {
-               getLogger().debug(testName + ":" + "page size is " + list.getPageSize());
-       }
-
-       long itemsInPage = list.getItemsInPage();
-       Assert.assertEquals(itemsInPage, expectedListSize);
-       if (getLogger().isDebugEnabled() == true) {
-               getLogger().debug(testName + ":" + "actual items in page was/were " + itemsInPage);
-       }
-
-       long totalItemsReturned = list.getTotalItems();
-       Assert.assertEquals(totalItemsReturned, expectedTotalItems);
-       if (getLogger().isDebugEnabled() == true) {
-               getLogger().debug(testName + ":" + "total number of items is " + list.getTotalItems());
-       }
+            AbstractCommonList list,
+            long expectedPageNum,
+            long expectedPageSize,
+            long expectedListSize,
+            long expectedTotalItems) {
+        Assert.assertNotNull(list);
+
+        long pageNum = list.getPageNum();
+        Assert.assertEquals(pageNum, expectedPageNum);
+        if (getLogger().isDebugEnabled() == true) {
+            getLogger().debug(testName + ":" + "page number is " + pageNum);
+        }
+
+        long pageSizeReturned = list.getPageSize();
+        Assert.assertEquals(pageSizeReturned, expectedPageSize);
+        if (getLogger().isDebugEnabled() == true) {
+            getLogger().debug(testName + ":" + "page size is " + list.getPageSize());
+        }
+
+        long itemsInPage = list.getItemsInPage();
+        Assert.assertEquals(itemsInPage, expectedListSize);
+        if (getLogger().isDebugEnabled() == true) {
+            getLogger().debug(testName + ":" + "actual items in page was/were " + itemsInPage);
+        }
+
+        long totalItemsReturned = list.getTotalItems();
+        Assert.assertEquals(totalItemsReturned, expectedTotalItems);
+        if (getLogger().isDebugEnabled() == true) {
+            getLogger().debug(testName + ":" + "total number of items is " + list.getTotalItems());
+        }
     }
 
     /**
@@ -580,7 +562,8 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
      * @throws Exception the exception
      */
     @Test(dataProvider = "testName") /*, dataProviderClass = AbstractServiceTestImpl.class,
-           dependsOnMethods = {"leafCreate"}) */
+    dependsOnMethods = {"leafCreate"}) */
+
     public void readPaginatedList(String testName) throws Exception {
         // Perform setup.
         setupReadList();
@@ -589,18 +572,18 @@ 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*/,
-                       EXPECTED_STATUS_CODE);
+                client,
+                1 /*pgSz*/,
+                0 /*pgNum*/,
+                EXPECTED_STATUS_CODE);
         if (list == null || list.getTotalItems() == 0) {
-               this.createPaginatedList(testName, DEFAULT_PAGINATEDLIST_SIZE);
+            this.createPaginatedList(testName, DEFAULT_PAGINATEDLIST_SIZE);
             setupReadList();
-               list = (AbstractCommonList) this.readList(testName,
-                               client,
-                               1 /*pgSz*/,
-                               0 /*pgNum*/,
-                               EXPECTED_STATUS_CODE);
+            list = (AbstractCommonList) this.readList(testName,
+                    client,
+                    1 /*pgSz*/,
+                    0 /*pgNum*/,
+                    EXPECTED_STATUS_CODE);
         }
 
         // Print out the current list size to be paginated
@@ -608,42 +591,42 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         long totalItems = list.getTotalItems();
         Assert.assertFalse(totalItems == 0);
         if (getLogger().isDebugEnabled() == true) {
-               getLogger().debug(testName + ":" + "created list of " +
-                               totalItems + " to be paginated.");
+            getLogger().debug(testName + ":" + "created list of "
+                    + totalItems + " to be paginated.");
         }
 
         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, EXPECTED_STATUS_CODE);
-               assertPaginationInfo(testName,
-                               list,
-                               i,                      //expected page number
-                               pageSize,       //expected page size
-                               pageSize,       //expected num of items in page
-                               totalItems);//expected total num of items
+            list = (AbstractCommonList) this.readList(testName, client, pageSize, i, EXPECTED_STATUS_CODE);
+            assertPaginationInfo(testName,
+                    list,
+                    i, //expected page number
+                    pageSize, //expected page size
+                    pageSize, //expected num of items in page
+                    totalItems);//expected total num of items
         }
 
         // 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, EXPECTED_STATUS_CODE);
-               assertPaginationInfo(testName,
-                               list,
-                               pagesTotal, //expected page number
-                               pageSize,       //expected page size
-                               mod,            //expected num of items in page
-                               totalItems);//expected total num of items
+            list = (AbstractCommonList) this.readList(testName, client, pageSize, pagesTotal, EXPECTED_STATUS_CODE);
+            assertPaginationInfo(testName,
+                    list,
+                    pagesTotal, //expected page number
+                    pageSize, //expected page size
+                    mod, //expected num of items in page
+                    totalItems);//expected total num of items
         }
     }
-    
+
     @SuppressWarnings("rawtypes")
-       protected void updateLifeCycleState(String testName, String resourceId, String lifeCycleState) throws Exception {
+    protected void updateLifeCycleState(String testName, String resourceId, String lifeCycleState) throws Exception {
         //
         // Read the existing object
         //
-       CollectionSpaceClient client = this.getClientInstance();
-       ClientResponse<String> res = client.getWorkflow(resourceId);
+        CollectionSpaceClient client = this.getClientInstance();
+        ClientResponse<String> res = client.getWorkflow(resourceId);
         assertStatusCode(res, testName);
         logger.debug("Got object to update life cycle state with ID: " + resourceId);
         PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
@@ -675,24 +658,24 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         Assert.assertNotNull(workflowCommons);
         Assert.assertEquals(updatedWorkflowCommons.getCurrentLifeCycleState(), lifeCycleState);
     }
-    
+
     private CollectionSpacePoxClient assertPoxClient() {
         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 clientCandidateName = "Unknown";
-               if (clientCandidate != null) {
-                       clientCandidateName = clientCandidate.getClass().getName();
-               }
-               String msg = "Workflow tests are incomplete because " +
-                       clientCandidateName + " does not support readIncludeDeleted() method.";
-               logger.warn(msg);
-               throw new UnsupportedOperationException();
+            String clientCandidateName = "Unknown";
+            if (clientCandidate != null) {
+                clientCandidateName = clientCandidate.getClass().getName();
+            }
+            String msg = "Workflow tests are incomplete because "
+                    + clientCandidateName + " does not support readIncludeDeleted() method.";
+            logger.warn(msg);
+            throw new UnsupportedOperationException();
         }
-        return (CollectionSpacePoxClient)clientCandidate;
+        return (CollectionSpacePoxClient) clientCandidate;
     }
-    
-       protected long readIncludeDeleted(String testName, Boolean includeDeleted) {
-               long result = 0;
+
+    protected long readIncludeDeleted(String testName, Boolean includeDeleted) {
+        long result = 0;
         // Perform setup.
         setupReadList();
 
@@ -718,27 +701,27 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         //
         /*
         List<AbstractCommonList.ListItem> items =
-            list.getListItem();
+        list.getListItem();
         result = items.size();
-        */
+         */
         result = list.getTotalItems();
-        
+
         return result;
-       }
-       
-       protected long readItemsIncludeDeleted(String testName, String parentCsid, Boolean includeDeleted) {
-               long result = 0;
+    }
+
+    protected long readItemsIncludeDeleted(String testName, String parentCsid, Boolean includeDeleted) {
+        long result = 0;
         // Perform setup.
         setupReadList();
 
         //
         // Ask for a list of all resources filtered by the incoming 'includeDeleted' workflow param
         //
-        AuthorityClient client = (AuthorityClient)this.getClientInstance();
+        AuthorityClient client = (AuthorityClient) this.getClientInstance();
         ClientResponse<AbstractCommonList> res = client.readItemList(parentCsid,
-                       null, /* partial terms */
-                       null, /* keywords */
-                       includeDeleted);
+                null, /* partial terms */
+                null, /* keywords */
+                includeDeleted);
         AbstractCommonList list = res.getEntity();
         int statusCode = res.getStatus();
         //
@@ -753,63 +736,133 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
 
         result = list.getTotalItems();
-        
+
         return result;
-       }       
-       
-       /*
-        * This test assumes that no objects exist yet.
-        * 
-        * http://localhost:8180/cspace-services/intakes?wf_deleted=false
-        */
+    }
+
+    /*
+     * 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.");
-               
-               //
-               // Next, test that a GET with WorkflowClient.WORKFLOWSTATE_DELETED query param set to 'false' returns a 404
-               //
-               CollectionSpacePoxClient client = this.assertPoxClient();
+    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.");
+
+            //
+            // Next, test that a GET with WorkflowClient.WORKFLOWSTATE_DELETED query param set to 'false' returns a 404
+            //
+            CollectionSpacePoxClient client = this.assertPoxClient();
             ClientResponse<String> res = client.readIncludeDeleted(csid, Boolean.FALSE);
             int result = res.getStatus();
             Assert.assertEquals(result, STATUS_NOT_FOUND);
-            
-       } catch (UnsupportedOperationException e) {
-               logger.warn(this.getClass().getName() + " did not implement createWorkflowTarget() method.  No workflow tests performed.");
-               return;
-       }
-       }
+
+        } catch (UnsupportedOperationException e) {
+            logger.warn(this.getClass().getName() + " did not implement createWorkflowTarget() method.  No workflow tests performed.");
+            return;
+        }
+    }
+
+    /*
+     * Test that searches honor the workflow deleted state.
+     */
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+
+        // FIXME: Temporarily avoid running test if client is of an authority service
+        CollectionSpacePoxClient client = this.assertPoxClient();
+        if (isAuthorityClient(client)) {
+            return;
+        }
+
+        try {
+
+            //
+            // Create 3 new objects
+            //
+            final int OBJECTS_TO_CREATE = 3;
+            final String KEYWORD = NON_EXISTENT_KEYWORD + createIdentifier();
+            for (int i = 0; i < OBJECTS_TO_CREATE; i++) {
+                this.createWorkflowTarget(testName, KEYWORD);
+            }
+
+            //
+            // 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);
+
+            //
+            // Search for the newly-created records, excluding the soft deleted record.
+            //
+            // Send the search request and receive a response
+            ClientResponse<AbstractCommonList> res = client.keywordSearchIncludeDeleted(KEYWORD, Boolean.FALSE);
+            int result = res.getStatus();
+            Assert.assertEquals(result, STATUS_OK);
+
+            AbstractCommonList list = res.getEntity();
+            long itemsMatchedBySearch = list.getTotalItems();
+            Assert.assertEquals(itemsMatchedBySearch, OBJECTS_TO_CREATE - 1,
+                    "Deleted items seem to be returned in list results.");
+
+            //
+            // Search for the newly-created records, including the soft deleted record.
+            //
+            // Send the search request and receive a response
+            res = client.keywordSearchIncludeDeleted(KEYWORD, Boolean.TRUE);
+            result = res.getStatus();
+            Assert.assertEquals(result, STATUS_OK);
+
+            list = res.getEntity();
+            itemsMatchedBySearch = list.getTotalItems();
+            Assert.assertEquals(itemsMatchedBySearch, OBJECTS_TO_CREATE,
+                    "Deleted item was not returned in list results, even though it was requested to be included.");
+
+        } 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();
+        String result = createTestObject(testName, identifier);
+        return result;
+
+    }
+
+    protected String createTestObject(String testName, String identifier) throws Exception {
+        String result = null;
+
+        CollectionSpacePoxClient client = (CollectionSpacePoxClient) getClientInstance();
         PoxPayloadOut multipart = createInstance(identifier);
         ClientResponse<Response> res = client.create(multipart);
 
@@ -820,121 +873,162 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         allResourceIdsCreated.add(result);
 
         return result;
-       }
-    
+    }
+
     protected String createWorkflowTarget(String testName) throws Exception {
-       String result = null;
-       
-       result = createTestObject(testName);
-       
-       return result;
+        String result = null;
+        result = createTestObject(testName);
+        return result;
+    }
+
+    protected String createWorkflowTarget(String testName, String keyword) throws Exception {
+        String result = null;
+        result = createTestObject(testName, keyword);
+        return result;
     }
-    
+
     /*
      * 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();
+        logger.warn("Sub-class test clients should override this method");
+
+
+        throw new UnsupportedOperationException();
+
+
+
     }
-    
+
     /*
      * Test classes for authority services should override these method and return 'true'
      */
     protected boolean isAuthorityClient(CollectionSpaceClient theClient) {
-       return AuthorityClient.class.isInstance(theClient);
+        return AuthorityClient.class.isInstance(theClient);
     }
-    
+
     protected PoxPayloadOut createItemInstance(String parentCsid, String identifier) {
-       logger.warn("Sub-class test clients should override this method");
-       throw new UnsupportedOperationException();
-    }    
-    
+        logger.warn("Sub-class test clients should override this method");
+
+
+        throw new UnsupportedOperationException();
+
+
+    }
+
     final protected String createWorkflowItemTarget(String testName, String parentCsid) throws Exception {
-       String result = null;
-       
-       result = createTestItemObject(testName, parentCsid);
-       
-       return result;
+        String result = null;
+
+        result = createTestItemObject(testName, parentCsid);
+
+
+
+        return result;
+
+
     }
-    
+
     protected String createTestItemObject(String testName, String parentCsid) throws Exception {
-               String result = null;
-               
-               AuthorityClient client = (AuthorityClient)getClientInstance();
+        String result = null;
+
+        AuthorityClient client = (AuthorityClient) getClientInstance();
         String identifier = createIdentifier();
         PoxPayloadOut multipart = createItemInstance(parentCsid, identifier);
         ClientResponse<Response> res = client.createItem(parentCsid, multipart);
 
+
+
         int statusCode = res.getStatus();
         Assert.assertEquals(statusCode, STATUS_CREATED);
 
         result = extractId(res);
         allResourceItemIdsCreated.put(result, parentCsid);
 
+
+
         return result;
-       }
-    
-       /*
-        * This test assumes that no objects exist yet.
-        * 
-        * http://localhost:8180/cspace-services/intakes?wf_deleted=false
-        */
+
+
+    }
+
+    /*
+     * 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 readAuthorityItemWorkflow(String testName) throws Exception {
-       //
-       // Run this test only if the client is an AuthorityClient //FIXME: REM - Replace this will an AuthorityServiceTest class
-       //
-       if (this.isAuthorityClient(this.getClientInstance()) == true) {
-               try {
-                       //
-                       // Get the total count of non-deleted existing records
-                       //
-                       String parentCsid = this.createTestObject(testName);
-       
-                       //
-                       // Create 3 new items
-                       //
-                       final int OBJECTS_TO_CREATE = 3;
-                       String lastCreatedItem = null;
-                       for (int i = 0; i < OBJECTS_TO_CREATE; i++) {
-                               lastCreatedItem = this.createWorkflowItemTarget(testName, parentCsid);
-                       }
-       
-                       //
-                       // Mark one item as soft deleted
-                       //
-                       String csid = lastCreatedItem;
-                       this.setupUpdate();
-                       this.updateItemLifeCycleState(testName, parentCsid, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
-                       //
-                       // Read the list of existing non-deleted records
-                       //
-                       long updatedTotal = readItemsIncludeDeleted(testName, parentCsid, Boolean.FALSE);
-                       Assert.assertEquals(updatedTotal, OBJECTS_TO_CREATE - 1, "Deleted items seem to be returned in list results.");
-                       
-                       //
-                       // Next, test that a GET with WorkflowClient.WORKFLOWSTATE_DELETED query param set to 'false' returns a 404
-                       //
-                       AuthorityClient client = (AuthorityClient)this.getClientInstance();
-                   ClientResponse<String> res = client.readItem(parentCsid, csid, Boolean.FALSE);
-                   int result = res.getStatus();
-                   Assert.assertEquals(result, STATUS_NOT_FOUND);
-                   
-               } catch (UnsupportedOperationException e) {
-                       logger.warn(this.getClass().getName() + " did not implement createWorkflowTarget() method.  No workflow tests performed.");
-                       return;
-               }
-       }
-       }
-    
-       protected void updateItemLifeCycleState(String testName, String parentCsid, String itemCsid, String lifeCycleState) throws Exception {
+    public void readAuthorityItemWorkflow(String testName) throws Exception {
+        //
+        // Run this test only if the client is an AuthorityClient //FIXME: REM - Replace this will an AuthorityServiceTest class
+        //
+        if (this.isAuthorityClient(this.getClientInstance()) == true) {
+            try {
+                //
+                // Get the total count of non-deleted existing records
+                //
+                String parentCsid = this.createTestObject(testName);
+
+                //
+                // Create 3 new items
+                //
+                final int OBJECTS_TO_CREATE = 3;
+                String lastCreatedItem = null;
+
+
+                for (int i = 0; i
+                        < OBJECTS_TO_CREATE; i++) {
+                    lastCreatedItem = this.createWorkflowItemTarget(testName, parentCsid);
+
+
+                } //
+                // Mark one item as soft deleted
+                //
+                String csid = lastCreatedItem;
+
+
+                this.setupUpdate();
+
+
+                this.updateItemLifeCycleState(testName, parentCsid, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
+                //
+                // Read the list of existing non-deleted records
+                //
+
+
+                long updatedTotal = readItemsIncludeDeleted(testName, parentCsid, Boolean.FALSE);
+                Assert.assertEquals(updatedTotal, OBJECTS_TO_CREATE - 1, "Deleted items seem to be returned in list results.");
+
+                //
+                // Next, test that a GET with WorkflowClient.WORKFLOWSTATE_DELETED query param set to 'false' returns a 404
+                //
+                AuthorityClient client = (AuthorityClient) this.getClientInstance();
+                ClientResponse<String> res = client.readItem(parentCsid, csid, Boolean.FALSE);
+
+
+                int result = res.getStatus();
+                Assert.assertEquals(result, STATUS_NOT_FOUND);
+
+
+
+            } catch (UnsupportedOperationException e) {
+                logger.warn(this.getClass().getName() + " did not implement createWorkflowTarget() method.  No workflow tests performed.");
+
+
+                return;
+
+
+            }
+        }
+    }
+
+    protected void updateItemLifeCycleState(String testName, String parentCsid, String itemCsid, String lifeCycleState) throws Exception {
         //
         // Read the existing object
         //
-       AuthorityClient client = (AuthorityClient)this.getClientInstance();
-       ClientResponse<String> res = client.readItemWorkflow(parentCsid, itemCsid);
-        assertStatusCode(res, testName);
+        AuthorityClient client = (AuthorityClient) this.getClientInstance();
+        ClientResponse<String> res = client.readItemWorkflow(parentCsid, itemCsid);
+        assertStatusCode(
+                res, testName);
         logger.debug("Got object to update life cycle state with ID: " + itemCsid);
         PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
         WorkflowCommon workflowCommons = (WorkflowCommon) extractPart(input, WorkflowClient.SERVICE_COMMONPART_NAME, WorkflowCommon.class);
@@ -942,7 +1036,8 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         //
         // Mark it for a soft delete.
         //
-        logger.debug("Current workflow state:" + objectAsXmlString(workflowCommons, WorkflowCommon.class));
+        logger.debug(
+                "Current workflow state:" + objectAsXmlString(workflowCommons, WorkflowCommon.class));
         workflowCommons.setCurrentLifeCycleState(lifeCycleState);
         PoxPayloadOut output = new PoxPayloadOut(WorkflowClient.SERVICE_PAYLOAD_NAME);
         PayloadOutputPart commonPart = output.addPart(WorkflowClient.SERVICE_COMMONPART_NAME, workflowCommons);
@@ -959,12 +1054,13 @@ public abstract class AbstractServiceTestImpl extends BaseServiceTest implements
         //
         res = client.readItemWorkflow(parentCsid, itemCsid);
         assertStatusCode(res, testName);
-        logger.debug("Got workflow state of updated object with ID: " + itemCsid);
+        logger.debug(
+                "Got workflow state of updated object with ID: " + itemCsid);
         input = new PoxPayloadIn(res.getEntity());
         updatedWorkflowCommons = (WorkflowCommon) extractPart(input, WorkflowClient.SERVICE_COMMONPART_NAME, WorkflowCommon.class);
         Assert.assertNotNull(workflowCommons);
         Assert.assertEquals(updatedWorkflowCommons.getCurrentLifeCycleState(), lifeCycleState);
-    }    
+    }
 }
 
 
index 8c5dadc66e73990f897172790761e891dea9888c..517017ed10f7a1bf6b1a16e36963b8b3aac91b1d 100644 (file)
@@ -83,5 +83,12 @@ public interface CollectionObjectProxy extends CollectionSpacePoxProxy<Collectio
     @Produces({"application/xml"})
     ClientResponse<CollectionobjectsCommonList> keywordSearch(
                @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<CollectionobjectsCommonList> keywordSearchIncludeDeleted(
+           @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
     
 }
index 75d17704997e6563989299b483afa2ce73b792db..274719c24e8edc42f54bbecf64b283ad1c4ba29f 100644 (file)
@@ -24,5 +24,12 @@ public interface ContactProxy extends CollectionSpacePoxProxy<ContactsCommonList
        @GET
     @Produces({"application/xml"})
     ClientResponse<ContactsCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+            
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<ContactsCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index 63147349cddfb1c68a11b49321d167392c59bbf0..1e5c6a5dd99e1d9379776465434590aa811f0fa1 100644 (file)
@@ -26,4 +26,11 @@ public interface DimensionProxy extends CollectionSpacePoxProxy<DimensionsCommon
     @Produces({"application/xml"})
     ClientResponse<DimensionsCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<DimensionsCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index ad2878bd3efeedb1c9d60c46ae9bac61f5c9c294..e546a0810179cc52707352ede63ce84a0f4b31f3 100644 (file)
@@ -680,6 +680,16 @@ public class DimensionServiceTest extends AbstractServiceTestImpl {
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    }
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index 8bd496edf34f293b85dfb8bdbba14bf9eaef6e32..35432ac5e3bf70271ce503a3523aeb57006fad6f 100644 (file)
@@ -58,4 +58,11 @@ public interface IntakeProxy extends CollectionSpacePoxProxy<IntakesCommonList>
     @Produces({"application/xml"})
     ClientResponse<IntakesCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<IntakesCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index 6a9bd91590406b432e821e1f5ab28bb47cc0207b..8009531c70fe6f51851dc8340246fe0743a2f3d8 100644 (file)
@@ -25,5 +25,12 @@ public interface LoaninProxy extends CollectionSpacePoxProxy<AbstractCommonList>
        @GET
     @Produces({"application/xml"})
     ClientResponse<AbstractCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+            
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index dfe92fae169348fcdcfd68fc4bbc54ccb4ed3871..76bfa8fbec9f1e09b75bf17cdf41d70c76bf0603 100644 (file)
@@ -27,5 +27,12 @@ public interface LoanoutProxy extends CollectionSpacePoxProxy<LoansoutCommonList
        @GET
     @Produces({"application/xml"})
     ClientResponse<LoansoutCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+            
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<LoansoutCommonList> keywordSearchIncludeDeleted(
+           @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index 6c00d76dbe33dfbd0c57956ff94e8e93cee05f26..81168dcb65f7e38d2db0a0ecaa6d8ed5aef80ff1 100644 (file)
@@ -57,5 +57,11 @@ public interface LocationAuthorityProxy extends AuthorityProxy<Locationauthoriti
     @Produces({"application/xml"})
     ClientResponse<LocationauthoritiesCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
-    
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<LocationauthoritiesCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);   
 }
index a2ac9fd3722d15d4b99adc7c391e8cc80d6ead02..ae38fb0986ac0a42ab4b22fb7d9eee1bf63947b7 100644 (file)
@@ -24,18 +24,30 @@ import org.collectionspace.services.client.workflow.WorkflowClient;
 @Consumes("application/xml")
 public interface MediaProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
 
-    @POST
-    @Path("/{csid}")
-    @Consumes("multipart/form-data")
-    ClientResponse<Response> createBlobFromFormData(@PathParam("csid") String csid,
-               MultipartFormDataOutput formDataOutput);
+    // List
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> readList();
     
     @Override
        @GET
     @Produces({"application/xml"})
     ClientResponse<AbstractCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
     
+    @POST
+    @Path("/{csid}")
+    @Consumes("multipart/form-data")
+    ClientResponse<Response> createBlobFromFormData(@PathParam("csid") String csid,
+               MultipartFormDataOutput formDataOutput);
+            
     @POST
     @Path("/{csid}")
        @Produces("application/xml")
@@ -43,8 +55,4 @@ public interface MediaProxy extends CollectionSpacePoxProxy<AbstractCommonList>
     ClientResponse<Response>createBlobFromUri(@PathParam("csid") String csid,
                @QueryParam(BlobClient.BLOB_URI_PARAM) String blobUri);
     
-    // List
-    @GET
-    @Produces({"application/xml"})
-    ClientResponse<AbstractCommonList> readList();
 }
index ef0a39114d4d9163e79c26f03c7f5c461dfbedec..bdaf3a2c8f07c4b3b323d1955ef11c9d6f3902fb 100644 (file)
@@ -60,7 +60,14 @@ public interface MovementProxy extends CollectionSpacePoxProxy<MovementsCommonLi
        @GET
     @Produces({"application/xml"})
     ClientResponse<MovementsCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<MovementsCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 
     @GET
     @Produces({"application/xml"})
index 0c47c7f8f6f607f77d0b55275262599aee35f288..f0a2ba32bccebe2e3f9b070ce3e5336653d20f78 100644 (file)
@@ -464,6 +464,16 @@ public class NoteServiceTest extends AbstractServiceTestImpl {
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));\r
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);\r
     }\r
+    \r
+    // ---------------------------------------------------------------\r
+    // Search tests\r
+    // ---------------------------------------------------------------\r
+    \r
+    @Override\r
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)\r
+    public void searchWorkflowDeleted(String testName) throws Exception {\r
+        // Fixme: null test for now, overriding test in base class\r
+    }    \r
 \r
     // ---------------------------------------------------------------\r
     // Utility tests : tests of code used in tests above\r
index c969f0a486f896fbfd5c306aa1b6189be7911cd8..85ed676b0d05bd0381b9a774b489b8988c4c4353 100644 (file)
@@ -26,4 +26,11 @@ public interface ObjectExitProxy extends CollectionSpacePoxProxy<AbstractCommonL
     @Produces({"application/xml"})
     ClientResponse<AbstractCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<AbstractCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
 }
index f629829e85eff02d453e4c7932a79477098d9a0a..43731b6d7817a2e3802e61d91218183804e37c7a 100644 (file)
@@ -28,7 +28,15 @@ public interface OrgAuthorityProxy extends AuthorityWithContactsProxy<Orgauthori
        @GET
     @Produces({"application/xml"})
     ClientResponse<OrgauthoritiesCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<OrgauthoritiesCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+            
     
     /*
      * List results that must be overridden for the RESTEasy proxy generation to work correctly.
index b193296cd222292d1ad5437d3711b96bb8c2585b..e39cdf1e4f86800d2ce6660443d8fe37741893f1 100644 (file)
@@ -29,7 +29,14 @@ public interface PersonAuthorityProxy extends AuthorityWithContactsProxy<Persona
        @GET
     @Produces({"application/xml"})
     ClientResponse<PersonauthoritiesCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+            
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<PersonauthoritiesCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
     
     /*
      * List results that must be overridden for the RESTEasy proxy generation to work correctly.
index debd053fdd7e5bf0011d8a6f84149a52024e3d98..e642644ec78a1bdf99c092be4cd805a971f69776 100644 (file)
@@ -30,6 +30,13 @@ public interface RelationProxy extends CollectionSpacePoxProxy<RelationsCommonLi
     ClientResponse<RelationsCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);        
     
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<RelationsCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
     @GET
     @Produces({"application/xml"})
     ClientResponse<RelationsCommonList> readList(
index 876eb4bea807410d02088aadb2a31ce6e112cdd1..11a8d1baee0c9c5bcb88a8ddf77779d865ad7ff6 100644 (file)
@@ -59,5 +59,11 @@ public interface ReportProxy extends CollectionSpacePoxProxy<ReportsCommonList>
     @Produces({"application/xml"})
     ClientResponse<ReportsCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
-    
+
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<ReportsCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
 }
index be6b5888c505f7c194edc55d9c7da72622a1904c..4995769f23d736aac060cc29ac2de8bed082c64d 100644 (file)
@@ -432,6 +432,16 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl {
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         res.releaseConnection();
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    } 
 
     // ---------------------------------------------------------------
     // Utility methods used by tests above
index 930ce12b1dd5696cb50429f009cf50218ec4a713..8fad552e58c0e21bcee07de05f46507a2fc8714e 100644 (file)
@@ -666,6 +666,16 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl {
         //ignoring this test as the service side returns 200 now even if it does
         //not find a record in the db
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    } 
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index 5b4a18cecea782931bf85db236efae9190ee4a0e..69ffd03b62b7833b43d9508ff5763b1aa2c5397d 100644 (file)
@@ -599,6 +599,16 @@ public class MultiTenancyTest extends AbstractServiceTestImpl {
         //instead of giving FORBIDDEN
         Assert.assertEquals(statusCode, Response.Status.NOT_FOUND.getStatusCode());
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
+    public void searchWorkflowDeleted(String testName) throws Exception {
+        // Fixme: null test for now, overriding test in base class
+    } 
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above
index ec3d19c443789d90e43f95413aad2871c8cf731e..c6b082d07c00f10df8f37130012a99143847be1c 100644 (file)
@@ -31,7 +31,13 @@ public interface VocabularyProxy extends AuthorityProxy<VocabulariesCommonList,
     ClientResponse<VocabulariesCommonList> readIncludeDeleted(
             @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);    
     
-    
+    @Override
+    @GET
+    @Produces({"application/xml"})
+    ClientResponse<VocabulariesCommonList> keywordSearchIncludeDeleted(
+               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
+            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+
     /*
      * List results that must be overridden for the RESTEasy proxy generation to work correctly.
      */
index 5b42dc7f4b78527a7c68f9d5df9a2c7db45dda89..7f56bdfd2c45ac877dabdc13089e34a9fee63d27 100644 (file)
@@ -205,6 +205,13 @@ public class WorkflowServiceTest extends AbstractServiceTestImpl {
     @Override
     public void updateWithWrongXmlSchema(String testName) throws Exception {
     }
+    
+    // ---------------------------------------------------------------
+    // Search tests
+    // ---------------------------------------------------------------
+    
+    public void searchWorkflowDeleted(String testName) throws Exception {
+    }    
 
     // ---------------------------------------------------------------
     // Utility tests : tests of code used in tests above