@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
dependsOnMethods = {"create", "testSubmitRequest"})
public void createFromXmlRFWS1(String testName) throws Exception {
+ String testDataDir = System.getProperty("test-data.fileName");
String newId =
- createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp1.xml", false);
+ //createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp1.xml", false);
+ createFromXmlFile(testName, testDataDir + "/repfield_whitesp1.xml", false);
testSubmitRequest(newId);
}
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
dependsOnMethods = {"create", "testSubmitRequest"})
public void createFromXmlRFWS2(String testName) throws Exception {
+ String testDataDir = System.getProperty("test-data.fileName");
String newId =
- createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp2.xml", false);
+ //createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp2.xml", false);
+ createFromXmlFile(testName, testDataDir + "/repfield_whitesp2.xml", false);
testSubmitRequest(newId);
}
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
dependsOnMethods = {"create", "testSubmitRequest"})
public void createFromXmlRFWS3(String testName) throws Exception {
+ String testDataDir = System.getProperty("test-data.fileName");
String newId =
- createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp3.xml", false);
+ //createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp3.xml", false);
+ createFromXmlFile(testName, testDataDir + "/repfield_whitesp3.xml", false);
testSubmitRequest(newId);
}
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
dependsOnMethods = {"create", "testSubmitRequest"})
public void createFromXmlRFWS4(String testName) throws Exception {
+ String testDataDir = System.getProperty("test-data.fileName");
String newId =
- createFromXmlFile(testName, "./target/test-classes/test-data/repfield_whitesp4.xml", false);
+ createFromXmlFile(testName, testDataDir + "/repfield_whitesp4.xml", false);
testSubmitRequest(newId);
}
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
dependsOnMethods = {"create", "testSubmitRequest"})
public void createWithNullValueRepeatableField(String testName) throws Exception {
- String newId =
- createFromXmlFile(testName, "./target/test-classes/test-data/repfield_null1.xml", false);
+ String testDataDir = System.getProperty("test-data.fileName");
+ String newId =
+ createFromXmlFile(testName, testDataDir + "/repfield_null1.xml", false);
if (logger.isDebugEnabled()) {
logger.debug("Successfully created record with null value repeatable field.");
logger.debug("Attempting to retrieve just-created record ...");
import org.collectionspace.services.common.storage.StorageClient;
/**
- * CollectionSpaceResource is a resource interface implemented by every
- * entity/service in CollectionSpace
+ * The Interface CollectionSpaceResource.
+ *
+ * @param <IT> the generic type
+ * @param <OT> the generic type
*/
public interface CollectionSpaceResource<IT, OT> {
/**
- * getServiceName returns the name of the service
+ * Gets the service name.
+ *
+ * @return the service name
*/
public String getServiceName();
/**
- * Gets the common class.
- *
- * @return the common class
+ * Gets the common part class.
+ *
+ * @return the common part class
*/
- public Class getCommonPartClass();
+ public Class<?> getCommonPartClass();
/**
- * getRepositoryClient
- * @param ctx service context
+ * Gets the repository client.
+ *
+ * @param ctx the ctx
+ * @return the repository client
*/
public RepositoryClient getRepositoryClient(ServiceContext<IT, OT> ctx);
/**
- * getStorageClient
- * @param ctx service context
+ * Gets the storage client.
+ *
+ * @param ctx the ctx
+ * @return the storage client
*/
public StorageClient getStorageClient(ServiceContext<IT, OT> ctx);
/**
- * createDocumentHandler creates a document handler and populates it with given
- * service context. document handler should never be used
- * across service invocations. it is a stateful object that holds request,
- * response and service context
- * @param ctx
- * @return
+ * Creates the document handler.
+ *
+ * @param ctx the ctx
+ * @return the document handler
+ * @throws Exception the exception
*/
public DocumentHandler createDocumentHandler(ServiceContext<IT, OT> ctx) throws Exception;
+ /**
+ * Gets the service context factory.
+ *
+ * @return the service context factory
+ */
public ServiceContextFactory<IT, OT> getServiceContextFactory();
}
import org.collectionspace.services.common.ClientType;
import org.collectionspace.services.common.ServiceMain;
-import org.collectionspace.services.common.context.MultipartServiceContext;
-import org.collectionspace.services.common.context.MultipartServiceContextFactory;
+//import org.collectionspace.services.common.context.MultipartServiceContext;
+//import org.collectionspace.services.common.context.MultipartServiceContextFactory;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.common.document.DocumentHandler;
* @see org.collectionspace.services.common.AbstractCollectionSpaceResourceImpl#getVersionString()
*/
@Override
- protected String getVersionString() {
+ public String getVersionString() {
/** The last change revision. */
final String lastChangeRevision = "$LastChangedRevision$";
return lastChangeRevision;