* @version $Revision:$
*/
-public class AccountClient extends AbstractServiceClientImpl<AccountProxy> {
+public class AccountClient extends AbstractServiceClientImpl<AccountsCommonList, AccountProxy> {
public static final String SERVICE_NAME = "accounts";
@Override
* @version $Revision:$
*/
-public class AccountRoleClient extends AbstractServiceClientImpl<AccountRoleProxy> {
+public class AccountRoleClient extends AbstractServiceClientImpl<AccountRole, AccountRoleProxy> {
public static final String SERVICE_NAME = "accountroles";
@Override
/* (non-Javadoc)
* @see
*/
+ @Override
public String getServicePathComponent() {
return "accounts";
}
* @version $Revision:$
*/
-public class AcquisitionClient extends AbstractPoxServiceClientImpl<AcquisitionProxy> {
+public class AcquisitionClient extends AbstractPoxServiceClientImpl<AbstractCommonList, AcquisitionProxy> {
public static final String SERVICE_NAME = "acquisitions";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(AcquisitionClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface AcquisitionProxy extends CollectionSpacePoxProxy {
+public interface AcquisitionProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
@GET
ClientResponse<AbstractCommonList> readList();
}
* @version $Revision:$
*/
-public class PermissionClient extends AbstractServiceClientImpl<PermissionProxy> {
+public class PermissionClient extends AbstractServiceClientImpl<PermissionsList, PermissionProxy> {
public static final String SERVICE_NAME = "authorization/permissions";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
* @version $Revision:$
*/
-public class PermissionRoleClient extends AbstractServiceClientImpl<PermissionRoleProxy> {
+public class PermissionRoleClient extends AbstractServiceClientImpl<PermissionRole, PermissionRoleProxy> {
@Override
public String getServiceName() {
throw new UnsupportedOperationException(); //FIXME: REM - http://issues.collectionspace.org/browse/CSPACE-3497
* @version $Revision:$
*/
-public class RoleClient extends AbstractServiceClientImpl<RoleProxy> {
+public class RoleClient extends AbstractServiceClientImpl<RolesList, RoleProxy> {
public static final String SERVICE_NAME = "authorization/roles";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
* @version $Revision:$
*/
-public class RolePermissionClient extends AbstractServiceClientImpl<RolePermissionProxy> {
+public class RolePermissionClient extends AbstractServiceClientImpl<PermissionRole, RolePermissionProxy> {
@Override
public String getServiceName() {
throw new UnsupportedOperationException(); //FIXME: REM - http://issues.collectionspace.org/browse/CSPACE-3498
/* (non-Javadoc)
* @see
*/
+ @Override
public String getServicePathComponent() {
return "authorization/roles";
}
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class BlobClient extends AbstractPoxServiceClientImpl<BlobProxy> {
+public class BlobClient extends AbstractPoxServiceClientImpl<AbstractCommonList, BlobProxy> {
public static final String SERVICE_NAME = "blobs";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
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;
import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
-import org.collectionspace.services.common.authorityref.AuthorityRefList;
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.jboss.resteasy.client.ClientResponse;
-import org.jboss.resteasy.plugins.providers.multipart.InputPart;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput;
@Path(BlobClient.SERVICE_PATH + "/")
@Produces("application/xml")
@Consumes("application/xml")
-public interface BlobProxy extends CollectionSpacePoxProxy {
+public interface BlobProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
//(C)reate
@POST
ClientResponse<Response> createBlobFromURI(byte[] xmlPayload,
package org.collectionspace.services.client;\r
\r
-import javax.ws.rs.PathParam;\r
import javax.ws.rs.core.Response;\r
\r
-import org.apache.commons.httpclient.HttpClient;\r
-import org.collectionspace.services.common.authorityref.AuthorityRefList;\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
-import org.collectionspace.services.workflow.WorkflowsCommon;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public abstract class AbstractPoxServiceClientImpl<T extends CollectionSpacePoxProxy> extends AbstractServiceClientImpl<T> \r
- implements CollectionSpacePoxClient<T> {\r
+/*\r
+ * LT = List type\r
+ * P = Proxy type\r
+ */\r
+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
return getProxy().create(xmlPayload.getBytes());\r
* @param <CommonListType> \r
* @param <ListType> \r
*/\r
-public abstract class AbstractServiceClientImpl<T extends CollectionSpaceProxy> implements\r
- CollectionSpaceClient<T> {\r
+public abstract class AbstractServiceClientImpl<LT, P extends CollectionSpaceProxy>\r
+ implements CollectionSpaceClient<LT, P> {\r
\r
/** The logger. */\r
protected final Logger logger = LoggerFactory.getLogger(AbstractServiceClientImpl.class);\r
/** The http client. */\r
private HttpClient httpClient;\r
/** The RESTEasy proxy */\r
- private T proxy;\r
+ private P proxy;\r
\r
/**\r
* Gets the logger.\r
}\r
\r
@Override\r
- public T getProxy() {\r
+ public P getProxy() {\r
return proxy;\r
}\r
\r
*/\r
@Override\r
public void setProxy() {\r
- Class<T> proxyClass = this.getProxyClass();\r
+ Class<P> proxyClass = this.getProxyClass();\r
if (useAuth()) {\r
proxy = ProxyFactory.create(proxyClass,\r
getBaseURL(), new ApacheHttpClientExecutor(getHttpClient()));\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public interface AuthorityClient<TL extends AbstractCommonList, T extends AuthorityProxy<TL>> extends CollectionSpacePoxClient<T> { \r
+/*\r
+ * LT - List type\r
+ * ILT - Authority item list type\r
+ * P - Proxy type\r
+ */\r
+public interface AuthorityClient<LT extends AbstractCommonList, ILT extends AbstractCommonList, P extends AuthorityProxy<LT, ILT>> \r
+ extends CollectionSpacePoxClient<LT, P> {\r
/*\r
* Basic CRUD operations\r
*/\r
* which will filter list results to return only matched resources.\r
* @return the client response\r
*/\r
- public ClientResponse<TL> readItemList(String inAuthority, String partialTerm, String keywords);\r
+ public ClientResponse<ILT> readItemList(String inAuthority, String partialTerm, String keywords);\r
\r
/**\r
* Read item list for named vocabulary, filtering by partial term match, or keywords. Only one of\r
* which will filter list results to return only matched resources.\r
* @return the client response\r
*/\r
- public ClientResponse<TL> readItemListForNamedAuthority(String specifier, \r
+ public ClientResponse<ILT> readItemListForNamedAuthority(String specifier, \r
String partialTerm, String keywords);\r
\r
}\r
import org.collectionspace.services.common.authorityref.AuthorityRefList;\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
\r
-public abstract class AuthorityClientImpl<TL extends AbstractCommonList, T extends AuthorityProxy<TL>> extends AbstractPoxServiceClientImpl<T>\r
- implements AuthorityClient<TL, T> {\r
+/*\r
+ * LT - List type\r
+ * ILT - Authority item list type\r
+ * P - Proxy type\r
+ */\r
+public abstract class AuthorityClientImpl<LT extends AbstractCommonList, ILT extends AbstractCommonList, P extends AuthorityProxy<LT, ILT>>\r
+ extends AbstractPoxServiceClientImpl<LT, P>\r
+ implements AuthorityClient<LT, ILT, P> {\r
\r
/*\r
* Basic CRUD proxied methods\r
* @return the client response\r
*/\r
@Override\r
- public ClientResponse<TL> \r
+ public ClientResponse<ILT> \r
readItemList(String inAuthority, String partialTerm, String keywords) {\r
return getProxy().readItemList(inAuthority, partialTerm, keywords);\r
}\r
*/\r
\r
@Override\r
- public ClientResponse<TL> readItemListForNamedAuthority(\r
+ public ClientResponse<ILT> readItemListForNamedAuthority(\r
String specifier, String partialTerm, String keywords) {\r
return getProxy().readItemListForNamedAuthority(specifier, partialTerm, keywords);\r
}\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public interface AuthorityProxy<TL extends AbstractCommonList> extends CollectionSpacePoxProxy {\r
+/*\r
+ * ILT = Item list type\r
+ * LT = List type\r
+ */\r
+public interface AuthorityProxy<LT extends AbstractCommonList, ILT extends AbstractCommonList> extends CollectionSpacePoxProxy<LT> {\r
\r
/*\r
* Basic CRUD operations\r
@GET\r
@Produces({"application/xml"})\r
@Path("/{csid}/items/")\r
- ClientResponse<TL> readItemList(\r
+ ClientResponse<ILT> readItemList(\r
@PathParam("csid") String vcsid,\r
@QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,\r
@QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);\r
@GET\r
@Produces({"application/xml"})\r
@Path("/urn:cspace:name({specifier})/items/")\r
- ClientResponse<TL> readItemListForNamedAuthority(\r
+ ClientResponse<ILT> readItemListForNamedAuthority(\r
@PathParam("specifier") String specifier,\r
@QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,\r
@QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);\r
*/
package org.collectionspace.services.client;
-import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import org.apache.commons.httpclient.HttpClient;
import org.collectionspace.services.common.authorityref.AuthorityRefList;
import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.workflow.WorkflowsCommon;
import org.jboss.resteasy.client.ClientResponse;
/**
*
*/
-public interface CollectionSpaceClient<T extends CollectionSpaceProxy> {
+public interface CollectionSpaceClient<LT, P extends CollectionSpaceProxy> {
public static final String AUTH_PROPERTY = "cspace.auth";
public static final String PASSWORD_PROPERTY = "cspace.password";
*
* @return the proxy
*/
- T getProxy();
+ P getProxy();
- Class<T> getProxyClass();
+ Class<P> getProxyClass();
/**
* Gets the base url.
package org.collectionspace.services.client;\r
\r
import javax.ws.rs.core.Response;\r
+\r
+import org.collectionspace.services.jaxb.AbstractCommonList;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public interface CollectionSpacePoxClient<T extends CollectionSpacePoxProxy> extends CollectionSpaceClient<T> {\r
+/*\r
+ * <LT> = List type\r
+ * <P> = Proxy type\r
+ */\r
+public interface CollectionSpacePoxClient<LT extends AbstractCommonList, P extends CollectionSpacePoxProxy<LT>>\r
+ extends CollectionSpaceClient<LT, P> {\r
/*\r
* Common service calls\r
*/\r
import javax.ws.rs.PUT;\r
import javax.ws.rs.Path;\r
import javax.ws.rs.PathParam;\r
+import javax.ws.rs.Produces;\r
+import javax.ws.rs.QueryParam;\r
import javax.ws.rs.core.Response;\r
\r
+import org.collectionspace.services.client.workflow.WorkflowClient;\r
+import org.collectionspace.services.jaxb.AbstractCommonList;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public interface CollectionSpacePoxProxy extends CollectionSpaceProxy {\r
+public interface CollectionSpacePoxProxy<LT extends AbstractCommonList> extends CollectionSpaceProxy {\r
//(C)reate\r
@POST\r
ClientResponse<Response> create(byte[] payload);\r
@PUT\r
@Path("/{csid}")\r
ClientResponse<String> update(@PathParam("csid") String csid, byte[] payload);\r
+ \r
+ //(L)ist non-deleted items\r
+ @GET\r
+ @Produces({"application/xml"})\r
+ ClientResponse<LT> readIncludeDeleted(\r
+ @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);\r
}\r
\r
import org.collectionspace.services.common.authorityref.AuthorityRefList;\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
-import org.collectionspace.services.workflow.WorkflowsCommon;\r
+\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
/**\r
ClientResponse<AbstractCommonList> readList(\r
@QueryParam(IClientQueryParams.SORT_BY_PARAM) String sortBy,\r
@QueryParam(IClientQueryParams.PAGE_SIZE_PARAM) Long pageSize,\r
- @QueryParam(IClientQueryParams.START_PAGE_PARAM) Long pageNumber);\r
+ @QueryParam(IClientQueryParams.START_PAGE_PARAM) Long pageNumber); \r
}\r
*/
package org.collectionspace.services.client;
-import javax.ws.rs.core.Response;
-
-import org.jboss.resteasy.client.ClientResponse;
-
/**
* A CollectionObjectClient.
* @version $Revision:$
*/
-public class TestServiceClient extends AbstractServiceClientImpl<TestServiceProxy> {
+public class TestServiceClient extends AbstractServiceClientImpl<Object, TestServiceProxy> {
/**
*
* You may obtain a copy of the ECL 2.0 License at
* https://source.collectionspace.org/collection-space/LICENSE.txt
*/
-package org.collectionspace.services.common.workflow.client;
+package org.collectionspace.services.client.workflow;
+import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.client.AbstractPoxServiceClientImpl;
/**
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class WorkflowClient extends AbstractPoxServiceClientImpl<WorkflowProxy> {
+public class WorkflowClient extends AbstractPoxServiceClientImpl<AbstractCommonList, WorkflowProxy> {
public static final String SERVICE_NAME = "workflows";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
public static final String SERVICE_COMMONPART_NAME = SERVICE_NAME + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
-
+ //
+ // Workflow states
+ //
public static final String WORKFLOWSTATE_DELETED = "deleted";
public static final String WORKFLOWSTATE_PROJECT = "project";
- public static final String WORKFLOWSTATE_APPROVED = "approved";
+ public static final String WORKFLOWSTATE_APPROVED = "approved";
+ //
+ // Service Query Params
+ //
+ public static final String WORKFLOW_QUERY_NONDELETED = "wf_deleted";
@Override
--- /dev/null
+package org.collectionspace.services.client.workflow;
+
+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.CollectionSpacePoxProxy;
+import org.collectionspace.services.jaxb.AbstractCommonList;
+import org.jboss.resteasy.client.ClientResponse;
+
+/**
+ * @version $Revision: 2108 $
+ */
+@Path(WorkflowClient.SERVICE_PATH + "/")
+@Produces({"application/xml"})
+@Consumes({"application/xml"})
+public interface WorkflowProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
+}
* The Class CollectionObjectClient.
* FIXME: http://issues.collectionspace.org/browse/CSPACE-1684
*/
-public class CollectionObjectClient extends AbstractPoxServiceClientImpl<CollectionObjectProxy> {
+public class CollectionObjectClient extends AbstractPoxServiceClientImpl<CollectionobjectsCommonList, CollectionObjectProxy> {
public static final String SERVICE_NAME = "collectionobjects";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(CollectionObjectClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface CollectionObjectProxy extends CollectionSpacePoxProxy {
+public interface CollectionObjectProxy extends CollectionSpacePoxProxy<CollectionobjectsCommonList> {
/**
* Roundtrip.
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.common-api</artifactId>\r
<name>services.common-api</name>\r
- <version>1.5.1</version>\r
<packaging>jar</packaging>\r
<dependencies>\r
<dependency>\r
<dependency>\r
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.common-api</artifactId>\r
- <version>1.5.1</version>\r
+ <version>${project.version}</version>\r
</dependency>\r
<dependency>\r
<groupId>org.collectionspace.services</groupId>\r
import javax.ws.rs.WebApplicationException;\r
import javax.ws.rs.core.Response;\r
\r
-import org.collectionspace.services.client.PayloadInputPart;\r
import org.collectionspace.services.client.PoxPayloadIn;\r
import org.collectionspace.services.client.PoxPayloadOut;\r
+import org.collectionspace.services.client.workflow.WorkflowClient;\r
import org.collectionspace.services.common.context.MultipartServiceContext;\r
import org.collectionspace.services.common.context.MultipartServiceContextFactory;\r
import org.collectionspace.services.common.context.ServiceContext;\r
import org.collectionspace.services.common.document.DocumentHandler;\r
import org.collectionspace.services.common.document.DocumentNotFoundException;\r
import org.collectionspace.services.common.security.UnauthorizedException;\r
-import org.collectionspace.services.common.workflow.client.WorkflowClient;\r
import org.collectionspace.services.common.workflow.service.nuxeo.WorkflowDocumentModelHandler;\r
import org.collectionspace.services.workflow.WorkflowsCommon;\r
import org.jboss.resteasy.client.ClientResponse;\r
throw bigReThrow(e, ServiceMessages.UPDATE_FAILED + WorkflowClient.SERVICE_PAYLOAD_NAME, csid);\r
}\r
return result.getBytes();\r
- }\r
- \r
- \r
+ } \r
}\r
import java.util.Map;
import javax.ws.rs.core.MultivaluedMap;
+import org.collectionspace.services.client.IQueryManager;
+import org.collectionspace.services.client.workflow.WorkflowClient;
import org.collectionspace.services.common.ClientType;
import org.collectionspace.services.common.ServiceMain;
import org.collectionspace.services.common.config.PropertyItemUtils;
}
}
+ private static String buildWorkflowWhereClause(MultivaluedMap<String, String> queryParams) {
+ String result = null;
+
+ String includeDeleted = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_NONDELETED);
+ if (includeDeleted != null && includeDeleted.equalsIgnoreCase(Boolean.FALSE.toString())) {
+ result = "ecm:currentLifeCycleState <> 'deleted'";
+ }
+
+ return result;
+ }
+
/**
* Creates the document handler instance.
*
if (this.getQueryParams() != null) {
docFilter.setSortOrder(this.getQueryParams());
docFilter.setPagination(this.getQueryParams());
+ String workflowWhereClause = buildWorkflowWhereClause(queryParams);
+ if (workflowWhereClause != null) {
+ docFilter.appendWhereClause(workflowWhereClause, IQueryManager.SEARCH_QUALIFIER_AND);
+ }
+
}
docHandler.setDocumentFilter(docFilter);
public String getDocType() {\r
return this.docType;\r
}\r
+\r
+ /**\r
+ * Gets the doc type.\r
+ *\r
+ * @return the doc type\r
+ */\r
+ public void setDocType(String theDocType) {\r
+ this.docType = theDocType;\r
+ }\r
}\r
public class QueryManagerNuxeoImpl implements IQueryManager {\r
\r
private final Logger logger = LoggerFactory\r
- .getLogger(RepositoryJavaClientImpl.class);\r
+ .getLogger(QueryManagerNuxeoImpl.class);\r
\r
// Consider that letters, letter-markers, numbers, '_' and apostrophe are words \r
private static Pattern nonWordChars = Pattern.compile("[^\\p{L}\\p{M}\\p{N}_']");\r
* The repository client then calls handle on the handler
*
*/
-public interface RepositoryClient extends StorageClient {
+public interface RepositoryClient<IT, OT> extends StorageClient {
/**
* createDomain creates a doamin in the default repository
* @throws DocumentException
*/
public DocumentWrapper<DocumentModel> getDoc(
- ServiceContext ctx, String id)
+ ServiceContext<IT, OT> ctx, String id)
throws DocumentNotFoundException, DocumentException;
+ public DocumentWrapper<DocumentModel> getDocFromCsid(ServiceContext<IT, OT> ctx,
+ String csid)
+ throws Exception;
+
/**
* Find wrapped documentModel from the Nuxeo repository
* @param ctx service context under which this method is invoked
* @throws DocumentException
*/
public DocumentWrapper<DocumentModel> findDoc(
- ServiceContext ctx, String where)
+ ServiceContext<IT, OT> ctx, String where)
throws DocumentNotFoundException, DocumentException;
/**
* @throws DocumentException
*/
public String findDocCSID(
- ServiceContext ctx, String where)
+ ServiceContext<IT, OT> ctx, String where)
throws DocumentNotFoundException, DocumentException;
/**
* @throws DocumentException
*/
public DocumentWrapper<DocumentModelList> findDocs(
- ServiceContext ctx,
+ ServiceContext<IT, OT> ctx,
List<String> docTypes,
String where,
int pageSize, int pageNum, boolean computeTotal)
public class VocabManagerImpl implements IVocabManager {\r
\r
private final Logger logger = LoggerFactory\r
- .getLogger(RepositoryJavaClientImpl.class);\r
+ .getLogger(VocabManagerImpl.class);\r
\r
public void exampleMethod(String someParam) {\r
}\r
+++ /dev/null
-package org.collectionspace.services.common.workflow.client;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.collectionspace.services.client.CollectionSpacePoxProxy;
-
-/**
- * @version $Revision: 2108 $
- */
-@Path(WorkflowClient.SERVICE_PATH + "/")
-@Produces({"application/xml"})
-@Consumes({"application/xml"})
-public interface WorkflowProxy extends CollectionSpacePoxProxy {
-}
import org.collectionspace.services.client.PayloadInputPart;
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.MultipartServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.common.document.DocumentHandler.Action;
import org.collectionspace.services.common.service.ObjectPartType;
-import org.collectionspace.services.common.workflow.client.WorkflowClient;
import org.collectionspace.services.common.workflow.jaxb.WorkflowJAXBSchema;
import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
*
* $LastChangedRevision: $ $LastChangedDate: $
*/
-public class RepositoryJavaClientImpl implements RepositoryClient {
+public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn, PoxPayloadOut> {
/** The logger. */
private final Logger logger = LoggerFactory.getLogger(RepositoryJavaClientImpl.class);
}
}
}
-
+
+ private static String getByNameWhereClause(String csid) {
+ String result = null;
+
+ if (csid != null) {
+ result = "ecm:name = " + "\'" + csid + "\'";
+ }
+
+ return result;
+ }
+
/**
- * get wrapped documentModel from the Nuxeo repository
+ * Get wrapped documentModel from the Nuxeo repository. The search is restricted to the workspace
+ * of the current context.
+ *
* @param ctx service context under which this method is invoked
* @param id
* of the document to retrieve
*/
@Override
public DocumentWrapper<DocumentModel> getDoc(
- ServiceContext ctx, String id)
+ ServiceContext ctx, String csid)
throws DocumentNotFoundException, DocumentException {
RepositoryInstance repoSession = null;
DocumentWrapper<DocumentModel> wrapDoc = null;
try {
repoSession = getRepositorySession();
- DocumentRef docRef = NuxeoUtils.createPathRef(ctx, id);
+ DocumentRef docRef = NuxeoUtils.createPathRef(ctx, csid);
DocumentModel doc = null;
try {
doc = repoSession.getDocument(docRef);
} catch (ClientException ce) {
- String msg = "could not find document with id=" + id;
+ String msg = "could not find document with id=" + csid;
logger.error(msg, ce);
throw new DocumentNotFoundException(msg, ce);
}
*/
@Override
public String findDocCSID(
- ServiceContext ctx, String whereClause)
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String whereClause)
throws DocumentNotFoundException, DocumentException {
String csid = null;
try {
*/
@Override
public DocumentWrapper<DocumentModelList> findDocs(
- ServiceContext ctx,
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
List<String> docTypes,
String whereClause,
int pageSize, int pageNum, boolean computeTotal)
return result;
}
+ /*
+ * A method to find a CollectionSpace document (of any type) given just a service context and
+ * its CSID. A search across *all* service workspaces (within a given tenant context) is performed to find
+ * the document
+ *
+ * This query searches Nuxeo's Hierarchy table where our CSIDs are stored in the "name" column.
+ */
+ @Override
+ public DocumentWrapper<DocumentModel> getDocFromCsid(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
+ String csid)
+ throws Exception {
+ DocumentWrapper<DocumentModel> result = null;
+ RepositoryInstance repoSession = getRepositorySession();
+ DocumentModelList docModelList = null;
+ //
+ // Set of query context using the current service context, but change the document type
+ // to be the base Nuxeo document type so we can look for the document across service workspaces
+ //
+ QueryContext queryContext = new QueryContext(ctx, getByNameWhereClause(csid));
+ queryContext.setDocType(NuxeoUtils.BASE_DOCUMENT_TYPE);
+ //
+ // Since we're doing a query, we get back a list so we need to make sure there is only
+ // a single result since CSID values are supposed to be unique.
+ String query = buildNXQLQuery(queryContext);
+ docModelList = repoSession.query(query);
+ long resultSize = docModelList.totalSize();
+ if (resultSize == 1) {
+ result = new DocumentWrapperImpl<DocumentModel>(docModelList.get(0));
+ } else if (resultSize > 1) {
+ throw new DocumentException("Found more than 1 document with CSID = " + csid);
+ }
+
+ return result;
+ }
+
+
/**
* getFiltered get all documents for an entity service from the Document repository,
* given filter parameters specified by the handler.
/** The logger. */
private static Logger logger = LoggerFactory.getLogger(NuxeoUtils.class);
+ //
+ // Base document type in Nuxeo is "Document"
+ public static final String BASE_DOCUMENT_TYPE = "Document";
public static void exportDocModel(DocumentModel src) {
DocumentReader reader = null;
}
/**
- * Gets the document model.
+ * Gets the document model corresponding to the Nuxeo ID.
+ *
+ * WARNING: Service should *rarely* if ever use this method. It bypasses our tenant and
+ * security filters.
*
* @param repoSession the repo session
* @param csid the csid
* @throws DocumentException the document exception
*/
public static DocumentModel getDocumentModel(
- RepositoryInstance repoSession, String csid)
+ RepositoryInstance repoSession, String nuxeoId)
throws DocumentException {
DocumentModel result = null;
try {
- DocumentRef documentRef = new IdRef(csid);
+ DocumentRef documentRef = new IdRef(nuxeoId);
result = repoSession.getDocument(documentRef);
} catch (ClientException e) {
e.printStackTrace();
import org.collectionspace.services.jaxb.AbstractCommonList;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public interface AuthorityWithContactsClient<TL extends AbstractCommonList, T extends AuthorityProxy<TL>> extends AuthorityClient<TL, T> {\r
+/*\r
+ * LT - List type\r
+ * ILT - Authority item list type\r
+ * P - Proxy type\r
+ */\r
+public interface AuthorityWithContactsClient<LT extends AbstractCommonList, ILT extends AbstractCommonList, P extends AuthorityProxy<LT, ILT>>\r
+ extends AuthorityClient<LT, ILT, P> {\r
/**\r
* Creates the contact.\r
*\r
import org.collectionspace.services.contact.ContactsCommonList;\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
\r
-public abstract class AuthorityWithContactsClientImpl<TL extends AbstractCommonList, T extends AuthorityWithContactsProxy<TL>>\r
- extends AuthorityClientImpl<TL, T>\r
- implements AuthorityWithContactsClient<TL, T> {\r
+/*\r
+ * LT - List type\r
+ * ILT - Authority item list type\r
+ * P - Proxy type\r
+ */\r
+public abstract class AuthorityWithContactsClientImpl<LT extends AbstractCommonList, ILT extends AbstractCommonList, P extends AuthorityWithContactsProxy<LT, ILT>>\r
+ extends AuthorityClientImpl<LT, ILT, P>\r
+ implements AuthorityWithContactsClient<LT, ILT, P> {\r
\r
@Override\r
public ClientResponse<Response> createContact(String parentcsid,\r
import org.collectionspace.services.jaxb.AbstractCommonList;\r
import org.jboss.resteasy.client.ClientResponse;\r
\r
-public interface AuthorityWithContactsProxy<TL extends AbstractCommonList> extends AuthorityProxy<TL> {\r
+/*\r
+ * ILT = Item list type\r
+ * LT = List type\r
+ */\r
+public interface AuthorityWithContactsProxy<LT extends AbstractCommonList, ILT extends AbstractCommonList> extends AuthorityProxy<LT, ILT> {\r
@GET\r
@Produces({"application/xml"})\r
@Path("/{parentcsid}/items/{itemcsid}/contacts/")\r
* $LastChangedDate: $
*/
-public class ContactClient extends AbstractPoxServiceClientImpl<ContactProxy> {
+public class ContactClient extends AbstractPoxServiceClientImpl<ContactsCommonList, ContactProxy> {
public static final String SERVICE_NAME = "contacts";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(ContactClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface ContactProxy extends CollectionSpacePoxProxy {
+public interface ContactProxy extends CollectionSpacePoxProxy<ContactsCommonList> {
@GET
ClientResponse<ContactsCommonList> readList();
}
* @version $Revision:$
*/
-public class DimensionClient extends AbstractPoxServiceClientImpl<DimensionProxy> {
+public class DimensionClient extends AbstractPoxServiceClientImpl<DimensionsCommonList, DimensionProxy> {
public static final String SERVICE_NAME = "dimensions";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
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());
+ }
}
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.dimension.DimensionsCommonList;
import org.jboss.resteasy.client.ClientResponse;
@Path("/dimensions/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface DimensionProxy extends CollectionSpacePoxProxy {
+public interface DimensionProxy extends CollectionSpacePoxProxy<DimensionsCommonList> {
@GET
@Produces({"application/xml"})
ClientResponse<DimensionsCommonList> readList();
+
+ @Override
+ @GET
+ @Produces({"application/xml"})
+ ClientResponse<DimensionsCommonList> readIncludeDeleted(
+ @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
}
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.relation.RelationJAXBSchema;
+import org.collectionspace.services.common.relation.nuxeo.RelationConstants;
import org.jboss.resteasy.util.HttpResponseCodes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* @version $Revision:$
*/
-public class IdClient extends AbstractServiceClientImpl<IdProxy> {
+public class IdClient extends AbstractServiceClientImpl<String, IdProxy> {
/* (non-Javadoc)
* @see org.collectionspace.services.client.BaseServiceClient#getServicePathComponent()
* @version $Revision:$
* FIXME: http://issues.collectionspace.org/browse/CSPACE-1684
*/
-public class IntakeClient extends AbstractPoxServiceClientImpl<IntakeProxy> {
+public class IntakeClient extends AbstractPoxServiceClientImpl<IntakesCommonList, IntakeProxy> {
public static final String SERVICE_NAME = "intakes";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(IntakeClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface IntakeProxy extends CollectionSpacePoxProxy {
+public interface IntakeProxy extends CollectionSpacePoxProxy<IntakesCommonList> {
/**
* Read list.
*
* $LastChangedDate$
*
*/
-public class LoaninClient extends AbstractPoxServiceClientImpl<LoaninProxy> {
+public class LoaninClient extends AbstractPoxServiceClientImpl<AbstractCommonList, LoaninProxy> {
public static final String SERVICE_NAME = "loansin";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
@Path("/loansin/")
@Produces({"application/xml;charset=UTF-8"})
@Consumes({"application/xml"})
-public interface LoaninProxy extends CollectionSpacePoxProxy {
+public interface LoaninProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
// List
@GET
ClientResponse<AbstractCommonList> readList();
* $LastChangedRevision$
* $LastChangedDate$
*/
-public class LoanoutClient extends AbstractPoxServiceClientImpl<LoanoutProxy> {
+public class LoanoutClient extends AbstractPoxServiceClientImpl<LoansoutCommonList, LoanoutProxy> {
public static final String SERVICE_NAME = "loansout";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path("/loansout/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface LoanoutProxy extends CollectionSpacePoxProxy {
+public interface LoanoutProxy extends CollectionSpacePoxProxy<LoansoutCommonList> {
// List
@GET
@Produces({"application/xml"})
/**
* The Class LocationAuthorityClient.
*/
-public class LocationAuthorityClient extends AuthorityClientImpl<LocationsCommonList, LocationAuthorityProxy> {
+public class LocationAuthorityClient extends AuthorityClientImpl<LocationauthoritiesCommonList, LocationsCommonList, LocationAuthorityProxy> {
public static final String SERVICE_NAME = "locationauthorities";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
/**
* @version $Revision:$
+ * ILT = Item list type
+ * LT = List type
*/
@Path(LocationAuthorityClient.SERVICE_PATH + "/")
@Produces("application/xml")
@Consumes("application/xml")
-public interface LocationAuthorityProxy extends AuthorityProxy<LocationsCommonList> {
+public interface LocationAuthorityProxy extends AuthorityProxy<LocationauthoritiesCommonList, LocationsCommonList> {
// List Locationauthorities
@GET
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class MediaClient extends AbstractPoxServiceClientImpl<MediaProxy> {
+public class MediaClient extends AbstractPoxServiceClientImpl<AbstractCommonList, MediaProxy> {
public static final String SERVICE_NAME = "media";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(MediaClient.SERVICE_PATH + "/")
@Produces("application/xml")
@Consumes("application/xml")
-public interface MediaProxy extends CollectionSpacePoxProxy {
+public interface MediaProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
@POST
@Path("/{csid}")
* $LastChangedDate$
*
*/
-public class MovementClient extends AbstractPoxServiceClientImpl<MovementProxy> {
+public class MovementClient extends AbstractPoxServiceClientImpl<MovementsCommonList, MovementProxy> {
public static final String SERVICE_NAME = "movements";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path("/movements/")
@Produces("application/xml")
@Consumes("application/xml")
-public interface MovementProxy extends CollectionSpacePoxProxy {
+public interface MovementProxy extends CollectionSpacePoxProxy<MovementsCommonList> {
// List
@GET
* $LastChangedDate: $\r
*/\r
\r
-public class NoteClient extends AbstractServiceClientImpl<NoteProxy> {\r
+public class NoteClient extends AbstractServiceClientImpl<NotesCommonList, NoteProxy> {\r
\r
public static final String SERVICE_NAME = "notes";\r
public static final String SERVICE_PATH_COMPONENT = "notes";\r
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class ObjectExitClient extends AbstractPoxServiceClientImpl<ObjectExitProxy> {
+public class ObjectExitClient extends AbstractPoxServiceClientImpl<AbstractCommonList, ObjectExitProxy> {
public static final String SERVICE_NAME = "objectexit";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(ObjectExitClient.SERVICE_PATH + "/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface ObjectExitProxy extends CollectionSpacePoxProxy {
+public interface ObjectExitProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
// List
@GET
ClientResponse<AbstractCommonList> readList();
/**
* The Class OrgAuthorityClient.
*/
-public class OrgAuthorityClient extends AuthorityWithContactsClientImpl<OrganizationsCommonList, OrgAuthorityProxy> {
+public class OrgAuthorityClient extends AuthorityWithContactsClientImpl<OrgauthoritiesCommonList, OrganizationsCommonList, OrgAuthorityProxy> {
public static final String SERVICE_NAME = "orgauthorities";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
-import org.collectionspace.services.common.authorityref.AuthorityRefList;
import org.collectionspace.services.organization.OrgauthoritiesCommonList;
import org.collectionspace.services.organization.OrganizationsCommonList;
-import org.collectionspace.services.person.PersonauthoritiesCommonList;
import org.jboss.resteasy.client.ClientResponse;
/**
@Path(OrgAuthorityClient.SERVICE_PATH + "/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface OrgAuthorityProxy extends AuthorityWithContactsProxy<OrganizationsCommonList> {
+public interface OrgAuthorityProxy extends AuthorityWithContactsProxy<OrgauthoritiesCommonList, OrganizationsCommonList> {
// List OrgAuthorities
@GET
ClientResponse<OrgauthoritiesCommonList> readList();
/**
* The Class PersonAuthorityClient.
*/
-public class PersonAuthorityClient extends AuthorityWithContactsClientImpl<PersonsCommonList, PersonAuthorityProxy> {
+public class PersonAuthorityClient extends AuthorityWithContactsClientImpl<PersonauthoritiesCommonList, PersonsCommonList, PersonAuthorityProxy> {
public static final String SERVICE_NAME = "personauthorities";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path(PersonAuthorityClient.SERVICE_PATH + "/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface PersonAuthorityProxy extends AuthorityWithContactsProxy<PersonsCommonList> {
+public interface PersonAuthorityProxy extends AuthorityWithContactsProxy<PersonauthoritiesCommonList, PersonsCommonList> {
// List Personauthorities
@GET
/**
* The Class RelationClient.
*/
-public class RelationClient extends AbstractPoxServiceClientImpl<RelationProxy> {
+public class RelationClient extends AbstractPoxServiceClientImpl<RelationsCommonList, RelationProxy> {
public static final String SERVICE_NAME = "relations";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path("/relations/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface RelationProxy extends CollectionSpacePoxProxy {
+public interface RelationProxy extends CollectionSpacePoxProxy<RelationsCommonList> {
@GET
@Produces({"application/xml"})
* @version $Revision:$
* FIXME: http://issues.collectionspace.org/browse/CSPACE-1684
*/
-public class ReportClient extends AbstractPoxServiceClientImpl<ReportProxy> {
+public class ReportClient extends AbstractPoxServiceClientImpl<ReportsCommonList, ReportProxy> {
public static final String SERVICE_NAME = "reports";
public static final String SERVICE_PATH_COMPONENT = "reports";
@Path("/reports/")
@Produces({"application/xml;charset=UTF-8"})
@Consumes({"application/xml"})
-public interface ReportProxy extends CollectionSpacePoxProxy {
+public interface ReportProxy extends CollectionSpacePoxProxy<ReportsCommonList> {
/**
* Read list.
*
/**
* The Class VocabularyClient.
*/
-public class VocabularyClient extends AuthorityClientImpl<VocabularyitemsCommonList, VocabularyProxy> {
+public class VocabularyClient extends AuthorityClientImpl<VocabulariesCommonList, VocabularyitemsCommonList, VocabularyProxy> {
public static final String SERVICE_NAME = "vocabularies";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
@Path("/" + VocabularyClient.SERVICE_PATH_COMPONENT + "/")
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface VocabularyProxy extends AuthorityProxy<VocabularyitemsCommonList> {
+public interface VocabularyProxy extends AuthorityProxy<VocabulariesCommonList, VocabularyitemsCommonList> {
// List Vocabularies
@GET
@Produces({"application/xml"})
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.common.workflow.client.WorkflowClient;
import org.collectionspace.services.workflow.WorkflowsCommon;
import org.collectionspace.services.client.DimensionClient;
+import org.collectionspace.services.client.workflow.WorkflowClient;
import org.collectionspace.services.dimension.DimensionsCommon;
import org.collectionspace.services.dimension.DimensionsCommonList;
@Override
protected CollectionSpaceClient getClientInstance() {
- return new WorkflowClient();
+ return new DimensionClient();
}
@Override
this.createTestObject(testName);
}
- private void readList(String testName, int expectedSize, String queryParam) {
+ 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.readList();
+ ClientResponse<DimensionsCommonList> res = client.readIncludeDeleted(includeDeleted);
DimensionsCommonList list = res.getEntity();
int statusCode = res.getStatus();
//
//
List<DimensionsCommonList.DimensionListItem> items =
list.getDimensionListItem();
- Assert.assertEquals(items.size(), expectedSize);
+ result = items.size();
+
+ return result;
}
/*
// Mark one as soft deleted
//
int currentTotal = allResourceIdsCreated.size();
- String csid = allResourceIdsCreated.get(currentTotal - 1); //get the last one added
+ String csid = allResourceIdsCreated.get(currentTotal - 1); //0-based index to get the last one added
this.setupUpdate();
this.updateLifeCycleState(testName, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
//
- // Read the list back
+ // Read the list back. The deleted item should not be in the list
//
+ int updatedTotal = readIncludeDeleted(testName, Boolean.FALSE);
+ Assert.assertEquals(updatedTotal, currentTotal - 1, "Deleted items seem to be returned in list results.");
}
@Override
package org.collectionspace.services.workflow;
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.ResourceBase;
import org.collectionspace.services.common.ServiceMessages;
-import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.common.workflow.client.WorkflowClient;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;