return BatchProxy.class;
}
- /*
- * Proxied service calls.
- *
-
- public BatchCommonList readList2(){
- BatchCommonList list = readList().getEntity(BatchCommonList.class);
- return list;
- }
- */
}
import javax.ws.rs.core.Response;
-import org.collectionspace.services.jaxb.AbstractCommonList;
import org.jboss.resteasy.client.ClientResponse;
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput;
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class BlobClient extends AbstractPoxServiceClientImpl<AbstractCommonList, BlobProxy> {
+public class BlobClient extends AbstractCommonListPoxServiceClientImpl<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;
* Blob proxied service calls
*/
- /**
- * @return
- * @see org.collectionspace.services.client.BlobProxy#getBlob()
- */
- public ClientResponse<AbstractCommonList> readList() {
- return getProxy().readList();
- }
-
public ClientResponse<Response> createBlobFromFormData(MultipartFormDataOutput formDataOutput) {
return getProxy().createBlobFromFormData(formDataOutput);
}
package org.collectionspace.services.client;
import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
-import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.jaxb.AbstractCommonList;
-
import org.jboss.resteasy.client.ClientResponse;
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput;
@Path(BlobClient.SERVICE_PATH + "/")
@Produces("application/xml")
@Consumes("application/xml")
-public interface BlobProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
+public interface BlobProxy extends CollectionSpaceCommonListPoxProxy {
//(C)reate
@POST
ClientResponse<Response> createBlobFromURI(byte[] xmlPayload,
@Consumes("multipart/form-data")
ClientResponse<Response> createBlobFromFormData(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);
-
- @Override
- @GET
- @Produces({"application/xml"})
- ClientResponse<AbstractCommonList> keywordSearchIncludeDeleted(
- @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
- @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
}
<service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
<service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.blob.nuxeo.BlobDocumentModelHandler</service:documentHandler>
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
- <service:classname>org.collectionspace.services.blob.nuxeo.BlobDocumentModelHandler</service:classname>
<service:params>
- <service:SchemaName>blobs</service:SchemaName>
- <service:DublinCoreTitle>blobs</service:DublinCoreTitle>
- <service:SummaryFields>name|mimeType|encoding|length|uri|csid</service:SummaryFields>
- <service:AbstractCommonListClassname />
- <service:CommonListItemClassname />
- <service:ListResultsItemMethodName>getBlobListItem</service:ListResultsItemMethodName>
<service:ListResultsFields>
<service:ListResultField>
<service:element>name</service:element>
<service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
<service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.group.nuxeo.GroupDocumentModelHandler</service:documentHandler>
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
- <service:classname>org.collectionspace.services.group.nuxeo.GroupDocumentModelHandler</service:classname>
<service:params>
- <service:SchemaName>groups</service:SchemaName>
- <service:DublinCoreTitle>groups</service:DublinCoreTitle>
- <service:SummaryFields>title|uri|csid</service:SummaryFields>
- <service:AbstractCommonListClassname />
- <service:CommonListItemClassname />
- <service:ListResultsItemMethodName>getGroupListItem</service:ListResultsItemMethodName>
<service:ListResultsFields>
<service:ListResultField>
<service:element>title</service:element>
<service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
<service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.media.nuxeo.MediaDocumentModelHandler</service:documentHandler>
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
- <service:classname>org.collectionspace.services.media.nuxeo.MediaDocumentModelHandler</service:classname>
<service:params>
- <service:SchemaName>media</service:SchemaName>
- <service:DublinCoreTitle>media</service:DublinCoreTitle>
- <service:SummaryFields>title|source|filename|identificationNumber|blobCsid|uri|csid</service:SummaryFields>
- <service:AbstractCommonListClassname />
- <service:CommonListItemClassname />
- <service:ListResultsItemMethodName>getMediaListItem</service:ListResultsItemMethodName>
<service:ListResultsFields>
<service:ListResultField>
<service:element>title</service:element>
*/
package org.collectionspace.services.client;
-import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.jboss.resteasy.client.ClientResponse;
-
/**
* GroupClient.java
*
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class GroupClient extends AbstractPoxServiceClientImpl<AbstractCommonList, GroupProxy> {
+public class GroupClient extends AbstractCommonListPoxServiceClientImpl<GroupProxy> {
public static final String SERVICE_NAME = "groups";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
return GroupProxy.class;
}
- /*
- * Proxied service calls.
- *
- */
-
- public ClientResponse<AbstractCommonList> readList() {
- return getProxy().readList();
- }
}
*/
package org.collectionspace.services.client;
-import org.jboss.resteasy.client.ClientResponse;
import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-
-import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.jaxb.AbstractCommonList;
/**
* @version $Revision: 2108 $
@Path(GroupClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface GroupProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
- // List
- @GET
- ClientResponse<AbstractCommonList> readList();
-
- @Override
- @GET
- @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);
+public interface GroupProxy extends CollectionSpaceCommonListPoxProxy {
}
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.AbstractCommonListUtils;
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.group.GroupsCommon;
ClientResponse<AbstractCommonList> res = client.readList();
AbstractCommonList list = res.getEntity();
assertStatusCode(res, testName);
- if (logger.isDebugEnabled()) {
- List<AbstractCommonList.ListItem> items =
- list.getListItem();
- int i = 0;
- for(AbstractCommonList.ListItem item : items){
- logger.debug(testName + ": list-item[" + i + "] " +
- item.toString());
- i++;
- }
+ if(logger.isTraceEnabled()){
+ AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
}
}
</xs:complexType>
</xs:element>
- <!-- This is the base class for paginated lists -->
- <xs:complexType name="abstractCommonList">
- <xs:annotation>
- <xs:appinfo>
- <jaxb:class ref="org.collectionspace.services.jaxb.AbstractCommonList"/>
- </xs:appinfo>
- </xs:annotation>
- </xs:complexType>
-
</xs:schema>
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput;
import org.jboss.resteasy.client.ClientResponse;
-import org.collectionspace.services.jaxb.AbstractCommonList;
-
/**
* MediaClient.java
*
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class MediaClient extends AbstractPoxServiceClientImpl<AbstractCommonList, MediaProxy> {
+public class MediaClient extends AbstractCommonListPoxServiceClientImpl<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;
* Proxied service calls
*/
- /**
- * @return
- * @see org.collectionspace.services.client.MediaProxy#getMedia()
- */
- public ClientResponse<AbstractCommonList> readList() {
- return getProxy().readList();
- }
-
/**
* @param media
* @return
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput;
import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
-import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.client.BlobClient;
-import org.collectionspace.services.client.workflow.WorkflowClient;
/**
* @version $Revision: 2108 $
@Path(MediaClient.SERVICE_PATH + "/")
@Produces("application/xml")
@Consumes("application/xml")
-public interface MediaProxy extends CollectionSpacePoxProxy<AbstractCommonList> {
+public interface MediaProxy extends CollectionSpaceCommonListPoxProxy {
- // List
- @GET
- @Produces({"application/xml"})
- ClientResponse<AbstractCommonList> readList();
-
- @Override
- @GET
- @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);
-
@POST
@Path("/{csid}")
@Consumes("multipart/form-data")
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.AbstractCommonListUtils;
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.media.LanguageList;
import org.collectionspace.services.media.MediaCommon;
ClientResponse<AbstractCommonList> res = client.readList();
AbstractCommonList list = res.getEntity();
assertStatusCode(res, testName);
- if (logger.isDebugEnabled()) {
- List<AbstractCommonList.ListItem> items =
- list.getListItem();
- int i = 0;
- for(AbstractCommonList.ListItem item : items){
- logger.debug(testName + ": list-item[" + i + "] " +
- item.toString());
- i++;
- }
+ // Optionally output additional data about list members for debugging.
+ if(logger.isTraceEnabled()){
+ AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
}
}
</xs:sequence>
</xs:complexType>
- <!-- This is the base class for paginated lists -->
- <xs:complexType name="abstractCommonList">
- <xs:annotation>
- <xs:appinfo>
- <jaxb:class ref="org.collectionspace.services.jaxb.AbstractCommonList"/>
- </xs:appinfo>
- </xs:annotation>
- </xs:complexType>
-
</xs:schema>