<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
<service:classname>org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler</service:classname>
<service:params>
- <service:SchemaName>objectexit</service:SchemaName>
- <service:DublinCoreTitle>objectexit</service:DublinCoreTitle>
- <service:SummaryFields>exitNumber|currentOwner|uri|csid</service:SummaryFields>
- <service:AbstractCommonListClassname>org.collectionspace.services.objectexit.ObjectexitCommonList</service:AbstractCommonListClassname>
- <service:CommonListItemClassname>org.collectionspace.services.objectexit.ObjectexitCommonList$ObjectexitListItem</service:CommonListItemClassname>
- <service:ListResultsItemMethodName>getObjectexitListItem</service:ListResultsItemMethodName>
<service:ListResultsFields>
<service:ListResultField>
<service:element>exitNumber</service:element>
*/
package org.collectionspace.services.client;
-import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.objectexit.ObjectexitCommonList;
-
-import org.jboss.resteasy.client.ClientResponse;
-
/**
* ObjectExitClient.java
*
* $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $
*
*/
-public class ObjectExitClient extends AbstractPoxServiceClientImpl<ObjectexitCommonList, 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;
- public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
+public class ObjectExitClient extends AbstractCommonListPoxServiceClientImpl<ObjectExitProxy> {
- @Override
- public String getServiceName() {
- return SERVICE_NAME;
- }
-
- @Override
+ 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;
+ public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";
+ public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
+
+ @Override
+ public String getServiceName() {
+ return SERVICE_NAME;
+ }
+
+ @Override
public String getServicePathComponent() {
return SERVICE_PATH_COMPONENT;
}
- @Override
- public Class<ObjectExitProxy> getProxyClass() {
- // TODO Auto-generated method stub
- return ObjectExitProxy.class;
- }
-
- /*
- * Proxied service calls.
- *
- */
-
- public ClientResponse<ObjectexitCommonList> readList() {
- return getProxy().readList();
+ @Override
+ public Class<ObjectExitProxy> getProxyClass() {
+ // TODO Auto-generated method stub
+ return ObjectExitProxy.class;
}
- public ObjectexitCommonList readList2(){
- ObjectexitCommonList list = readList().getEntity(ObjectexitCommonList.class);
- return list;
- }
}
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;
-import org.collectionspace.services.objectexit.ObjectexitCommonList;
-
/**
* @version $Revision: 2108 $
*/
-@Path(ObjectExitClient.SERVICE_PATH + "/")
+@Path(ObjectExitClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface ObjectExitProxy extends CollectionSpacePoxProxy<ObjectexitCommonList> {
- // List
- @GET
- ClientResponse<ObjectexitCommonList> readList();
-
- @Override
- @GET
- @Produces({"application/xml"})
- ClientResponse<ObjectexitCommonList> readIncludeDeleted(
- @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
-
- @Override
- @GET
- @Produces({"application/xml"})
- ClientResponse<ObjectexitCommonList> keywordSearchIncludeDeleted(
- @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
- @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+public interface ObjectExitProxy extends CollectionSpaceCommonListPoxProxy {
}
*/
package org.collectionspace.services.client.test;
-import java.util.List;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.collectionspace.services.client.CollectionSpaceClient;
import org.collectionspace.services.client.ObjectExitClient;
-import org.collectionspace.services.client.ObjectExitProxy;
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.objectexit.ObjectexitCommonList;
import org.collectionspace.services.objectexit.ObjectexitCommon;
import org.jboss.resteasy.client.ClientResponse;
@Override
protected AbstractCommonList getAbstractCommonList(ClientResponse<AbstractCommonList> response) {
- return response.getEntity(ObjectexitCommonList.class);
+ return response.getEntity(AbstractCommonList.class);
}
@Override
logger.debug(testBanner(testName, CLASS_NAME));
setupReadList();
ObjectExitClient client = new ObjectExitClient();
- ClientResponse<ObjectexitCommonList> res = client.readList();
+ ClientResponse<AbstractCommonList> res = client.readList();
String bar = "\r\n\r\n=================================\r\n\r\n";
System.out.println(bar+" res: "+res);
- ObjectexitCommonList list = res.getEntity();
+ AbstractCommonList list = res.getEntity();
System.out.println(bar+" list: "+list);
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++;
- }
- }
-
- /*
- List<AbstractCommonList.ListItem> items = list.getListItem();
- int i = 0;
- for(AbstractCommonList.ListItem item : items){
- List<Element> elList = item.getAny();
- StringBuilder elementStrings = new StringBuilder();
- for(Element el : elList) {
- Node textEl = el.getFirstChild();
- if (textEl != null){
- elementStrings.append("["+el.getNodeName()+":"+textEl.getNodeValue()+"] ");
- }
- }
- System.out.println("\r\n\r\n\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~"+testName + ": list-item[" + i + "]: "+elementStrings.toString());
- i++;
+ // Optionally output additional data about list members for debugging.
+ boolean iterateThroughList = true;
+ if(iterateThroughList && logger.isDebugEnabled()){
+ ListItemsInAbstractCommonList(list, logger, testName);
}
- */
+
}
@Override
</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>
-
-
- <!-- objectexit records, as in nuxeo repository -->
- <xs:element name="objectexit-common-list">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="abstractCommonList">
- <xs:sequence>
- <xs:element name="objectexit-list-item" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="exitNumber" type="xs:string"
- minOccurs="1" />
- <xs:element name="currentOwner" type="xs:string"
- minOccurs="1" />
- <xs:element name="uri" type="xs:anyURI"
- minOccurs="1" />
- <xs:element name="csid" type="xs:string"
- minOccurs="1" />
-
-
-
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
-
</xs:schema>
package org.collectionspace.services.test;
-//import org.collectionspace.services.objectexit.ObjectExit;
-//import org.collectionspace.services.objectexit.ObjectexitList;
-
/**
* Placeholder for server-side testing of Loan Out service code.
*