import org.collectionspace.services.common.AbstractCollectionSpaceResource;
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
-import org.collectionspace.services.common.repository.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
+import org.collectionspace.services.common.document.DocumentHandler;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
import org.jboss.resteasy.util.HttpResponseCodes;
import java.util.List;
import org.collectionspace.services.AcquisitionJAXBSchema;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.acquisition.AcquisitionsCommon;
import org.collectionspace.services.acquisition.AcquisitionsCommonList;
import org.collectionspace.services.acquisition.AcquisitionsCommonList.AcquisitionListItem;
-import org.collectionspace.services.common.repository.DocumentHandler.Action;
+import org.collectionspace.services.common.document.DocumentHandler.Action;
import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandler;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.nuxeo.ecm.core.api.DocumentModel;
package org.collectionspace.services.acquisition.nuxeo;
import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentHandlerFactory;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandlerFactory;
/**
* AcquisitionHandlerFactory creates handlers for acquisition based
import org.collectionspace.services.common.AbstractCollectionSpaceResource;
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
-import org.collectionspace.services.common.repository.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
+import org.collectionspace.services.common.document.DocumentHandler;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
import org.jboss.resteasy.util.HttpResponseCodes;
import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
import org.collectionspace.services.collectionobject.CollectionobjectsCommonList;
import org.collectionspace.services.collectionobject.CollectionobjectsCommonList.CollectionObjectListItem;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandler;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.nuxeo.ecm.core.api.DocumentModel;
package org.collectionspace.services.collectionobject.nuxeo;
import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentHandlerFactory;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandlerFactory;
/**
* CollectionObjectHandlerFactory creates handlers for collectionobject based
import org.collectionspace.services.common.context.RemoteServiceContext;\r
import org.collectionspace.services.common.context.ServiceContext;\r
import org.collectionspace.services.common.context.RemoteServiceContextImpl;\r
-import org.collectionspace.services.common.repository.DocumentHandler;\r
+import org.collectionspace.services.common.document.DocumentHandler;\r
import org.collectionspace.services.common.repository.RepositoryClient;\r
import org.collectionspace.services.common.repository.RepositoryClientFactory;\r
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;\r
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandler;
import org.collectionspace.services.common.repository.RepositoryClient;
import org.collectionspace.services.common.repository.RepositoryClientFactory;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
* $LastChangedRevision: $
* $LastChangedDate: $
*/
-public abstract class AbstractServiceContext<T1, T2>
- implements ServiceContext<T1, T2> {
+public abstract class AbstractServiceContext<IT, OT>
+ implements ServiceContext<IT, OT> {
final Logger logger = LoggerFactory.getLogger(AbstractServiceContext.class);
Map<String, ObjectPartType> objectPartMap = new HashMap<String, ObjectPartType>();
}
@Override
- public abstract T1 getInput();
+ public abstract IT getInput();
@Override
- public abstract void setInput(T1 input) throws Exception;
+ public abstract void setInput(IT input) throws Exception;
@Override
- public abstract T2 getOutput();
+ public abstract OT getOutput();
@Override
- public abstract void setOutput(T2 output) throws Exception;
+ public abstract void setOutput(OT output) throws Exception;
@Override
public String toString() {
import java.io.IOException;
import java.lang.reflect.Constructor;
import javax.ws.rs.core.MediaType;
-import org.collectionspace.services.common.repository.DocumentUtils;
+import org.collectionspace.services.common.document.DocumentUtils;
import org.jboss.resteasy.plugins.providers.multipart.InputPart;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
* between various components of the service framework while processing
* a service request.
*/
-public interface ServiceContext<T1, T2> {
+public interface ServiceContext<IT, OT> {
/**
* The character used to separate the words in a part label
* Get input parts as received over the wire from service consumer
* @return the input
*/
- public T1 getInput();
+ public IT getInput();
/**
* setInput is used to set request input before starting to
* @param input
* @exception Exception
*/
- public void setInput(T1 input) throws Exception;
+ public void setInput(IT input) throws Exception;
/**
* Get output parts to send over the wire to service consumer
* @return the output
*/
- public T2 getOutput();
+ public OT getOutput();
/**
* setOutput set output
* @param output
*/
- public void setOutput(T2 output) throws Exception;
+ public void setOutput(OT output) throws Exception;
/**
* getPartsMetadata returns metadata for object parts used by the service
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
import java.util.HashMap;
import java.util.Map;
* limitations under the License.
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
/**
* BadRequestException
* https://source.collectionspace.org/collection-space/LICENSE.txt
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
/**
* DocumentException
\r
* https://source.collectionspace.org/collection-space/LICENSE.txt\r
*/\r
-package org.collectionspace.services.common.repository;\r
+package org.collectionspace.services.common.document;\r
\r
import java.util.List;\r
\r
* https://source.collectionspace.org/collection-space/LICENSE.txt
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
import java.util.Map;
import org.collectionspace.services.common.context.ServiceContext;
*/
public void fillCommonPartList(TL obj, DocumentWrapper docWrap) throws Exception;
- /**
- * Gets the document type.
- *
- * @return the document type
- */
- public String getDocumentType();
/**
* getProperties
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
/**
*
* https://source.collectionspace.org/collection-space/LICENSE.txt
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
/**
* DocumentNotFoundException
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
import java.io.InputStream;
import java.io.OutputStream;
* limitations under the License.
*/
-package org.collectionspace.services.common.repository;
+package org.collectionspace.services.common.document;
/**
*
import java.util.List;\r
\r
\r
-import org.collectionspace.services.common.repository.DocumentException;\r
+import org.collectionspace.services.common.document.DocumentException;\r
import org.collectionspace.services.relation.RelationsCommon;\r
import org.nuxeo.ecm.core.api.DocumentModel;\r
\r
import java.util.List;
import org.collectionspace.services.common.relation.RelationJAXBSchema;
-import org.collectionspace.services.common.repository.DocumentException;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentException;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.collectionspace.services.relation.RelationsCommonList;
import org.collectionspace.services.relation.RelationsCommonList.RelationListItem;
*/
package org.collectionspace.services.common.repository;
-import org.collectionspace.services.common.context.ServiceContext;
+import org.collectionspace.services.common.storage.StorageClient;
/**
* RepositoryClient is a generic Document Repository client
* The repository client then calls handle on the handler
*
*/
-public interface RepositoryClient {
-
- /**
- * create document in the Document repository
- * @param ctx service context under which this method is invoked
- * @param handler should be used by the caller to provide and transform the document
- * @return id in repository of the newly created document
- * @throws BadRequestException data input is bad
- * @throws DocumentException
- */
- String create(ServiceContext ctx, DocumentHandler handler) throws BadRequestException, DocumentException;
-
- /**
- * delete a document from the Document repository
- * @param ctx service context under which this method is invoked
- * @param id of the document
- * @throws DocumentNotFoundException if document not found
- * @throws DocumentException
- */
- void delete(ServiceContext ctx, String id) throws DocumentNotFoundException, DocumentException;
-
- /**
- * get document from the Document repository
- * @param ctx service context under which this method is invoked
- * @param id of the document to retrieve
- * @param handler should be used by the caller to provide and transform the document
- * @throws DocumentNotFoundException if document not found
- * @throws DocumentException
- */
- void get(ServiceContext ctx, String id, DocumentHandler handler) throws DocumentNotFoundException, DocumentException;
-
- /**
- * getAll get all documents for an entity service from the Document repository
- * @param ctx service context under which this method is invoked
- * @param handler should be used by the caller to provide and transform the document
- * @throws DocumentNotFoundException if workspace not found
- * @throws DocumentException
- */
- void getAll(ServiceContext ctx, DocumentHandler handler) throws DocumentNotFoundException, DocumentException;
-
- /**
- * getFiltered get all documents for an entity service from the Document repository,
- * given filter parameters specified by the handler.
- * @param ctx service context under which this method is invoked
- * @param handler should be used by the caller to provide and transform the document
- * @throws DocumentNotFoundException if workspace not found
- * @throws DocumentException
- */
- void getFiltered(ServiceContext ctx, DocumentHandler handler) throws DocumentNotFoundException, DocumentException;
-
- /**
- * update given document in the Document repository
- * @param ctx service context under which this method is invoked
- * @param id of the document
- * @param handler should be used by the caller to provide and transform the document
- * @throws BadRequestException data input is bad
- * @throws DocumentNotFoundException if document not found
- * @throws DocumentException
- */
- void update(ServiceContext ctx, String id, DocumentHandler handler) throws BadRequestException, DocumentNotFoundException, DocumentException;
+public interface RepositoryClient extends StorageClient {
/**
* createWorkspace creates a workspace in default repository under given domain
--- /dev/null
+/**
+ * This entity is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * 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.storage;
+
+import org.collectionspace.services.common.context.ServiceContext;
+import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentException;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
+
+/**
+ *
+ * @author
+ */
+public interface StorageClient {
+
+ /**
+ * create entity in the persistence store
+ * @param ctx service context under which this method is invoked
+ * @param handler should be used by the caller to provide and transform the entity
+ * @return id in persistence store of the newly created entity
+ * @throws BadRequestException data input is bad
+ * @throws DocumentException
+ */
+ String create(ServiceContext ctx, DocumentHandler handler) throws BadRequestException, DocumentException;
+
+ /**
+ * delete a entity from the persistence store
+ * @param ctx service context under which this method is invoked
+ * @param id of the entity
+ * @throws DocumentNotFoundException if entity not found
+ * @throws DocumentException
+ */
+ void delete(ServiceContext ctx, String id) throws DocumentNotFoundException, DocumentException;
+
+ /**
+ * get entity from the persistence store
+ * @param ctx service context under which this method is invoked
+ * @param id of the entity to retrieve
+ * @param handler should be used by the caller to provide and transform the entity
+ * @throws DocumentNotFoundException if entity not found
+ * @throws DocumentException
+ */
+ void get(ServiceContext ctx, String id, DocumentHandler handler) throws DocumentNotFoundException, DocumentException;
+
+ /**
+ * getAll get all entitys for an entity service from the persistence store
+ * @param ctx service context under which this method is invoked
+ * @param handler should be used by the caller to provide and transform the entity
+ * @throws DocumentNotFoundException if workspace not found
+ * @throws DocumentException
+ */
+ void getAll(ServiceContext ctx, DocumentHandler handler) throws DocumentNotFoundException, DocumentException;
+
+ /**
+ * getFiltered get all entitys for an entity service from the persistence store,
+ * given filter parameters specified by the handler.
+ * @param ctx service context under which this method is invoked
+ * @param handler should be used by the caller to provide and transform the entity
+ * @throws DocumentNotFoundException if workspace not found
+ * @throws DocumentException
+ */
+ void getFiltered(ServiceContext ctx, DocumentHandler handler) throws DocumentNotFoundException, DocumentException;
+
+ /**
+ * update given entity in the persistence store
+ * @param ctx service context under which this method is invoked
+ * @param id of the entity
+ * @param handler should be used by the caller to provide and transform the entity
+ * @throws BadRequestException data input is bad
+ * @throws DocumentNotFoundException if entity not found
+ * @throws DocumentException
+ */
+ void update(ServiceContext ctx, String id, DocumentHandler handler) throws BadRequestException, DocumentNotFoundException, DocumentException;
+
+}
*/
package org.collectionspace.services.nuxeo.client.java;
-import org.collectionspace.services.common.repository.DocumentWrapper;
-import org.collectionspace.services.common.repository.AbstractDocumentHandler;
+import org.collectionspace.services.common.document.DocumentWrapper;
+import org.collectionspace.services.common.document.AbstractDocumentHandler;
import org.collectionspace.services.nuxeo.client.*;
import org.nuxeo.ecm.core.api.repository.RepositoryInstance;
import org.slf4j.Logger;
@Override
public abstract void setCommonPartList(TL obj);
- /* (non-Javadoc)
- * @see org.collectionspace.services.common.repository.DocumentHandler#getDocumentType()
+ /**
+ * Gets the document type.
+ *
+ * @return the document type
*/
- @Override
public abstract String getDocumentType();
-
}
package org.collectionspace.services.nuxeo.client.java;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.nuxeo.ecm.core.api.DocumentModelList;
/**
package org.collectionspace.services.nuxeo.client.java;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.nuxeo.ecm.core.api.DocumentModel;
/**
import javax.ws.rs.core.MediaType;
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.BadRequestException;
-import org.collectionspace.services.common.repository.DocumentUtils;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentUtils;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.common.service.ObjectPartType;
import org.jboss.resteasy.plugins.providers.multipart.InputPart;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import java.util.UUID;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.BadRequestException;
-import org.collectionspace.services.common.repository.DocumentException;
-import org.collectionspace.services.common.repository.DocumentFilter;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
+import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentException;
+import org.collectionspace.services.common.document.DocumentFilter;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.common.repository.RepositoryClient;
-import org.collectionspace.services.common.repository.DocumentHandler.Action;
+import org.collectionspace.services.common.document.DocumentHandler.Action;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.nuxeo.common.utils.IdUtils;
import org.nuxeo.ecm.core.api.ClientException;
DocumentHandler handler) throws BadRequestException,
DocumentException {
- if (handler.getDocumentType() == null) {
+ if (ctx.getDocumentType() == null) {
throw new IllegalArgumentException(
"RemoteRepositoryClient.create: docType is missing");
}
String id = IdUtils.generateId(UUID.randomUUID().toString());
// create document model
DocumentModel doc = repoSession.createDocumentModel(wspacePath, id,
- handler.getDocumentType());
+ ctx.getDocumentType());
((DocumentModelHandler) handler).setRepositorySession(repoSession);
DocumentModelWrapper wrapDoc = new DocumentModelWrapper(doc);
handler.handle(Action.CREATE, wrapDoc);
import java.util.Map;
import java.util.StringTokenizer;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.DocumentException;
+import org.collectionspace.services.common.document.DocumentException;
import org.dom4j.Document;
import org.dom4j.io.SAXReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
* AlphabeticIDGeneratorPart
*/
package org.collectionspace.services.id;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
public interface IDGeneratorPart {
import com.thoughtworks.xstream.XStreamException;
import com.thoughtworks.xstream.io.xml.DomDriver;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
// May at some point instead use
// org.jboss.resteasy.spi.NotFoundException
-import org.collectionspace.services.common.repository.BadRequestException;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
+import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.dom4j.Document;
import org.dom4j.DocumentException;
// May at some point instead use
// org.jboss.resteasy.spi.NotFoundException
import java.util.Map;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
// org.jboss.resteasy.spi.NotFoundException
import java.util.LinkedHashMap;
import java.util.Map;
-import org.collectionspace.services.common.repository.BadRequestException;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
+import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
* NumericIDGeneratorPart
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
* SettableIDGenerator
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
* StringIDGeneratorPart
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
* UUIDGeneratorPart
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
/**
* YearIDGeneratorPart
package org.collectionspace.services.id.test;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.id.AlphabeticIDGeneratorPart;
import org.collectionspace.services.id.SequenceIDGeneratorPart;
import java.util.Vector;
import junit.framework.TestCase;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.id.*;
/**
import org.collectionspace.services.id.*;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import junit.framework.TestCase;
import static org.junit.Assert.*;
package org.collectionspace.services.id.test;
import java.util.Map;
-import org.collectionspace.services.common.repository.BadRequestException;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
+import org.collectionspace.services.common.document.BadRequestException;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.id.*;
package org.collectionspace.services.id.test;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import static org.junit.Assert.fail;
import junit.framework.TestCase;
import org.collectionspace.services.id.NumericIDGeneratorPart;
package org.collectionspace.services.id.test;
import junit.framework.TestCase;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.id.*;
/**
package org.collectionspace.services.id.test;
import junit.framework.TestCase;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.id.StoredValueIDGeneratorPart;
import org.collectionspace.services.id.StringIDGeneratorPart;
package org.collectionspace.services.id.test;
-import org.collectionspace.services.common.repository.BadRequestException;
+import org.collectionspace.services.common.document.BadRequestException;
import static org.junit.Assert.fail;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.collectionspace.services.common.ServiceMain;
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
-import org.collectionspace.services.common.repository.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
+import org.collectionspace.services.common.document.DocumentHandler;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
import org.jboss.resteasy.util.HttpResponseCodes;
import java.util.List;
import org.collectionspace.services.IntakeJAXBSchema;
-import org.collectionspace.services.common.repository.DocumentHandler.Action;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentHandler.Action;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.intake.IntakesCommon;
import org.collectionspace.services.intake.IntakesCommonList;
import org.collectionspace.services.intake.IntakesCommonList.IntakeListItem;
package org.collectionspace.services.intake.nuxeo;
import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentHandlerFactory;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandlerFactory;
/**
* IntakeHandlerFactory creates handlers for collectionobject based
-<?xml version="1.0" encoding="UTF-8"?>\r
-<actions>\r
- <action>\r
- <actionName>rebuild</actionName>\r
- <packagings>\r
- <packaging>*</packaging>\r
- </packagings>\r
- <goals>\r
- <goal>clean</goal>\r
- <goal>install</goal>\r
- </goals>\r
- <properties>\r
- <maven.test.skip>true</maven.test.skip>\r
- </properties>\r
- </action>\r
- </actions>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <action>
+ <actionName>rebuild</actionName>
+ <goals>
+ <goal>clean</goal>
+ <goal>install</goal>
+ </goals>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ </properties>
+ </action>
+ <action>
+ <actionName>CUSTOM-hotdeploy</actionName>
+ <displayName>hotdeploy</displayName>
+ <goals>
+ <goal>hotdeploy</goal>
+ </goals>
+ </action>
+ </actions>
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project xmlns="http://maven.apache.org/POM/4.0.0"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
- <parent>\r
- <artifactId>org.collectionspace.services</artifactId>\r
- <groupId>org.collectionspace.services</groupId>\r
- <version>1.0</version>\r
- </parent>\r
- <modelVersion>4.0.0</modelVersion>\r
- <groupId>org.collectionspace.services</groupId>\r
- <version>1.0</version>\r
- <artifactId>org.collectionspace.services.main</artifactId>\r
- <packaging>pom</packaging>\r
- <name>services.main</name>\r
-\r
- <modules>\r
- <!-- add modules below in the order based on dependencies -->\r
- <module>common</module>\r
- <module>authentication</module>\r
- <module>relation</module>\r
- <!--module>query</module-->\r
- <module>acquisition</module>\r
- <module>vocabulary</module>\r
- <module>id</module>\r
- <module>collectionobject</module>\r
- <module>intake</module>\r
- <module>JaxRsServiceProvider</module>\r
- <module>client</module>\r
- <module>sdk</module>\r
- <module>IntegrationTests</module>\r
- </modules>\r
-\r
- <repositories> </repositories>\r
-\r
- <pluginRepositories>\r
- </pluginRepositories>\r
-\r
- <build>\r
- <pluginManagement>\r
- <plugins>\r
- <plugin>\r
- <groupId>org.apache.maven.plugins</groupId>\r
- <artifactId>maven-compiler-plugin</artifactId>\r
- <configuration>\r
- <source>1.5</source>\r
- <target>1.5</target>\r
- </configuration>\r
- </plugin>\r
- <plugin>\r
- <groupId>org.apache.maven.plugins</groupId>\r
- <artifactId>maven-site-plugin</artifactId>\r
- <configuration>\r
- <unzipCommand>/usr/bin/unzip -o > err.txt</unzipCommand>\r
- </configuration>\r
- </plugin>\r
- <plugin>\r
- <groupId>org.apache.maven.plugins</groupId>\r
- <artifactId>maven-war-plugin</artifactId>\r
- <version>2.0.1</version>\r
- <configuration>\r
- <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>\r
- <archive>\r
- <manifest>\r
- <addClasspath>true</addClasspath>\r
-\r
- </manifest>\r
- </archive>\r
- </configuration>\r
- </plugin>\r
-\r
- <plugin>\r
- <groupId>org.apache.maven.plugins</groupId>\r
- <artifactId>maven-dependency-plugin</artifactId>\r
- <executions>\r
- <execution>\r
- <id>classpath</id>\r
- <goals>\r
- <goal>build-classpath</goal>\r
- </goals>\r
- <configuration>\r
- <outputFile>classpath</outputFile>\r
- </configuration>\r
- </execution>\r
- </executions>\r
- </plugin>\r
-\r
-\r
- </plugins>\r
- </pluginManagement>\r
- <plugins>\r
- <plugin>\r
- <groupId>org.apache.maven.plugins</groupId>\r
- <artifactId>maven-compiler-plugin</artifactId>\r
- <version>2.0.2</version>\r
- <configuration>\r
- <source>1.6</source>\r
- <target>1.6</target>\r
- </configuration>\r
- </plugin>\r
- </plugins>\r
- </build>\r
- <reporting>\r
- <plugins>\r
- <!--plugin>\r
- <groupId>org.codehaus.mojo</groupId>\r
- <artifactId>taglist-maven-plugin</artifactId>\r
- <version>2.1</version>\r
- <configuration>\r
- <tags>\r
- <tag>@FIXME</tag>\r
- <tag>@fixme</tag>\r
- <tag>FIXME</tag>\r
- <tag>fixme</tag>\r
- <tag>@TODO</tag>\r
- <tag>@todo</tag>\r
- <tag>TODO</tag>\r
- <tag>todo</tag>\r
- </tags>\r
- <onlyAnalyze>org.collectionspace.*</onlyAnalyze>\r
- </configuration>\r
- </plugin-->\r
-\r
- <plugin>\r
- <groupId>org.codehaus.mojo</groupId>\r
- <artifactId>findbugs-maven-plugin</artifactId>\r
- <version>2.0.1</version>\r
- <configuration>\r
- <onlyAnalyze>org.collectionspace.*</onlyAnalyze>\r
- </configuration>\r
- </plugin>\r
- </plugins>\r
- </reporting>\r
- <dependencyManagement>\r
- <dependencies>\r
- <dependency>\r
- <groupId>net.java.dev.jaxb2-commons</groupId>\r
- <artifactId>jaxb-fluent-api</artifactId>\r
- <version>2.0.1</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.testng</groupId>\r
- <artifactId>testng</artifactId>\r
- <version>5.6</version>\r
- <scope>test</scope>\r
- <classifier>jdk15</classifier>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.jboss.resteasy</groupId>\r
- <artifactId>jaxrs-api</artifactId>\r
- <version>1.1.GA</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>net.java.dev.jaxb2-commons</groupId>\r
- <artifactId>jaxb-fluent-api</artifactId>\r
- <version>2.0.1</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.jvnet.jaxb2-commons</groupId>\r
- <artifactId>property-listener-injector</artifactId>\r
- <version>1.0</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.jvnet.jaxb2_commons</groupId>\r
- <artifactId>runtime</artifactId>\r
- <version>0.4.1</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.jboss.resteasy</groupId>\r
- <artifactId>resteasy-jaxrs</artifactId>\r
- <version>1.1.GA</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>commons-httpclient</groupId>\r
- <artifactId>commons-httpclient</artifactId>\r
- <version>3.1</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>com.sun.xml.bind</groupId>\r
- <artifactId>jaxb-impl</artifactId>\r
- <version>2.1.9</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.slf4j</groupId>\r
- <artifactId>slf4j-api</artifactId>\r
- <version>1.5.2</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.slf4j</groupId>\r
- <artifactId>slf4j-log4j12</artifactId>\r
- <version>1.5.2</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>mysql</groupId>\r
- <artifactId>mysql-connector-java</artifactId>\r
- <version>5.1.5</version>\r
- <scope>test</scope>\r
- </dependency>\r
- </dependencies>\r
- </dependencyManagement>\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>org.collectionspace.services</artifactId>
+ <groupId>org.collectionspace.services</groupId>
+ <version>1.0</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.services</groupId>
+ <version>1.0</version>
+ <artifactId>org.collectionspace.services.main</artifactId>
+ <packaging>pom</packaging>
+ <name>services.main</name>
+
+ <modules>
+ <!-- add modules below in the order based on dependencies -->
+ <module>common</module>
+ <module>authentication</module>
+ <module>relation</module>
+ <!--module>query</module-->
+ <module>acquisition</module>
+ <module>vocabulary</module>
+ <module>id</module>
+ <module>collectionobject</module>
+ <module>intake</module>
+ <module>JaxRsServiceProvider</module>
+ <module>client</module>
+ <module>sdk</module>
+ <module>IntegrationTests</module>
+ <!--module>account</module-->
+ </modules>
+
+ <repositories> </repositories>
+
+ <pluginRepositories>
+ </pluginRepositories>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <unzipCommand>/usr/bin/unzip -o > err.txt</unzipCommand>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>classpath</id>
+ <goals>
+ <goal>build-classpath</goal>
+ </goals>
+ <configuration>
+ <outputFile>classpath</outputFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <tags>
+ <tag>@FIXME</tag>
+ <tag>@fixme</tag>
+ <tag>FIXME</tag>
+ <tag>fixme</tag>
+ <tag>@TODO</tag>
+ <tag>@todo</tag>
+ <tag>TODO</tag>
+ <tag>todo</tag>
+ </tags>
+ <onlyAnalyze>org.collectionspace.*</onlyAnalyze>
+ </configuration>
+ </plugin-->
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <onlyAnalyze>org.collectionspace.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>net.java.dev.jaxb2-commons</groupId>
+ <artifactId>jaxb-fluent-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.6</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>jaxrs-api</artifactId>
+ <version>1.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>net.java.dev.jaxb2-commons</groupId>
+ <artifactId>jaxb-fluent-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2-commons</groupId>
+ <artifactId>property-listener-injector</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>runtime</artifactId>
+ <version>0.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxrs</artifactId>
+ <version>1.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>2.1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.5</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
\ No newline at end of file
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.relation.IRelationsManager;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
-import org.collectionspace.services.common.repository.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
+import org.collectionspace.services.common.document.DocumentHandler;
import org.collectionspace.services.relation.nuxeo.RelationHandlerFactory;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
import org.collectionspace.services.common.relation.IRelationsManager;
import org.collectionspace.services.common.relation.nuxeo.RelationConstants;
import org.collectionspace.services.common.relation.nuxeo.RelationsUtils;
-import org.collectionspace.services.common.repository.DocumentHandler.Action;
+import org.collectionspace.services.common.document.DocumentHandler.Action;
import org.collectionspace.services.relation.RelationsCommon;
import org.collectionspace.services.relation.RelationsCommonList;
import org.collectionspace.services.relation.RelationsCommonList.RelationListItem;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandler;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
package org.collectionspace.services.relation.nuxeo;
import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentHandlerFactory;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandlerFactory;
/**
* CollectionObjectHandlerFactory creates handlers for collectionobject based
import org.collectionspace.services.common.ServiceMain;
import org.collectionspace.services.common.context.RemoteServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.repository.DocumentFilter;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentNotFoundException;
+import org.collectionspace.services.common.document.DocumentFilter;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.vocabulary.nuxeo.VocabularyHandlerFactory;
import org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler;
import org.collectionspace.services.vocabulary.nuxeo.VocabularyItemHandlerFactory;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
import org.jboss.resteasy.util.HttpResponseCodes;
-import org.nuxeo.ecm.core.api.repository.RepositoryInstance;
-import org.nuxeo.ecm.core.client.NuxeoClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@PathParam("csid") String parentcsid,
@Context UriInfo ui) {
VocabularyitemsCommonList vocabularyItemObjectList = new VocabularyitemsCommonList();
- NuxeoClient client = null;
try{
// Note that docType defaults to the ServiceName, so we're fine with that.
RemoteServiceContext ctx = createServiceContext(null, getItemServiceName());
import java.util.List;
import org.collectionspace.services.VocabularyJAXBSchema;
-import org.collectionspace.services.common.repository.DocumentHandler.Action;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentHandler.Action;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.vocabulary.VocabulariesCommon;
import org.collectionspace.services.vocabulary.VocabulariesCommonList;
import org.collectionspace.services.vocabulary.VocabulariesCommonList.VocabularyListItem;
package org.collectionspace.services.vocabulary.nuxeo;
import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentHandlerFactory;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandlerFactory;
/**
import java.util.List;
import org.collectionspace.services.VocabularyItemJAXBSchema;
-import org.collectionspace.services.common.repository.DocumentWrapper;
+import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandler;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.collectionspace.services.vocabulary.VocabularyitemsCommon;
package org.collectionspace.services.vocabulary.nuxeo;
import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.repository.DocumentHandler;
-import org.collectionspace.services.common.repository.DocumentHandlerFactory;
+import org.collectionspace.services.common.document.DocumentHandler;
+import org.collectionspace.services.common.document.DocumentHandlerFactory;
/**