-<project name="article.3rdparty" default="package" basedir=".">
+<project name="publicitem.3rdparty" default="package" basedir=".">
<description>
- Article service 3rdparty
+ PublicItem service 3rdparty
</description>
<!-- set global properties for this build -->
<property name="services.trunk" value="../../.."/>
</target>
<target name="deploy" depends="install"
- description="deploy article in ${jee.server.nuxeo}">
- <ant antfile="nuxeo-platform-cs-article/build.xml" target="deploy" inheritall="false"/>
+ description="deploy publicitem in ${jee.server.nuxeo}">
+ <ant antfile="nuxeo-platform-cs-publicitem/build.xml" target="deploy" inheritall="false"/>
</target>
<target name="undeploy"
- description="undeploy article from ${jee.server.nuxeo}">
- <ant antfile="nuxeo-platform-cs-article/build.xml" target="undeploy" inheritall="false"/>
+ description="undeploy publicitem from ${jee.server.nuxeo}">
+ <ant antfile="nuxeo-platform-cs-publicitem/build.xml" target="undeploy" inheritall="false"/>
</target>
<target name="dist"
- description="generate distribution for article" depends="package">
- <ant antfile="nuxeo-platform-cs-article/build.xml" target="dist" inheritall="false"/>
+ description="generate distribution for publicitem" depends="package">
+ <ant antfile="nuxeo-platform-cs-publicitem/build.xml" target="dist" inheritall="false"/>
</target>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
- ArticlesCommon XML Schema (XSD) for Nuxeo
-
- Entity : ArticlesCommon
- Used for: Nuxeo EP core document type
-
- $LastChangedRevision$
- $LastChangedDate$
--->
-
-<xs:schema
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:ns="http://collectionspace.org/article/"
- xmlns="http://collectionspace.org/article/"
- targetNamespace="http://collectionspace.org/article/"
- version="0.1">
-
- <xs:element name="articleNumber" type="xs:string" /> <!-- An identifier for the article (different than the CSID) -->
- <xs:element name="articleContentName" type="xs:string" /> <!-- A name for the article's content -->
- <xs:element name="articleContentRepositoryId" type="xs:string" /> <!-- The backend repository ID of the article's content -->
- <xs:element name="articleContentUrl" type="xs:string" /> <!-- The publicly accessible URL of the article's content -->
- <xs:element name="articleJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
- <xs:element name="articleSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the article. -->
- <xs:element name="accessExpirationDate" type="xs:dateTime" /> <!-- When the article is no longer available for access -->
- <xs:element name="accessedCount" type="xs:integer" /> <!-- How many times the article has been accessed. -->
- <xs:element name="accessedCountLimit" type="xs:integer" /> <!-- The maximum times the article can be accessed. -->
-</xs:schema>
-<project name="nuxeo-platform-cs-article" default="package" basedir=".">
+<project name="nuxeo-platform-cs-publicitem" default="package" basedir=".">
<description>
- Article nuxeo document type
+ PublicItem's Nuxeo document type
</description>
<!-- set global properties for this build -->
<property name="services.trunk" value="../../../.."/>
<property file="${services.trunk}/build.properties" />
<property name="mvn.opts" value="" />
<property name="src" location="src"/>
- <property name="nuxeo.article.jar"
- value="org.collectionspace.services.article.3rdparty.nuxeo-${cspace.release}.jar"/>
- <property name="nuxeo.article.jars.all"
- value="org.collectionspace.services.article.3rdparty.nuxeo-*.jar"/>
+ <property name="nuxeo.publicitem.jar"
+ value="org.collectionspace.services.publicitem.3rdparty.nuxeo-${cspace.release}.jar"/>
+ <property name="nuxeo.publicitem.jars.all"
+ value="org.collectionspace.services.publicitem.3rdparty.nuxeo-*.jar"/>
<condition property="osfamily-unix">
<os family="unix" />
</target>
<target name="deploy" depends="install"
- description="deploy article doctype in ${jee.server.nuxeo}">
- <copy file="${basedir}/target/${nuxeo.article.jar}"
+ description="deploy publicitem doctype in ${jee.server.nuxeo}">
+ <copy file="${basedir}/target/${nuxeo.publicitem.jar}"
todir="${jee.deploy.nuxeo.plugins}"/>
</target>
<target name="undeploy"
- description="undeploy article doctype from ${jee.server.nuxeo}">
+ description="undeploy publicitem doctype from ${jee.server.nuxeo}">
<delete>
<fileset dir="${jee.deploy.nuxeo.plugins}">
- <include name="${nuxeo.article.jars.all}"/>
+ <include name="${nuxeo.publicitem.jars.all}"/>
</fileset>
</delete>
</target>
<target name="dist"
- description="generate distribution for article doctype" depends="package">
+ description="generate distribution for publicitem doctype" depends="package">
<copy todir="${services.trunk}/${dist.deploy.nuxeo.plugins}">
- <fileset file="${basedir}/target/${nuxeo.article.jar}"/>
+ <fileset file="${basedir}/target/${nuxeo.publicitem.jar}"/>
</copy>
</target>
<parent>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article.3rdparty</artifactId>
+ <artifactId>org.collectionspace.services.publicitem.3rdparty</artifactId>
<version>3.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article.3rdparty.nuxeo</artifactId>
- <name>services.article.3rdparty.nuxeo</name>
+ <artifactId>org.collectionspace.services.publicitem.3rdparty.nuxeo</artifactId>
+ <name>services.publicitem.3rdparty.nuxeo</name>
<packaging>jar</packaging>
<description>
- Article Nuxeo Document Type
+ PublicItem Nuxeo Document Type
</description>
<properties>
- <ServiceName>article</ServiceName>
- <NuxeoDocTypeName>Article</NuxeoDocTypeName>
- <CommonSchemaName>articles_common</CommonSchemaName>
+ <ServiceName>publicitem</ServiceName>
+ <NuxeoDocTypeName>PublicItem</NuxeoDocTypeName>
+ <CommonSchemaName>publicitems_common</CommonSchemaName>
<Lifecycle>cs_default</Lifecycle>
</properties>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ PublicitemsCommon XML Schema (XSD) for Nuxeo
+
+ Entity : PublicitemsCommon
+ Used for: Nuxeo EP core document type
+
+ $LastChangedRevision$
+ $LastChangedDate$
+-->
+
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns="http://collectionspace.org/publicitem/"
+ xmlns="http://collectionspace.org/publicitem/"
+ targetNamespace="http://collectionspace.org/publicitem/"
+ version="0.1">
+
+ <xs:element name="itemNumber" type="xs:string" /> <!-- An identifier for the publicitem (different than the CSID) -->
+ <xs:element name="contentName" type="xs:string" /> <!-- A name for the publicitem's content -->
+ <xs:element name="contentId" type="xs:string" /> <!-- The the ID of the content blob in the back-end repository -->
+ <xs:element name="contentUri" type="xs:string" /> <!-- The publicly accessible URL of the publicitem's content -->
+ <xs:element name="contentCreationJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
+ <xs:element name="contentSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the publicitem. -->
+ <xs:element name="contentExpirationDate" type="xs:dateTime" /> <!-- When the publicitem is no longer available for access -->
+ <xs:element name="contentAccessedCount" type="xs:integer" /> <!-- How many times the publicitem has been accessed. -->
+ <xs:element name="contentAccessCountLimit" type="xs:integer" /> <!-- The maximum times the publicitem can be accessed. -->
+</xs:schema>
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.article</artifactId>
+ <artifactId>org.collectionspace.services.publicitem</artifactId>
<groupId>org.collectionspace.services</groupId>
<version>3.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.article.3rdparty</artifactId>
- <name>services.article.3rdparty</name>
+ <artifactId>org.collectionspace.services.publicitem.3rdparty</artifactId>
+ <name>services.publicitem.3rdparty</name>
<packaging>pom</packaging>
<description>
- 3rd party build for article service
+ 3rd party build for publicitem service
</description>
<modules>
- <module>nuxeo-platform-cs-article</module>
+ <module>nuxeo-platform-cs-publicitem</module>
</modules>
</project>
-<project name="article" default="package" basedir=".">
+<project name="publicitem" default="package" basedir=".">
<description>
- Article service
+ PublicItem service
</description>
<!-- set global properties for this build -->
<property name="services.trunk" value="../.."/>
</target>
<target name="deploy" depends="install"
- description="deploy article service">
+ description="deploy publicitem service">
<ant antfile="3rdparty/build.xml" target="deploy" inheritall="false"/>
</target>
<target name="undeploy"
- description="undeploy article service">
+ description="undeploy publicitem service">
<ant antfile="3rdparty/build.xml" target="undeploy" inheritall="false"/>
</target>
<target name="dist" depends="package"
- description="distribute article service">
+ description="distribute publicitem service">
<ant antfile="3rdparty/build.xml" target="dist" inheritall="false"/>
</target>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article</artifactId>
+ <artifactId>org.collectionspace.services.publicitem</artifactId>
<version>3.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.article.client</artifactId>
- <name>services.article.client</name>
+ <artifactId>org.collectionspace.services.publicitem.client</artifactId>
+ <name>services.publicitem.client</name>
<dependencies>
<!-- keep slf4j dependencies on the top -->
</dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article.jaxb</artifactId>
+ <artifactId>org.collectionspace.services.publicitem.jaxb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
</dependencies>
<build>
- <finalName>collectionspace-services-article-client</finalName>
+ <finalName>collectionspace-services-publicitem-client</finalName>
</build>
</project>
* $LastChangedDate$
*
*/
-public class ArticleClient extends AbstractCommonListPoxServiceClientImpl<ArticleProxy> {
+public class PublicItemClient extends AbstractCommonListPoxServiceClientImpl<PublicItemProxy> {
public static final String SERVICE_NAME = "articles";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
}
@Override
- public Class<ArticleProxy> getProxyClass() {
- return ArticleProxy.class;
+ public Class<PublicItemProxy> getProxyClass() {
+ return PublicItemProxy.class;
}
}
* $LastChangedDate$
*
*/
-@Path(ArticleClient.SERVICE_PATH_PROXY)
+@Path(PublicItemClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface ArticleProxy extends CollectionSpaceCommonListPoxProxy {
+public interface PublicItemProxy extends CollectionSpaceCommonListPoxProxy {
}
//import java.util.ArrayList;
import java.math.BigInteger;
-import java.util.Date;
import javax.ws.rs.core.Response;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.XMLGregorianCalendar;
import org.collectionspace.services.client.AbstractCommonListUtils;
-import org.collectionspace.services.client.CollectionSpaceClient;
-import org.collectionspace.services.client.ArticleClient;
+import org.collectionspace.services.client.PublicItemClient;
import org.collectionspace.services.client.PayloadInputPart;
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.article.ArticlesCommon;
+import org.collectionspace.services.publicitem.PublicitemsCommon;
import org.jboss.resteasy.client.ClientResponse;
import org.testng.Assert;
import org.slf4j.LoggerFactory;
/**
- * ArticleServiceTest, carries out tests against a deployed and running Articles
+ * PublicItemServiceTest, carries out tests against a deployed and running PublicItem
* Service.
*
* $LastChangedRevision$ $LastChangedDate$
*/
-public class ArticleServiceTest extends
- AbstractPoxServiceTestImpl<AbstractCommonList, ArticlesCommon> {
+public class PublicItemServiceTest extends
+ AbstractPoxServiceTestImpl<AbstractCommonList, PublicitemsCommon> {
/** The logger. */
- private final String CLASS_NAME = ArticleServiceTest.class.getName();
+ private final String CLASS_NAME = PublicItemServiceTest.class.getName();
private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
// Instance variables specific to this test.
/** The service path component. */
- final String SERVICE_NAME = "articles";
- final String SERVICE_PATH_COMPONENT = "articles";
+ final String SERVICE_NAME = PublicItemClient.SERVICE_NAME;
+ final String SERVICE_PATH_COMPONENT = PublicItemClient.SERVICE_PATH_COMPONENT;
/*
* (non-Javadoc)
* ()
*/
@Override
- protected ArticleClient getClientInstance() {
- return new ArticleClient();
+ protected PublicItemClient getClientInstance() {
+ return new PublicItemClient();
}
/*
setupCreate();
// Submit the request to the service and store the response.
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
String identifier = createIdentifier();
- PoxPayloadOut multipart = createArticleInstance(identifier);
+ PoxPayloadOut multipart = createPublicItemInstance(identifier);
String newID = null;
ClientResponse<Response> res = client.create(multipart);
try {
setupRead();
// Submit the request to the service and store the response.
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
ClientResponse<String> res = client.read(knownResourceId);
PoxPayloadIn input = null;
try {
// Get the common part of the response and verify that it is not null.
PayloadInputPart payloadInputPart = input.getPart(client
.getCommonPartName());
- ArticlesCommon articlesCommon = null;
+ PublicitemsCommon publicItemsCommon = null;
if (payloadInputPart != null) {
- articlesCommon = (ArticlesCommon) payloadInputPart.getBody();
+ publicItemsCommon = (PublicitemsCommon) payloadInputPart.getBody();
}
- Assert.assertNotNull(articlesCommon);
+ Assert.assertNotNull(publicItemsCommon);
}
setupReadNonExistent();
// Submit the request to the service and store the response.
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
ClientResponse<String> res = client.read(NON_EXISTENT_ID);
try {
int statusCode = res.getStatus();
// Submit the request to the service and store the response.
AbstractCommonList list = null;
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
ClientResponse<AbstractCommonList> res = client.readList();
assertStatusCode(res, testName);
try {
setupRead();
// Retrieve the contents of a resource to update.
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
ClientResponse<String> res = client.read(knownResourceId);
PoxPayloadIn input = null;
try {
// Extract the common part from the response.
PayloadInputPart payloadInputPart = input.getPart(client
.getCommonPartName());
- ArticlesCommon articlesCommon = null;
+ PublicitemsCommon publicItemsCommon = null;
if (payloadInputPart != null) {
- articlesCommon = (ArticlesCommon) payloadInputPart.getBody();
+ publicItemsCommon = (PublicitemsCommon) payloadInputPart.getBody();
}
- Assert.assertNotNull(articlesCommon);
+ Assert.assertNotNull(publicItemsCommon);
// Update the content of this resource.
- articlesCommon.setArticleNumber("updated-"
- + articlesCommon.getArticleNumber());
- articlesCommon.setArticleJobId("updated-" + articlesCommon.getArticleJobId());
+ publicItemsCommon.setItemNumber("updated-"
+ + publicItemsCommon.getItemNumber());
+ publicItemsCommon.setContentCreationJobId("updated-" + publicItemsCommon.getContentCreationJobId());
if (logger.isDebugEnabled()) {
logger.debug("to be updated object");
- logger.debug(objectAsXmlString(articlesCommon, ArticlesCommon.class));
+ logger.debug(objectAsXmlString(publicItemsCommon, PublicitemsCommon.class));
}
setupUpdate();
// and store the response.
PoxPayloadOut output = new PoxPayloadOut(this.getServicePathComponent());
PayloadOutputPart commonPart = output.addPart(
- client.getCommonPartName(), articlesCommon);
+ client.getCommonPartName(), publicItemsCommon);
res = client.update(knownResourceId, output);
try {
assertStatusCode(res, testName);
// Extract the updated common part from the response.
payloadInputPart = input.getPart(client.getCommonPartName());
- ArticlesCommon updatedArticleCommon = null;
+ PublicitemsCommon updatedPublicitemsCommon = null;
if (payloadInputPart != null) {
- updatedArticleCommon = (ArticlesCommon) payloadInputPart.getBody();
+ updatedPublicitemsCommon = (PublicitemsCommon) payloadInputPart.getBody();
}
- Assert.assertNotNull(updatedArticleCommon);
+ Assert.assertNotNull(updatedPublicitemsCommon);
// Check selected fields in the updated common part.
- Assert.assertEquals(updatedArticleCommon.getArticleNumber(),
- articlesCommon.getArticleNumber(),
+ Assert.assertEquals(updatedPublicitemsCommon.getItemNumber(),
+ publicItemsCommon.getItemNumber(),
"Data in updated object did not match submitted data.");
if (logger.isDebugEnabled()) {
- logger.debug("UTF-8 data sent=" + articlesCommon.getArticleJobId()
+ logger.debug("UTF-8 data sent=" + publicItemsCommon.getContentCreationJobId()
+ "\n" + "UTF-8 data received="
- + updatedArticleCommon.getArticleJobId());
+ + updatedPublicitemsCommon.getContentCreationJobId());
}
- Assert.assertTrue(updatedArticleCommon.getArticleSource().contains(
+ Assert.assertTrue(updatedPublicitemsCommon.getContentSource().contains(
getUTF8DataFragment()), "UTF-8 data retrieved '"
- + updatedArticleCommon.getArticleSource()
+ + updatedPublicitemsCommon.getContentSource()
+ "' does not contain expected data '"
+ getUTF8DataFragment());
- Assert.assertEquals(updatedArticleCommon.getArticleJobId(),
- articlesCommon.getArticleJobId(),
+ Assert.assertEquals(updatedPublicitemsCommon.getContentCreationJobId(),
+ publicItemsCommon.getContentCreationJobId(),
"Data in updated object did not match submitted data.");
}
// Submit the request to the service and store the response.
// Note: The ID used in this 'create' call may be arbitrary.
// The only relevant ID may be the one used in update(), below.
- ArticleClient client = new ArticleClient();
- PoxPayloadOut multipart = createArticleInstance(NON_EXISTENT_ID);
+ PublicItemClient client = new PublicItemClient();
+ PoxPayloadOut multipart = createPublicItemInstance(NON_EXISTENT_ID);
ClientResponse<String> res = client.update(NON_EXISTENT_ID, multipart);
try {
int statusCode = res.getStatus();
setupDelete();
// Submit the request to the service and store the response.
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
ClientResponse<Response> res = client.delete(knownResourceId);
try {
int statusCode = res.getStatus();
setupDeleteNonExistent();
// Submit the request to the service and store the response.
- ArticleClient client = new ArticleClient();
+ PublicItemClient client = new PublicItemClient();
ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
try {
int statusCode = res.getStatus();
@Override
protected PoxPayloadOut createInstance(String identifier) {
- return createArticleInstance(identifier);
+ return createPublicItemInstance(identifier);
}
/**
- * Creates the article instance.
+ * Creates the publicitem instance.
*
* @param identifier
* the identifier
* @return the multipart output
*/
- private PoxPayloadOut createArticleInstance(String identifier) {
- return createArticleInstance("articleNumber-" + identifier,
- "articleJobId-" + identifier);
+ private PoxPayloadOut createPublicItemInstance(String identifier) {
+ return createPublicItemInstance("itemNumber-" + identifier,
+ "contentCreationJobId-" + identifier);
}
/**
- * Creates the Article instance.
+ * Creates the PublicItem instance.
*
- * @param articleNumber
- * the article number
- * @param articleJobId
- * the article asynch job ID
+ * @param itemNumber
+ * the publicitem number
+ * @param contentCreationJobId
+ * the publicitem asynch job ID
* @return the multipart output
*/
- private PoxPayloadOut createArticleInstance(String articleNumber,
- String articleJobId) {
-
- ArticlesCommon articlesCommon = new ArticlesCommon();
- articlesCommon.setArticleNumber(articleNumber);
- articlesCommon.setArticleContentName("contentname-" + articleNumber);
- articlesCommon.setArticleContentRepositoryId("42640780-82eb-4650-8a70");
- articlesCommon.setArticleContentUrl("https://github.com/collectionspace/services/blob/CSPACE-5564-REM-A/services/article/jaxb/src/main/resources/articles-common.xsd");
- articlesCommon.setArticleJobId(articleJobId);
- articlesCommon.setArticleSource(getUTF8DataFragment());
+ private PoxPayloadOut createPublicItemInstance(String itemNumber,
+ String itemJobId) {
+
+ PublicitemsCommon publicItemsCommon = new PublicitemsCommon();
+ publicItemsCommon.setItemNumber(itemNumber);
+ publicItemsCommon.setContentName("Inventory report-" + itemNumber);
+ publicItemsCommon.setContentId("42640780-82eb-4650-8a70");
+ publicItemsCommon.setContentUri("publicitems/1/7eaf0780-9eeb-af50-9d76/content");
+ publicItemsCommon.setContentCreationJobId(itemJobId);
+ publicItemsCommon.setContentSource(getUTF8DataFragment());
try {
XMLGregorianCalendar expirationDate =
DatatypeFactory.newInstance().newXMLGregorianCalendarDate(2013, 12, 31, 0);
- articlesCommon.setAccessExpirationDate(expirationDate);
+ publicItemsCommon.setContentExpirationDate(expirationDate);
} catch (DatatypeConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
- articlesCommon.setAccessedCount(new BigInteger("3"));
- articlesCommon.setAccessedCountLimit(new BigInteger("5"));
+ publicItemsCommon.setContentAccessedCount(new BigInteger("3"));
+ publicItemsCommon.setContentAccessCountLimit(new BigInteger("5"));
PoxPayloadOut multipart = new PoxPayloadOut(
this.getServicePathComponent());
PayloadOutputPart commonPart = multipart.addPart(
- new ArticleClient().getCommonPartName(), articlesCommon);
+ new PublicItemClient().getCommonPartName(), publicItemsCommon);
if (logger.isDebugEnabled()) {
- logger.debug("To be created, article common:");
- logger.debug(objectAsXmlString(articlesCommon, ArticlesCommon.class));
+ logger.debug("To be created, publicitem common:");
+ logger.debug(objectAsXmlString(publicItemsCommon, PublicitemsCommon.class));
}
return multipart;
@Override
protected PoxPayloadOut createInstance(String commonPartName,
String identifier) {
- PoxPayloadOut result = createArticleInstance(identifier);
+ PoxPayloadOut result = createPublicItemInstance(identifier);
return result;
}
@Override
- protected ArticlesCommon updateInstance(ArticlesCommon commonPartObject) {
+ protected PublicitemsCommon updateInstance(PublicitemsCommon commonPartObject) {
// TODO Auto-generated method stub
return null;
}
@Override
- protected void compareUpdatedInstances(ArticlesCommon original,
- ArticlesCommon updated) throws Exception {
+ protected void compareUpdatedInstances(PublicitemsCommon original,
+ PublicitemsCommon updated) throws Exception {
// TODO Auto-generated method stub
}
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.article</artifactId>
+ <artifactId>org.collectionspace.services.publicitem</artifactId>
<groupId>org.collectionspace.services</groupId>
<version>3.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.article.jaxb</artifactId>
- <name>services.article.jaxb</name>
+ <artifactId>org.collectionspace.services.publicitem.jaxb</artifactId>
+ <name>services.publicitem.jaxb</name>
<dependencies>
<dependency>
</dependencies>
<build>
- <finalName>collectionspace-services-article-jaxb</finalName>
+ <finalName>collectionspace-services-publicitem-jaxb</finalName>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
+++ /dev/null
-/**
- * String constants to access XML element names of the ArticlesCommon class.
- */
-package org.collectionspace.services;
-
-/*
- <xs:element name="articles_common">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="articleNumber" type="xs:string" /> <!-- An ID for the article (different than the CSID) -->
- <xs:element name="articleContentCsid" type="xs:string" /> <!-- The URL of the article's content -->
- <xs:element name="articleJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
- <xs:element name="articleSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the article. -->
- <xs:element name="articlePublisher" type="xs:string" /> <!-- The user who published the article -->
- <xs:element name="accessExpirationDate" type="xs:dateTime" /> <!-- When the article is no longer available for access -->
- <xs:element name="accessedCount" type="xs:integer" /> <!-- How many times the article has been accessed. -->
- <xs:element name="accessCountLimit" type="xs:integer" /> <!-- The maximum times the article can be accessed. -->
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- */
-
-public interface ArticlesCommonJAXBSchema {
- final static String ARTICLE_NUMBER = "articleNumber";
- final static String ARTICLE_CONTENT_NAME = "articleContentName";
- final static String ARTICLE_CONTENT_REPO_ID = "articleContentRepositoryId";
- final static String ARTICLE_CONTENT_URL = "articleContentUrl";
- final static String ARTICLE_JOB_ID = "articleJobId";
- final static String ARTICLE_SOURCE = "articleSource";
- final static String ARTICLE_ACCESS_EXPIRATION_DATE = "accessExpirationDate";
- final static String ARTICLE_ACCESSED_COUNT = "accessedCount";
- final static String ARTICLE_ACCESSED_COUNT_LIMIT = "accesseedCountLimit";
-}
\ No newline at end of file
--- /dev/null
+/**
+ * String constants to access XML element names of the ArticlesCommon class.
+ */
+package org.collectionspace.services;
+
+/*
+ <xs:element name="articles_common">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="itemNumber" type="xs:string" /> <!-- An identifier for the article (different than the CSID) -->
+ <xs:element name="itemContentName" type="xs:string" /> <!-- A name for the article's content -->
+ <xs:element name="itemContentId" type="xs:string" /> <!-- The backend repository ID of the article's content -->
+ <xs:element name="itemContentUri" type="xs:string" /> <!-- The publicly accessible URL of the article's content -->
+ <xs:element name="itemJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
+ <xs:element name="itemSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the article. -->
+ <xs:element name="itemExpirationDate" type="xs:dateTime" /> <!-- When the article is no longer available for access -->
+ <xs:element name="itemCount" type="xs:integer" /> <!-- How many times the article has been accessed. -->
+ <xs:element name="itemCountLimit" type="xs:integer" /> <!-- The maximum times the article can be accessed. -->
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ */
+
+public interface PublicitemsCommonJAXBSchema {
+ final static String ITEM_NUMBER = "itemNumber";
+ final static String ITEM_CONTENT_NAME = "itemContentName";
+ final static String ITEM_CONTENT_REPO_ID = "itemContentId";
+ final static String ITEM_CONTENT_URI = "itemContentUri";
+ final static String ITEM_JOB_ID = "itemJobId";
+ final static String ITEM_SOURCE = "itemSource";
+ final static String ITEM_ACCESS_EXPIRATION_DATE = "itemExpirationDate";
+ final static String ITEM_ACCESSED_COUNT = "itemCount";
+ final static String ITEM_ACCESSED_COUNT_LIMIT = "itemCountLimit";
+}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-<!-- ArticlesCommon XML Schema (XSD) Entity : ArticlesCommon Used for: JAXB
- binding between XML and Java objects $LastChangedRevision$ $LastChangedDate$ -->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0"
- elementFormDefault="unqualified" xmlns:ns="http://collectionspace.org/services/article"
- xmlns="http://collectionspace.org/services/article" targetNamespace="http://collectionspace.org/services/article"
- version="0.1">
-
- <!-- Avoid XmlRootElement nightmare: See http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html -->
- <xs:element name="articles_common">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="articleNumber" type="xs:string" /> <!-- An identifier for the article (different than the CSID) -->
- <xs:element name="articleContentName" type="xs:string" /> <!-- A name for the article's content -->
- <xs:element name="articleContentRepositoryId" type="xs:string" /> <!-- The backend repository ID of the article's content -->
- <xs:element name="articleContentUrl" type="xs:string" /> <!-- The publicly accessible URL of the article's content -->
- <xs:element name="articleJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
- <xs:element name="articleSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the article. -->
- <xs:element name="accessExpirationDate" type="xs:dateTime" /> <!-- When the article is no longer available for access -->
- <xs:element name="accessedCount" type="xs:integer" /> <!-- How many times the article has been accessed. -->
- <xs:element name="accessedCountLimit" type="xs:integer" /> <!-- The maximum times the article can be accessed. -->
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!-- PublicitemsCommon XML Schema (XSD) Entity : PublicitemsCommon Used for: JAXB
+ binding between XML and Java objects $LastChangedRevision$ $LastChangedDate$ -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0"
+ elementFormDefault="unqualified" xmlns:ns="http://collectionspace.org/services/publicitem"
+ xmlns="http://collectionspace.org/services/publicitem" targetNamespace="http://collectionspace.org/services/publicitem"
+ version="0.1">
+
+ <!-- Avoid XmlRootElement nightmare: See http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html -->
+ <xs:element name="publicitems_common">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="itemNumber" type="xs:string" /> <!-- An identifier for the publicitem (different than the CSID) -->
+ <xs:element name="contentName" type="xs:string" /> <!-- A name for the publicitem's content -->
+ <xs:element name="contentId" type="xs:string" /> <!-- The the ID of the content blob in the back-end repository -->
+ <xs:element name="contentUri" type="xs:string" /> <!-- The publicly accessible URL of the publicitem's content -->
+ <xs:element name="contentCreationJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
+ <xs:element name="contentSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the publicitem. -->
+ <xs:element name="contentExpirationDate" type="xs:dateTime" /> <!-- When the publicitem is no longer available for access -->
+ <xs:element name="contentAccessedCount" type="xs:integer" /> <!-- How many times the publicitem has been accessed. -->
+ <xs:element name="contentAccessCountLimit" type="xs:integer" /> <!-- The maximum times the publicitem can be accessed. -->
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.article</artifactId>
- <name>services.article</name>
+ <artifactId>org.collectionspace.services.publicitem</artifactId>
+ <name>services.publicitem</name>
<packaging>pom</packaging>
<dependencies>
<parent>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article</artifactId>
+ <artifactId>org.collectionspace.services.publicitem</artifactId>
<version>3.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.article.service</artifactId>
- <name>services.article.service</name>
+ <artifactId>org.collectionspace.services.publicitem.service</artifactId>
+ <name>services.publicitem.service</name>
<packaging>jar</packaging>
<dependencies>
</dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article.jaxb</artifactId>
+ <artifactId>org.collectionspace.services.publicitem.jaxb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.article.client</artifactId>
+ <artifactId>org.collectionspace.services.publicitem.client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
</dependencies>
<build>
- <finalName>collectionspace-services-article</finalName>
+ <finalName>collectionspace-services-publicitem</finalName>
</build>
</project>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.article.nuxeo;
+package org.collectionspace.services.publicitem.nuxeo;
/**
* ArticleConstants specifies constants for the Articles In service
*
*/
-public class ArticleConstants {
+public class PublicItemConstants {
public final static String NUXEO_DOCTYPE = "Article";
public final static String NUXEO_SCHEMA_NAME = "article";
public final static String NUXEO_DC_TITLE = "CollectionSpace-Article";
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.article.nuxeo;
+package org.collectionspace.services.publicitem.nuxeo;
-import org.collectionspace.services.ArticlesCommonJAXBSchema;
-import org.collectionspace.services.article.ArticlesCommon;
-import org.collectionspace.services.client.ArticleClient;
+import javax.ws.rs.core.UriInfo;
+
+import org.collectionspace.services.PublicitemsCommonJAXBSchema;
+import org.collectionspace.services.article.PublicitemsCommon;
+import org.collectionspace.services.client.PublicItemClient;
import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
import org.nuxeo.ecm.core.api.DocumentModel;
* $LastChangedRevision$
* $LastChangedDate$
*/
-public class ArticleDocumentModelHandler
- extends DocHandlerBase<ArticlesCommon> {
+public class PublicItemDocumentModelHandler
+ extends DocHandlerBase<PublicitemsCommon> {
@Override
public void fillAllParts(DocumentWrapper<DocumentModel> wrapDoc, Action action) throws Exception {
// add it now.
//
DocumentModel documentModel = wrapDoc.getWrappedObject();
- String url = (String) documentModel.getProperty(ArticleClient.SERVICE_COMMON_PART_NAME,
- ArticlesCommonJAXBSchema.ARTICLE_CONTENT_URL);
- url = url.replace(ArticleClient.CSID_PATH_PARAM_VAR, documentModel.getName());
- documentModel.setProperty(ArticleClient.SERVICE_COMMON_PART_NAME,
- ArticlesCommonJAXBSchema.ARTICLE_CONTENT_URL, url);
+ String url = (String) documentModel.getProperty(PublicItemClient.SERVICE_COMMON_PART_NAME,
+ PublicitemsCommonJAXBSchema.ITEM_CONTENT_URI);
+ url = url.replace(PublicItemClient.CSID_PATH_PARAM_VAR, documentModel.getName());
+ documentModel.setProperty(PublicItemClient.SERVICE_COMMON_PART_NAME,
+ PublicitemsCommonJAXBSchema.ITEM_CONTENT_URI, url);
}
+
+ @Override
+ public void extractAllParts(DocumentWrapper<DocumentModel> wrapDoc)
+ throws Exception {
+ //
+ // Replace the URI with a fully qualified URL
+ //
+ DocumentModel documentModel = wrapDoc.getWrappedObject();
+ String itemContentUri = (String) documentModel.getProperty(PublicItemClient.SERVICE_COMMON_PART_NAME,
+ PublicitemsCommonJAXBSchema.ITEM_CONTENT_URI);
+ UriInfo uriInfo = this.getServiceContext().getUriInfo();
+ String baseUrl = uriInfo.getBaseUri().toString();
+ String url = String.format("%s%s", baseUrl, itemContentUri);
+ documentModel.setProperty(PublicItemClient.SERVICE_COMMON_PART_NAME,
+ PublicitemsCommonJAXBSchema.ITEM_CONTENT_URI, url);
+ }
}
-package org.collectionspace.services.article.nuxeo;
+package org.collectionspace.services.publicitem.nuxeo;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.InvalidDocumentException;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
-public class ArticleValidatorHandler implements ValidatorHandler<PoxPayloadIn, PoxPayloadOut> {
+public class PublicItemValidatorHandler implements ValidatorHandler<PoxPayloadIn, PoxPayloadOut> {
@Override
public void validate(Action action, ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx)
throws InvalidDocumentException {
// TODO Auto-generated method stub
- System.out.println("ArticleValidatorHandler executed.");
+ System.out.println("PublicItemValidatorHandler executed.");
}
package org.collectionspace.services.test;
-//import org.collectionspace.services.article.Article;
-//import org.collectionspace.services.article.ArticleList;
-
/**
* Placeholder for server-side testing of Articles service code.
*
* @version $Revision$
*/
-public class ArticleServiceTest {
+public class PublicItemServiceTest {
//empty
}
*/
package org.collectionspace.services.blob;
-import org.collectionspace.services.article.ArticlesCommon;
+import org.collectionspace.services.article.PublicitemsCommon;
import org.collectionspace.services.client.BlobClient;
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PayloadPart;
BlobsCommon blobsCommon = getBlobsCommon(csid);
StringBuffer mimeType = new StringBuffer();
InputStream contentStream = getBlobContent(ctx, csid, null /*derivative term*/, mimeType /*will get set*/);
- result = ArticleUtil.publishToRepository((ArticlesCommon)null, resourceMap, uriInfo,
+ result = ArticleUtil.publishToRepository((PublicitemsCommon)null, resourceMap, uriInfo,
getRepositoryClient(ctx), ctx, contentStream, blobsCommon.getName());
} catch (Exception e) {
throw bigReThrow(e, ServiceMessages.PUT_FAILED);
BlobsCommon blobsCommon = getBlobsCommon(csid);
StringBuffer mimeType = new StringBuffer();
InputStream contentStream = getBlobContent(ctx, csid, derivativeTerm, mimeType);
- result = ArticleUtil.publishToRepository((ArticlesCommon)null, resourceMap, uriInfo,
+ result = ArticleUtil.publishToRepository((PublicitemsCommon)null, resourceMap, uriInfo,
getRepositoryClient(ctx), ctx, contentStream, blobsCommon.getName());
} catch (Exception e) {
throw bigReThrow(e, ServiceMessages.CREATE_FAILED);
import java.io.InputStream;
import org.collectionspace.authentication.spi.AuthNContext;
-import org.collectionspace.services.article.ArticlesCommon;
-import org.collectionspace.services.client.ArticleClient;
+import org.collectionspace.services.article.PublicitemsCommon;
+import org.collectionspace.services.client.PublicItemClient;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.common.ResourceBase;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-@Path(ArticleClient.SERVICE_PATH)
+@Path(PublicItemClient.SERVICE_PATH)
@Consumes("application/xml")
@Produces("application/xml")
public class ArticleResource extends ResourceBase {
@Override
public String getServiceName() {
- return ArticleClient.SERVICE_NAME;
+ return PublicItemClient.SERVICE_NAME;
}
@Override
- public Class<ArticlesCommon> getCommonPartClass() {
- return ArticlesCommon.class;
+ public Class<PublicitemsCommon> getCommonPartClass() {
+ return PublicitemsCommon.class;
}
@Override
}
@GET
- @Path("/{csid}/{tenantId}/" + ArticleClient.PUBLICITEMS_CONTENT_SUFFIX) // "content"
+ @Path("/{csid}/{tenantId}/" + PublicItemClient.PUBLICITEMS_CONTENT_SUFFIX) // "content"
public Response getPublishedResource(
@Context Request request,
@Context UriInfo uriInfo,
//
RemoteServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = (RemoteServiceContext<PoxPayloadIn, PoxPayloadOut>) createServiceContext(uriInfo);
PoxPayloadOut poxPayloadOut = get(csid, ctx);
- ArticlesCommon articlesCommon = (ArticlesCommon)poxPayloadOut.getPart(ArticleClient.SERVICE_COMMON_PART_NAME).getBody();
+ PublicitemsCommon articlesCommon = (PublicitemsCommon)poxPayloadOut.getPart(PublicItemClient.SERVICE_COMMON_PART_NAME).getBody();
//
// Get the repository blob ID and retrieve the content as a stream
//
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-import org.collectionspace.services.article.ArticlesCommon;
+import org.collectionspace.services.article.PublicitemsCommon;
import org.collectionspace.services.blob.BlobsCommon;
-import org.collectionspace.services.client.ArticleClient;
+import org.collectionspace.services.client.PublicItemClient;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.common.ResourceMap;
/*
* Sets common fields for an ArticlesCommon instance
*/
- private static ArticlesCommon setArticlesCommonMetadata(
- ArticlesCommon articlesCommon,
+ private static PublicitemsCommon setArticlesCommonMetadata(
+ PublicitemsCommon articlesCommon,
UriInfo uriInfo,
ServiceContext<PoxPayloadIn, PoxPayloadOut> parentCtx) {
- ArticlesCommon result = articlesCommon;
+ PublicitemsCommon result = articlesCommon;
if (result == null) {
- result = new ArticlesCommon(); // If they passed in null, we'll create a new instance
+ result = new PublicitemsCommon(); // If they passed in null, we'll create a new instance
}
- String articleSource = result.getArticleSource();
- if (articleSource == null || articleSource.trim().isEmpty()) {
+ String itemSource = result.getItemSource();
+ if (itemSource == null || itemSource.trim().isEmpty()) {
String publishingService = parentCtx.getServiceName(); // Overrides any existing value
- result.setArticleSource(publishingService);
+ result.setItemSource(publishingService);
}
- String publicUrl = String.format("%s%s/%s/%s/%s", // e.g., http://{base url}/articles/{csid}/{tenant ID}/content
- uriInfo.getBaseUri().toString(), // the base part of the URL
- ArticleClient.SERVICE_NAME, // the base service path to the Article service
- ArticleClient.CSID_PATH_PARAM_VAR, // the {csid} param part that will be filled in later in ArticleDocumentModelHandler.fillAllParts() method
- parentCtx.getTenantId(), // the tenant ID part
- ArticleClient.PUBLICITEMS_CONTENT_SUFFIX); // the final "content" suffix
- result.setArticleContentUrl(publicUrl);
+ String publicUri = String.format("%s/%s/%s/%s", // e.g., publicitems/{csid}/{tenant ID}/content
+// uriInfo.getBaseUri().toString(), // the base part of the URL
+ PublicItemClient.SERVICE_NAME, // the base service path to the Article service
+ PublicItemClient.CSID_PATH_PARAM_VAR, // the {csid} param part that will be filled in later in ArticleDocumentModelHandler.fillAllParts() method
+ parentCtx.getTenantId(), // the tenant ID part
+ PublicItemClient.PUBLICITEMS_CONTENT_SUFFIX); // the final "content" suffix
+ result.setItemContentUri(publicUri);
return result;
}
* Publishes a PoxPayloadOut instance for public access
*/
public static Response publishToRepository(
- ArticlesCommon articlesCommon,
+ PublicitemsCommon articlesCommon,
ResourceMap resourceMap,
UriInfo uriInfo,
ServiceContext<PoxPayloadIn, PoxPayloadOut> parentCtx,
Response result = null;
articlesCommon = setArticlesCommonMetadata(articlesCommon, uriInfo, parentCtx);
- PoxPayloadIn input = new PoxPayloadIn(ArticleClient.SERVICE_PAYLOAD_NAME, articlesCommon,
- ArticleClient.SERVICE_COMMON_PART_NAME);
+ PoxPayloadIn input = new PoxPayloadIn(PublicItemClient.SERVICE_PAYLOAD_NAME, articlesCommon,
+ PublicItemClient.SERVICE_COMMON_PART_NAME);
ArticleResource articleResource = new ArticleResource();
result = articleResource.create(parentCtx, resourceMap, uriInfo, input.getXmlPayload());
* Publishes a a byte stream for public access
*/
public static Response publishToRepository(
- ArticlesCommon articlesCommon,
+ PublicitemsCommon articlesCommon,
ResourceMap resourceMap,
UriInfo uriInfo,
RepositoryClient<PoxPayloadIn, PoxPayloadOut> repositoryClient,
inputStream, streamName, false);
articlesCommon = setArticlesCommonMetadata(articlesCommon, uriInfo, parentCtx);
- articlesCommon.setArticleContentRepositoryId(blobsCommon.getRepositoryId());
- articlesCommon.setArticleContentName(streamName);
+ articlesCommon.setItemContentId(blobsCommon.getRepositoryId());
+ articlesCommon.setItemContentName(streamName);
- PoxPayloadOut poxPayloadOut = new PoxPayloadOut(ArticleClient.SERVICE_PAYLOAD_NAME);
- poxPayloadOut.addPart(ArticleClient.SERVICE_COMMON_PART_NAME, articlesCommon);
+ PoxPayloadOut poxPayloadOut = new PoxPayloadOut(PublicItemClient.SERVICE_PAYLOAD_NAME);
+ poxPayloadOut.addPart(PublicItemClient.SERVICE_COMMON_PART_NAME, articlesCommon);
ArticleResource articleResource = new ArticleResource();
result = articleResource.create(parentCtx, resourceMap, uriInfo, poxPayloadOut.toXML());
import org.collectionspace.services.common.api.CommonAPI;
import org.collectionspace.services.common.api.RefNameUtils;
import org.collectionspace.services.common.api.Tools;
-import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils;
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.AuthRefConfigInfo;
import org.collectionspace.services.config.service.DocHandlerParams;
import org.collectionspace.services.config.service.ListResultField;
import org.collectionspace.services.config.service.ObjectPartType;
-import org.collectionspace.services.config.service.ServiceBindingType;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.collectionspace.services.relation.RelationsCommon;
import org.collectionspace.services.relation.RelationsCommonList;
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.report.nuxeo.ReportDocumentModelHandler;
-import org.collectionspace.services.article.ArticlesCommon;
+import org.collectionspace.services.article.PublicitemsCommon;
import org.collectionspace.services.client.IQueryManager;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
StringBuffer outReportFileName = new StringBuffer();
ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
InputStream reportInputStream = invokeReport(ctx, csid, invContext, outMimeType, outReportFileName);
- response = ArticleUtil.publishToRepository((ArticlesCommon)null, resourceMap, uriInfo, getRepositoryClient(ctx), ctx,
+ response = ArticleUtil.publishToRepository((PublicitemsCommon)null, resourceMap, uriInfo, getRepositoryClient(ctx), ctx,
reportInputStream, outReportFileName.toString());
} catch (Exception e) {
throw bigReThrow(e, ServiceMessages.POST_FAILED);