diff --git a/3rdparty/ant/build.xml b/3rdparty/ant/build.xml
new file mode 100644
index 0000000000..77f80a502d
--- /dev/null
+++ b/3rdparty/ant/build.xml
@@ -0,0 +1,23 @@
+
+ Collectionspace Services - Ant Libs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/ant/pom.xml b/3rdparty/ant/pom.xml
new file mode 100644
index 0000000000..422ad4da36
--- /dev/null
+++ b/3rdparty/ant/pom.xml
@@ -0,0 +1,22 @@
+
+
+
+ org.collectionspace.services
+ org.collectionspace.services.3rdparty
+ ${revision}
+
+
+ 4.0.0
+ org.collectionspace.services.3rdparty.ant-lib
+ collectionspace.3rdparty.ant-lib
+ pom
+
+
+
+ org.openjdk.nashorn
+ nashorn-core
+ 15.7
+
+
+
diff --git a/3rdparty/nuxeo/nuxeo-platform-elasticsearch/src/main/java/org/collectionspace/services/nuxeo/elasticsearch/DefaultESDocumentWriter.java b/3rdparty/nuxeo/nuxeo-platform-elasticsearch/src/main/java/org/collectionspace/services/nuxeo/elasticsearch/DefaultESDocumentWriter.java
index e9dea8ffed..c8c3f01382 100644
--- a/3rdparty/nuxeo/nuxeo-platform-elasticsearch/src/main/java/org/collectionspace/services/nuxeo/elasticsearch/DefaultESDocumentWriter.java
+++ b/3rdparty/nuxeo/nuxeo-platform-elasticsearch/src/main/java/org/collectionspace/services/nuxeo/elasticsearch/DefaultESDocumentWriter.java
@@ -12,29 +12,25 @@
import java.util.Map;
import java.util.Set;
-import javax.ws.rs.core.HttpHeaders;
-
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.IntNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.databind.node.TextNode;
import org.apache.commons.lang3.StringUtils;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.node.IntNode;
-import org.codehaus.jackson.node.ObjectNode;
-import org.codehaus.jackson.node.TextNode;
import org.collectionspace.services.common.api.RefNameUtils;
-import org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter;
import org.nuxeo.ecm.core.api.CoreSession;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
+import org.nuxeo.elasticsearch.io.JsonESDocumentWriter;
public class DefaultESDocumentWriter extends JsonESDocumentWriter {
- private static ObjectMapper objectMapper = new ObjectMapper();
+ private static final ObjectMapper objectMapper = new ObjectMapper();
@Override
- public void writeDoc(JsonGenerator jg, DocumentModel doc, String[] schemas,
- Map contextParameters, HttpHeaders headers)
- throws IOException {
-
+ public void writeESDocument(JsonGenerator jg, DocumentModel doc, String[] schemas,
+ Map contextParameters) throws IOException {
ObjectNode denormValues = getDenormValues(doc);
jg.writeStartObject();
@@ -42,7 +38,7 @@ public void writeDoc(JsonGenerator jg, DocumentModel doc, String[] schemas,
writeSystemProperties(jg, doc);
writeSchemas(jg, doc, schemas);
writeContextParameters(jg, doc, contextParameters);
- writeDenormValues(jg, doc, denormValues);
+ writeDenormValues(jg, denormValues);
jg.writeEndObject();
jg.flush();
@@ -90,13 +86,13 @@ public ObjectNode getDenormValues(DocumentModel doc) {
return denormValues;
}
- public void writeDenormValues(JsonGenerator jg, DocumentModel doc, ObjectNode denormValues) throws IOException {
- if (denormValues != null && denormValues.size() > 0) {
+ public void writeDenormValues(JsonGenerator jg, ObjectNode denormValues) throws IOException {
+ if (denormValues != null && !denormValues.isEmpty()) {
if (jg.getCodec() == null) {
jg.setCodec(objectMapper);
}
- Iterator> entries = denormValues.getFields();
+ Iterator> entries = denormValues.fields();
while (entries.hasNext()) {
Map.Entry entry = entries.next();
@@ -112,29 +108,26 @@ private void denormMediaRecords(CoreSession session, String csid, String tenantI
String relatedRecordQuery = String.format("SELECT * FROM Relation WHERE relations_common:subjectCsid = '%s' AND relations_common:objectDocumentType = 'Media' AND ecm:currentLifeCycleState = 'project' AND collectionspace_core:tenantId = '%s'", csid, tenantId);
DocumentModelList relationDocs = session.query(relatedRecordQuery);
- List mediaCsids = new ArrayList();
- List mediaAltTexts = new ArrayList();
+ List mediaCsids = new ArrayList<>();
+ List mediaAltTexts = new ArrayList<>();
if (relationDocs.size() > 0) {
- Iterator iterator = relationDocs.iterator();
+ for (DocumentModel relationDoc : relationDocs) {
+ String mediaCsid = (String) relationDoc.getProperty("relations_common", "objectCsid");
+ DocumentModel mediaDoc = getRecordByCsid(session, tenantId, "Media", mediaCsid);
- while (iterator.hasNext()) {
- DocumentModel relationDoc = iterator.next();
- String mediaCsid = (String) relationDoc.getProperty("relations_common", "objectCsid");
- DocumentModel mediaDoc = getRecordByCsid(session, tenantId, "Media", mediaCsid);
+ if (isMediaPublished(mediaDoc)) {
+ mediaCsids.add(new TextNode(mediaCsid));
- if (isMediaPublished(mediaDoc)) {
- mediaCsids.add(new TextNode(mediaCsid));
+ String altText = (String) mediaDoc.getProperty("media_common", "altText");
- String altText = (String) mediaDoc.getProperty("media_common", "altText");
+ if (altText == null) {
+ altText = "";
+ }
- if (altText == null) {
- altText = "";
- }
-
- mediaAltTexts.add(new TextNode(altText));
- }
- }
+ mediaAltTexts.add(new TextNode(altText));
+ }
+ }
}
denormValues.putArray("mediaCsid").addAll(mediaCsids);
@@ -149,19 +142,16 @@ private void denormRelatedObjects(CoreSession session, String csid, String tenan
"SELECT * FROM Relation WHERE relations_common:objectCsid = '%s' AND relations_common:subjectDocumentType = 'CollectionObject' AND ecm:currentLifeCycleState = 'project' AND collectionspace_core:tenantId = '%s'",
csid, tenantId);
DocumentModelList relationDocs = session.query(relatedRecordQuery);
- List objectCsids = new ArrayList();
+ List objectCsids = new ArrayList<>();
if (relationDocs.size() > 0) {
- Iterator iterator = relationDocs.iterator();
-
- while (iterator.hasNext()) {
- DocumentModel relationDoc = iterator.next();
- String objectCsid = (String) relationDoc.getProperty("relations_common", "subjectCsid");
+ for (DocumentModel relationDoc : relationDocs) {
+ String objectCsid = (String) relationDoc.getProperty("relations_common", "subjectCsid");
- if (objectCsid != null) {
- objectCsids.add(new TextNode(objectCsid));
- }
- }
+ if (objectCsid != null) {
+ objectCsids.add(new TextNode(objectCsid));
+ }
+ }
}
denormValues.putArray("objectCsid").addAll(objectCsids);
@@ -172,20 +162,17 @@ private void denormAcquisitionRecords(CoreSession session, String csid, String t
String relatedRecordQuery = String.format("SELECT * FROM Relation WHERE relations_common:subjectCsid = '%s' AND relations_common:objectDocumentType = 'Acquisition' AND ecm:currentLifeCycleState = 'project' AND collectionspace_core:tenantId = '%s'", csid, tenantId);
DocumentModelList relationDocs = session.query(relatedRecordQuery);
- List creditLines = new ArrayList();
+ List creditLines = new ArrayList<>();
if (relationDocs.size() > 0) {
- Iterator iterator = relationDocs.iterator();
-
- while (iterator.hasNext()) {
- DocumentModel relationDoc = iterator.next();
- String acquisitionCsid = (String) relationDoc.getProperty("relations_common", "objectCsid");
- String creditLine = getCreditLine(session, tenantId, acquisitionCsid);
-
- if (creditLine != null && creditLine.length() > 0) {
- creditLines.add(new TextNode(creditLine));
- }
- }
+ for (DocumentModel relationDoc : relationDocs) {
+ String acquisitionCsid = (String) relationDoc.getProperty("relations_common", "objectCsid");
+ String creditLine = getCreditLine(session, tenantId, acquisitionCsid);
+
+ if (creditLine != null && !creditLine.isEmpty()) {
+ creditLines.add(new TextNode(creditLine));
+ }
+ }
}
denormValues.putArray("creditLine").addAll(creditLines);
@@ -196,30 +183,27 @@ private void denormExhibitionRecords(CoreSession session, String csid, String te
String relatedRecordQuery = String.format("SELECT * FROM Relation WHERE relations_common:subjectCsid = '%s' AND relations_common:objectDocumentType = 'Exhibition' AND ecm:currentLifeCycleState = 'project' AND collectionspace_core:tenantId = '%s'", csid, tenantId);
DocumentModelList relationDocs = session.query(relatedRecordQuery);
- List exhibitions = new ArrayList();
+ List exhibitions = new ArrayList<>();
if (relationDocs.size() > 0) {
- Iterator iterator = relationDocs.iterator();
+ for (DocumentModel relationDoc : relationDocs) {
+ String exhibitionCsid = (String) relationDoc.getProperty("relations_common", "objectCsid");
+ DocumentModel exhibitionDoc = getRecordByCsid(session, tenantId, "Exhibition", exhibitionCsid);
- while (iterator.hasNext()) {
- DocumentModel relationDoc = iterator.next();
- String exhibitionCsid = (String) relationDoc.getProperty("relations_common", "objectCsid");
- DocumentModel exhibitionDoc = getRecordByCsid(session, tenantId, "Exhibition", exhibitionCsid);
+ if (exhibitionDoc != null && isExhibitionPublished(exhibitionDoc)) {
+ ObjectNode exhibitionNode = objectMapper.createObjectNode();
- if (exhibitionDoc != null && isExhibitionPublished(exhibitionDoc)) {
- ObjectNode exhibitionNode = objectMapper.createObjectNode();
+ String title = (String) exhibitionDoc.getProperty("exhibitions_common", "title");
+ String generalNote = (String) exhibitionDoc.getProperty("exhibitions_common", "generalNote");
+ String curatorialNote = (String) exhibitionDoc.getProperty("exhibitions_common", "curatorialNote");
- String title = (String) exhibitionDoc.getProperty("exhibitions_common", "title");
- String generalNote = (String) exhibitionDoc.getProperty("exhibitions_common", "generalNote");
- String curatorialNote = (String) exhibitionDoc.getProperty("exhibitions_common", "curatorialNote");
+ exhibitionNode.put("title", title);
+ exhibitionNode.put("generalNote", generalNote);
+ exhibitionNode.put("curatorialNote", curatorialNote);
- exhibitionNode.put("title", title);
- exhibitionNode.put("generalNote", generalNote);
- exhibitionNode.put("curatorialNote", curatorialNote);
-
- exhibitions.add(exhibitionNode);
- }
- }
+ exhibitions.add(exhibitionNode);
+ }
+ }
}
denormValues.putArray("exhibition").addAll(exhibitions);
@@ -376,15 +360,14 @@ private boolean isPublished(DocumentModel doc, String publishedFieldPart, String
List publishToValues = (List) doc.getProperty(publishedFieldPart, publishedFieldName);
if (publishToValues != null) {
- for (int i=0; i structDateToYearNodes(Map structDate) {
}
protected List structDatesToYearNodes(List
+ * Might be worth exploring if this should be a ContextResolver instead of a singleton.
+ *
+ * @since 9.0.0
+ */
+public class JAXBContextCache {
+ private static final JAXBContextCache INSTANCE = new JAXBContextCache();
+
+ /**
+ * Store a cache of JAXBContexts so that the namespace does not get polluted when marshalling
+ *
+ * TODO: Class or String? String gets us support for package based JAXBContext, which means fewer instances total
+ */
+ ConcurrentHashMap contextCache = new ConcurrentHashMap<>();
+
+ private JAXBContextCache() {
+ }
+
+ public static JAXBContextCache getInstance() {
+ return INSTANCE;
+ }
+
+ public JAXBContext getCachedJAXBContext(final Class> type) throws JAXBException {
+ final var packageName = type.getPackageName();
+ return getCachedJAXBContext(packageName);
+ }
+
+ public JAXBContext getCachedJAXBContext(final String packageName) throws JAXBException {
+ // avoid computeIfAbsent b/c newInstance can throw an exception
+ JAXBContext context = contextCache.get(packageName);
+ if (context == null) {
+ context = JAXBContext.newInstance(packageName);
+ contextCache.putIfAbsent(packageName, context);
+ }
+ return context;
+ }
+}
diff --git a/services/common-http/src/main/java/org/collectionspace/services/common/provider/JakartaJAXBProvider.java b/services/common-http/src/main/java/org/collectionspace/services/common/provider/JakartaJAXBProvider.java
new file mode 100644
index 0000000000..af328de192
--- /dev/null
+++ b/services/common-http/src/main/java/org/collectionspace/services/common/provider/JakartaJAXBProvider.java
@@ -0,0 +1,103 @@
+package org.collectionspace.services.common.provider;
+
+import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.stream.StreamSource;
+
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlType;
+import org.collectionspace.services.common.jaxb.JAXBContextCache;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A MessageBodyWriter which can use the Jakarta XML bindings. This should only be necessary while we are on RESTEasy 5;
+ * once we move to 6 and have other Jakarta specs available we can use the provided writers.
+ *
+ * Additionally, this only supports marshalling {@link XmlRootElement}. We only have a few JAXB classes to support, and
+ * while some were previously annotated with {@link XmlType} I'm not really sure why. Supporting XmlTypes requires some
+ * reflection, instantiating the ObjectFactory, and wrapping the provided object T in a JAXBElement. If we do end up
+ * needing additional support, it would be better to have a separate provider which is created.
+ *
+ * @param The class type for the JAXB object
+ * @since 9.0.0
+ */
+@Provider
+@Produces({ "application/xml", "application/*+xml", "text/xml", "text/*+xml" })
+public class JakartaJAXBProvider implements MessageBodyWriter, MessageBodyReader {
+
+ private static final Logger logger = LoggerFactory.getLogger(JakartaJAXBProvider.class);
+
+ @Override
+ public boolean isWriteable(Class> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
+ return type.isAnnotationPresent(XmlRootElement.class);
+ }
+
+ @Override
+ public boolean isReadable(Class> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
+ return type.isAnnotationPresent(XmlRootElement.class);
+ }
+
+ @Override
+ public void writeTo(T t, Class> type, Type genericType, Annotation[] annotations, MediaType mediaType,
+ MultivaluedMap multivaluedMap, OutputStream outputStream)
+ throws WebApplicationException {
+ try {
+ final var context = JAXBContextCache.getInstance().getCachedJAXBContext(type);
+ final var marshaller = context.createMarshaller();
+ marshaller.marshal(t, outputStream);
+ } catch (JAXBException e) {
+ logger.error("Unable to marshal JAXB Object {}", type.getSimpleName(), e);
+ final var response = Response.status(INTERNAL_SERVER_ERROR).build();
+ throw new WebApplicationException(response);
+ }
+ }
+
+ @Override
+ public T readFrom(Class type, Type genericType, Annotation[] annotations, MediaType mediaType,
+ MultivaluedMap httpHeaders, InputStream entityStream)
+ throws WebApplicationException {
+ try {
+ final var xmlInputFactory = XMLInputFactory.newFactory();
+ xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
+ xmlInputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
+
+ final XMLStreamReader xmlStream;
+ final var context = JAXBContextCache.getInstance().getCachedJAXBContext(type);
+ final var unmarshaller = context.createUnmarshaller();
+ if (mediaType != null && mediaType.getParameters().get("charset") == null) {
+ xmlStream = xmlInputFactory.createXMLStreamReader(new StreamSource(
+ new InputStreamReader(entityStream, StandardCharsets.UTF_8)));
+ } else {
+ xmlStream = xmlInputFactory.createXMLStreamReader(new StreamSource(entityStream));
+ }
+ return (T) unmarshaller.unmarshal(xmlStream);
+ } catch (JAXBException e) {
+ logger.error("Unable to unmarshal JAXB Object {}", type.getSimpleName(), e);
+ final var response = Response.status(INTERNAL_SERVER_ERROR).build();
+ throw new WebApplicationException(response);
+ } catch (XMLStreamException e) {
+ logger.error("Unable to create XMLStreamReader for JAXB Object {}", type.getSimpleName(), e);
+ final var response = Response.status(INTERNAL_SERVER_ERROR).build();
+ throw new WebApplicationException(response);
+ }
+ }
+}
diff --git a/services/common-test/pom.xml b/services/common-test/pom.xml
index 61cd855172..eb4a1a2176 100644
--- a/services/common-test/pom.xml
+++ b/services/common-test/pom.xml
@@ -31,11 +31,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/common/pom.xml b/services/common/pom.xml
index 7dc3204024..11cb0b1495 100644
--- a/services/common/pom.xml
+++ b/services/common/pom.xml
@@ -64,8 +64,6 @@
org.collectionspace.services.publicitem.jaxb
${project.version}
-
org.collectionspace.services
org.collectionspace.services.jaxb
@@ -140,10 +138,16 @@
2.0.1
- commons-dbcp
- commons-dbcp
- 1.3-RC1
+ org.apache.commons
+ commons-dbcp2
+ 2.13.0
provided
+
+
+ jakarta.transaction
+ jakarta.transaction-api
+
+
commons-codec
@@ -173,8 +177,8 @@
provided
- javax.xml.bind
- jaxb-api
+ jakarta.xml.bind
+ jakarta.xml.bind-api
javax.security
@@ -195,17 +199,13 @@
javax.persistence
- persistence-api
+ javax.persistence-api
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
@@ -230,40 +230,24 @@
- org.nuxeo.binary.metadata
+ org.nuxeo.ecm.platform
nuxeo-binary-metadata
- ${nuxeo.platform.version}
+ ${nuxeo.general.release}
org.nuxeo.lib.runtime
nuxeo-runtime-launcher
- ${nuxeo.platform.version}
-
-
- org.nuxeo.ecm.platform
- nuxeo-platform-types-api
- ${nuxeo.platform.version}
+ ${nuxeo.general.release}
org.nuxeo.ecm.platform
- nuxeo-platform-types-core
- ${nuxeo.platform.version}
+ nuxeo-platform-types
+ ${nuxeo.general.release}
org.nuxeo.ecm.platform
nuxeo-platform-imaging-core
- ${nuxeo.platform.version}
-
-
- org.nuxeo.ecm.platform
- nuxeo-platform-imaging-api
- ${nuxeo.platform.version}
- provided
-
-
- org.nuxeo.ecm.platform
- nuxeo-platform-filemanager-api
- ${nuxeo.platform.version}
+ ${nuxeo.general.release}
org.nuxeo.common
@@ -281,7 +265,7 @@
org.nuxeo.ecm.core
nuxeo-core-query
- ${nuxeo.core.version}
+ ${nuxeo.general.release}
org.nuxeo.ecm.core
@@ -291,12 +275,6 @@
org.nuxeo.ecm.core
nuxeo-core-storage-sql
-
org.nuxeo.ecm.core
nuxeo-core-convert
@@ -304,7 +282,7 @@
org.nuxeo.runtime
nuxeo-runtime-osgi
- ${nuxeo.core.version}
+ ${nuxeo.general.release}
org.nuxeo.ecm.core
@@ -329,6 +307,15 @@
com.sun.xml.ws
jaxws-rt
+
+ javax.xml.bind
+ jaxb-api
+
+
+
+ org.codehaus.woodstox
+ woodstox-core-asl
+
@@ -419,8 +406,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/common/src/main/cspace/config/services/tenants/anthro/anthro-tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/anthro/anthro-tenant-bindings.delta.xml
index 5d2b1c2844..e2510418d3 100644
--- a/services/common/src/main/cspace/config/services/tenants/anthro/anthro-tenant-bindings.delta.xml
+++ b/services/common/src/main/cspace/config/services/tenants/anthro/anthro-tenant-bindings.delta.xml
@@ -44,9 +44,6 @@
// index as small as possible. We may want to turn this on in the future, to support arbitrary
// searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
"dynamic": false,
- "_all" : {
- "enabled": false
- },
"_source": {
"includes": [
"collectionobjects_common:briefDescriptions",
diff --git a/services/common/src/main/cspace/config/services/tenants/bonsai/bonsai-tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/bonsai/bonsai-tenant-bindings.delta.xml
index 2f12109df3..976c9ef2c0 100644
--- a/services/common/src/main/cspace/config/services/tenants/bonsai/bonsai-tenant-bindings.delta.xml
+++ b/services/common/src/main/cspace/config/services/tenants/bonsai/bonsai-tenant-bindings.delta.xml
@@ -15,9 +15,6 @@
// index as small as possible. We may want to turn this on in the future, to support arbitrary
// searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
"dynamic": false,
- "_all" : {
- "enabled": false
- },
"_source": {
"includes": [
"collectionobjects_common:briefDescriptions",
diff --git a/services/common/src/main/cspace/config/services/tenants/fcart/fcart-tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/fcart/fcart-tenant-bindings.delta.xml
index 0045ce0287..a449679117 100644
--- a/services/common/src/main/cspace/config/services/tenants/fcart/fcart-tenant-bindings.delta.xml
+++ b/services/common/src/main/cspace/config/services/tenants/fcart/fcart-tenant-bindings.delta.xml
@@ -24,9 +24,6 @@
// index as small as possible. We may want to turn this on in the future, to support arbitrary
// searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
"dynamic": false,
- "_all" : {
- "enabled": false
- },
"_source": {
"includes": [
"collectionobjects_common:briefDescriptions",
diff --git a/services/common/src/main/cspace/config/services/tenants/lhmc/lhmc-tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/lhmc/lhmc-tenant-bindings.delta.xml
index f836218cc5..71b91a369f 100644
--- a/services/common/src/main/cspace/config/services/tenants/lhmc/lhmc-tenant-bindings.delta.xml
+++ b/services/common/src/main/cspace/config/services/tenants/lhmc/lhmc-tenant-bindings.delta.xml
@@ -15,9 +15,6 @@
// index as small as possible. We may want to turn this on in the future, to support arbitrary
// searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
"dynamic": false,
- "_all" : {
- "enabled": false
- },
"_source": {
"includes": [
"collectionobjects_common:briefDescriptions",
diff --git a/services/common/src/main/cspace/config/services/tenants/materials/materials-tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/materials/materials-tenant-bindings.delta.xml
index 64e57db8e8..771e303a78 100644
--- a/services/common/src/main/cspace/config/services/tenants/materials/materials-tenant-bindings.delta.xml
+++ b/services/common/src/main/cspace/config/services/tenants/materials/materials-tenant-bindings.delta.xml
@@ -19,9 +19,6 @@
// index as small as possible. We may want to turn this on in the future, to support arbitrary
// searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
"dynamic": false,
- "_all" : {
- "enabled": false
- },
"_source": {
"includes": [
"collectionspace_denorm:*",
diff --git a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml
index 91411631c4..42834cb08d 100644
--- a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml
+++ b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml
@@ -1174,9 +1174,6 @@
// index as small as possible. We may want to turn this on in the future, to support arbitrary
// searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
"dynamic": false,
- "_all" : {
- "enabled": false
- },
"_source": {
"includes": [
"collectionobjects_common:briefDescriptions",
diff --git a/services/common/src/main/java/org/collectionspace/services/common/CollectionSpaceServiceContextListener.java b/services/common/src/main/java/org/collectionspace/services/common/CollectionSpaceServiceContextListener.java
index dd2ce05e51..9d6d91e9dd 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/CollectionSpaceServiceContextListener.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/CollectionSpaceServiceContextListener.java
@@ -56,7 +56,7 @@ public void contextDestroyed(ServletContextEvent event) {
ServiceMain instance = null;
try {
- ServiceMain.getInstance();
+ instance = ServiceMain.getInstance();
} catch (Throwable t) {
// Do nothing. Error already logged by the Services layer
} finally {
diff --git a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java
index fd0803b46c..65d47cbd8a 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java
@@ -1219,7 +1219,7 @@ public TenantBindingConfigReaderImpl getTenantBindingConfigReader() {
public ResourceMap getJaxRSResourceMap() {
ResourceMap result;
- result = ResteasyProviderFactory.getContextData(ResourceMap.class);
+ result = ResteasyProviderFactory.getInstance().getContextData(ResourceMap.class);
return result;
}
diff --git a/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java b/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java
index 91c920708e..ca9ff6342f 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java
@@ -1,6 +1,5 @@
package org.collectionspace.services.common.authorization_mgt;
-import java.security.NoSuchAlgorithmException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -19,7 +18,6 @@
import org.collectionspace.authentication.AuthN;
import org.collectionspace.services.account.AccountListItem;
-
import org.collectionspace.services.authentication.Token;
import org.collectionspace.services.authorization.AuthZ;
import org.collectionspace.services.authorization.CSpaceAction;
@@ -41,7 +39,6 @@
import org.collectionspace.services.client.Profiler;
import org.collectionspace.services.client.RoleClient;
import org.collectionspace.services.client.workflow.WorkflowClient;
-
import org.collectionspace.services.common.config.ServiceConfigUtils;
import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
import org.collectionspace.services.common.context.ServiceBindingUtils;
@@ -52,17 +49,13 @@
import org.collectionspace.services.common.storage.JDBCTools;
import org.collectionspace.services.common.storage.jpa.JPATransactionContext;
import org.collectionspace.services.common.storage.jpa.JpaStorageUtils;
-
import org.collectionspace.services.config.service.ServiceBindingType;
import org.collectionspace.services.config.tenant.EmailConfig;
import org.collectionspace.services.config.tenant.PasswordResetConfig;
import org.collectionspace.services.config.tenant.TenantBindingType;
-
import org.collectionspace.services.lifecycle.Lifecycle;
import org.collectionspace.services.lifecycle.TransitionDef;
import org.collectionspace.services.lifecycle.TransitionDefList;
-
-//import org.mortbay.log.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -189,7 +182,7 @@ public static Role getRole(JPATransactionContext jpaTransactionContext, String t
public static Role createRole(String tenantId, String name, String description, boolean immutable) {
Role role = new Role();
- role.setCreatedAtItem(new Date());
+ role.setCreatedAt(new Date());
role.setDisplayName(name);
String roleName = AuthorizationCommon.getQualifiedRoleName(tenantId, name);
role.setRoleName(roleName);
@@ -298,7 +291,7 @@ private static Permission createPermission(String tenantId,
Permission perm = new Permission();
perm.setCsid(id);
perm.setDescription(description);
- perm.setCreatedAtItem(new Date());
+ perm.setCreatedAt(new Date());
perm.setResourceName(resourceName.toLowerCase().trim());
perm.setEffect(EffectType.PERMIT);
perm.setTenantId(tenantId);
@@ -1105,7 +1098,7 @@ public static void createDefaultWorkflowPermissions(
Role readonlyRole = AuthorizationCommon.getRole(jpaTransactionContext, tenantBinding.getId(), ROLE_TENANT_READER);
if (adminRole == null || readonlyRole == null) {
- String msg = String.format("One or more of the required default CollectionSpace administrator roles is missing or was never created. If you're setting up a new instance of CollectionSpace, shutdown the Tomcat server and run the 'ant import' command from the root/top level CollectionSpace 'Services' source directory. Then try restarting Tomcat.");
+ String msg = "One or more of the required default CollectionSpace administrator roles is missing or was never created. If you're setting up a new instance of CollectionSpace, shutdown the Tomcat server and run the 'ant import' command from the root/top level CollectionSpace 'Services' source directory. Then try restarting Tomcat.";
logger.info(msg);
throw new RuntimeException("One or more of the required default CollectionSpace administrator roles is missing or was never created.");
}
@@ -1265,17 +1258,17 @@ private static void persist(JPATransactionContext jpaTransactionContext, Permiss
}
- public static boolean hasTokenExpired(EmailConfig emailConfig, Token token) throws NoSuchAlgorithmException {
+ public static boolean hasTokenExpired(EmailConfig emailConfig, Token token) {
boolean result = false;
int maxConfigSeconds = emailConfig.getPasswordResetConfig().getTokenExpirationSeconds().intValue();
int maxTokenSeconds = token.getExpireSeconds().intValue();
- long createdTime = token.getCreatedAtItem().getTime();
- long configExpirationTime = createdTime + maxConfigSeconds * 1000; // the current tenant config for how long a token stays valid
- long tokenDefinedExirationTime = createdTime + maxTokenSeconds * 1000; // the tenant config for how long a token stays valid when the token was created.
+ long createdTime = token.getCreatedAt().getTime();
+ long configExpirationTime = createdTime + maxConfigSeconds * 1000L; // the current tenant config for how long a token stays valid
+ long tokenDefinedExpirationTime = createdTime + maxTokenSeconds * 1000L; // the tenant config for how long a token stays valid when the token was created.
- if (configExpirationTime != tokenDefinedExirationTime) {
+ if (configExpirationTime != tokenDefinedExpirationTime) {
String msg = String.format("The configured expiration time for the token = '%s' changed from when the token was created.",
token.getId());
logger.warn(msg);
diff --git a/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationStore.java b/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationStore.java
index 6a4b72ac02..64211d4960 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationStore.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationStore.java
@@ -118,7 +118,7 @@ public String store(Object entity) throws Exception {
//by the caller
em.getTransaction().begin();
if (JaxbUtils.getValue(entity, "getCreatedAt") == null) {
- JaxbUtils.setValue(entity, "setCreatedAtItem", Date.class, new Date());
+ JaxbUtils.setValue(entity, "setCreatedAt", Date.class, new Date());
}
em.persist(entity);
em.getTransaction().commit();
@@ -201,7 +201,7 @@ public String store(JPATransactionContext jpaTransactionContext, Object entity)
}
*/
if (JaxbUtils.getValue(entity, "getCreatedAt") == null) {
- JaxbUtils.setValue(entity, "setCreatedAtItem", Date.class, new Date());
+ JaxbUtils.setValue(entity, "setCreatedAt", Date.class, new Date());
}
if (entityExists == true) {
diff --git a/services/common/src/main/java/org/collectionspace/services/common/context/ServiceBindingUtils.java b/services/common/src/main/java/org/collectionspace/services/common/context/ServiceBindingUtils.java
index 9404590b19..c05f57f237 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/context/ServiceBindingUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/context/ServiceBindingUtils.java
@@ -15,7 +15,7 @@
import org.collectionspace.services.config.types.PropertyItemType;
import org.collectionspace.services.config.types.PropertyType;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
-import org.nuxeo.ecm.core.api.ClientException;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.DocumentModel;
import java.lang.IndexOutOfBoundsException;
@@ -218,7 +218,7 @@ public static String getMappedFieldInDoc(ServiceBindingType sb,
logger.trace("SBUtils.getMappedField caught OOB exc, for Prop: "
+ propName + " in: " + docModel.getDocumentType().getName()
+ " csid: " + NuxeoUtils.getCsid(docModel));
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw new RuntimeException(
"getMappedFieldInDoc: Problem fetching: " + propName
+ " logicalfieldName: " + logicalFieldName
diff --git a/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java b/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java
index c1b7ab430a..e9252e7198 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java
@@ -753,7 +753,7 @@ private static void buildList(Document document, Element element,
*/
public static Schema getSchemaFromName(String schemaName) {
SchemaManager schemaManager = Framework
- .getLocalService(SchemaManager.class);
+ .getService(SchemaManager.class);
return schemaManager.getSchema(schemaName);
}
diff --git a/services/common/src/main/java/org/collectionspace/services/common/document/JaxbUtils.java b/services/common/src/main/java/org/collectionspace/services/common/document/JaxbUtils.java
index 366634d278..d62a368f3d 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/document/JaxbUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/document/JaxbUtils.java
@@ -27,17 +27,17 @@
*/
package org.collectionspace.services.common.document;
-import java.io.InputStream;
import java.io.StringWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBElement;
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.Marshaller;
+
import javax.xml.namespace.QName;
+import org.collectionspace.services.common.jaxb.JAXBContextCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,11 +59,11 @@ public static String toString(Object o, Class> clazz) {
StringWriter sw = new StringWriter();
try {
- JAXBContext jc = JAXBContext.newInstance(clazz);
+ JAXBContext jc = JAXBContextCache.getInstance().getCachedJAXBContext(clazz);
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
m.marshal(o, sw);
- } catch (javax.xml.bind.MarshalException e) {
+ } catch (jakarta.xml.bind.MarshalException e) {
//
// If the JAX-B object we're trying to marshal doesn't have an @XmlRootElement, then we need another
// approach.
@@ -83,7 +83,7 @@ private static String marshalWithoutRoot(Object o, Class> clazz) {
StringWriter sw = new StringWriter();
try {
- JAXBContext jc = JAXBContext.newInstance(clazz);
+ JAXBContext jc = JAXBContextCache.getInstance().getCachedJAXBContext(clazz);
Marshaller marshaller = jc.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(new JAXBElement(new QName("uri","local"), clazz, o), sw);
@@ -94,40 +94,6 @@ private static String marshalWithoutRoot(Object o, Class> clazz) {
return sw.toString();
}
- /**
- * fromFile retrieves object of given class from given file (in classpath)
- * @param jaxbClass
- * @param fileName of the file to read to construct the object
- * @return
- * @throws Exception
- */
- public static Object fromFile(Class jaxbClass, String fileName)
- throws Exception {
-
- JAXBContext context = JAXBContext.newInstance(jaxbClass);
- Unmarshaller unmarshaller = context.createUnmarshaller();
- //note: setting schema to null will turn validator off
- unmarshaller.setSchema(null);
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
- InputStream is = tccl.getResourceAsStream(fileName);
- return fromStream(jaxbClass, is);
- }
-
- /**
- * fromStream retrieves object of given class from given inputstream
- * @param jaxbClass
- * @param is stream to read to construct the object
- * @return
- * @throws Exception
- */
- public static Object fromStream(Class jaxbClass, InputStream is) throws Exception {
- JAXBContext context = JAXBContext.newInstance(jaxbClass);
- Unmarshaller unmarshaller = context.createUnmarshaller();
- //note: setting schema to null will turn validator off
- unmarshaller.setSchema(null);
- return jaxbClass.cast(unmarshaller.unmarshal(is));
- }
-
/**
* getValue gets invokes specified accessor method on given object. Assumption
* is that this is used for JavaBean pattern getXXX methods only.
diff --git a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax
index 2d7d8dbff9..845ceaa0b7 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax
+++ b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax
@@ -24,7 +24,7 @@ import java.util.Map;
import org.nuxeo.common.utils.IdUtils;
import org.nuxeo.ecm.core.api.Blob;
-import org.nuxeo.ecm.core.api.ClientException;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.CoreSession;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentRef;
@@ -39,6 +39,7 @@ import org.nuxeo.ecm.platform.types.TypeManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+// TODO: This file is named incorrectly. What was it supposed to be for?
public class ImagePlugin extends AbstractFileImporter {
private static final long serialVersionUID = 5850210255138418118L;
@@ -47,7 +48,7 @@ public class ImagePlugin extends AbstractFileImporter {
public DocumentModel create(CoreSession documentManager, Blob content,
String path, boolean overwrite, String fullname,
- TypeManager typeService) throws ClientException, IOException {
+ TypeManager typeService) throws NuxeoException, IOException {
path = getNearestContainerPath(documentManager, path);
doSecurityCheck(documentManager, path,
ImagingDocumentConstants.PICTURE_TYPE_NAME, typeService);
diff --git a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoBlobUtils.java b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoBlobUtils.java
index 2b638550da..f4fe2f3a3b 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoBlobUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoBlobUtils.java
@@ -29,9 +29,12 @@
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.io.InputStream;
+import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -40,63 +43,61 @@
import java.util.Set;
import java.util.UUID;
-import org.nuxeo.runtime.api.Framework;
-import org.nuxeo.ecm.platform.picture.api.ImageInfo;
-import org.nuxeo.ecm.platform.picture.api.ImagingDocumentConstants;
-import org.nuxeo.ecm.platform.picture.api.ImagingService;
-import org.nuxeo.ecm.platform.picture.api.PictureView;
-import org.nuxeo.ecm.platform.mimetype.MimetypeDetectionException;
-import org.nuxeo.ecm.platform.mimetype.interfaces.MimetypeRegistry;
-import org.nuxeo.ecm.platform.picture.api.adapters.PictureBlobHolder;
-import org.nuxeo.ecm.platform.filemanager.api.FileManager;
-import org.nuxeo.ecm.platform.filemanager.service.FileManagerService;
-import org.nuxeo.ecm.platform.filemanager.service.extension.FileImporter;
-import org.nuxeo.ecm.platform.filemanager.utils.FileManagerUtils;
-import org.nuxeo.ecm.platform.types.TypeManager;
-import org.nuxeo.ecm.core.api.IdRef;
-import org.nuxeo.ecm.core.api.NuxeoException;
-import org.nuxeo.ecm.core.api.blobholder.BlobHolder;
-import org.nuxeo.ecm.core.api.blobholder.DocumentBlobHolder;
-import org.nuxeo.ecm.core.api.impl.blob.FileBlob;
-import org.nuxeo.ecm.core.api.model.Property;
-import org.nuxeo.binary.metadata.api.BinaryMetadataService;
-import org.nuxeo.ecm.core.api.Blob;
-import org.nuxeo.ecm.core.api.ClientException;
-import org.nuxeo.ecm.core.api.DocumentModel;
-import org.nuxeo.ecm.core.api.DocumentRef;
-import org.nuxeo.ecm.core.api.PropertyException;
-import org.nuxeo.ecm.core.blob.BlobManager;
-import org.nuxeo.ecm.core.blob.BlobProvider;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.apache.commons.io.IOUtils;
-
+import org.collectionspace.services.blob.BlobsCommon;
+import org.collectionspace.services.blob.DimensionSubGroup;
+import org.collectionspace.services.blob.DimensionSubGroupList;
+import org.collectionspace.services.blob.MeasuredPartGroup;
+import org.collectionspace.services.blob.MeasuredPartGroupList;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.common.FileUtilities;
import org.collectionspace.services.common.ServiceMain;
+import org.collectionspace.services.common.api.CommonAPI;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
import org.collectionspace.services.common.blob.BlobInput;
+import org.collectionspace.services.common.blob.BlobOutput;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.DocumentException;
import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.common.document.TransactionException;
import org.collectionspace.services.common.repository.RepositoryClient;
-import org.collectionspace.services.common.api.CommonAPI;
-import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
-import org.collectionspace.services.common.blob.BlobOutput;
-import org.collectionspace.services.blob.BlobsCommon;
-import org.collectionspace.services.blob.DimensionSubGroup;
-import org.collectionspace.services.blob.DimensionSubGroupList;
-import org.collectionspace.services.blob.MeasuredPartGroup;
-import org.collectionspace.services.blob.MeasuredPartGroupList;
+import org.collectionspace.services.config.service.ListResultField;
import org.collectionspace.services.jaxb.BlobJAXBSchema;
import org.collectionspace.services.nuxeo.client.java.CommonList;
import org.collectionspace.services.nuxeo.client.java.CoreSessionInterface;
import org.collectionspace.services.nuxeo.client.java.NuxeoRepositoryClientImpl;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.collectionspace.services.nuxeo.util.ThumbnailConstants;
-import org.collectionspace.services.config.service.ListResultField;
+import org.nuxeo.binary.metadata.api.BinaryMetadataService;
+import org.nuxeo.ecm.core.api.Blob;
+import org.nuxeo.ecm.core.api.DocumentModel;
+import org.nuxeo.ecm.core.api.DocumentRef;
+import org.nuxeo.ecm.core.api.IdRef;
+import org.nuxeo.ecm.core.api.NuxeoException;
+import org.nuxeo.ecm.core.api.PropertyException;
+import org.nuxeo.ecm.core.api.blobholder.BlobHolder;
+import org.nuxeo.ecm.core.api.blobholder.DocumentBlobHolder;
+import org.nuxeo.ecm.core.api.impl.blob.FileBlob;
+import org.nuxeo.ecm.core.api.model.Property;
+import org.nuxeo.ecm.core.blob.BlobManager;
+import org.nuxeo.ecm.core.blob.BlobProvider;
+import org.nuxeo.ecm.platform.filemanager.api.FileImporterContext;
+import org.nuxeo.ecm.platform.filemanager.api.FileManager;
+import org.nuxeo.ecm.platform.filemanager.service.FileManagerService;
+import org.nuxeo.ecm.platform.filemanager.service.extension.FileImporter;
+import org.nuxeo.ecm.platform.filemanager.utils.FileManagerUtils;
+import org.nuxeo.ecm.platform.mimetype.MimetypeDetectionException;
+import org.nuxeo.ecm.platform.mimetype.interfaces.MimetypeRegistry;
+import org.nuxeo.ecm.platform.picture.api.ImageInfo;
+import org.nuxeo.ecm.platform.picture.api.ImagingDocumentConstants;
+import org.nuxeo.ecm.platform.picture.api.ImagingService;
+import org.nuxeo.ecm.platform.picture.api.PictureView;
+import org.nuxeo.ecm.platform.picture.api.adapters.PictureBlobHolder;
+import org.nuxeo.ecm.platform.types.TypeManager;
+import org.nuxeo.runtime.api.Framework;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Use Nuxeo's FileBlob class to create a temporary file that Nuxeo manages.
@@ -227,13 +228,13 @@ private static String toStringPictureView(PictureView pictureView) {
return strBuffer.toString();
}
- static private String getDerivativeUri(String uri, String derivativeName) {
+ private static String getDerivativeUri(String uri, String derivativeName) {
return uri + derivativeName + "/" + BlobInput.URI_CONTENT_PATH;
}
- static private HashMap createBlobListItem(Blob blob,
- String uri,
- String derivativeName) {
+ private static HashMap createBlobListItem(Blob blob,
+ String uri,
+ String derivativeName) {
HashMap item = new HashMap();
String value = getDerivativeUri(uri, derivativeName);
@@ -263,14 +264,14 @@ static private HashMap createBlobListItem(Blob blob,
return item;
}
- static public String getSanizitedFilename(File srcFile) throws Exception {
+ public static String getSanizitedFilename(File srcFile) throws Exception {
return getSanizitedFilename(srcFile.getName());
}
/*
* Valid Nuxeo file names are a subset of *nix and Windows filenames, so we need to check.
*/
- static public String getSanizitedFilename(String fileName) throws Exception {
+ public static String getSanizitedFilename(String fileName) throws Exception {
String result = fileName;
if (fileName != null && fileName.matches(NUXEO_FILENAME_VALID_STRING) == false) {
@@ -285,7 +286,7 @@ static public String getSanizitedFilename(String fileName) throws Exception {
if (result != null && logger.isDebugEnabled() == true) {
if (result.equals(fileName) == false) {
- logger.debug(String.format("The file name '%s' was sanizitized to '%s'.", fileName, result));
+ logger.debug("The file name '{}' was sanizitized to '{}'.", fileName, result);
}
}
@@ -337,8 +338,8 @@ private static void handlePictureViewBlobs(PictureBlobHolder pictureBlobHolder,
commonList.setItemsInPage(total);
}
- static public CommonList getBlobDerivatives(CoreSessionInterface repoSession,
- String repositoryId, List resultsFields, String uri)
+ public static CommonList getBlobDerivatives(CoreSessionInterface repoSession,
+ String repositoryId, List resultsFields, String uri)
throws Exception {
CommonList commonList = new CommonList();
int nFields = resultsFields.size() + 2;
@@ -383,7 +384,7 @@ private static Map getMetadata(Blob nuxeoBlob) throws Exception
return binaryMetadataService.readMetadata(nuxeoBlob, false);
}
- static private MeasuredPartGroupList getDimensions(
+ private static MeasuredPartGroupList getDimensions(
DocumentModel documentModel, Blob nuxeoBlob) {
MeasuredPartGroupList result = null;
@@ -456,19 +457,19 @@ static private MeasuredPartGroupList getDimensions(
// FIXME: Add error checking here, as none of these calls return an
// Exception
- static private BigDecimal intToBigDecimal(int i) {
+ private static BigDecimal intToBigDecimal(int i) {
BigInteger bigint = BigInteger.valueOf(i);
BigDecimal bigdec = new BigDecimal(bigint);
return bigdec;
}
- static private BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel documentModel,
- Blob nuxeoBlob) {
+ private static BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel documentModel,
+ Blob nuxeoBlob) {
return createBlobsCommon(ctx, documentModel, nuxeoBlob, false);
}
- static private BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel documentModel,
- Blob nuxeoBlob, Boolean getContentFlag) {
+ private static BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel documentModel,
+ Blob nuxeoBlob, Boolean getContentFlag) {
BlobsCommon result = new BlobsCommon();
if (documentModel != null && nuxeoBlob != null) {
@@ -484,7 +485,7 @@ static private BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel d
BlobProvider bp = blobManager.getBlobProvider(ctx.getRepositoryName());
digest = bp.getBinaryManager().getBinary(nuxeoBlob).getDigest();
} catch (Exception e) {
- logger.warn(String.format("Could not compute digest value for uploaded media '%s'.", nuxeoBlob.getFilename()));
+ logger.warn("Could not compute digest value for uploaded media '{}'.", nuxeoBlob.getFilename());
}
}
result.setDigest(digest);
@@ -511,7 +512,7 @@ static private BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel d
ThumbnailConstants.THUMBNAIL_FILENAME_PROPERTY_NAME);
Blob thumbnailBlob = (Blob)documentModel.getProperty(ThumbnailConstants.THUMBNAIL_SCHEMA_NAME,
ThumbnailConstants.THUMBNAIL_PROPERTY_NAME);
- } catch (ClientException e) {
+ } catch (NuxeoException e) {
errorMsg = "Could not extract the name of the thumbnail preview image file.";
if (logger.isDebugEnabled()) {
logger.debug(errorMsg, e);
@@ -529,8 +530,8 @@ static private BlobsCommon createBlobsCommon(ServiceContext ctx, DocumentModel d
return result;
}
- static private Blob checkMimeType(Blob blob, String fullname)
- throws ClientException {
+ private static Blob checkMimeType(Blob blob, String fullname)
+ throws NuxeoException {
final String mimeType = blob.getMimeType();
if (mimeType != null && !mimeType.equals("application/octet-stream")
&& !mimeType.equals("application/octetstream")) {
@@ -540,7 +541,7 @@ static private Blob checkMimeType(Blob blob, String fullname)
try {
blob = getMimeService().updateMimetype(blob, filename);
} catch (MimetypeDetectionException e) {
- throw new ClientException(e);
+ throw new NuxeoException(e);
}
return blob;
}
@@ -549,16 +550,16 @@ static private Blob checkMimeType(Blob blob, String fullname)
* Gets the type service. Not in use, but please keep for future reference
*
* @return the type service
- * @throws ClientException
+ * @throws NuxeoException
* the client exception
*/
- private static TypeManager getTypeService() throws ClientException {
+ private static TypeManager getTypeService() throws NuxeoException {
TypeManager typeService = null;
try {
typeService = Framework.getService(TypeManager.class);
} catch (Exception e) {
- throw new ClientException(e);
+ throw new NuxeoException(e);
}
return typeService;
@@ -579,10 +580,10 @@ private static Blob createFileBlob(File file, boolean isTemporary) throws Except
* Gets Nuxeo's file manager service.
*
* @return the file manager service
- * @throws ClientException
+ * @throws NuxeoException
* the client exception
*/
- private static FileManager getFileManager() throws ClientException {
+ private static FileManager getFileManager() throws NuxeoException {
FileManager result = null;
try {
@@ -590,7 +591,7 @@ private static FileManager getFileManager() throws ClientException {
} catch (Exception e) {
String msg = "Unable to get Nuxeo's FileManager service.";
logger.error(msg, e);
- throw new ClientException("msg", e);
+ throw new NuxeoException("msg", e);
}
return result;
@@ -600,10 +601,10 @@ private static FileManager getFileManager() throws ClientException {
* Gets Nuxeo's file manager service.
*
* @return the file manager service
- * @throws ClientException
+ * @throws NuxeoException
* the client exception
*/
- private static FileManagerService getFileManagerService() throws ClientException {
+ private static FileManagerService getFileManagerService() throws NuxeoException {
FileManagerService result = null;
try {
@@ -611,15 +612,15 @@ private static FileManagerService getFileManagerService() throws ClientException
} catch (Exception e) {
String msg = "Unable to get Nuxeo's FileManager service.";
logger.error(msg, e);
- throw new ClientException("msg", e);
+ throw new NuxeoException("msg", e);
}
return result;
}
- static private CoreSessionInterface getRepositorySession(ServiceContext ctx,
- RepositoryClient repositoryClient) {
+ private static CoreSessionInterface getRepositorySession(ServiceContext ctx,
+ RepositoryClient repositoryClient) {
CoreSessionInterface result = null;
NuxeoRepositoryClientImpl nuxeoClient = (NuxeoRepositoryClientImpl)repositoryClient;
@@ -632,20 +633,20 @@ static private CoreSessionInterface getRepositorySession(ServiceContext ctx,
- RepositoryClient repositoryClient,
- CoreSessionInterface repoSession) throws TransactionException {
+ private static void releaseRepositorySession(ServiceContext ctx,
+ RepositoryClient repositoryClient,
+ CoreSessionInterface repoSession) throws TransactionException {
NuxeoRepositoryClientImpl nuxeoClient = (NuxeoRepositoryClientImpl)repositoryClient;
nuxeoClient.releaseRepositorySession(ctx, repoSession);
}
- static private MimetypeRegistry getMimeService() throws ClientException {
+ private static MimetypeRegistry getMimeService() throws NuxeoException {
MimetypeRegistry result = null;
try {
result = Framework.getService(MimetypeRegistry.class);
} catch (Exception e) {
- throw new ClientException(e);
+ throw new NuxeoException(e);
}
return result;
@@ -660,40 +661,63 @@ private static DocumentModel createDocumentFromBlob(
boolean useNuxeoAdaptors) throws Exception {
DocumentModel result = null;
- boolean createdFromAdaptor = false;
- if (useNuxeoAdaptors == true) try {
- //
- // Use Nuxeo's high-level create method which looks for plugin adapters that match the MIME type. For example,
- // for image blobs, Nuxeo's file manager will pick a special image plugin that will automatically generate
- // image derivatives.
- //
- result = getFileManager().createDocumentFromBlob(
- repoSession.getCoreSession(), inputStreamBlob, blobLocation, overwrite, blobName);
- createdFromAdaptor = true;
- } catch (NuxeoException ne) {
- logger.warn(String.format("Tried but failed to use Nuxeo import adaptor to download '%s'. Falling back to generic file importer",
- blobName));
+ // useNuxeoAdaptors is kind of a misnomer because we always use Nuxeo to create the Blob document
+ // instead now it's more used to show where the call has come from (PublicItem vs BlobDocumentModelHandler)
+ // and to determine if we want to generate derivatives or not
+ if (!useNuxeoAdaptors) {
+ inputStreamBlob = checkMimeType(inputStreamBlob, blobName);
}
- if (createdFromAdaptor == false) {
- //
- // User Nuxeo's default file importer/adapter explicitly. This avoids specialized functionality from happening like
- // image derivative creation.
- //
- String digestAlgorithm = getFileManager().getDigestAlgorithm(); // Only call this because we seem to need some way of initializing Nuxeo's FileManager with a call.
-
- FileManagerService fileManagerService = getFileManagerService();
- inputStreamBlob = checkMimeType(inputStreamBlob, blobName);
+ final var context = FileImporterContext.builder(repoSession.getCoreSession(), inputStreamBlob, blobLocation)
+ .overwrite(overwrite)
+ .fileName(blobName)
+ .build();
+ result = getFileManager().createOrUpdateDocument(context);
- FileImporter defaultFileImporter = fileManagerService.getPluginByName("DefaultFileImporter");
- result = defaultFileImporter.create(
- repoSession.getCoreSession(), inputStreamBlob, blobLocation, overwrite, blobName, getTypeService());
+ // Compute the views now instead of relying on Nuxeo to populate them
+ if (result != null && isBlobAnImage(inputStreamBlob) && useNuxeoAdaptors) {
+ computeViews(result, inputStreamBlob);
}
return result;
}
- static public BlobsCommon createBlobInRepository(
+ /**
+ * Compute the derivative views and add them to our document. This assumes the view list is not populated and in the
+ * future we might need to clear existing views before setting the value.
+ *
+ * @param doc The Blob's document
+ * @param blob The Blob
+ */
+ private static void computeViews(DocumentModel doc, Blob blob) {
+ final var convert = true;
+ final var imagingService = Framework.getService(ImagingService.class);
+ if (imagingService == null) {
+ logger.warn("Unable to compute views for {}, ImagingService not found", blob.getFilename());
+ return;
+ }
+
+ final var views = new ArrayList>();
+ final var imageInfo = imagingService.getImageInfo(blob);
+ if (imageInfo == null) {
+ logger.warn("Unable to generate imageInfo for {}, skipping derivative generation", blob.getFilename());
+ return;
+ }
+
+ try {
+ final var computedViews = imagingService.computeViewsFor(doc, blob, imageInfo, convert);
+ for (var view : computedViews) {
+ views.add(view.asMap());
+ }
+ doc.setPropertyValue(VIEWS_PROPERTY, views);
+ } catch (PropertyException e) {
+ logger.error("Unable to set view property for document {}", blob.getFilename(), e);
+ } catch (IOException e) {
+ logger.error("Unable to compute views for document {}", blob.getFilename(), e);
+ }
+ }
+
+ public static BlobsCommon createBlobInRepository(
ServiceContext ctx,
RepositoryClient repositoryClient,
InputStream inputStream,
@@ -768,8 +792,9 @@ public static BlobsCommon createBlobInRepository(
if (sanitizedName.equals(originalFile.getName()) == false) {
targetFile = FileUtilities.createTmpFile(originalFile, sanitizedName);
if (logger.isDebugEnabled() == true) {
- logger.debug(String.format("The file '%s''s name has characters that Nuxeo can't deal with. Rather than renaming the file, we created a new temp file at '%s'",
- originalFile.getName(), targetFile.getAbsolutePath()));
+ logger.debug(
+ "The file '{}''s name has characters that Nuxeo can't deal with. Rather than renaming the file, we created a new temp file at '{}'",
+ originalFile.getName(), targetFile.getAbsolutePath());
}
}
@@ -802,7 +827,7 @@ public static BlobsCommon createBlobInRepository(
//
if (targetFile.equals(originalFile) == false) {
if (targetFile.delete() == false) {
- logger.warn(String.format("Attempt to delete temporary file '%s' failed.", targetFile.getAbsolutePath()));
+ logger.warn("Attempt to delete temporary file '{}' failed.", targetFile.getAbsolutePath());
}
}
}
@@ -814,7 +839,7 @@ public static BlobsCommon createBlobInRepository(
* Find out if this document's blob/file-contents are allowed to be purged. For instance, we currently
* only want to allow the purging the contents of Nuxeo "Picture" documents.
*/
- static private boolean isPurgeAllowed(DocumentModel docModel) {
+ private static boolean isPurgeAllowed(DocumentModel docModel) {
boolean result = false;
if (docModel.hasFacet(ImagingDocumentConstants.PICTURE_FACET) == true) {
@@ -839,7 +864,7 @@ static private boolean isPurgeAllowed(DocumentModel docModel) {
* the mime type
* @return the string
*/
- static private BlobsCommon createBlobInRepository(ServiceContext ctx,
+ private static BlobsCommon createBlobInRepository(ServiceContext ctx,
CoreSessionInterface nuxeoSession,
DocumentModel blobLocation,
boolean purgeOriginal,
@@ -877,8 +902,9 @@ static private BlobsCommon createBlobInRepository(ServiceContext ctx,
String source = (String)documentModel.getProperty(CommonAPI.NUXEO_DUBLINCORE_SCHEMANAME,
CommonAPI.NUXEO_DUBLINCORE_SOURCE);
if (source != null) {
- logger.warn(String.format("The Nuxeo dublin core property '%s' is set to '%s'. We expected it to be empty. See JIRA issue CSPACE-6679 for details.",
- CommonAPI.NUXEO_DUBLINCORE_SOURCE, source));
+ logger.warn(
+ "The Nuxeo dublin core property '{}' is set to '{}'. We expected it to be empty. See JIRA issue CSPACE-6679 for details.",
+ CommonAPI.NUXEO_DUBLINCORE_SOURCE, source);
}
documentModel.setProperty(CommonAPI.NUXEO_DUBLINCORE_SCHEMANAME,
CommonAPI.NUXEO_DUBLINCORE_SOURCE, CommonAPI.URL_SOURCED_PICTURE);
@@ -948,10 +974,10 @@ public static InputStream getResource(String resourceName) {
return result;
}
- static public BlobOutput getBlobOutput(ServiceContext ctx,
- RepositoryClient repositoryClient,
- String repositoryId,
- StringBuffer outMimeType) throws TransactionException, DocumentNotFoundException {
+ public static BlobOutput getBlobOutput(ServiceContext ctx,
+ RepositoryClient repositoryClient,
+ String repositoryId,
+ StringBuffer outMimeType) throws TransactionException, DocumentNotFoundException {
BlobOutput result = null;
boolean repoSessionCleanup = false;
@@ -987,7 +1013,7 @@ static public BlobOutput getBlobOutput(ServiceContext getPictureViewNameSet(CoreSessionInterface repoSession, String repositoryId) throws PropertyException {
+ public static Set getPictureViewNameSet(CoreSessionInterface repoSession, String repositoryId) throws PropertyException {
Set result = null;
DocumentModel docModel = repoSession.getDocument(new IdRef(repositoryId));
@@ -1044,7 +1071,7 @@ static public Set getPictureViewNameSet(CoreSessionInterface repoSession
* @return the image
* @throws DocumentNotFoundException
*/
- static public BlobOutput getBlobOutput(ServiceContext ctx,
+ public static BlobOutput getBlobOutput(ServiceContext ctx,
CoreSessionInterface repoSession,
String repositoryId,
String derivativeTerm,
@@ -1204,11 +1231,11 @@ static public BlobOutput getBlobOutput(ServiceContext modes) {
+ public static String createWhereClauseForInvocableByMode(String schema, List modes) {
return queryManager.createWhereClauseForInvocableByMode(schema, modes);
}
}
diff --git a/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java b/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java
index 0058c73b1c..f3ba49ed92 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java
@@ -46,8 +46,7 @@
public class QueryManagerNuxeoImpl implements IQueryManager {
- private static String ECM_FULLTEXT_LIKE = "ecm:fulltext"
- + SEARCH_TERM_SEPARATOR + IQueryManager.SEARCH_LIKE;
+ private static String ECM_FULLTEXT_LIKE = "ecm:fulltext" + SEARCH_TERM_SEPARATOR + IQueryManager.SEARCH_LIKE;
private static String SEARCH_LIKE_FORM = null;
private final Logger logger = LoggerFactory
@@ -82,22 +81,6 @@ public String getDatasourceName() {
return JDBCTools.NUXEO_DATASOURCE_NAME;
}
- // TODO: This is currently just an example fixed query. This should
- // eventually be
- // removed or replaced with a more generic method.
- /*
- * (non-Javadoc)
- *
- * @see
- * org.collectionspace.services.common.query.IQueryManager#execQuery(java
- * .lang.String)
- */
- @Override
- @Deprecated
- public void execQuery(String queryString) {
- // Intentionally left blank
- }
-
@Override
public String createWhereClauseFromAdvancedSearch(String advancedSearch) {
String result = null;
@@ -105,14 +88,12 @@ public String createWhereClauseFromAdvancedSearch(String advancedSearch) {
// Process search term. FIXME: REM - Do we need to perform any string filtering here?
//
if (advancedSearch != null && !advancedSearch.isEmpty()) {
- // Filtering of advanced searches on a single '%' char, per CSPACE-5828
- Matcher regexMatcher = advSearchSqlWildcard.matcher(advancedSearch.trim());
- if (regexMatcher.matches()) {
- return "";
- }
- StringBuffer advancedSearchWhereClause = new StringBuffer(
- advancedSearch);
- result = advancedSearchWhereClause.toString();
+ // Filtering of advanced searches on a single '%' char, per CSPACE-5828
+ Matcher regexMatcher = advSearchSqlWildcard.matcher(advancedSearch.trim());
+ if (regexMatcher.matches()) {
+ return "";
+ }
+ result = advancedSearch;
}
return result;
@@ -125,10 +106,10 @@ public String createWhereClauseFromAdvancedSearch(String advancedSearch) {
* createWhereClauseFromKeywords(java.lang.String)
*/
@Override
- public String createWhereClauseFromKeywords(String keywords) {
- StringBuffer fullTextWhereClause = new StringBuffer();
+ public String createWhereClauseFromKeywords(String keywords, boolean clean) {
+ StringBuilder fullTextWhereClause = new StringBuilder();
- String cleanKeywords = kwdSearchProblemChars.matcher(keywords).replaceAll(" ").trim();
+ String cleanKeywords = clean ? kwdSearchProblemChars.matcher(keywords).replaceAll(" ").trim() : keywords;
Matcher regexMatcher = kwdTokenizer.matcher(cleanKeywords);
boolean addNOT = false;
diff --git a/services/common/src/main/java/org/collectionspace/services/common/relation/RelationUtils.java b/services/common/src/main/java/org/collectionspace/services/common/relation/RelationUtils.java
index bb3ee993fb..29bbffed6f 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/relation/RelationUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/relation/RelationUtils.java
@@ -17,7 +17,7 @@
import org.collectionspace.services.nuxeo.client.java.CoreSessionInterface;
import org.collectionspace.services.nuxeo.client.java.NuxeoRepositoryClientImpl;
-import org.nuxeo.ecm.core.api.ClientException;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
@@ -118,7 +118,7 @@ public static void updateRefNamesInRelations(
try {
docModel.setProperty(IRelationsManager.SERVICE_COMMONPART_NAME, targetField, newRefName);
repoSession.saveDocument(docModel);
- } catch (ClientException e) {
+ } catch (NuxeoException e) {
logger.error(String.format("Could not update field '%s' with updated refName '%s' for relations record CSID=%s",
targetField, newRefName, docModel.getName()));
}
@@ -142,7 +142,7 @@ public static void updateRefNamesInRelations(
//
try {
repoSession.save();
- } catch (ClientException e) {
+ } catch (NuxeoException e) {
// TODO Auto-generated catch block
logger.error("Could not flush results of relation-refName payload updates to Nuxeo repository");
}
diff --git a/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java b/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java
index 5cce0ca2d9..fc1f734d0b 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java
@@ -26,8 +26,6 @@
import java.util.Hashtable;
import java.util.List;
-import org.collectionspace.services.client.PoxPayloadIn;
-import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.DocumentException;
import org.collectionspace.services.common.document.DocumentHandler;
@@ -41,7 +39,7 @@
// All of these Nuxeo specific classes should not be here. This is supposed to be
// a repository-neutral interface.
//
-import org.nuxeo.ecm.core.api.ClientException;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
@@ -115,7 +113,7 @@ public DocumentWrapper getDocFromCsid(ServiceContext ctx,
String csid)
throws Exception;
- public String getDocURI(DocumentWrapper wrappedDoc) throws ClientException;
+ public String getDocURI(DocumentWrapper wrappedDoc) throws NuxeoException;
/**
* Find wrapped documentModel from the Nuxeo repository
diff --git a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaRelationshipStorageClient.java b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaRelationshipStorageClient.java
index 63b0547c64..7491ff48a5 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaRelationshipStorageClient.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaRelationshipStorageClient.java
@@ -95,7 +95,7 @@ public String create(ServiceContext ctx,
DocumentWrapper> wrapDoc = new DocumentWrapperImpl>(relationshipList);
handler.handle(Action.CREATE, wrapDoc);
for (T relationship : relationshipList) {
- JaxbUtils.setValue(relationship, "setCreatedAtItem", Date.class, new Date());
+ JaxbUtils.setValue(relationship, "setCreatedAt", Date.class, new Date());
jpaTransactionContext.persist(relationship);
}
handler.complete(Action.CREATE, wrapDoc);
diff --git a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageClientImpl.java b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageClientImpl.java
index b963929a3b..6803d78cea 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageClientImpl.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageClientImpl.java
@@ -117,7 +117,7 @@ public String create(ServiceContext ctx,
jpaConnectionContext.beginTransaction();
try {
handler.handle(Action.CREATE, wrapDoc);
- JaxbUtils.setValue(entity, "setCreatedAtItem", Date.class, new Date());
+ JaxbUtils.setValue(entity, "setCreatedAt", Date.class, new Date());
jpaConnectionContext.persist(entity);
} catch (EntityExistsException ee) { // FIXME: No, don't allow duplicates
//
@@ -312,7 +312,7 @@ public void update(ServiceContext ctx, String id, DocumentHandler handler)
Object entityFound = getEntity(ctx, id, entityReceived.getClass());
DocumentWrapper wrapDoc = new DocumentWrapperImpl(entityFound);
handler.handle(Action.UPDATE, wrapDoc);
- JaxbUtils.setValue(entityFound, "setUpdatedAtItem", Date.class, new Date());
+ JaxbUtils.setValue(entityFound, "setUpdatedAt", Date.class, new Date());
handler.complete(Action.UPDATE, wrapDoc);
jpaConnectionContext.commitTransaction();
diff --git a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java
index 111b4e69f2..1040751da6 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java
@@ -23,18 +23,16 @@
*/
package org.collectionspace.services.common.storage.jpa;
-import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
-
-import javax.persistence.PersistenceException;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
-import javax.persistence.EntityNotFoundException;
import javax.persistence.NoResultException;
import javax.persistence.Persistence;
+import javax.persistence.PersistenceException;
import javax.persistence.Query;
import org.collectionspace.authentication.AuthN;
@@ -50,13 +48,12 @@
import org.collectionspace.services.authorization.URIResourceImpl;
import org.collectionspace.services.common.api.Tools;
import org.collectionspace.services.common.authorization_mgt.AuthorizationRoleRel;
-import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.DocumentFilter;
import org.collectionspace.services.common.document.DocumentNotFoundException;
-import org.collectionspace.services.common.security.UnauthorizedException;
import org.collectionspace.services.common.document.JaxbUtils;
import org.collectionspace.services.common.document.TransactionException;
import org.collectionspace.services.common.security.SecurityUtils;
+import org.collectionspace.services.common.security.UnauthorizedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -64,7 +61,6 @@
* Utilities for JpaStorage
* @author
*/
-@SuppressWarnings({"rawtypes", "unchecked"})
public class JpaStorageUtils {
final private static Logger logger = LoggerFactory.getLogger(JpaStorageUtils.class);
diff --git a/services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java b/services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java
index 5233aadf06..eaf1d9f00d 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java
@@ -31,11 +31,11 @@
import javax.ws.rs.core.Response;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.model.Property;
-import org.nuxeo.ecm.core.api.model.PropertyException;
+import org.nuxeo.ecm.core.api.PropertyException;
import org.nuxeo.ecm.core.api.model.PropertyNotFoundException;
import org.nuxeo.ecm.core.api.model.impl.primitives.StringProperty;
import org.slf4j.Logger;
@@ -48,7 +48,6 @@
import org.collectionspace.services.client.Profiler;
import org.collectionspace.services.common.CSWebApplicationException;
import org.collectionspace.services.common.ServiceMain;
-import org.collectionspace.services.common.ServletTools;
import org.collectionspace.services.common.StoredValuesUriTemplate;
import org.collectionspace.services.common.UriTemplateFactory;
import org.collectionspace.services.common.UriTemplateRegistry;
@@ -85,20 +84,20 @@
*/
public class RefNameServiceUtils {
- public static enum SpecifierForm {
+ public enum SpecifierForm {
CSID, URN_NAME // Either a CSID or a short ID
- };
+ }
public static class Specifier {
//
// URN statics for things like urn:cspace:name(grover)
//
- final static String URN_PREFIX = "urn:cspace:";
- final static int URN_PREFIX_LEN = URN_PREFIX.length();
- final static String URN_PREFIX_NAME = "name(";
- final static int URN_NAME_PREFIX_LEN = URN_PREFIX_LEN + URN_PREFIX_NAME.length();
- final static String URN_PREFIX_ID = "id(";
- final static int URN_ID_PREFIX_LEN = URN_PREFIX_LEN + URN_PREFIX_ID.length();
+ static final String URN_PREFIX = "urn:cspace:";
+ static final int URN_PREFIX_LEN = URN_PREFIX.length();
+ static final String URN_PREFIX_NAME = "name(";
+ static final int URN_NAME_PREFIX_LEN = URN_PREFIX_LEN + URN_PREFIX_NAME.length();
+ static final String URN_PREFIX_ID = "id(";
+ static final int URN_ID_PREFIX_LEN = URN_PREFIX_LEN + URN_PREFIX_ID.length();
public SpecifierForm form;
public String value;
@@ -141,7 +140,7 @@ public static Specifier getSpecifier(String identifier, String method, String op
identifier.substring(URN_ID_PREFIX_LEN, closeParen));
}
} else {
- logger.error(method + ": bad or missing specifier!");
+ logger.error("{}: bad or missing specifier!", method);
Response response = Response.status(Response.Status.BAD_REQUEST).entity(
op + " failed on bad or missing Authority specifier").type(
"text/plain").build();
@@ -380,7 +379,7 @@ public static void updateRefNamesInRelations(
public static List getConfiguredAuthorityRefs(ServiceContext ctx) {
List authRefFields = ((AbstractServiceContextImpl) ctx).getAllPartsPropertyValues(
ServiceBindingUtils.AUTH_REF_PROP, ServiceBindingUtils.QUALIFIED_PROP_NAMES);
- ArrayList authRefsInfo = new ArrayList(authRefFields.size());
+ ArrayList authRefsInfo = new ArrayList<>(authRefFields.size());
for (String spec : authRefFields) {
AuthRefConfigInfo arci = new AuthRefConfigInfo(spec);
authRefsInfo.add(arci);
@@ -406,8 +405,8 @@ public static AuthorityRefDocList getAuthorityRefDocs(
List list =
wrapperList.getAuthorityRefDocItem();
- Map queriedServiceBindings = new HashMap();
- Map> authRefFieldsByService = new HashMap>();
+ Map queriedServiceBindings = new HashMap<>();
+ Map> authRefFieldsByService = new HashMap<>();
NuxeoRepositoryClientImpl nuxeoRepoClient = (NuxeoRepositoryClientImpl) repoClient;
try {
@@ -486,7 +485,7 @@ public static AuthorityRefDocList getAuthorityRefDocs(
private static ArrayList getRefNameServiceTypes() {
if (refNameServiceTypes == null) {
- refNameServiceTypes = new ArrayList();
+ refNameServiceTypes = new ArrayList<>();
refNameServiceTypes.add(ServiceBindingUtils.SERVICE_TYPE_AUTHORITY);
refNameServiceTypes.add(ServiceBindingUtils.SERVICE_TYPE_OBJECT);
refNameServiceTypes.add(ServiceBindingUtils.SERVICE_TYPE_PROCEDURE);
@@ -505,8 +504,8 @@ public static int updateAuthorityRefDocs(
String oldRefName,
String newRefName,
String refPropName) throws Exception {
- Map queriedServiceBindings = new HashMap();
- Map> authRefFieldsByService = new HashMap>();
+ Map queriedServiceBindings = new HashMap<>();
+ Map> authRefFieldsByService = new HashMap<>();
int docsScanned = 0;
int nRefsFound = 0;
@@ -546,7 +545,8 @@ public static int updateAuthorityRefDocs(
break;
}
docsInCurrentPage = docList.size();
- logger.debug("updateAuthorityRefDocs: current page=" + currentPage + " documents included in page=" + docsInCurrentPage);
+ logger.debug("updateAuthorityRefDocs: current page={} documents included in page={}", currentPage,
+ docsInCurrentPage);
if (docsInCurrentPage == 0) {
logger.debug("updateAuthorityRefDocs: no more documents requiring refName updates could be found");
break;
@@ -575,11 +575,13 @@ public static int updateAuthorityRefDocs(
}
} catch (Exception e) {
- logger.error("Internal error updating the AuthorityRefDocs: " + e.getLocalizedMessage());
+ logger.error("Internal error updating the AuthorityRefDocs: {}", e.getLocalizedMessage());
logger.debug(Tools.errorToString(e, true));
throw e;
}
- logger.debug("updateAuthorityRefDocs replaced a total of " + nRefsFound + " authority references, within as many as " + docsScanned + " scanned document(s)");
+ logger.debug(
+ "updateAuthorityRefDocs replaced a total of {} authority references, within as many as {} scanned document(s)",
+ nRefsFound, docsScanned);
return nRefsFound;
}
@@ -640,7 +642,7 @@ protected static DocumentModelList findAuthorityRefDocs(
// Filter the list for current user rights
servicebindings = SecurityUtils.getReadableServiceBindingsForCurrentUser(servicebindings);
- ArrayList docTypes = new ArrayList();
+ ArrayList docTypes = new ArrayList<>();
String query = computeWhereClauseForAuthorityRefDocs(refName, refPropName, docTypes, servicebindings, // REM - Side effect that docTypes, authRefFieldsByService, and queriedServiceBindings get set/change. Any others?
queriedServiceBindings, authRefFieldsByService);
@@ -669,7 +671,7 @@ protected static DocumentModelList findAuthorityRefDocs(
return docList;
}
- private static final DocumentModelList findDocs(
+ private static DocumentModelList findDocs(
RepositoryClient repoClient,
ServiceContext ctx,
CoreSessionInterface repoSession,
@@ -753,7 +755,7 @@ private static String computeWhereClauseForAuthorityRefDocs(
if (authRefFieldPaths.isEmpty()) {
continue;
}
- ArrayList authRefsInfo = new ArrayList();
+ ArrayList authRefsInfo = new ArrayList<>();
for (String spec : authRefFieldPaths) {
AuthRefConfigInfo arci = new AuthRefConfigInfo(spec);
authRefsInfo.add(arci);
@@ -773,28 +775,27 @@ private static String computeWhereClauseForAuthorityRefDocs(
// we compute actual matches.
AuthorityTermInfo authTermInfo = RefNameUtils.parseAuthorityTermInfo(refName);
- // Example refname: urn:cspace:pahma.cspace.berkeley.edu:personauthorities:name(person):item:name(ReneRichie1586477168934)
- // Corresponding phrase: "urn cspace pahma cspace berkeley edu personauthorities name person item name ReneRichie1586477168934
-
- String refnamePhrase = String.format("urn cspace %s %s name %s item name %s",
- RefNameUtils.domainToPhrase(authTermInfo.inAuthority.domain),
- authTermInfo.inAuthority.resource,
- authTermInfo.inAuthority.name,
- authTermInfo.name
- );
- refnamePhrase = String.format("\"%s\"", refnamePhrase); // surround the phase in double quotes to indicate this is a NXQL phrase search
+ // As of Nuxeo LTS 2019, fulltext no longer has punctuation removed and as such when looking for authority
+ // references we want to provide a search string with the authority name, authority vocabulary name, and the
+ // short ID of the authority
+ // e.g.
+ // urn:cspace:pahma.cspace.berkeley.edu:personauthorities:name(person):item:name(ReneRichie1586477168934)
+ // becomes
+ // personauthorities person ReneRichie1586477168934
+ // We also no longer need a phrase search because we would be required to retain punctuation
+ final var refnameQuery = authTermInfo.inAuthority.resource
+ + " " + authTermInfo.inAuthority.name
+ + " " + authTermInfo.name;
- String whereClauseStr = QueryManager.createWhereClauseFromKeywords(refnamePhrase);
+ String whereClauseStr = QueryManager.createWhereClauseFromKeywords(refnameQuery, false);
- if (logger.isTraceEnabled()) {
- logger.trace("The 'where' clause to find refObjs is: ", refnamePhrase);
- }
+ logger.trace("The 'where' clause to find refObjs is: {}", refnameQuery);
return whereClauseStr;
}
// TODO there are multiple copies of this that should be put somewhere common.
- protected static String getRefname(DocumentModel docModel) throws ClientException {
+ protected static String getRefname(DocumentModel docModel) throws NuxeoException {
String result = (String)docModel.getProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA,
CollectionSpaceClient.COLLECTIONSPACE_CORE_REFNAME);
return result;
@@ -903,7 +904,7 @@ private static long processRefObjsDocList(
try {
String itemRefName = getRefname(docModel);
ilistItem.setRefName(itemRefName);
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw new RuntimeException(
"processRefObjsDocList: Problem fetching refName from item Object: "
+ ce.getLocalizedMessage());
@@ -913,7 +914,7 @@ private static long processRefObjsDocList(
UriTemplateRegistryKey key = new UriTemplateRegistryKey(tenantId, docType);
StoredValuesUriTemplate template = registry.get(key);
if (template != null) {
- Map additionalValues = new HashMap();
+ Map additionalValues = new HashMap<>();
if (template.getUriTemplateType() == UriTemplateFactory.RESOURCE) {
additionalValues.put(UriTemplateFactory.IDENTIFIER_VAR, csid);
uri = template.buildUri(additionalValues);
@@ -924,19 +925,20 @@ private static long processRefObjsDocList(
additionalValues.put(UriTemplateFactory.ITEM_IDENTIFIER_VAR, csid);
uri = template.buildUri(additionalValues);
} catch (Exception e) {
- logger.warn("Could not extract inAuthority property from authority item record: " + e.getMessage());
+ logger.warn("Could not extract inAuthority property from authority item record: {}",
+ e.getMessage());
}
} else if (template.getUriTemplateType() == UriTemplateFactory.CONTACT) {
// FIXME: Generating contact sub-resource URIs requires additional work,
// as a follow-on to CSPACE-5271 - ADR 2012-08-16
// Sets the default (empty string) value for uri, for now
} else {
- logger.warn("Unrecognized URI template type = " + template.getUriTemplateType());
+ logger.warn("Unrecognized URI template type = {}", template.getUriTemplateType());
// Sets the default (empty string) value for uri
}
} else { // (if template == null)
- logger.warn("Could not retrieve URI template from registry via tenant ID "
- + tenantId + " and docType " + docType);
+ logger.warn("Could not retrieve URI template from registry via tenant ID {} and docType {}",
+ tenantId, docType);
// Sets the default (empty string) value for uri
}
ilistItem.setUri(uri);
@@ -944,7 +946,7 @@ private static long processRefObjsDocList(
ilistItem.setWorkflowState(docModel.getCurrentLifeCycleState());
ilistItem.setUpdatedAt(NuxeoDocumentModelHandler.getUpdatedAtAsString(docModel));
} catch (Exception e) {
- logger.error("Error getting core values for doc [" + csid + "]: " + e.getLocalizedMessage());
+ logger.error("Error getting core values for doc [{}]: {}", csid, e.getLocalizedMessage());
}
ilistItem.setDocType(docType);
ilistItem.setDocNumber(
@@ -960,7 +962,7 @@ private static long processRefObjsDocList(
"getAuthorityRefDocs: internal logic error: can't fetch authRefFields for DocType.");
}
- ArrayList foundProps = new ArrayList();
+ ArrayList foundProps = new ArrayList<>();
try {
findAuthRefPropertiesInDoc(docModel, matchingAuthRefFields, refName, matchBaseOnly, foundProps); // REM - side effect that foundProps is set
if(!foundProps.isEmpty()) {
@@ -991,19 +993,15 @@ private static long processRefObjsDocList(
:refName.equals(docRefName)) {
// We found the self for an item
foundSelf = true;
- logger.trace("getAuthorityRefDocs: Result: "
- + docType + " [" + NuxeoUtils.getCsid(docModel)
- + "] appears to be self for: ["
- + refName + "]");
+ logger.trace("getAuthorityRefDocs: Result: {} [{}] appears to be self for: [{}]", docType,
+ NuxeoUtils.getCsid(docModel), refName);
} else {
nRefsFalsePositives++;
- logger.trace("getAuthorityRefDocs: Result: "
- + docType + " [" + NuxeoUtils.getCsid(docModel)
- + "] does not reference ["
- + refName + "]");
+ logger.trace("getAuthorityRefDocs: Result: {} [{}] does not reference [{}]", docType,
+ NuxeoUtils.getCsid(docModel), refName);
}
}
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw new RuntimeException(
"getAuthorityRefDocs: Problem fetching values from repo: " + ce.getLocalizedMessage());
}
@@ -1094,7 +1092,7 @@ public static List findAuthRefPropertiesInDoc(
Property prop = docModel.getProperty(arci.pathEls[0]);
findAuthRefPropertiesInProperty(authRefInfoList, prop, arci, 0, refNameToMatch, matchBaseOnly);
} catch (Exception e) {
- logger.error("Problem fetching property: " + arci.pathEls[0]);
+ logger.error("Problem fetching property: {}", arci.pathEls[0]);
}
}
return authRefInfoList;
@@ -1124,8 +1122,8 @@ private static List findAuthRefPropertiesInProperty(
for (Property listItemProp : propList) {
if (listItemProp instanceof StringProperty) {
if (arci.pathEls.length - pathStartIndex != 1) {
- logger.error("Configuration for authRefs does not match schema structure: "
- + arci.pathEls.toString());
+ logger.error("Configuration for authRefs does not match schema structure: {}",
+ arci.pathEls.toString());
break;
} else {
addARIifMatches(refNameToMatch, matchBaseOnly, arci, listItemProp, authRefInfoList);
@@ -1136,8 +1134,8 @@ private static List findAuthRefPropertiesInProperty(
findAuthRefPropertiesInProperty(authRefInfoList, listItemProp, arci,
pathStartIndex + 2, refNameToMatch, matchBaseOnly);
} else {
- logger.error("Configuration for authRefs does not match schema structure: "
- + arci.pathEls.toString());
+ logger.error("Configuration for authRefs does not match schema structure: {}",
+ arci.pathEls.toString());
break;
}
}
@@ -1149,13 +1147,11 @@ private static List findAuthRefPropertiesInProperty(
findAuthRefPropertiesInProperty(authRefInfoList, localProp, arci,
pathStartIndex, refNameToMatch, matchBaseOnly);
} catch (PropertyNotFoundException pnfe) {
- logger.error("Could not find property: [" + localPropName + "] in path: "
- + arci.getFullPath());
+ logger.error("Could not find property: [{}] in path: {}", localPropName, arci.getFullPath());
// Fall through - ari will be null and we will continue...
}
} else {
- logger.error("Configuration for authRefs does not match schema structure: "
- + arci.pathEls.toString());
+ logger.error("Configuration for authRefs does not match schema structure: {}", arci.pathEls.toString());
}
if (ari != null) {
@@ -1181,12 +1177,12 @@ private static void addARIifMatches(
:refNameToMatch.equals(value)))
|| ((refNameToMatch == null) && Tools.notBlank(value))) {
// Found a match
- logger.debug("Found a match on property: " + prop.getPath() + " with value: [" + value + "]");
+ logger.debug("Found a match on property: {} with value: [{}]", prop.getXPath(), value);
AuthRefInfo ari = new AuthRefInfo(arci, prop);
authRefInfoList.add(ari);
}
} catch (PropertyException pe) {
- logger.debug("PropertyException on: " + prop.getPath() + pe.getLocalizedMessage());
+ logger.debug("PropertyException on: {}{}", prop.getXPath(), pe.getLocalizedMessage());
}
}
diff --git a/services/common/src/main/java/org/collectionspace/services/common/workflow/service/nuxeo/WorkflowDocumentModelHandler.java b/services/common/src/main/java/org/collectionspace/services/common/workflow/service/nuxeo/WorkflowDocumentModelHandler.java
index 0842347f8a..bc76307873 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/workflow/service/nuxeo/WorkflowDocumentModelHandler.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/workflow/service/nuxeo/WorkflowDocumentModelHandler.java
@@ -39,8 +39,8 @@
import org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler;
import org.collectionspace.services.nuxeo.client.java.DocumentModelHandler;
import org.collectionspace.services.workflow.WorkflowCommon;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -83,7 +83,7 @@ public void handleUpdate(DocumentWrapper wrapDoc) throws Exceptio
}
@Override
- protected void handleRefNameChanges(ServiceContext ctx, DocumentModel docModel) throws ClientException {
+ protected void handleRefNameChanges(ServiceContext ctx, DocumentModel docModel) throws NuxeoException {
//
// We are intentionally overriding this method to do nothing since the Workflow resource is a meta-resource without a refname
//
@@ -172,8 +172,7 @@ public void fillAllParts(DocumentWrapper wrapDoc, Action action)
String msg = "Unable to follow workflow transition to state = "
+ transitionToFollow;
logger.error(msg, e);
- ClientException ce = new ClientException("Unable to follow workflow transition: " + transitionToFollow);
- throw ce;
+ throw new NuxeoException("Unable to follow workflow transition: " + transitionToFollow);
}
}
diff --git a/services/common/src/main/java/org/collectionspace/services/common/xmljson/XmlToJsonFilter.java b/services/common/src/main/java/org/collectionspace/services/common/xmljson/XmlToJsonFilter.java
index d415f0acc8..bb8edf7b17 100644
--- a/services/common/src/main/java/org/collectionspace/services/common/xmljson/XmlToJsonFilter.java
+++ b/services/common/src/main/java/org/collectionspace/services/common/xmljson/XmlToJsonFilter.java
@@ -28,7 +28,6 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.commons.lang.NotImplementedException;
-import org.apache.commons.lang3.StringUtils;
/**
*
@@ -77,7 +76,8 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
chain.doFilter(requestWrapper, responseWrapper);
- if (StringUtils.equals(responseWrapper.getContentType(), MediaType.APPLICATION_XML)) {
+ final var contentType = response.getContentType();
+ if (contentType != null && contentType.startsWith(MediaType.APPLICATION_XML)) {
// Got an XML response. Translate it to JSON.
response.setContentType(MediaType.APPLICATION_JSON);
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/handler/CSDocumentModelList.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/handler/CSDocumentModelList.java
index 65e18063cd..c6bbc4ee51 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/handler/CSDocumentModelList.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/handler/CSDocumentModelList.java
@@ -3,9 +3,9 @@
import java.util.ArrayList;
import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlRootElement;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.jaxb.AbstractCommonList;
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java
index b096964a91..db034c0eba 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java
@@ -37,10 +37,10 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlTransient;
/**
* This class allows us to generically represent and marshall a set of list
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionInterface.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionInterface.java
index 1c45a4805a..c3243ff5b2 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionInterface.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionInterface.java
@@ -3,13 +3,13 @@
import java.security.Principal;
import org.collectionspace.services.common.document.DocumentException;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.CoreSession;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
import org.nuxeo.ecm.core.api.DocumentRef;
import org.nuxeo.ecm.core.api.Filter;
import org.nuxeo.ecm.core.api.IterableQueryResult;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
import org.nuxeo.ecm.core.api.impl.LifeCycleFilter;
@@ -25,10 +25,10 @@ public interface CoreSessionInterface {
* Gets the root document of this repository.
*
* @return the root document. cannot be null
- * @throws ClientException
+ * @throws NuxeoException
* @throws SecurityException
*/
- public DocumentModel getRootDocument() throws ClientException;
+ public DocumentModel getRootDocument() throws NuxeoException;
/**
* Gets the current session id.
@@ -60,12 +60,12 @@ public interface CoreSessionInterface {
public Principal getPrincipal();
public IterableQueryResult queryAndFetch(String query, String queryType,
- Object... params) throws ClientException, DocumentException;
+ Object... params) throws NuxeoException, DocumentException;
public DocumentModelList query(String query, Filter filter, long limit,
- long offset, boolean countTotal) throws ClientException, DocumentException;
+ long offset, boolean countTotal) throws NuxeoException, DocumentException;
- public DocumentModelList query(String query) throws ClientException, DocumentException;
+ public DocumentModelList query(String query) throws NuxeoException, DocumentException;
/**
* Executes the given NXQL query an returns the result.
@@ -73,10 +73,10 @@ public DocumentModelList query(String query, Filter filter, long limit,
* @param query the query to execute
* @param max number of document to retrieve
* @return the query result
- * @throws ClientException
+ * @throws NuxeoException
* @throws DocumentException
*/
- public DocumentModelList query(String query, int max) throws ClientException, DocumentException;
+ public DocumentModelList query(String query, int max) throws NuxeoException, DocumentException;
/**
* Executes the given NXQL query and returns the result that matches the
@@ -86,7 +86,7 @@ public DocumentModelList query(String query, Filter filter, long limit,
* @param filter the filter to apply to result
* @return the query result
* @throws DocumentException
- * @throws ClientException
+ * @throws NuxeoException
*/
public DocumentModelList query(String query, LifeCycleFilter workflowStateFilter) throws DocumentException;
@@ -101,30 +101,30 @@ public DocumentModelList query(String query, Filter filter, long limit,
*
* @param docRef the document reference
* @return the document
- * @throws ClientException
+ * @throws NuxeoException
* @throws SecurityException
*/
- public DocumentModel getDocument(DocumentRef docRef) throws ClientException;
+ public DocumentModel getDocument(DocumentRef docRef) throws NuxeoException;
- public DocumentModel saveDocument(DocumentModel docModel) throws ClientException;
+ public DocumentModel saveDocument(DocumentModel docModel) throws NuxeoException;
- public void save() throws ClientException;
+ public void save() throws NuxeoException;
/**
* Bulk document saving.
*
* @param docModels the document models that needs to be saved
- * @throws ClientException
+ * @throws NuxeoException
*/
- public void saveDocuments(DocumentModel[] docModels) throws ClientException;
+ public void saveDocuments(DocumentModel[] docModels) throws NuxeoException;
/**
* Removes this document and all its children, if any.
*
* @param docRef the reference to the document to remove
- * @throws ClientException
+ * @throws NuxeoException
*/
- public void removeDocument(DocumentRef docRef) throws ClientException;
+ public void removeDocument(DocumentRef docRef) throws NuxeoException;
/**
* Creates a document model using required information.
@@ -139,10 +139,10 @@ public DocumentModelList query(String query, Filter filter, long limit,
* @param id
* @param typeName
* @return the initial document model
- * @throws ClientException
+ * @throws NuxeoException
*/
public DocumentModel createDocumentModel(String parentPath, String id,
- String typeName) throws ClientException;
+ String typeName) throws NuxeoException;
/**
* Creates a document using given document model for initialization.
@@ -153,9 +153,9 @@ public DocumentModel createDocumentModel(String parentPath, String id,
*
* @param model the document model to use for initialization
* @return the created document
- * @throws ClientException
+ * @throws NuxeoException
*/
- public DocumentModel createDocument(DocumentModel model) throws ClientException;
+ public DocumentModel createDocument(DocumentModel model) throws NuxeoException;
/**
* Gets the children of the given parent.
@@ -163,9 +163,9 @@ public DocumentModel createDocumentModel(String parentPath, String id,
* @param parent the parent reference
* @return the children if any, an empty list if no children or null if the
* specified parent document is not a folder
- * @throws ClientException
+ * @throws NuxeoException
*/
- public DocumentModelList getChildren(DocumentRef parent) throws ClientException;
+ public DocumentModelList getChildren(DocumentRef parent) throws NuxeoException;
}
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java
index 14459dfdf0..953e9ed5ca 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java
@@ -14,12 +14,12 @@
import java.util.regex.Pattern;
import org.collectionspace.services.common.document.DocumentException;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
import org.nuxeo.ecm.core.api.DocumentRef;
import org.nuxeo.ecm.core.api.Filter;
import org.nuxeo.ecm.core.api.IterableQueryResult;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
import org.nuxeo.ecm.core.api.impl.LifeCycleFilter;
import org.nuxeo.ecm.core.api.CoreSession;
@@ -96,11 +96,11 @@ public void close() throws Exception {
* Gets the root document of this repository.
*
* @return the root document. cannot be null
- * @throws ClientException
+ * @throws NuxeoException
* @throws SecurityException
*/
@Override
- public DocumentModel getRootDocument() throws ClientException {
+ public DocumentModel getRootDocument() throws NuxeoException {
return repoSession.getRootDocument();
}
@@ -171,7 +171,7 @@ private String localizeTimestamps(String query) throws DocumentException {
@Override
public IterableQueryResult queryAndFetch(String query, String queryType,
- Object... params) throws ClientException, DocumentException {
+ Object... params) throws NuxeoException, DocumentException {
query = localizeTimestamps(query);
logQuery(query, queryType);
return repoSession.queryAndFetch(query, queryType, params);
@@ -179,21 +179,21 @@ public IterableQueryResult queryAndFetch(String query, String queryType,
@Override
public DocumentModelList query(String query, Filter filter, long limit,
- long offset, boolean countTotal) throws ClientException, DocumentException {
+ long offset, boolean countTotal) throws NuxeoException, DocumentException {
query = localizeTimestamps(query);
logQuery(query, filter, limit, offset, countTotal);
return repoSession.query(query, filter, limit, offset, countTotal);
}
@Override
- public DocumentModelList query(String query, int max) throws ClientException, DocumentException {
+ public DocumentModelList query(String query, int max) throws NuxeoException, DocumentException {
query = localizeTimestamps(query);
logQuery(query);
return repoSession.query(query, max);
}
@Override
- public DocumentModelList query(String query) throws ClientException, DocumentException {
+ public DocumentModelList query(String query) throws NuxeoException, DocumentException {
query = localizeTimestamps(query);
logQuery(query);
return repoSession.query(query);
@@ -216,16 +216,16 @@ public DocumentModelList query(String query, LifeCycleFilter workflowStateFilter
*
* @param docRef the document reference
* @return the document
- * @throws ClientException
+ * @throws NuxeoException
* @throws SecurityException
*/
@Override
- public DocumentModel getDocument(DocumentRef docRef) throws ClientException {
+ public DocumentModel getDocument(DocumentRef docRef) throws NuxeoException {
return repoSession.getDocument(docRef);
}
@Override
- public DocumentModel saveDocument(DocumentModel docModel) throws ClientException {
+ public DocumentModel saveDocument(DocumentModel docModel) throws NuxeoException {
DocumentModel result = null;
try {
@@ -244,7 +244,7 @@ public DocumentModel saveDocument(DocumentModel docModel) throws ClientException
}
@Override
- public void save() throws ClientException {
+ public void save() throws NuxeoException {
try {
if (isTransactionMarkedForRollbackOnly() == false) {
repoSession.save();
@@ -262,10 +262,10 @@ public void save() throws ClientException {
* Bulk document saving.
*
* @param docModels the document models that needs to be saved
- * @throws ClientException
+ * @throws NuxeoException
*/
@Override
- public void saveDocuments(DocumentModel[] docModels) throws ClientException {
+ public void saveDocuments(DocumentModel[] docModels) throws NuxeoException {
try {
if (isTransactionMarkedForRollbackOnly() == false) {
repoSession.saveDocuments(docModels);
@@ -283,10 +283,10 @@ public void saveDocuments(DocumentModel[] docModels) throws ClientException {
* Removes this document and all its children, if any.
*
* @param docRef the reference to the document to remove
- * @throws ClientException
+ * @throws NuxeoException
*/
@Override
- public void removeDocument(DocumentRef docRef) throws ClientException {
+ public void removeDocument(DocumentRef docRef) throws NuxeoException {
repoSession.removeDocument(docRef);
}
@@ -303,11 +303,11 @@ public void removeDocument(DocumentRef docRef) throws ClientException {
* @param id
* @param typeName
* @return the initial document model
- * @throws ClientException
+ * @throws NuxeoException
*/
@Override
public DocumentModel createDocumentModel(String parentPath, String id,
- String typeName) throws ClientException {
+ String typeName) throws NuxeoException {
return repoSession.createDocumentModel(parentPath, id, typeName);
}
@@ -320,10 +320,10 @@ public DocumentModel createDocumentModel(String parentPath, String id,
*
* @param model the document model to use for initialization
* @return the created document
- * @throws ClientException
+ * @throws NuxeoException
*/
@Override
- public DocumentModel createDocument(DocumentModel model) throws ClientException {
+ public DocumentModel createDocument(DocumentModel model) throws NuxeoException {
return repoSession.createDocument(model);
}
@@ -333,10 +333,10 @@ public DocumentModel createDocument(DocumentModel model) throws ClientException
* @param parent the parent reference
* @return the children if any, an empty list if no children or null if the
* specified parent document is not a folder
- * @throws ClientException
+ * @throws NuxeoException
*/
@Override
- public DocumentModelList getChildren(DocumentRef parent) throws ClientException {
+ public DocumentModelList getChildren(DocumentRef parent) throws NuxeoException {
return repoSession.getChildren(parent);
}
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java
index 828260d44a..083a28250a 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java
@@ -54,10 +54,10 @@
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.AuthRefConfigInfo;
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.Specifier;
import org.collectionspace.services.lifecycle.Lifecycle;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
-import org.nuxeo.ecm.core.api.model.PropertyException;
+import org.nuxeo.ecm.core.api.NuxeoException;
+import org.nuxeo.ecm.core.api.PropertyException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -264,7 +264,7 @@ protected RefName.RefNameInterface getRefName(DocumentWrapper doc
}
private void handleCoreValues(DocumentWrapper docWrapper,
- Action action) throws ClientException {
+ Action action) throws NuxeoException {
DocumentModel documentModel = docWrapper.getWrappedObject();
String now = GregorianCalendarDateTimeUtils.timestampUTC();
ServiceContext ctx = getServiceContext();
@@ -352,7 +352,7 @@ protected boolean hasRefNameUpdate() {
return result;
}
- protected void handleRefNameChanges(ServiceContext ctx, DocumentModel docModel) throws ClientException {
+ protected void handleRefNameChanges(ServiceContext ctx, DocumentModel docModel) throws NuxeoException {
// First get the old refName
this.oldRefNameOnUpdate = (String)docModel.getProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA,
CollectionSpaceClient.COLLECTIONSPACE_CORE_REFNAME);
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java
index 559e3ccf49..38b05736c6 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java
@@ -23,24 +23,20 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
-import java.security.Principal;
+import javax.transaction.TransactionManager;
import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.repository.RepositoryInstanceWrapperAdvice;
import org.collectionspace.services.config.tenant.RepositoryDomainType;
-import org.nuxeo.ecm.core.api.repository.Repository;
import org.nuxeo.ecm.core.api.CoreInstance;
import org.nuxeo.ecm.core.api.CoreSession;
import org.nuxeo.ecm.core.api.NuxeoPrincipal;
import org.nuxeo.ecm.core.api.SystemPrincipal;
+import org.nuxeo.ecm.core.api.repository.Repository;
import org.nuxeo.ecm.core.api.repository.RepositoryManager;
import org.nuxeo.runtime.api.Framework;
import org.nuxeo.runtime.jtajca.NuxeoContainer;
import org.nuxeo.runtime.transaction.TransactionHelper;
-
-import javax.transaction.TransactionManager;
-import javax.transaction.UserTransaction;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.framework.ProxyFactory;
@@ -278,9 +274,8 @@ private CoreSessionInterface getAOPProxy(CoreSession repositoryInstance) {
return result;
}
- private Principal getSystemPrincipal() {
- NuxeoPrincipal principal = new SystemPrincipal(null);
- return principal;
+ private NuxeoPrincipal getSystemPrincipal() {
+ return new SystemPrincipal(null);
}
/*
@@ -291,31 +286,30 @@ private Principal getSystemPrincipal() {
*/
private CoreSessionInterface getCoreSessionWrapper(Repository repository) {
CoreSessionInterface result = null;
-
+
CoreSession coreSession = null;
try {
- coreSession = CoreInstance.openCoreSession(repository.getName(), getSystemPrincipal()); // A Nuxeo repo instance handler proxy
+ // A Nuxeo repo instance handler proxy
+ coreSession = CoreInstance.getCoreSession(repository.getName(), getSystemPrincipal());
} catch (Exception e) {
- logger.warn(String.format("Could not open a session to the '%s' repository. The current request to the CollectionSpace services API will fail.",
- repository != null ? repository.getName() : "not specified"), e);
+ logger.warn(
+ "Could not open a session to the '{}' repository. The current request to the CollectionSpace services API will fail.",
+ repository != null ? repository.getName() : "not specified", e);
}
-
+
if (coreSession != null) {
result = this.getAOPProxy(coreSession); // This is our AOP proxy
if (result != null) {
String key = result.getSessionId();
repositoryInstances.put(key, result);
} else {
- //
- // Since we couldn't get an AOP proxy, we need to close the core session.
- //
- CoreInstance.closeCoreSession(coreSession);
- String errMsg = String.format("Could not instantiate a Spring AOP proxy for class '%s'.",
- CoreSessionWrapper.class.getName());
- logger.error(errMsg);
+ // This is now a no-op and probably isn't necessary
+ coreSession.close();
+ logger.error("Could not instantiate a Spring AOP proxy for class '{}'.",
+ CoreSessionWrapper.class.getName());
}
}
-
+
return result;
}
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java
index 0fca95e1c8..61f41379ef 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java
@@ -139,13 +139,13 @@ private void startNuxeoEP(String serverRootPath) throws Exception {
try {
Repository defaultRepo = Framework.getService(RepositoryManager.class).getDefaultRepository();
- coreSession = CoreInstance.openCoreSession(defaultRepo.getName(), new SystemPrincipal(null));
+ coreSession = CoreInstance.getCoreSession(defaultRepo.getName(), new SystemPrincipal(null));
} catch (Throwable t) {
logger.error(t.getMessage());
throw new RuntimeException("Could not start the Nuxeo EP Framework", t);
} finally {
if (coreSession != null) {
- CoreInstance.closeCoreSession(coreSession);
+ coreSession.close();
}
if (transactionStarted) {
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoDocumentException.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoDocumentException.java
index 1ed3cfe00d..b96b95ce51 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoDocumentException.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoDocumentException.java
@@ -5,7 +5,6 @@
import org.apache.http.HttpStatus;
import org.nuxeo.ecm.core.api.ConcurrentUpdateException;
-import org.nuxeo.ecm.core.api.WrappedException;
public class NuxeoDocumentException extends DocumentException {
@@ -50,11 +49,8 @@ private static String getExceptionClassName(Throwable exception) {
if (exception != null) {
result = exception.getClass().getCanonicalName();
- if (exception instanceof WrappedException) {
- result = ((WrappedException)exception).getClassName(); // Nuxeo wraps the original exception, so we need to get the name of it.
- }
}
-
+
return result;
}
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoRepositoryClientImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoRepositoryClientImpl.java
index 537cba57ae..a9cf5d8233 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoRepositoryClientImpl.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoRepositoryClientImpl.java
@@ -28,17 +28,13 @@
import java.util.Map;
import java.util.Set;
import java.util.UUID;
-
import javax.sql.rowset.CachedRowSet;
import javax.ws.rs.core.MultivaluedMap;
-//
-// CSPACE-5036 - How to make CMISQL queries from Nuxeo
-//
import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
import org.apache.chemistry.opencmis.commons.server.CallContext;
import org.apache.chemistry.opencmis.server.impl.CallContextImpl;
-import org.apache.chemistry.opencmis.server.shared.ThresholdOutputStreamFactory;
+import org.apache.chemistry.opencmis.server.shared.TempStoreOutputStreamFactory;
import org.collectionspace.services.client.CollectionSpaceClient;
import org.collectionspace.services.client.IQueryManager;
import org.collectionspace.services.client.PoxPayloadIn;
@@ -75,12 +71,12 @@
import org.collectionspace.services.nuxeo.util.CSReindexFulltextRoot;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
import org.nuxeo.common.utils.IdUtils;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
import org.nuxeo.ecm.core.api.DocumentRef;
import org.nuxeo.ecm.core.api.IdRef;
import org.nuxeo.ecm.core.api.IterableQueryResult;
+import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.PathRef;
import org.nuxeo.ecm.core.api.VersioningOption;
import org.nuxeo.ecm.core.api.impl.DocumentModelListImpl;
@@ -104,12 +100,8 @@
*/
public class NuxeoRepositoryClientImpl implements RepositoryClient {
- /**
- * The logger.
- */
private final Logger logger = LoggerFactory.getLogger(NuxeoRepositoryClientImpl.class);
-// private final Logger profilerLogger = LoggerFactory.getLogger("remperf");
-// private String foo = Profiler.createLogger();
+
public static final String NUXEO_CORE_TYPE_DOMAIN = "Domain";
public static final String NUXEO_CORE_TYPE_WORKSPACEROOT = "WorkspaceRoot";
// FIXME: Get this value from an existing constant, if available
@@ -129,7 +121,8 @@ public NuxeoRepositoryClientImpl() {
//Empty constructor
}
- public void assertWorkflowState(ServiceContext ctx, DocumentModel docModel) throws DocumentNotFoundException, ClientException {
+ public void assertWorkflowState(ServiceContext ctx, DocumentModel docModel) throws DocumentNotFoundException,
+ NuxeoException {
MultivaluedMap queryParams = ctx.getQueryParams();
if (queryParams != null) {
//
@@ -389,7 +382,7 @@ private boolean reindexElasticsearch(DocumentHandler handler, String csid, Strin
@Override
public boolean synchronize(ServiceContext ctx, Object specifier, DocumentHandler handler)
- throws DocumentNotFoundException, TransactionException, DocumentException {
+ throws DocumentNotFoundException, DocumentException {
boolean result = false;
if (handler == null) {
@@ -592,7 +585,7 @@ public void get(ServiceContext ctx, DocumentHandler handler)
public DocumentWrapper getDoc(
CoreSessionInterface repoSession,
ServiceContext ctx,
- String csid) throws DocumentNotFoundException, DocumentException {
+ String csid) throws DocumentNotFoundException {
DocumentWrapper wrapDoc = null;
try {
@@ -600,15 +593,15 @@ public DocumentWrapper getDoc(
DocumentModel doc = null;
try {
doc = repoSession.getDocument(docRef);
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
String msg = logException(ce, "Could not find document with CSID=" + csid);
throw new DocumentNotFoundException(msg, ce);
}
wrapDoc = new DocumentWrapperImpl(doc);
} catch (IllegalArgumentException iae) {
throw iae;
- } catch (DocumentException de) {
- throw de;
+ } catch (NuxeoException ne) {
+ throw ne;
}
return wrapDoc;
@@ -1185,11 +1178,11 @@ public DocumentWrapper getDocFromCsid(ServiceContext wrappedDoc) throws ClientException {
+ public String getDocURI(DocumentWrapper wrappedDoc) throws NuxeoException {
DocumentModel docModel = wrappedDoc.getWrappedObject();
String uri = (String) docModel.getProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA,
CollectionSpaceClient.COLLECTIONSPACE_CORE_URI);
@@ -1208,7 +1201,7 @@ private IterableQueryResult makeCMISQLQuery(CoreSessionInterface repoSession, St
logger.debug(String.format("Performing a CMIS query on Nuxeo repository named %s",
repoSession.getRepositoryName()));
- ThresholdOutputStreamFactory streamFactory = ThresholdOutputStreamFactory.newInstance(
+ TempStoreOutputStreamFactory streamFactory = TempStoreOutputStreamFactory.newInstance(
null, THRESHOLD, -1, false);
CallContextImpl callContext = new CallContextImpl(
CallContext.BINDING_LOCAL,
@@ -1223,7 +1216,7 @@ private IterableQueryResult makeCMISQLQuery(CoreSessionInterface repoSession, St
NuxeoCmisService cmisService = new NuxeoCmisService(repoSession.getCoreSession());
result = repoSession.queryAndFetch(query, "CMISQL", cmisService);
- } catch (ClientException e) {
+ } catch (NuxeoException e) {
// TODO Auto-generated catch block
logger.error("Encounter trouble making the following CMIS query: " + query, e);
throw new NuxeoDocumentException(e);
@@ -1300,7 +1293,7 @@ public void getFiltered(ServiceContext ctx, DocumentHandler handler)
throw de;
} catch (Exception e) {
if (logger.isDebugEnabled()) {
- logger.debug("Caught exception ", e); // REM - 1/17/2014: Check for org.nuxeo.ecm.core.api.ClientException and re-attempt
+ logger.debug("Caught exception ", e); // REM - 1/17/2014: Check for org.nuxeo.ecm.core.api.NuxeoException and re-attempt
}
throw new NuxeoDocumentException(e);
} finally {
@@ -1791,7 +1784,7 @@ public void update(ServiceContext ctx, String csid, DocumentHandler handler)
* @param docModel the document to save
* @param fSaveSession if TRUE, will call CoreSessionInterface.save() to save
* accumulated changes.
- * @throws ClientException
+ * @throws NuxeoException
* @throws DocumentException
*/
@Deprecated
@@ -1800,14 +1793,14 @@ public void saveDocWithoutHandlerProcessing(
CoreSessionInterface repoSession,
DocumentModel docModel,
boolean fSaveSession)
- throws ClientException, DocumentException {
+ throws NuxeoException, DocumentException {
try {
repoSession.saveDocument(docModel);
if (fSaveSession) {
repoSession.save();
}
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw ce;
} catch (Exception e) {
if (logger.isDebugEnabled()) {
@@ -1825,7 +1818,7 @@ public void saveDocWithoutHandlerProcessing(
* @param docModelList a list of document models
* @param fSaveSession if TRUE, will call CoreSessionInterface.save() to save
* accumulated changes.
- * @throws ClientException
+ * @throws NuxeoException
* @throws DocumentException
*/
public void saveDocListWithoutHandlerProcessing(
@@ -1833,14 +1826,14 @@ public void saveDocListWithoutHandlerProcessing(
CoreSessionInterface repoSession,
DocumentModelList docList,
boolean fSaveSession)
- throws ClientException, DocumentException {
+ throws NuxeoException, DocumentException {
try {
DocumentModel[] docModelArray = new DocumentModel[docList.size()];
repoSession.saveDocuments(docList.toArray(docModelArray));
if (fSaveSession) {
repoSession.save();
}
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw ce;
} catch (Exception e) {
logger.error("Caught exception ", e);
@@ -2084,7 +2077,7 @@ private DocumentModel getWorkspacesRoot(CoreSessionInterface repoSession,
}
if (result == null) {
- throw new ClientException("Could not find workspace root directory in: "
+ throw new NuxeoException("Could not find workspace root directory in: "
+ domainPath);
}
@@ -2283,9 +2276,7 @@ public void releaseRepositorySession(ServiceContext
@Override
public void doWorkflowTransition(ServiceContext ctx, String id,
- DocumentHandler handler, TransitionDef transitionDef)
- throws BadRequestException, DocumentNotFoundException,
- DocumentException {
+ DocumentHandler handler, TransitionDef transitionDef) {
// This is a placeholder for when we change the StorageClient interface to treat workflow transitions as 1st class operations like 'get', 'create', 'update, 'delete', etc
}
@@ -2399,7 +2390,7 @@ private void rollbackTransaction(CoreSessionInterface repoSession) {
*/
@Override
public boolean delete(ServiceContext ctx, Object entityFound, DocumentHandler handler)
- throws DocumentNotFoundException, DocumentException {
+ throws DocumentException {
throw new UnsupportedOperationException();
}
}
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/ObjectFactory.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/ObjectFactory.java
index ec1d553bae..3d35a61674 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/ObjectFactory.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/ObjectFactory.java
@@ -23,7 +23,7 @@
*/
package org.collectionspace.services.nuxeo.client.java;
-import javax.xml.bind.annotation.XmlRegistry;
+import jakarta.xml.bind.annotation.XmlRegistry;
/**
* ObjectFactory for CommonList
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java
index eb6b0158ca..b1f961c8c7 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java
@@ -37,7 +37,7 @@
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-import javax.xml.bind.JAXBElement;
+import jakarta.xml.bind.JAXBElement;
import org.collectionspace.authentication.AuthN;
import org.collectionspace.services.authorization.AccountPermission;
@@ -91,7 +91,7 @@
import org.nuxeo.ecm.core.api.impl.DataModelImpl;
import org.nuxeo.ecm.core.api.model.DocumentPart;
import org.nuxeo.ecm.core.api.model.Property;
-import org.nuxeo.ecm.core.api.model.PropertyException;
+import org.nuxeo.ecm.core.api.PropertyException;
import org.nuxeo.ecm.core.api.model.impl.ScalarProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -251,7 +251,7 @@ public boolean handleDelete(DocumentWrapper wrapDoc) throws Excep
public void completeUpdate(DocumentWrapper wrapDoc) throws Exception {
DocumentModel docModel = wrapDoc.getWrappedObject();
- String[] schemas = docModel.getDeclaredSchemas();
+ String[] schemas = docModel.getSchemas();
Map partsMetaMap = getServiceContext().getPartsMetadata();
for (String schema : schemas) {
ObjectPartType partMeta = partsMetaMap.get(schema);
@@ -353,7 +353,7 @@ public void extractAllParts(DocumentWrapper wrapDoc)
throws Exception {
DocumentModel docModel = wrapDoc.getWrappedObject();
- String[] schemas = docModel.getDeclaredSchemas();
+ String[] schemas = docModel.getSchemas();
Map partsMetaMap = getServiceContext().getPartsMetadata();
for (String schema : schemas) {
ObjectPartType partMeta = partsMetaMap.get(schema);
@@ -404,7 +404,7 @@ private void addExtraCoreValues(DocumentModel docModel, Map unQO
private void addAccountPermissionsPart() throws Exception {
Profiler profiler = new Profiler("addAccountPermissionsPart():", 1);
profiler.start();
-
+
MultipartServiceContext ctx = (MultipartServiceContext) getServiceContext();
String currentServiceName = ctx.getServiceName();
String workflowSubResource = "/";
@@ -417,12 +417,9 @@ private void addAccountPermissionsPart() throws Exception {
}
AccountPermission accountPermission = JpaStorageUtils.getAccountPermissions(JpaStorageUtils.CS_CURRENT_USER,
currentServiceName, workflowSubResource);
- org.collectionspace.services.authorization.ObjectFactory objectFactory =
- new org.collectionspace.services.authorization.ObjectFactory();
- JAXBElement ap = objectFactory.createAccountPermission(accountPermission);
- PayloadOutputPart accountPermissionPart = new PayloadOutputPart("account_permission", ap); // REM - "account_permission" should be using a constant and not a literal
+ PayloadOutputPart accountPermissionPart = new PayloadOutputPart("account_permission", accountPermission);
ctx.addOutputPart(accountPermissionPart);
-
+
profiler.stop();
}
@@ -768,9 +765,8 @@ public AuthorityRefList getAuthorityRefs(
return authRefList;
}
- private boolean appendToAuthRefsList(RefNameServiceUtils.AuthRefInfo ari,
- List list)
- throws Exception {
+ private boolean appendToAuthRefsList(RefNameServiceUtils.AuthRefInfo ari,
+ List list) {
String fieldName = ari.getQualifiedDisplayName();
try {
String refNameValue = (String)ari.getProperty().getValue();
@@ -780,12 +776,7 @@ private boolean appendToAuthRefsList(RefNameServiceUtils.AuthRefInfo ari,
return true;
}
} catch(PropertyException pe) {
- String msg = "PropertyException on: "+ari.getProperty().getPath()+pe.getLocalizedMessage();
- if (logger.isDebugEnabled()) {
- logger.debug(msg, pe);
- } else {
- logger.error(msg);
- }
+ logger.error("PropertyException on: {} {}", ari.getProperty().getXPath(), pe.getLocalizedMessage(), pe);
}
return false;
}
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/package-info.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/package-info.java
index 648de4f715..5b29334bd0 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/package-info.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/package-info.java
@@ -1,3 +1,3 @@
// We make the CommonList act like an AbstractCommonList, by setting its namespace
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://collectionspace.org/services/jaxb")
+@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://collectionspace.org/services/jaxb")
package org.collectionspace.services.nuxeo.client.java;
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/listener/AbstractCSEventListenerImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/listener/AbstractCSEventListenerImpl.java
index 3d7ad65e30..0d326769ab 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/listener/AbstractCSEventListenerImpl.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/listener/AbstractCSEventListenerImpl.java
@@ -14,8 +14,6 @@
import org.collectionspace.services.config.tenant.Param;
import org.collectionspace.services.nuxeo.client.java.CoreSessionInterface;
import org.collectionspace.services.nuxeo.util.NuxeoUtils;
-import org.nuxeo.common.collections.ScopeType;
-import org.nuxeo.common.collections.ScopedMap;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
import org.nuxeo.ecm.core.event.Event;
@@ -23,9 +21,9 @@
import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
public abstract class AbstractCSEventListenerImpl implements CSEventListener {
- private static Map> mapOfrepositoryNames = new HashMap>(); //
- private static Map>> eventListenerParamsMap = new HashMap>>(); // >>
- private static Map nameMap = new HashMap();
+ private static Map> mapOfrepositoryNames = new HashMap<>(); //
+ private static Map>> eventListenerParamsMap = new HashMap<>(); // >>
+ private static Map nameMap = new HashMap<>();
// SQL clauses
private final static String NONVERSIONED_NONPROXY_DOCUMENT_WHERE_CLAUSE_FRAGMENT =
@@ -34,7 +32,7 @@ public abstract class AbstractCSEventListenerImpl implements CSEventListener {
protected final static String ACTIVE_DOCUMENT_WHERE_CLAUSE_FRAGMENT =
"AND (ecm:currentLifeCycleState <> 'deleted') "
+ NONVERSIONED_NONPROXY_DOCUMENT_WHERE_CLAUSE_FRAGMENT;
- static final String DOCMODEL_CONTEXT_PROPERTY_PREFIX = ScopeType.DEFAULT.getScopePrefix();
+ private static final String DOCMODEL_CONTEXT_PROPERTY_PREFIX = "default/";
private String currentRepositoryName;
public AbstractCSEventListenerImpl() {
@@ -228,8 +226,8 @@ protected Serializable getContextPropertyValue(DocumentEventContext docEventCont
//
@Override
public void setDocModelContextProperty(DocumentModel collectionObjectDocModel, String key, Serializable value) {
- ScopedMap contextData = collectionObjectDocModel.getContextData();
- contextData.putIfAbsent(DOCMODEL_CONTEXT_PROPERTY_PREFIX + key, value);
+ Map contextData = collectionObjectDocModel.getContextData();
+ contextData.putIfAbsent(DOCMODEL_CONTEXT_PROPERTY_PREFIX + key, value);
}
//
@@ -237,8 +235,8 @@ public void setDocModelContextProperty(DocumentModel collectionObjectDocModel, S
//
@Override
public void clearDocModelContextProperty(DocumentModel docModel, String key) {
- ScopedMap contextData = docModel.getContextData();
- contextData.remove(DOCMODEL_CONTEXT_PROPERTY_PREFIX + key);
+ Map contextData = docModel.getContextData();
+ contextData.remove(DOCMODEL_CONTEXT_PROPERTY_PREFIX + key);
}
//
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java
index e036d7f41f..727160e060 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java
@@ -50,7 +50,6 @@
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.AuthorityItemSpecifier;
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.Specifier;
import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.SpecifierForm;
-import org.collectionspace.services.config.tenant.RepositoryDomainType;
import org.collectionspace.services.lifecycle.Lifecycle;
import org.collectionspace.services.lifecycle.State;
import org.collectionspace.services.lifecycle.StateList;
@@ -66,7 +65,6 @@
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
import org.nuxeo.ecm.core.api.Blob;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.CoreSession;
import org.nuxeo.ecm.core.api.DocumentRef;
import org.nuxeo.ecm.core.api.IdRef;
@@ -493,7 +491,7 @@ public static Document getDocument(CoreSessionInterface repoSession, String csid
*
* @throws DocumentException the document exception
* @throws IOException Signals that an I/O exception has occurred.
- * @throws ClientException the client exception
+ * @throws NuxeoException the client exception
*/
public static DocumentModel getWorkspaceModel(
CoreSessionInterface repoSession, String workspaceName)
@@ -955,7 +953,7 @@ public static String prepareStringLiteral(String s) {
}
public static boolean documentExists(CoreSessionInterface repoSession,
- String csid) throws ClientException, DocumentException {
+ String csid) throws NuxeoException, DocumentException {
boolean result = false;
String statement = String.format(
diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java
index 2458da6089..eb86ceae9c 100644
--- a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java
+++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java
@@ -44,15 +44,15 @@
import org.nuxeo.ecm.core.api.IterableQueryResult;
import org.nuxeo.ecm.core.api.NuxeoException;
import org.nuxeo.ecm.core.api.NuxeoPrincipal;
+import org.nuxeo.ecm.core.api.repository.FulltextConfiguration;
import org.nuxeo.ecm.core.event.EventService;
import org.nuxeo.ecm.core.query.QueryFilter;
import org.nuxeo.ecm.core.query.sql.NXQL;
-import org.nuxeo.ecm.core.storage.FulltextConfiguration;
+import org.nuxeo.ecm.core.storage.FulltextExtractorWork;
import org.nuxeo.ecm.core.storage.sql.Model;
import org.nuxeo.ecm.core.storage.sql.Node;
import org.nuxeo.ecm.core.storage.sql.Session;
import org.nuxeo.ecm.core.storage.sql.SimpleProperty;
-import org.nuxeo.ecm.core.storage.sql.coremodel.SQLFulltextExtractorWork;
import org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession;
import org.nuxeo.ecm.core.work.api.Work;
import org.nuxeo.ecm.core.work.api.WorkManager;
@@ -263,7 +263,7 @@ protected void doBatch(List infos) throws NuxeoException {
runAsyncBatch(asyncIds);
// wait for async completion after transaction commit
- Framework.getLocalService(EventService.class).waitForAsyncCompletion();
+ Framework.getService(EventService.class).waitForAsyncCompletion();
}
/*
@@ -312,9 +312,9 @@ protected void runAsyncBatch(Set asyncIds) {
return;
}
String repositoryName = coreSession.getRepositoryName();
- WorkManager workManager = Framework.getLocalService(WorkManager.class);
+ WorkManager workManager = Framework.getService(WorkManager.class);
for (String id : asyncIds) {
- Work work = new SQLFulltextExtractorWork(repositoryName, id);
+ Work work = new FulltextExtractorWork(repositoryName, id, false, true, false);
// schedule immediately, we're outside a transaction
workManager.schedule(work, Scheduling.IF_NOT_SCHEDULED, false);
}
diff --git a/services/common/src/test/java/org/collectionspace/services/common/test/AbstractSecurityTestBase.java b/services/common/src/test/java/org/collectionspace/services/common/test/AbstractSecurityTestBase.java
index 2fdd5da6ed..2ec195f5a9 100644
--- a/services/common/src/test/java/org/collectionspace/services/common/test/AbstractSecurityTestBase.java
+++ b/services/common/src/test/java/org/collectionspace/services/common/test/AbstractSecurityTestBase.java
@@ -2,7 +2,7 @@
import java.io.ByteArrayInputStream;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import org.collectionspace.services.common.config.ServicesConfigReaderImpl;
diff --git a/services/common/src/test/java/org/collectionspace/services/common/test/SecurityUtilsTest.java b/services/common/src/test/java/org/collectionspace/services/common/test/SecurityUtilsTest.java
index 22b6fc62b7..debac3a76e 100644
--- a/services/common/src/test/java/org/collectionspace/services/common/test/SecurityUtilsTest.java
+++ b/services/common/src/test/java/org/collectionspace/services/common/test/SecurityUtilsTest.java
@@ -2,7 +2,7 @@
import java.util.Set;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import org.collectionspace.services.common.security.SecurityUtils;
import org.collectionspace.services.config.AssertionProbesType;
diff --git a/services/concept/client/pom.xml b/services/concept/client/pom.xml
index 9525e09204..9f9d250518 100644
--- a/services/concept/client/pom.xml
+++ b/services/concept/client/pom.xml
@@ -51,11 +51,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/concept/jaxb/pom.xml b/services/concept/jaxb/pom.xml
index af24038e3b..2516ddc1e7 100644
--- a/services/concept/jaxb/pom.xml
+++ b/services/concept/jaxb/pom.xml
@@ -13,19 +13,9 @@
services.concept.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.common
-
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.authority.jaxb
- true
${project.version}
@@ -35,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/concept/jaxb/src/main/resources/concept_common.xsd b/services/concept/jaxb/src/main/resources/concept_common.xsd
index 505f955bbd..1f0c485b0f 100644
--- a/services/concept/jaxb/src/main/resources/concept_common.xsd
+++ b/services/concept/jaxb/src/main/resources/concept_common.xsd
@@ -8,14 +8,12 @@
Used for: JAXB binding between XML and Java objects
-->
-
diff --git a/services/concept/jaxb/src/main/resources/conceptauthority_common.xsd b/services/concept/jaxb/src/main/resources/conceptauthority_common.xsd
index c319b93fcb..9ce44f12d7 100644
--- a/services/concept/jaxb/src/main/resources/conceptauthority_common.xsd
+++ b/services/concept/jaxb/src/main/resources/conceptauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/config/pom.xml b/services/config/pom.xml
index 71136d8951..3955bacda6 100644
--- a/services/config/pom.xml
+++ b/services/config/pom.xml
@@ -27,14 +27,9 @@
commons-io
- javax.xml.bind
- jaxb-api
+ jakarta.xml.bind
+ jakarta.xml.bind-api
-
- com.sun.xml.bind
- jaxb-core
- test
-
xerces
xercesImpl
@@ -42,22 +37,19 @@
test
- org.jvnet.jaxb2_commons
- jaxb2-basics
-
-
- org.jvnet.jaxb2-commons
- property-listener-injector
-
-
- org.jvnet.jaxb2_commons
- jaxb2-basics-runtime
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
org.collectionspace.services
org.collectionspace.services.common-api
${project.version}
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
@@ -65,8 +57,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/config/src/main/java/org/collectionspace/services/common/config/AbstractConfigReaderImpl.java b/services/config/src/main/java/org/collectionspace/services/common/config/AbstractConfigReaderImpl.java
index a03e118f35..4fc64ed05a 100644
--- a/services/config/src/main/java/org/collectionspace/services/common/config/AbstractConfigReaderImpl.java
+++ b/services/config/src/main/java/org/collectionspace/services/common/config/AbstractConfigReaderImpl.java
@@ -31,11 +31,12 @@
import java.util.ArrayList;
import java.util.List;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.Unmarshaller;
import org.collectionspace.services.common.api.JEEServerDeployment;
+import org.collectionspace.services.common.jaxb.JAXBContextCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -148,7 +149,7 @@ public Object parse(InputStream configFileStream, Class> clazz)
throws JAXBException {
Object result = null;
- JAXBContext jc = JAXBContext.newInstance(clazz);
+ JAXBContext jc = JAXBContextCache.getInstance().getCachedJAXBContext(clazz);
Unmarshaller um = jc.createUnmarshaller();
result = um.unmarshal(configFileStream);
diff --git a/services/config/src/test/java/org/collectionspace/services/common/config/ServicesConfigReaderImplTest.java b/services/config/src/test/java/org/collectionspace/services/common/config/ServicesConfigReaderImplTest.java
index 73c612ccf0..6f9b858e57 100644
--- a/services/config/src/test/java/org/collectionspace/services/common/config/ServicesConfigReaderImplTest.java
+++ b/services/config/src/test/java/org/collectionspace/services/common/config/ServicesConfigReaderImplTest.java
@@ -4,7 +4,7 @@
import java.util.ArrayList;
import java.util.List;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import org.collectionspace.services.config.AssertionAttributeProbeType;
import org.collectionspace.services.config.SAMLRelyingPartyType;
diff --git a/services/conservation/client/pom.xml b/services/conservation/client/pom.xml
index 2f3b35173d..de38d72d00 100644
--- a/services/conservation/client/pom.xml
+++ b/services/conservation/client/pom.xml
@@ -51,11 +51,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/conservation/jaxb/pom.xml b/services/conservation/jaxb/pom.xml
index 22d256ddd2..5dead3adb1 100644
--- a/services/conservation/jaxb/pom.xml
+++ b/services/conservation/jaxb/pom.xml
@@ -7,26 +7,30 @@
org.collectionspace.services
${revision}
-
+
4.0.0
org.collectionspace.services.conservation.jaxb
services.conservation.jaxb
-
+
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
-
+
collectionspace-services-conservation-jaxb
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/conservation/jaxb/src/main/resources/conservation-common.xsd b/services/conservation/jaxb/src/main/resources/conservation-common.xsd
index cc9a996c6a..62aab79ede 100644
--- a/services/conservation/jaxb/src/main/resources/conservation-common.xsd
+++ b/services/conservation/jaxb/src/main/resources/conservation-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/consultation/client/pom.xml b/services/consultation/client/pom.xml
index 848d86dcae..df28c42ba8 100644
--- a/services/consultation/client/pom.xml
+++ b/services/consultation/client/pom.xml
@@ -32,7 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -41,10 +41,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -58,4 +54,4 @@
collectionspace-services-consultation-client
-
\ No newline at end of file
+
diff --git a/services/consultation/jaxb/pom.xml b/services/consultation/jaxb/pom.xml
index 98cc855583..80579927b0 100644
--- a/services/consultation/jaxb/pom.xml
+++ b/services/consultation/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/consultation/jaxb/src/main/resources/consultations_common.xsd b/services/consultation/jaxb/src/main/resources/consultations_common.xsd
index 0f1af8bb80..97e6d95c11 100644
--- a/services/consultation/jaxb/src/main/resources/consultations_common.xsd
+++ b/services/consultation/jaxb/src/main/resources/consultations_common.xsd
@@ -10,8 +10,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/contact/client/pom.xml b/services/contact/client/pom.xml
index bb18c23027..444867b187 100644
--- a/services/contact/client/pom.xml
+++ b/services/contact/client/pom.xml
@@ -45,11 +45,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
@@ -59,6 +55,11 @@
commons-httpclient
commons-httpclient
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
diff --git a/services/contact/jaxb/pom.xml b/services/contact/jaxb/pom.xml
index 8e1b6f9503..ab1b1fad64 100644
--- a/services/contact/jaxb/pom.xml
+++ b/services/contact/jaxb/pom.xml
@@ -7,26 +7,30 @@
org.collectionspace.services.contact
${revision}
-
+
4.0.0
org.collectionspace.services.contact.jaxb
services.contact.jaxb
-
+
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
-
+
collectionspace-services-contact-jaxb
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
@@ -35,4 +39,3 @@
-
diff --git a/services/contact/jaxb/src/main/resources/contacts-common.xsd b/services/contact/jaxb/src/main/resources/contacts-common.xsd
index 81ca550088..df76462433 100644
--- a/services/contact/jaxb/src/main/resources/contacts-common.xsd
+++ b/services/contact/jaxb/src/main/resources/contacts-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
-
diff --git a/services/contact/service/pom.xml b/services/contact/service/pom.xml
index e0484bcbf2..9edad6f47f 100644
--- a/services/contact/service/pom.xml
+++ b/services/contact/service/pom.xml
@@ -56,11 +56,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/deaccession/client/pom.xml b/services/deaccession/client/pom.xml
index fd8fa06172..0018558b11 100644
--- a/services/deaccession/client/pom.xml
+++ b/services/deaccession/client/pom.xml
@@ -32,7 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -41,10 +41,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -53,9 +49,14 @@
commons-httpclient
commons-httpclient
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
collectionspace-services-deaccession-client
-
\ No newline at end of file
+
diff --git a/services/deaccession/jaxb/pom.xml b/services/deaccession/jaxb/pom.xml
index 610d5f0388..ac300e78d5 100644
--- a/services/deaccession/jaxb/pom.xml
+++ b/services/deaccession/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,9 +29,9 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
-
\ No newline at end of file
+
diff --git a/services/deaccession/jaxb/src/main/resources/deaccessions_common.xsd b/services/deaccession/jaxb/src/main/resources/deaccessions_common.xsd
index 0515b12769..08542df130 100644
--- a/services/deaccession/jaxb/src/main/resources/deaccessions_common.xsd
+++ b/services/deaccession/jaxb/src/main/resources/deaccessions_common.xsd
@@ -9,8 +9,7 @@
-->
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/dimension/client/pom.xml b/services/dimension/client/pom.xml
index 57e8dcc42c..1e7b4832b0 100644
--- a/services/dimension/client/pom.xml
+++ b/services/dimension/client/pom.xml
@@ -45,11 +45,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/dimension/jaxb/pom.xml b/services/dimension/jaxb/pom.xml
index 50d13aa8ba..d7768a1c3e 100644
--- a/services/dimension/jaxb/pom.xml
+++ b/services/dimension/jaxb/pom.xml
@@ -19,11 +19,6 @@
org.collectionspace.services.jaxb
${project.version}
-
- org.collectionspace.services
- org.collectionspace.services.hyperjaxb
- ${project.version}
-
@@ -31,8 +26,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/dimension/jaxb/src/main/resources/dimensions-common.xsd b/services/dimension/jaxb/src/main/resources/dimensions-common.xsd
index 40fd310b68..83e1c561a3 100644
--- a/services/dimension/jaxb/src/main/resources/dimensions-common.xsd
+++ b/services/dimension/jaxb/src/main/resources/dimensions-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate: 2009-10-14 14:48:05 -0700 (Wed, 14 Oct 2009) $
-->
-
diff --git a/services/dimension/service/pom.xml b/services/dimension/service/pom.xml
index 43c341c546..0dd3eba750 100644
--- a/services/dimension/service/pom.xml
+++ b/services/dimension/service/pom.xml
@@ -57,11 +57,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/dutyofcare/client/pom.xml b/services/dutyofcare/client/pom.xml
index c5275152ac..22d1fbcc3f 100644
--- a/services/dutyofcare/client/pom.xml
+++ b/services/dutyofcare/client/pom.xml
@@ -52,7 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/dutyofcare/jaxb/pom.xml b/services/dutyofcare/jaxb/pom.xml
index 1b85ef8b85..a4b9700b60 100644
--- a/services/dutyofcare/jaxb/pom.xml
+++ b/services/dutyofcare/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/dutyofcare/jaxb/src/main/resources/dutiesofcare_common.xsd b/services/dutyofcare/jaxb/src/main/resources/dutiesofcare_common.xsd
index 46517dc65b..ecacd06c81 100644
--- a/services/dutyofcare/jaxb/src/main/resources/dutiesofcare_common.xsd
+++ b/services/dutyofcare/jaxb/src/main/resources/dutiesofcare_common.xsd
@@ -9,8 +9,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -63,10 +63,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/exhibition/client/pom.xml b/services/exhibition/client/pom.xml
index 7921ae8995..8fd3ca5b92 100644
--- a/services/exhibition/client/pom.xml
+++ b/services/exhibition/client/pom.xml
@@ -54,11 +54,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/exhibition/jaxb/pom.xml b/services/exhibition/jaxb/pom.xml
index 93624fd486..5d14720ca5 100644
--- a/services/exhibition/jaxb/pom.xml
+++ b/services/exhibition/jaxb/pom.xml
@@ -15,10 +15,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -26,8 +30,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/exhibition/jaxb/src/main/resources/exhibitions-common.xsd b/services/exhibition/jaxb/src/main/resources/exhibitions-common.xsd
index f1a7bed01e..c25779abe5 100644
--- a/services/exhibition/jaxb/src/main/resources/exhibitions-common.xsd
+++ b/services/exhibition/jaxb/src/main/resources/exhibitions-common.xsd
@@ -8,11 +8,9 @@
Used for: JAXB binding between XML and Java objects
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/exit/client/pom.xml b/services/exit/client/pom.xml
index d9ed912c9b..8846323656 100644
--- a/services/exit/client/pom.xml
+++ b/services/exit/client/pom.xml
@@ -32,7 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -41,10 +41,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -53,6 +49,11 @@
commons-httpclient
commons-httpclient
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
diff --git a/services/exit/jaxb/pom.xml b/services/exit/jaxb/pom.xml
index e61c843374..a2a2ce1be6 100644
--- a/services/exit/jaxb/pom.xml
+++ b/services/exit/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/exit/jaxb/src/main/resources/exits_common.xsd b/services/exit/jaxb/src/main/resources/exits_common.xsd
index 3dd9096e00..a50981da7e 100644
--- a/services/exit/jaxb/src/main/resources/exits_common.xsd
+++ b/services/exit/jaxb/src/main/resources/exits_common.xsd
@@ -10,9 +10,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/export/client/pom.xml b/services/export/client/pom.xml
index 3b257b2cab..0edcbea446 100644
--- a/services/export/client/pom.xml
+++ b/services/export/client/pom.xml
@@ -61,11 +61,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/export/jaxb/pom.xml b/services/export/jaxb/pom.xml
index b5cea75ccf..f83692326a 100644
--- a/services/export/jaxb/pom.xml
+++ b/services/export/jaxb/pom.xml
@@ -25,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/export/jaxb/src/main/resources/exports-common.xsd b/services/export/jaxb/src/main/resources/exports-common.xsd
index 95e981c61c..44e3ceccf7 100644
--- a/services/export/jaxb/src/main/resources/exports-common.xsd
+++ b/services/export/jaxb/src/main/resources/exports-common.xsd
@@ -12,13 +12,11 @@
-->
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
diff --git a/services/group/client/pom.xml b/services/group/client/pom.xml
index cb6bc5ce95..6afd946198 100644
--- a/services/group/client/pom.xml
+++ b/services/group/client/pom.xml
@@ -52,11 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/group/jaxb/pom.xml b/services/group/jaxb/pom.xml
index 5ac3e2e1fc..1ba2c23463 100644
--- a/services/group/jaxb/pom.xml
+++ b/services/group/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/group/jaxb/src/main/resources/groups_common.xsd b/services/group/jaxb/src/main/resources/groups_common.xsd
index 5e23c3e08f..c15703b514 100644
--- a/services/group/jaxb/src/main/resources/groups_common.xsd
+++ b/services/group/jaxb/src/main/resources/groups_common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
-
diff --git a/services/group/service/pom.xml b/services/group/service/pom.xml
index f9345a581c..9cae3e1b9e 100644
--- a/services/group/service/pom.xml
+++ b/services/group/service/pom.xml
@@ -56,11 +56,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/heldintrust/client/pom.xml b/services/heldintrust/client/pom.xml
index c79bc4e623..217a1952ff 100644
--- a/services/heldintrust/client/pom.xml
+++ b/services/heldintrust/client/pom.xml
@@ -32,7 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -41,10 +41,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -53,9 +49,14 @@
commons-httpclient
commons-httpclient
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
collectionspace-services-heldintrust-client
-
\ No newline at end of file
+
diff --git a/services/heldintrust/jaxb/pom.xml b/services/heldintrust/jaxb/pom.xml
index f68d6c04f0..a8f659b2f6 100644
--- a/services/heldintrust/jaxb/pom.xml
+++ b/services/heldintrust/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,9 +29,9 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
-
\ No newline at end of file
+
diff --git a/services/heldintrust/jaxb/src/main/resources/heldintrusts_common.xsd b/services/heldintrust/jaxb/src/main/resources/heldintrusts_common.xsd
index 85065a41a5..8f89eba62e 100644
--- a/services/heldintrust/jaxb/src/main/resources/heldintrusts_common.xsd
+++ b/services/heldintrust/jaxb/src/main/resources/heldintrusts_common.xsd
@@ -9,8 +9,7 @@
-->
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/hyperjaxb/pom.xml b/services/hyperjaxb/pom.xml
index e5da60c0cf..c9e4fc4ef0 100644
--- a/services/hyperjaxb/pom.xml
+++ b/services/hyperjaxb/pom.xml
@@ -34,28 +34,19 @@
services.hyperjaxb
-
+
+ org.collectionspace.services
+ org.collectionspace.services.jaxb
+ ${project.version}
+
+
- javax.xml.bind
- jaxb-api
+ jakarta.xml.bind
+ jakarta.xml.bind-api
-
javax.persistence
- persistence-api
+ javax.persistence-api
org.hibernate
@@ -66,22 +57,16 @@
org.dom4j
dom4j
-
- org.jvnet.hyperjaxb3
- hyperjaxb3-ejb-runtime
-
+
+ org.jspecify
+ jspecify
+ 1.0.0
+
collectionspace-services-hyperjaxb
install
-
-
-
- org.jvnet.hyperjaxb3
- maven-hyperjaxb3-plugin
-
-
diff --git a/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/ActionType.java b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/ActionType.java
new file mode 100644
index 0000000000..fd67add3cc
--- /dev/null
+++ b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/ActionType.java
@@ -0,0 +1,26 @@
+package org.collectionspace.services.authorization.perms;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlType;
+
+@XmlEnum
+@XmlType(name = "action_type")
+public enum ActionType {
+ CREATE,
+ READ,
+ UPDATE,
+ DELETE,
+ SEARCH,
+ START,
+ STOP,
+ RUN,
+ ADMIN;
+
+ public String value() {
+ return name();
+ }
+
+ public static ActionType fromValue(String v) {
+ return valueOf(v);
+ }
+}
diff --git a/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/EffectType.java b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/EffectType.java
new file mode 100644
index 0000000000..ad396acfd7
--- /dev/null
+++ b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/EffectType.java
@@ -0,0 +1,19 @@
+package org.collectionspace.services.authorization.perms;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlType;
+
+@XmlEnum
+@XmlType(name = "effect_type")
+public enum EffectType {
+ PERMIT,
+ DENY;
+
+ public String value() {
+ return name();
+ }
+
+ public static EffectType fromValue(String v) {
+ return valueOf(v);
+ }
+}
diff --git a/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/Permission.java b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/Permission.java
new file mode 100644
index 0000000000..04591b8e3a
--- /dev/null
+++ b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/Permission.java
@@ -0,0 +1,247 @@
+package org.collectionspace.services.authorization.perms;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+import javax.persistence.Basic;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.collectionspace.services.jaxb.adapter.DateAdapter;
+import org.jspecify.annotations.NonNull;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "permission")
+@Entity(name = "Permission")
+@Table(name = "permissions")
+@Inheritance(strategy = InheritanceType.JOINED)
+public class Permission {
+
+ @Id
+ @Column(name = "csid", nullable = false, length = 128)
+ @XmlAttribute(name = "csid")
+ private String csid;
+
+ @Basic
+ @Column(name = "description")
+ private String description;
+
+ @Basic
+ @Column(name = "resource_name", nullable = false, length = 128)
+ @XmlElement(required = true)
+ private String resourceName;
+
+ @Basic
+ @Column(name = "attribute_name", length = 128)
+ private String attributeName;
+
+ @Basic
+ @Column(name = "action_group", length = 128)
+ private String actionGroup;
+
+ @OneToMany(
+ targetEntity = PermissionAction.class,
+ cascade = {CascadeType.ALL})
+ @JoinColumn(name = "ACTION__PERMISSION_CSID")
+ @XmlElement(required = true)
+ private List action;
+
+ @Basic
+ @Column(name = "effect", nullable = false, length = 32)
+ @Enumerated(EnumType.STRING)
+ @XmlElement(required = true)
+ private EffectType effect;
+
+ @Basic
+ @Column(name = "metadata_protection")
+ private String metadataProtection;
+
+ @Basic
+ @Column(name = "actions_protection")
+ private String actionsProtection;
+
+ @Basic
+ @Column(name = "tenant_id", nullable = false, length = 128)
+ @XmlElement(name = "tenant_id", required = true)
+ private String tenantId;
+
+ @Column(name = "created_at", nullable = false)
+ @Temporal(TemporalType.TIMESTAMP)
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "dateTime")
+ @XmlJavaTypeAdapter(DateAdapter.class)
+ private Date createdAt;
+
+ @Column(name = "updated_at")
+ @Temporal(TemporalType.TIMESTAMP)
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "dateTime")
+ @XmlJavaTypeAdapter(DateAdapter.class)
+ private Date updatedAt;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public Permission setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public Permission setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ public String getAttributeName() {
+ return attributeName;
+ }
+
+ public Permission setAttributeName(String attributeName) {
+ this.attributeName = attributeName;
+ return this;
+ }
+
+ public String getActionGroup() {
+ return actionGroup;
+ }
+
+ public Permission setActionGroup(String actionGroup) {
+ this.actionGroup = actionGroup;
+ return this;
+ }
+
+ @NonNull
+ public List getAction() {
+ if (action == null) {
+ action = new ArrayList<>();
+ }
+ return action;
+ }
+
+ public Permission setAction(List action) {
+ this.action = action;
+ return this;
+ }
+
+ public EffectType getEffect() {
+ return effect;
+ }
+
+ public Permission setEffect(EffectType effect) {
+ this.effect = effect;
+ return this;
+ }
+
+ public String getMetadataProtection() {
+ return metadataProtection;
+ }
+
+ public Permission setMetadataProtection(String metadataProtection) {
+ this.metadataProtection = metadataProtection;
+ return this;
+ }
+
+ public String getActionsProtection() {
+ return actionsProtection;
+ }
+
+ public Permission setActionsProtection(String actionsProtection) {
+ this.actionsProtection = actionsProtection;
+ return this;
+ }
+
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ public Permission setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ public Date getCreatedAt() {
+ return createdAt;
+ }
+
+ public Permission setCreatedAt(Date createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ public Date getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public Permission setUpdatedAt(Date updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ public String getCsid() {
+ return csid;
+ }
+
+ public Permission setCsid(String csid) {
+ this.csid = csid;
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Permission that = (Permission) o;
+ return Objects.equals(description, that.description)
+ && Objects.equals(resourceName, that.resourceName)
+ && Objects.equals(attributeName, that.attributeName)
+ && Objects.equals(actionGroup, that.actionGroup)
+ && effect == that.effect
+ && Objects.equals(metadataProtection, that.metadataProtection)
+ && Objects.equals(actionsProtection, that.actionsProtection)
+ && Objects.equals(tenantId, that.tenantId)
+ && Objects.equals(createdAt, that.createdAt)
+ && Objects.equals(updatedAt, that.updatedAt)
+ && Objects.equals(csid, that.csid);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ description,
+ resourceName,
+ attributeName,
+ actionGroup,
+ effect,
+ metadataProtection,
+ actionsProtection,
+ tenantId,
+ createdAt,
+ updatedAt,
+ csid);
+ }
+}
diff --git a/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/PermissionAction.java b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/PermissionAction.java
new file mode 100644
index 0000000000..aa9f289a8a
--- /dev/null
+++ b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/PermissionAction.java
@@ -0,0 +1,101 @@
+package org.collectionspace.services.authorization.perms;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlType;
+import java.util.Objects;
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.Table;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "permission_action")
+@Entity(name = "PermissionAction")
+@Table(name = "permissions_actions")
+@Inheritance(strategy = InheritanceType.JOINED)
+public class PermissionAction {
+
+ @Basic
+ @Column(name = "name", nullable = false, length = 128)
+ @Enumerated(EnumType.STRING)
+ @XmlElement(required = true)
+ private ActionType name;
+
+ @Basic
+ @Column(name = "objectIdentity", nullable = false, length = 128)
+ @XmlElement(required = true)
+ private String objectIdentity;
+
+ @Basic
+ @Column(name = "objectIdentityResource", nullable = false, length = 128)
+ @XmlElement(required = true)
+ private String objectIdentityResource;
+
+ @Id
+ @Column(name = "HJID")
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ @XmlAttribute(name = "Hjid")
+ private Long hjid;
+
+ public ActionType getName() {
+ return name;
+ }
+
+ public PermissionAction setName(ActionType name) {
+ this.name = name;
+ return this;
+ }
+
+ public String getObjectIdentity() {
+ return objectIdentity;
+ }
+
+ public PermissionAction setObjectIdentity(String objectIdentity) {
+ this.objectIdentity = objectIdentity;
+ return this;
+ }
+
+ public String getObjectIdentityResource() {
+ return objectIdentityResource;
+ }
+
+ public PermissionAction setObjectIdentityResource(String objectIdentityResource) {
+ this.objectIdentityResource = objectIdentityResource;
+ return this;
+ }
+
+ public Long getHjid() {
+ return hjid;
+ }
+
+ public PermissionAction setHjid(Long hjid) {
+ this.hjid = hjid;
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PermissionAction that = (PermissionAction) o;
+ return name == that.name
+ && Objects.equals(objectIdentity, that.objectIdentity)
+ && Objects.equals(objectIdentityResource, that.objectIdentityResource);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, objectIdentity, objectIdentityResource);
+ }
+}
diff --git a/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/PermissionsList.java b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/PermissionsList.java
new file mode 100644
index 0000000000..762f6ddfc4
--- /dev/null
+++ b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/PermissionsList.java
@@ -0,0 +1,79 @@
+package org.collectionspace.services.authorization.perms;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import java.util.ArrayList;
+import java.util.List;
+import org.jspecify.annotations.NonNull;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "permissions_list")
+public class PermissionsList {
+
+ @XmlSchemaType(name = "unsignedInt")
+ private long pageNum;
+
+ @XmlSchemaType(name = "unsignedInt")
+ private long pageSize;
+
+ @XmlSchemaType(name = "unsignedInt")
+ private long itemsInPage;
+
+ @XmlSchemaType(name = "unsignedInt")
+ private long totalItems;
+
+ @XmlElement(required = true)
+ private List permission;
+
+ public long getPageNum() {
+ return pageNum;
+ }
+
+ public PermissionsList setPageNum(long pageNum) {
+ this.pageNum = pageNum;
+ return this;
+ }
+
+ public long getPageSize() {
+ return pageSize;
+ }
+
+ public PermissionsList setPageSize(long pageSize) {
+ this.pageSize = pageSize;
+ return this;
+ }
+
+ public long getItemsInPage() {
+ return itemsInPage;
+ }
+
+ public PermissionsList setItemsInPage(long itemsInPage) {
+ this.itemsInPage = itemsInPage;
+ return this;
+ }
+
+ public long getTotalItems() {
+ return totalItems;
+ }
+
+ public PermissionsList setTotalItems(long totalItems) {
+ this.totalItems = totalItems;
+ return this;
+ }
+
+ @NonNull
+ public List getPermission() {
+ if (permission == null) {
+ permission = new ArrayList<>();
+ }
+ return permission;
+ }
+
+ public PermissionsList setPermission(List permission) {
+ this.permission = permission;
+ return this;
+ }
+}
diff --git a/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/package-info.java b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/package-info.java
new file mode 100644
index 0000000000..e7e54891fe
--- /dev/null
+++ b/services/hyperjaxb/src/main/java/org/collectionspace/services/authorization/perms/package-info.java
@@ -0,0 +1,4 @@
+@XmlSchema(namespace = "http://collectionspace.org/services/authorization/perms")
+package org.collectionspace.services.authorization.perms;
+
+import jakarta.xml.bind.annotation.XmlSchema;
\ No newline at end of file
diff --git a/services/hyperjaxb/src/main/resources/bindings.xjb b/services/hyperjaxb/src/main/resources/bindings.xjb
deleted file mode 100644
index ce5cc40c49..0000000000
--- a/services/hyperjaxb/src/main/resources/bindings.xjb
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/services/hyperjaxb/src/main/resources/org/collectionspace/services/authorization/perms/jaxb.index b/services/hyperjaxb/src/main/resources/org/collectionspace/services/authorization/perms/jaxb.index
new file mode 100644
index 0000000000..512f6a8a26
--- /dev/null
+++ b/services/hyperjaxb/src/main/resources/org/collectionspace/services/authorization/perms/jaxb.index
@@ -0,0 +1,2 @@
+Permission
+PermissionsList
diff --git a/services/hyperjaxb/src/main/resources/permissions.xsd b/services/hyperjaxb/src/main/resources/permissions.xsd
deleted file mode 100644
index 1bb5fd50fe..0000000000
--- a/services/hyperjaxb/src/main/resources/permissions.xsd
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- CspacePermissionConfig describes permission in CollectionSpace
- - resourceName could be a service path, e.g. collectionobjects or
- intakes
- no need to give slash at the beginning or end
- - attributeName could be an attribute of the service schema
- e.g. distinguishingFeatures from collectionobjects_common
- - actionGroup is label that can be used by a client to "group" sets
- of actions for operations
- like searching for permissions by a specific actionGroup label.
- - action describes the actions that could be taken on given resource
- (and attribute)
- - effect describes the effect of the access control for the action
- performed on the given resource (and attribute)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/services/hyperjaxb/src/main/resources/permissions_list.xsd b/services/hyperjaxb/src/main/resources/permissions_list.xsd
deleted file mode 100644
index f45fe2c535..0000000000
--- a/services/hyperjaxb/src/main/resources/permissions_list.xsd
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- permission configuration list
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/services/id/jaxb/pom.xml b/services/id/jaxb/pom.xml
index 0f1712e467..ef68404a83 100644
--- a/services/id/jaxb/pom.xml
+++ b/services/id/jaxb/pom.xml
@@ -35,8 +35,8 @@
- org.jvnet.jaxb2_commons
- jaxb2-basics-runtime
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -45,8 +45,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/imports/jaxb/pom.xml b/services/imports/jaxb/pom.xml
index 358d9efd84..54eea34174 100644
--- a/services/imports/jaxb/pom.xml
+++ b/services/imports/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/imports/jaxb/src/main/resources/imports_common.xsd b/services/imports/jaxb/src/main/resources/imports_common.xsd
index c9008afff2..cc925d1184 100644
--- a/services/imports/jaxb/src/main/resources/imports_common.xsd
+++ b/services/imports/jaxb/src/main/resources/imports_common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
@@ -85,16 +81,10 @@
-
-
- org.nuxeo.shell
- nuxeo-shell-core
- ${nuxeo.shell.version}
-
org.nuxeo.ecm.platform
nuxeo-importer-core
- ${nuxeo.platform.version}
+ ${nuxeo.general.release}
org.slf4j
@@ -109,7 +99,7 @@
org.nuxeo.ecm.platform
nuxeo-importer-xml-parser
- ${nuxeo.platform.version}
+ ${nuxeo.general.release}
dom4j
diff --git a/services/index/client/pom.xml b/services/index/client/pom.xml
index 08ea979cdc..5bf949817d 100644
--- a/services/index/client/pom.xml
+++ b/services/index/client/pom.xml
@@ -41,11 +41,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/index/jaxb/pom.xml b/services/index/jaxb/pom.xml
index 932d01f50c..851342e3df 100644
--- a/services/index/jaxb/pom.xml
+++ b/services/index/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/index/jaxb/src/main/resources/index-common.xsd b/services/index/jaxb/src/main/resources/index-common.xsd
index ef50d16a95..51699fa94c 100644
--- a/services/index/jaxb/src/main/resources/index-common.xsd
+++ b/services/index/jaxb/src/main/resources/index-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
-
diff --git a/services/index/service/pom.xml b/services/index/service/pom.xml
index d728467728..352687326f 100644
--- a/services/index/service/pom.xml
+++ b/services/index/service/pom.xml
@@ -46,11 +46,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/insurance/client/pom.xml b/services/insurance/client/pom.xml
index 180b9d413f..e4e5e0b27e 100644
--- a/services/insurance/client/pom.xml
+++ b/services/insurance/client/pom.xml
@@ -52,7 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/insurance/jaxb/pom.xml b/services/insurance/jaxb/pom.xml
index b28112b95c..3019713fd0 100644
--- a/services/insurance/jaxb/pom.xml
+++ b/services/insurance/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/insurance/jaxb/src/main/resources/insurances_common.xsd b/services/insurance/jaxb/src/main/resources/insurances_common.xsd
index fc43a34cc2..d242006e65 100644
--- a/services/insurance/jaxb/src/main/resources/insurances_common.xsd
+++ b/services/insurance/jaxb/src/main/resources/insurances_common.xsd
@@ -10,9 +10,7 @@
+
diff --git a/services/insurance/service/pom.xml b/services/insurance/service/pom.xml
index e8d4299f7c..bb5490f29a 100644
--- a/services/insurance/service/pom.xml
+++ b/services/insurance/service/pom.xml
@@ -56,7 +56,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -64,10 +64,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/intake/client/pom.xml b/services/intake/client/pom.xml
index e066409ce6..ebbb40b90a 100644
--- a/services/intake/client/pom.xml
+++ b/services/intake/client/pom.xml
@@ -57,11 +57,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/intake/jaxb/pom.xml b/services/intake/jaxb/pom.xml
index d79d575ef6..b2e6b8f95d 100644
--- a/services/intake/jaxb/pom.xml
+++ b/services/intake/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/intake/jaxb/src/main/resources/intakes-common.xsd b/services/intake/jaxb/src/main/resources/intakes-common.xsd
index cde240b546..f51c9e3703 100644
--- a/services/intake/jaxb/src/main/resources/intakes-common.xsd
+++ b/services/intake/jaxb/src/main/resources/intakes-common.xsd
@@ -13,9 +13,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/iterationreport/client/pom.xml b/services/iterationreport/client/pom.xml
index 07d00e9d18..2010ea0788 100644
--- a/services/iterationreport/client/pom.xml
+++ b/services/iterationreport/client/pom.xml
@@ -52,7 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/iterationreport/jaxb/pom.xml b/services/iterationreport/jaxb/pom.xml
index 9a38c72b9f..807e0e5294 100644
--- a/services/iterationreport/jaxb/pom.xml
+++ b/services/iterationreport/jaxb/pom.xml
@@ -1,7 +1,5 @@
-
-
+
+
org.collectionspace.services.iterationreport
org.collectionspace.services
@@ -14,9 +12,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +27,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/iterationreport/jaxb/src/main/resources/iterationreports_common.xsd b/services/iterationreport/jaxb/src/main/resources/iterationreports_common.xsd
index d41204cc83..0fa2b8498a 100644
--- a/services/iterationreport/jaxb/src/main/resources/iterationreports_common.xsd
+++ b/services/iterationreport/jaxb/src/main/resources/iterationreports_common.xsd
@@ -10,9 +10,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -64,10 +64,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/jaxb/pom.xml b/services/jaxb/pom.xml
index 8905e189e4..e438958a78 100644
--- a/services/jaxb/pom.xml
+++ b/services/jaxb/pom.xml
@@ -23,12 +23,13 @@
- com.sun.xml.bind
- jaxb-core
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
- org.jvnet.jaxb2_commons
- jaxb2-basics
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -37,8 +38,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/jaxb/src/main/java/org/collectionspace/services/jaxb/adapter/DateAdapter.java b/services/jaxb/src/main/java/org/collectionspace/services/jaxb/adapter/DateAdapter.java
new file mode 100644
index 0000000000..6d79288393
--- /dev/null
+++ b/services/jaxb/src/main/java/org/collectionspace/services/jaxb/adapter/DateAdapter.java
@@ -0,0 +1,24 @@
+package org.collectionspace.services.jaxb.adapter;
+
+import java.time.Instant;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+
+import jakarta.xml.bind.annotation.adapters.XmlAdapter;
+
+/**
+ * Adapter to convert {@link Date} to an ISO-8601 String at UTC-0
+ *
+ * @since 9.0.0
+ */
+public class DateAdapter extends XmlAdapter {
+ @Override
+ public Date unmarshal(String s) {
+ return Date.from(Instant.parse(s));
+ }
+
+ @Override
+ public String marshal(Date date) {
+ return DateTimeFormatter.ISO_INSTANT.format(date.toInstant());
+ }
+}
diff --git a/services/jaxb/src/main/resources/authorityref.xsd b/services/jaxb/src/main/resources/authorityref.xsd
index 68c1d4dcd6..0399bda5df 100644
--- a/services/jaxb/src/main/resources/authorityref.xsd
+++ b/services/jaxb/src/main/resources/authorityref.xsd
@@ -17,8 +17,8 @@
-->
+
+
+
+
+
+
+
+
+
+
diff --git a/services/jaxb/src/main/resources/bindings.xml b/services/jaxb/src/main/resources/bindings.xml
deleted file mode 100644
index 76f7b6ad0f..0000000000
--- a/services/jaxb/src/main/resources/bindings.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/services/jaxb/src/main/resources/blobs_common.xsd b/services/jaxb/src/main/resources/blobs_common.xsd
index 5b973959df..4e8015d67a 100644
--- a/services/jaxb/src/main/resources/blobs_common.xsd
+++ b/services/jaxb/src/main/resources/blobs_common.xsd
@@ -11,11 +11,10 @@
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
diff --git a/services/jaxb/src/main/resources/index_common.xsd b/services/jaxb/src/main/resources/index_common.xsd
index e250df2d12..d270eaaa86 100644
--- a/services/jaxb/src/main/resources/index_common.xsd
+++ b/services/jaxb/src/main/resources/index_common.xsd
@@ -11,11 +11,10 @@
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
diff --git a/services/jaxb/src/main/resources/invocationContext.xsd b/services/jaxb/src/main/resources/invocationContext.xsd
index 3f7a85bc0e..112b499174 100644
--- a/services/jaxb/src/main/resources/invocationContext.xsd
+++ b/services/jaxb/src/main/resources/invocationContext.xsd
@@ -8,7 +8,10 @@
$LastChangedRevision: 2316 $
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
+
diff --git a/services/jaxb/src/main/resources/invocationResults.xsd b/services/jaxb/src/main/resources/invocationResults.xsd
index 7f7b732c09..4524ee7c0c 100644
--- a/services/jaxb/src/main/resources/invocationResults.xsd
+++ b/services/jaxb/src/main/resources/invocationResults.xsd
@@ -8,13 +8,11 @@
$LastChangedRevision: 2316 $
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
+
diff --git a/services/jaxb/src/main/resources/lifecycle.xsd b/services/jaxb/src/main/resources/lifecycle.xsd
index b7a41ea674..934d8d71f5 100644
--- a/services/jaxb/src/main/resources/lifecycle.xsd
+++ b/services/jaxb/src/main/resources/lifecycle.xsd
@@ -1,9 +1,9 @@
-
+
diff --git a/services/jaxb/src/main/resources/relations_common.xsd b/services/jaxb/src/main/resources/relations_common.xsd
index 923d1d3fd5..21991ce129 100644
--- a/services/jaxb/src/main/resources/relations_common.xsd
+++ b/services/jaxb/src/main/resources/relations_common.xsd
@@ -12,12 +12,10 @@
-->
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" jaxb:version="3.0"
+ xmlns="http://collectionspace.org/services/relation"
+ targetNamespace="http://collectionspace.org/services/relation">
diff --git a/services/jaxb/src/main/resources/service_description.xsd b/services/jaxb/src/main/resources/service_description.xsd
index c586bb3788..c3bfa7fa3d 100644
--- a/services/jaxb/src/main/resources/service_description.xsd
+++ b/services/jaxb/src/main/resources/service_description.xsd
@@ -7,11 +7,9 @@
Used for: JAXB binding between XML and Java objects
-->
-
diff --git a/services/jaxb/src/main/resources/workflow_common.xsd b/services/jaxb/src/main/resources/workflow_common.xsd
index 3ba78d7d4f..9d4a5ca778 100644
--- a/services/jaxb/src/main/resources/workflow_common.xsd
+++ b/services/jaxb/src/main/resources/workflow_common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
diff --git a/services/jaxb/src/test/java/org/collectionspace/services/jaxb/adapter/DateAdapterTest.java b/services/jaxb/src/test/java/org/collectionspace/services/jaxb/adapter/DateAdapterTest.java
new file mode 100644
index 0000000000..9710573f89
--- /dev/null
+++ b/services/jaxb/src/test/java/org/collectionspace/services/jaxb/adapter/DateAdapterTest.java
@@ -0,0 +1,26 @@
+package org.collectionspace.services.jaxb.adapter;
+
+import java.time.Instant;
+import java.util.Date;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class DateAdapterTest {
+
+ private static final String STRING_EPOCH = "1970-01-01T00:00:00Z";
+ private static final Date DATE_EPOCH = Date.from(Instant.EPOCH);
+ private final DateAdapter adapter = new DateAdapter();
+
+ @Test
+ public void testUnmarshal() {
+ Date unmarshalled = adapter.unmarshal(STRING_EPOCH);
+ Assert.assertEquals(unmarshalled, DATE_EPOCH);
+ }
+
+ @Test
+ public void testMarshal() {
+ String marshalled = adapter.marshal(DATE_EPOCH);
+ Assert.assertEquals(marshalled, STRING_EPOCH);
+ }
+}
\ No newline at end of file
diff --git a/services/loanin/client/pom.xml b/services/loanin/client/pom.xml
index 494d55510e..3ca33c8452 100644
--- a/services/loanin/client/pom.xml
+++ b/services/loanin/client/pom.xml
@@ -51,11 +51,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/loanin/jaxb/pom.xml b/services/loanin/jaxb/pom.xml
index 764068b5db..cc0fd629d4 100644
--- a/services/loanin/jaxb/pom.xml
+++ b/services/loanin/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/loanin/jaxb/src/main/resources/loansin-common.xsd b/services/loanin/jaxb/src/main/resources/loansin-common.xsd
index 65c9e6df8a..e146410e0c 100644
--- a/services/loanin/jaxb/src/main/resources/loansin-common.xsd
+++ b/services/loanin/jaxb/src/main/resources/loansin-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/loanout/client/pom.xml b/services/loanout/client/pom.xml
index 53875c5b46..a490e0f2b9 100644
--- a/services/loanout/client/pom.xml
+++ b/services/loanout/client/pom.xml
@@ -52,11 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/loanout/jaxb/pom.xml b/services/loanout/jaxb/pom.xml
index 99f53bbfcb..a5c02e2c0a 100644
--- a/services/loanout/jaxb/pom.xml
+++ b/services/loanout/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/loanout/jaxb/src/main/resources/loansout-common.xsd b/services/loanout/jaxb/src/main/resources/loansout-common.xsd
index 0bbb9b50e2..a32abeba88 100644
--- a/services/loanout/jaxb/src/main/resources/loansout-common.xsd
+++ b/services/loanout/jaxb/src/main/resources/loansout-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/location/client/pom.xml b/services/location/client/pom.xml
index 966fb25490..55afa6e31f 100644
--- a/services/location/client/pom.xml
+++ b/services/location/client/pom.xml
@@ -51,11 +51,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/location/jaxb/pom.xml b/services/location/jaxb/pom.xml
index 94bc73f7f3..1210ce8753 100644
--- a/services/location/jaxb/pom.xml
+++ b/services/location/jaxb/pom.xml
@@ -13,19 +13,9 @@
services.location.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.common
-
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.authority.jaxb
- true
${project.version}
@@ -35,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/location/jaxb/src/main/resources/location_common.xsd b/services/location/jaxb/src/main/resources/location_common.xsd
index c2b6115e7c..d970443f7f 100644
--- a/services/location/jaxb/src/main/resources/location_common.xsd
+++ b/services/location/jaxb/src/main/resources/location_common.xsd
@@ -8,14 +8,12 @@
Used for: JAXB binding between XML and Java objects
-->
-
@@ -88,4 +86,3 @@
-
diff --git a/services/location/jaxb/src/main/resources/locationauthority_common.xsd b/services/location/jaxb/src/main/resources/locationauthority_common.xsd
index 513788fc55..275371561a 100644
--- a/services/location/jaxb/src/main/resources/locationauthority_common.xsd
+++ b/services/location/jaxb/src/main/resources/locationauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.authority.jaxb
- true
${project.version}
@@ -49,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/material/jaxb/src/main/resources/material_common.xsd b/services/material/jaxb/src/main/resources/material_common.xsd
index 1a3448ba68..f133c6e21a 100644
--- a/services/material/jaxb/src/main/resources/material_common.xsd
+++ b/services/material/jaxb/src/main/resources/material_common.xsd
@@ -8,15 +8,13 @@
Used for: JAXB binding between XML and Java objects
-->
-
+
@@ -478,4 +476,4 @@
-
\ No newline at end of file
+
diff --git a/services/material/jaxb/src/main/resources/materialauthority_common.xsd b/services/material/jaxb/src/main/resources/materialauthority_common.xsd
index 2c54d79e66..631a8a0418 100644
--- a/services/material/jaxb/src/main/resources/materialauthority_common.xsd
+++ b/services/material/jaxb/src/main/resources/materialauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/movement/client/pom.xml b/services/movement/client/pom.xml
index 9bbb016ea4..9ca0891569 100644
--- a/services/movement/client/pom.xml
+++ b/services/movement/client/pom.xml
@@ -53,11 +53,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/movement/jaxb/pom.xml b/services/movement/jaxb/pom.xml
index 5c87d32935..1735fa1a0a 100644
--- a/services/movement/jaxb/pom.xml
+++ b/services/movement/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/movement/jaxb/src/main/resources/movements-common.xsd b/services/movement/jaxb/src/main/resources/movements-common.xsd
index ea729d27be..3975f7a6c5 100644
--- a/services/movement/jaxb/src/main/resources/movements-common.xsd
+++ b/services/movement/jaxb/src/main/resources/movements-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/nagpra-jaxb/pom.xml b/services/nagpra-jaxb/pom.xml
index 86f1003d1e..08aa2c416b 100644
--- a/services/nagpra-jaxb/pom.xml
+++ b/services/nagpra-jaxb/pom.xml
@@ -16,9 +16,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -27,8 +31,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/nagpra-jaxb/src/main/resources/nagpra_common.xsd b/services/nagpra-jaxb/src/main/resources/nagpra_common.xsd
index 0f0a775ddd..a1103aea0c 100644
--- a/services/nagpra-jaxb/src/main/resources/nagpra_common.xsd
+++ b/services/nagpra-jaxb/src/main/resources/nagpra_common.xsd
@@ -5,8 +5,7 @@
-->
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -41,10 +41,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -53,9 +49,14 @@
commons-httpclient
commons-httpclient
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
collectionspace-services-nagprainventory-client
-
\ No newline at end of file
+
diff --git a/services/nagprainventory/jaxb/pom.xml b/services/nagprainventory/jaxb/pom.xml
index c8606bcbef..101bca4598 100644
--- a/services/nagprainventory/jaxb/pom.xml
+++ b/services/nagprainventory/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,9 +29,9 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
-
\ No newline at end of file
+
diff --git a/services/nagprainventory/jaxb/src/main/resources/nagprainventory_common.xsd b/services/nagprainventory/jaxb/src/main/resources/nagprainventory_common.xsd
index c17f9b9ade..447534ac08 100644
--- a/services/nagprainventory/jaxb/src/main/resources/nagprainventory_common.xsd
+++ b/services/nagprainventory/jaxb/src/main/resources/nagprainventory_common.xsd
@@ -10,9 +10,7 @@
-
+
diff --git a/services/nagprainventory/service/pom.xml b/services/nagprainventory/service/pom.xml
index 931497ebf9..662e1e9334 100644
--- a/services/nagprainventory/service/pom.xml
+++ b/services/nagprainventory/service/pom.xml
@@ -53,7 +53,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/note/client/pom.xml b/services/note/client/pom.xml
index ada93e07a4..9528e2c7e0 100644
--- a/services/note/client/pom.xml
+++ b/services/note/client/pom.xml
@@ -39,11 +39,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/note/jaxb/pom.xml b/services/note/jaxb/pom.xml
index f05f71e18f..d8598e0bb6 100644
--- a/services/note/jaxb/pom.xml
+++ b/services/note/jaxb/pom.xml
@@ -30,8 +30,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/note/service/pom.xml b/services/note/service/pom.xml
index 82f9573096..051bf1f41a 100644
--- a/services/note/service/pom.xml
+++ b/services/note/service/pom.xml
@@ -47,11 +47,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/objectexit/client/pom.xml b/services/objectexit/client/pom.xml
index d4b5c625f7..292526f5e4 100644
--- a/services/objectexit/client/pom.xml
+++ b/services/objectexit/client/pom.xml
@@ -52,11 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/objectexit/jaxb/pom.xml b/services/objectexit/jaxb/pom.xml
index 20ace344de..b59a9b9b5d 100644
--- a/services/objectexit/jaxb/pom.xml
+++ b/services/objectexit/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd b/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd
index f6aad8a48c..ce401a8988 100644
--- a/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd
+++ b/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/organization/client/pom.xml b/services/organization/client/pom.xml
index 9bb8676521..e254e64bc8 100644
--- a/services/organization/client/pom.xml
+++ b/services/organization/client/pom.xml
@@ -46,11 +46,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/organization/jaxb/pom.xml b/services/organization/jaxb/pom.xml
index db829b4bd9..b26dcfdd8c 100644
--- a/services/organization/jaxb/pom.xml
+++ b/services/organization/jaxb/pom.xml
@@ -13,15 +13,6 @@
services.organization.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.common
-
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.authority.jaxb
@@ -34,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
@@ -44,3 +35,4 @@
+
diff --git a/services/organization/jaxb/src/main/resources/organization_common.xsd b/services/organization/jaxb/src/main/resources/organization_common.xsd
index 37976cefdf..77665852cb 100644
--- a/services/organization/jaxb/src/main/resources/organization_common.xsd
+++ b/services/organization/jaxb/src/main/resources/organization_common.xsd
@@ -9,13 +9,11 @@
-->
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" jaxb:version="3.0"
+ xmlns="http://collectionspace.org/services/organization"
+ targetNamespace="http://collectionspace.org/services/organization"
+ version="0.1">
diff --git a/services/organization/jaxb/src/main/resources/orgauthority_common.xsd b/services/organization/jaxb/src/main/resources/orgauthority_common.xsd
index cb0a797ad4..070a381fd0 100644
--- a/services/organization/jaxb/src/main/resources/orgauthority_common.xsd
+++ b/services/organization/jaxb/src/main/resources/orgauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/osteology/jaxb/pom.xml b/services/osteology/jaxb/pom.xml
index cad2f68a47..f2a022eb48 100644
--- a/services/osteology/jaxb/pom.xml
+++ b/services/osteology/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/osteology/jaxb/src/main/resources/osteology-common.xsd b/services/osteology/jaxb/src/main/resources/osteology-common.xsd
index 5f6ca87d84..aef8da2c5e 100644
--- a/services/osteology/jaxb/src/main/resources/osteology-common.xsd
+++ b/services/osteology/jaxb/src/main/resources/osteology-common.xsd
@@ -10,9 +10,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -64,10 +64,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/person/client/pom.xml b/services/person/client/pom.xml
index 4b423940fa..8d14ffc94e 100644
--- a/services/person/client/pom.xml
+++ b/services/person/client/pom.xml
@@ -39,6 +39,12 @@
org.collectionspace.services.contact.client
${project.version}
+
+ org.collectionspace.services
+ org.collectionspace.services.authorization.jaxb
+ ${project.version}
+ test
+
org.testng
@@ -47,11 +53,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/person/jaxb/pom.xml b/services/person/jaxb/pom.xml
index e1e10aa17e..59b3cf1ecd 100644
--- a/services/person/jaxb/pom.xml
+++ b/services/person/jaxb/pom.xml
@@ -13,11 +13,6 @@
services.person.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.authority.jaxb
@@ -31,8 +26,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/person/jaxb/src/main/resources/person_common.xsd b/services/person/jaxb/src/main/resources/person_common.xsd
index 11941acbb1..870c9e7d25 100644
--- a/services/person/jaxb/src/main/resources/person_common.xsd
+++ b/services/person/jaxb/src/main/resources/person_common.xsd
@@ -11,14 +11,12 @@
$LastChangedDate: $
-->
-
@@ -146,4 +144,3 @@
-
diff --git a/services/person/jaxb/src/main/resources/personauthority_common.xsd b/services/person/jaxb/src/main/resources/personauthority_common.xsd
index ec44739074..797612c129 100644
--- a/services/person/jaxb/src/main/resources/personauthority_common.xsd
+++ b/services/person/jaxb/src/main/resources/personauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
@@ -161,4 +159,3 @@
-
diff --git a/services/place/jaxb/src/main/resources/placeauthority_common.xsd b/services/place/jaxb/src/main/resources/placeauthority_common.xsd
index c9a4971220..bdc64a6d48 100644
--- a/services/place/jaxb/src/main/resources/placeauthority_common.xsd
+++ b/services/place/jaxb/src/main/resources/placeauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
cs_default
generate-sources
@@ -29,6 +29,7 @@
-->
config
+ common-http
common-api
authentication
authorization-common
@@ -183,33 +184,9 @@
- org.jvnet.hyperjaxb3
- maven-hyperjaxb3-plugin
- 0.6.0
-
-
-
- generate
-
-
-
-
-
- bindings.xjb
-
-
- -Xannotate
-
- true
- true
- false
- garbage
-
-
-
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
- ${maven-jaxb2-plugin.version}
+ org.jvnet.jaxb
+ jaxb-maven-plugin
+ ${jvnet.jaxb.version}
jaxb-codegen
@@ -218,57 +195,27 @@
generate
- true
- src/main/resources
-
- *.xsd
-
- src/main/resources
-
- bindings.xml
-
- -extension
- -Xnamespace-prefix
- -Xannotate
- -verbose
-
+ -XtoString
-Xequals
-XhashCode
-
+ -Xnamespace-prefix
- javax.xml.bind
- jaxb-api
- ${jaxb.version}
-
-
- org.jvnet.jaxb2_commons
- jaxb2-basics-annotate
- ${jaxb2-basics.version}
-
-
- org.jvnet.jaxb2_commons
- jaxb2-basics
- ${jaxb2-basics.version}
+ org.jvnet.jaxb
+ jaxb-plugins
+ ${jvnet.jaxb.version}
-
-
- org.jvnet.jaxb2_commons
- jaxb2-namespace-prefix
- 1.4-SNAPSHOT
-
-
org.codehaus.mojo
exec-maven-plugin
- 1.1
+ 3.6.3
@@ -301,39 +248,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
-
-
-
-
-
-
@@ -358,7 +273,6 @@
-
diff --git a/services/pottag/client/pom.xml b/services/pottag/client/pom.xml
index 18cc3e5548..0fb83b1c2c 100644
--- a/services/pottag/client/pom.xml
+++ b/services/pottag/client/pom.xml
@@ -53,11 +53,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/pottag/jaxb/pom.xml b/services/pottag/jaxb/pom.xml
index 6e23a40544..ed1dd78755 100644
--- a/services/pottag/jaxb/pom.xml
+++ b/services/pottag/jaxb/pom.xml
@@ -15,10 +15,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -26,8 +30,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/pottag/jaxb/src/main/resources/pottags-common.xsd b/services/pottag/jaxb/src/main/resources/pottags-common.xsd
index 711ddc27da..14c9178f8b 100644
--- a/services/pottag/jaxb/src/main/resources/pottags-common.xsd
+++ b/services/pottag/jaxb/src/main/resources/pottags-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/propagation/client/pom.xml b/services/propagation/client/pom.xml
index 802774a859..20098e6196 100644
--- a/services/propagation/client/pom.xml
+++ b/services/propagation/client/pom.xml
@@ -51,11 +51,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/propagation/jaxb/pom.xml b/services/propagation/jaxb/pom.xml
index b55be2de8b..9ec225841e 100644
--- a/services/propagation/jaxb/pom.xml
+++ b/services/propagation/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/propagation/jaxb/src/main/resources/propagations-common.xsd b/services/propagation/jaxb/src/main/resources/propagations-common.xsd
index 2b98fec5ef..cf0273a07d 100644
--- a/services/propagation/jaxb/src/main/resources/propagations-common.xsd
+++ b/services/propagation/jaxb/src/main/resources/propagations-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate$
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/publicitem/3rdparty/nuxeo-platform-cs-publicitem/src/main/resources/schemas/publicitems_common.xsd b/services/publicitem/3rdparty/nuxeo-platform-cs-publicitem/src/main/resources/schemas/publicitems_common.xsd
index ecbcd3014b..4b7f816adc 100644
--- a/services/publicitem/3rdparty/nuxeo-platform-cs-publicitem/src/main/resources/schemas/publicitems_common.xsd
+++ b/services/publicitem/3rdparty/nuxeo-platform-cs-publicitem/src/main/resources/schemas/publicitems_common.xsd
@@ -9,13 +9,12 @@
$LastChangedDate$
-->
-
-
+
+
diff --git a/services/publicitem/client/pom.xml b/services/publicitem/client/pom.xml
index 5eef9a3656..20102aac25 100644
--- a/services/publicitem/client/pom.xml
+++ b/services/publicitem/client/pom.xml
@@ -46,11 +46,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/publicitem/jaxb/pom.xml b/services/publicitem/jaxb/pom.xml
index ab3f7d5e05..a7726a9693 100644
--- a/services/publicitem/jaxb/pom.xml
+++ b/services/publicitem/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/publicitem/jaxb/src/main/resources/publicitems-common.xsd b/services/publicitem/jaxb/src/main/resources/publicitems-common.xsd
index c6d874b7a1..7528cfd9e1 100644
--- a/services/publicitem/jaxb/src/main/resources/publicitems-common.xsd
+++ b/services/publicitem/jaxb/src/main/resources/publicitems-common.xsd
@@ -4,10 +4,10 @@
binding between XML and Java objects $LastChangedRevision$ $LastChangedDate$ -->
+ xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" jaxb:version="3.0"
+ xmlns="http://collectionspace.org/services/publicitem"
+ targetNamespace="http://collectionspace.org/services/publicitem"
+ version="0.1">
diff --git a/services/publicitem/service/pom.xml b/services/publicitem/service/pom.xml
index 0538d5db7c..c043450f6a 100644
--- a/services/publicitem/service/pom.xml
+++ b/services/publicitem/service/pom.xml
@@ -56,11 +56,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/query/service/pom.xml b/services/query/service/pom.xml
index 116181ec58..f739ff3a2c 100644
--- a/services/query/service/pom.xml
+++ b/services/query/service/pom.xml
@@ -32,11 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/relation/client/pom.xml b/services/relation/client/pom.xml
index 96e89ab949..c85a18e729 100644
--- a/services/relation/client/pom.xml
+++ b/services/relation/client/pom.xml
@@ -46,11 +46,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/relation/service/pom.xml b/services/relation/service/pom.xml
index 5477f11faa..f02d595847 100644
--- a/services/relation/service/pom.xml
+++ b/services/relation/service/pom.xml
@@ -88,11 +88,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.txt b/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.txt
deleted file mode 100644
index d3a70a756a..0000000000
--- a/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Because of a dependency cycle with the "Common" module, the RelationResource class was moved to the "Common" module at:
-
-..\services\common\src\main\java\org\collectionspace\services\common\relation
\ No newline at end of file
diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java
index f512f27714..fa296be087 100644
--- a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java
+++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java
@@ -58,10 +58,10 @@
import org.collectionspace.services.nuxeo.client.java.CoreSessionInterface;
import org.collectionspace.services.nuxeo.client.java.NuxeoRepositoryClientImpl;
-import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
-import org.nuxeo.ecm.core.api.model.PropertyException;
+import org.nuxeo.ecm.core.api.NuxeoException;
+import org.nuxeo.ecm.core.api.PropertyException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -514,7 +514,7 @@ private void populateSubjectOrObjectValues(
RelationJAXBSchema.SUBJECT_REFNAME
:RelationJAXBSchema.OBJECT_REFNAME),
refname);
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw new RuntimeException(
"populateSubjectOrObjectValues: Problem fetching field " + ce.getLocalizedMessage());
}
@@ -523,7 +523,7 @@ private void populateSubjectOrObjectValues(
// property values in the target document model.
try {
relationDocModel.setProperties(ctx.getCommonPartLabel(), properties);
- } catch (ClientException ce) {
+ } catch (NuxeoException ce) {
throw new RuntimeException(
"populateSubjectValues: Problem setting fields " + ce.getLocalizedMessage());
}
diff --git a/services/repatriationrequest/client/pom.xml b/services/repatriationrequest/client/pom.xml
index aa3b731c34..c1719269c0 100644
--- a/services/repatriationrequest/client/pom.xml
+++ b/services/repatriationrequest/client/pom.xml
@@ -32,7 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -41,10 +41,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -53,9 +49,14 @@
commons-httpclient
commons-httpclient
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
+
collectionspace-services-repatriationrequest-client
-
\ No newline at end of file
+
diff --git a/services/repatriationrequest/jaxb/pom.xml b/services/repatriationrequest/jaxb/pom.xml
index d61ef620da..f7435d2b78 100644
--- a/services/repatriationrequest/jaxb/pom.xml
+++ b/services/repatriationrequest/jaxb/pom.xml
@@ -13,11 +13,6 @@
services.repatriationrequest.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.nagpra-jaxb
@@ -30,9 +25,9 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
-
\ No newline at end of file
+
diff --git a/services/repatriationrequest/jaxb/src/main/resources/repatriationrequests_common.xsd b/services/repatriationrequest/jaxb/src/main/resources/repatriationrequests_common.xsd
index 58c864617e..7c116c8254 100644
--- a/services/repatriationrequest/jaxb/src/main/resources/repatriationrequests_common.xsd
+++ b/services/repatriationrequest/jaxb/src/main/resources/repatriationrequests_common.xsd
@@ -10,10 +10,8 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -65,10 +65,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
@@ -90,4 +86,4 @@
collectionspace-services-repatriationrequest
-
\ No newline at end of file
+
diff --git a/services/report/client/pom.xml b/services/report/client/pom.xml
index c14b8d6353..53de0cf1d8 100644
--- a/services/report/client/pom.xml
+++ b/services/report/client/pom.xml
@@ -61,11 +61,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/report/jaxb/pom.xml b/services/report/jaxb/pom.xml
index 6ee0189ac4..06bebdfeeb 100644
--- a/services/report/jaxb/pom.xml
+++ b/services/report/jaxb/pom.xml
@@ -25,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/report/jaxb/src/main/resources/reports-common.xsd b/services/report/jaxb/src/main/resources/reports-common.xsd
index c3ee01df5b..9b09ba5c86 100644
--- a/services/report/jaxb/src/main/resources/reports-common.xsd
+++ b/services/report/jaxb/src/main/resources/reports-common.xsd
@@ -11,14 +11,12 @@
$LastChangedDate: 2010-06-16 14:47:45 -0700 (Wed, 16 Jun 2010) $
-->
-
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/report/service/src/main/java/org/collectionspace/services/report/jasperreports/CSpaceRepositoryService.java b/services/report/service/src/main/java/org/collectionspace/services/report/jasperreports/CSpaceRepositoryService.java
index bb29da9826..6dd6c02e13 100644
--- a/services/report/service/src/main/java/org/collectionspace/services/report/jasperreports/CSpaceRepositoryService.java
+++ b/services/report/service/src/main/java/org/collectionspace/services/report/jasperreports/CSpaceRepositoryService.java
@@ -59,7 +59,7 @@ private InputStreamResource getCSpaceResource(String resourcePath) {
private InputStreamResource getMediaContentResource(String mediaCsid, String derivative) {
if (StringUtils.isNotEmpty(mediaCsid) && StringUtils.isNotEmpty(derivative)) {
- ResourceMap resourceMap = ResteasyProviderFactory.getContextData(ResourceMap.class);
+ ResourceMap resourceMap = ResteasyProviderFactory.getInstance().getContextData(ResourceMap.class);
MediaResource mediaResource = (MediaResource) resourceMap.get(MediaClient.SERVICE_NAME);
InputStream contentStream = null;
diff --git a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java
index b4fe5bc0e2..d93ed0e715 100644
--- a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java
+++ b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java
@@ -104,7 +104,7 @@
import org.collectionspace.services.report.ResourceActionGroup;
import org.collectionspace.services.report.ResourceActionGroupList;
import org.nuxeo.ecm.core.api.DocumentModel;
-import org.nuxeo.ecm.core.api.model.PropertyException;
+import org.nuxeo.ecm.core.api.PropertyException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/services/restrictedmedia/client/pom.xml b/services/restrictedmedia/client/pom.xml
index 2ccb0db6f1..ff91c09f5b 100644
--- a/services/restrictedmedia/client/pom.xml
+++ b/services/restrictedmedia/client/pom.xml
@@ -54,7 +54,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -62,10 +62,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/restrictedmedia/jaxb/pom.xml b/services/restrictedmedia/jaxb/pom.xml
index b0acaec097..9278b974f4 100644
--- a/services/restrictedmedia/jaxb/pom.xml
+++ b/services/restrictedmedia/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,9 +29,9 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
-
\ No newline at end of file
+
diff --git a/services/restrictedmedia/jaxb/src/main/resources/restrictedmedia_common.xsd b/services/restrictedmedia/jaxb/src/main/resources/restrictedmedia_common.xsd
index aed21ba74f..7dc3517f4b 100644
--- a/services/restrictedmedia/jaxb/src/main/resources/restrictedmedia_common.xsd
+++ b/services/restrictedmedia/jaxb/src/main/resources/restrictedmedia_common.xsd
@@ -9,8 +9,7 @@
-->
-
+
diff --git a/services/restrictedmedia/service/pom.xml b/services/restrictedmedia/service/pom.xml
index 6a6530f22d..0775b6a11d 100644
--- a/services/restrictedmedia/service/pom.xml
+++ b/services/restrictedmedia/service/pom.xml
@@ -68,7 +68,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -76,10 +76,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/security/client/pom.xml b/services/security/client/pom.xml
index e7dee9f82c..fcbd881339 100644
--- a/services/security/client/pom.xml
+++ b/services/security/client/pom.xml
@@ -57,11 +57,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
@@ -81,25 +77,5 @@
cspace-services-security-client
-
-
- maven-antrun-plugin
-
-
- subs-hibernate-config
- generate-test-resources
-
- run
-
-
-
-
-
-
-
-
-
-
-
diff --git a/services/security/client/src/test/resources/META-INF/persistence.xml b/services/security/client/src/test/resources/META-INF/persistence.xml
deleted file mode 100644
index 9577e73190..0000000000
--- a/services/security/client/src/test/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- org.collectionspace.services.authentication.User
- org.collectionspace.services.authorization.Role
-
-
-
-
-
-
-
diff --git a/services/security/client/src/test/resources/hibernate.cfg.xml b/services/security/client/src/test/resources/hibernate.cfg.xml
deleted file mode 100644
index eb577d2288..0000000000
--- a/services/security/client/src/test/resources/hibernate.cfg.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
- @DB_CSPACE_URL@
- @DB_DRIVER_CLASS@
- @DB_CSPACE_USER@
- @DB_CSPACE_PASSWORD@
- @DB_DIALECT@
- org.hibernate.transaction.JDBCTransactionFactory
- thread
- true
-
-
diff --git a/services/servicegroup/client/pom.xml b/services/servicegroup/client/pom.xml
index 14f5d3db5a..d5ab5d5477 100644
--- a/services/servicegroup/client/pom.xml
+++ b/services/servicegroup/client/pom.xml
@@ -41,11 +41,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/servicegroup/jaxb/pom.xml b/services/servicegroup/jaxb/pom.xml
index cc8e9c51a0..49e0761563 100644
--- a/services/servicegroup/jaxb/pom.xml
+++ b/services/servicegroup/jaxb/pom.xml
@@ -15,10 +15,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -26,8 +30,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/servicegroup/jaxb/src/main/resources/servicegroup_common.xsd b/services/servicegroup/jaxb/src/main/resources/servicegroup_common.xsd
index 42a6695514..92e00dcbe6 100644
--- a/services/servicegroup/jaxb/src/main/resources/servicegroup_common.xsd
+++ b/services/servicegroup/jaxb/src/main/resources/servicegroup_common.xsd
@@ -13,8 +13,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/structureddate/client/pom.xml b/services/structureddate/client/pom.xml
index 278020446e..fc768741a5 100644
--- a/services/structureddate/client/pom.xml
+++ b/services/structureddate/client/pom.xml
@@ -39,11 +39,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
diff --git a/services/structureddate/jaxb/pom.xml b/services/structureddate/jaxb/pom.xml
index 2518f5bc22..56627f5e2c 100644
--- a/services/structureddate/jaxb/pom.xml
+++ b/services/structureddate/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/structureddate/jaxb/src/main/resources/structureddate-common.xsd b/services/structureddate/jaxb/src/main/resources/structureddate-common.xsd
index 7d05df2e9c..212e08a981 100644
--- a/services/structureddate/jaxb/src/main/resources/structureddate-common.xsd
+++ b/services/structureddate/jaxb/src/main/resources/structureddate-common.xsd
@@ -10,9 +10,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/summarydocumentation/client/pom.xml b/services/summarydocumentation/client/pom.xml
index ed83674252..906798179e 100644
--- a/services/summarydocumentation/client/pom.xml
+++ b/services/summarydocumentation/client/pom.xml
@@ -32,7 +32,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
@@ -43,15 +43,16 @@
org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-multipart-provider
- org.jboss.resteasy
- resteasy-multipart-provider
+ org.glassfish.jaxb
+ jaxb-runtime
+ test
collectionspace-services-summarydocumentation-client
-
\ No newline at end of file
+
diff --git a/services/summarydocumentation/jaxb/pom.xml b/services/summarydocumentation/jaxb/pom.xml
index 1e27981d80..7130c3928b 100644
--- a/services/summarydocumentation/jaxb/pom.xml
+++ b/services/summarydocumentation/jaxb/pom.xml
@@ -13,11 +13,6 @@
services.summarydocumentation.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.nagpra-jaxb
@@ -30,9 +25,9 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
-
\ No newline at end of file
+
diff --git a/services/summarydocumentation/jaxb/src/main/resources/summarydocumentations_common.xsd b/services/summarydocumentation/jaxb/src/main/resources/summarydocumentations_common.xsd
index 0855f2e30b..ec8c57b0d5 100644
--- a/services/summarydocumentation/jaxb/src/main/resources/summarydocumentations_common.xsd
+++ b/services/summarydocumentation/jaxb/src/main/resources/summarydocumentations_common.xsd
@@ -10,8 +10,7 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -60,10 +60,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/systeminfo/client/pom.xml b/services/systeminfo/client/pom.xml
index 8d200e0fbd..c625004a8b 100644
--- a/services/systeminfo/client/pom.xml
+++ b/services/systeminfo/client/pom.xml
@@ -34,11 +34,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
diff --git a/services/systeminfo/jaxb/pom.xml b/services/systeminfo/jaxb/pom.xml
index 8b91cc996a..a70bd83495 100644
--- a/services/systeminfo/jaxb/pom.xml
+++ b/services/systeminfo/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd b/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd
index d35336f9e0..489eaa2b76 100644
--- a/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd
+++ b/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd
@@ -9,14 +9,12 @@
-->
-
@@ -104,4 +102,3 @@
-
diff --git a/services/taxonomy/jaxb/src/main/resources/taxonomyauthority_common.xsd b/services/taxonomy/jaxb/src/main/resources/taxonomyauthority_common.xsd
index 7417bedd4d..6f123c3229 100644
--- a/services/taxonomy/jaxb/src/main/resources/taxonomyauthority_common.xsd
+++ b/services/taxonomy/jaxb/src/main/resources/taxonomyauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
@@ -61,10 +61,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/transport/jaxb/pom.xml b/services/transport/jaxb/pom.xml
index ba80ae541c..32affaf66b 100644
--- a/services/transport/jaxb/pom.xml
+++ b/services/transport/jaxb/pom.xml
@@ -14,9 +14,13 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
diff --git a/services/transport/jaxb/src/main/resources/transports-common.xsd b/services/transport/jaxb/src/main/resources/transports-common.xsd
index 5084ed8c5b..9bbd4f85cb 100644
--- a/services/transport/jaxb/src/main/resources/transports-common.xsd
+++ b/services/transport/jaxb/src/main/resources/transports-common.xsd
@@ -10,8 +10,8 @@
org.jboss.resteasy
- resteasy-jaxrs
+ resteasy-client
tjws
@@ -66,10 +66,6 @@
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
org.jboss.resteasy
resteasy-multipart-provider
diff --git a/services/uoc/client/pom.xml b/services/uoc/client/pom.xml
index 05e8bd37a1..98c8f22b9a 100644
--- a/services/uoc/client/pom.xml
+++ b/services/uoc/client/pom.xml
@@ -51,11 +51,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/uoc/jaxb/pom.xml b/services/uoc/jaxb/pom.xml
index 7da14c652a..de61702f48 100644
--- a/services/uoc/jaxb/pom.xml
+++ b/services/uoc/jaxb/pom.xml
@@ -14,10 +14,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -25,8 +29,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/uoc/jaxb/src/main/resources/uoc-common.xsd b/services/uoc/jaxb/src/main/resources/uoc-common.xsd
index e82423553b..8b00cbad66 100644
--- a/services/uoc/jaxb/src/main/resources/uoc-common.xsd
+++ b/services/uoc/jaxb/src/main/resources/uoc-common.xsd
@@ -11,11 +11,9 @@
$LastChangedDate: 2018-05-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/valuationcontrol/client/pom.xml b/services/valuationcontrol/client/pom.xml
index 55372ae4b0..ea93fc2b85 100644
--- a/services/valuationcontrol/client/pom.xml
+++ b/services/valuationcontrol/client/pom.xml
@@ -52,11 +52,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/valuationcontrol/jaxb/pom.xml b/services/valuationcontrol/jaxb/pom.xml
index 8aacc9883d..ff6abd9317 100644
--- a/services/valuationcontrol/jaxb/pom.xml
+++ b/services/valuationcontrol/jaxb/pom.xml
@@ -15,10 +15,14 @@
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+
+
+
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
@@ -26,8 +30,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/valuationcontrol/jaxb/src/main/resources/Valuationcontrols-common.xsd b/services/valuationcontrol/jaxb/src/main/resources/Valuationcontrols-common.xsd
index 71764e02cd..1c0ae2e9df 100644
--- a/services/valuationcontrol/jaxb/src/main/resources/Valuationcontrols-common.xsd
+++ b/services/valuationcontrol/jaxb/src/main/resources/Valuationcontrols-common.xsd
@@ -8,11 +8,9 @@
Used for: JAXB binding between XML and Java objects
-->
-
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/vocabulary/client/pom.xml b/services/vocabulary/client/pom.xml
index 88bfddf698..8db995c3ef 100644
--- a/services/vocabulary/client/pom.xml
+++ b/services/vocabulary/client/pom.xml
@@ -43,11 +43,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/vocabulary/jaxb/pom.xml b/services/vocabulary/jaxb/pom.xml
index 7f96d589c2..0fc4b4fca1 100644
--- a/services/vocabulary/jaxb/pom.xml
+++ b/services/vocabulary/jaxb/pom.xml
@@ -13,25 +13,23 @@
services.vocabulary.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.common
+ jakarta.xml.bind
+ jakarta.xml.bind-api
-
+
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
+ org.jvnet.jaxb
+ jaxb-plugins-runtime
+
collectionspace-services-vocabulary-jaxb
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/vocabulary/jaxb/src/main/resources/vocabulary_common.xsd b/services/vocabulary/jaxb/src/main/resources/vocabulary_common.xsd
index 48b5433284..0cbffef362 100644
--- a/services/vocabulary/jaxb/src/main/resources/vocabulary_common.xsd
+++ b/services/vocabulary/jaxb/src/main/resources/vocabulary_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
@@ -35,4 +33,3 @@
-
diff --git a/services/vocabulary/service/pom.xml b/services/vocabulary/service/pom.xml
index 6b13d244df..7df3feda03 100644
--- a/services/vocabulary/service/pom.xml
+++ b/services/vocabulary/service/pom.xml
@@ -69,11 +69,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java b/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java
index ae371b36a1..30f2ad5ff9 100644
--- a/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java
+++ b/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java
@@ -23,6 +23,21 @@
*/
package org.collectionspace.services.vocabulary;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.UriInfo;
+
import org.collectionspace.services.client.IClientQueryParams;
import org.collectionspace.services.client.PayloadInputPart;
import org.collectionspace.services.client.PoxPayload;
@@ -60,24 +75,6 @@
import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
-import java.util.ArrayList;
-import java.util.Base64;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Request;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriBuilder;
-import javax.ws.rs.core.UriInfo;
-import javax.xml.bind.DatatypeConverter;
-
@Path("/" + VocabularyClient.SERVICE_PATH_COMPONENT)
public class VocabularyResource extends
AuthorityResource {
@@ -86,12 +83,12 @@ private enum Method {
POST, PUT;
}
- private final static String vocabularyServiceName = VocabularyClient.SERVICE_PATH_COMPONENT;
+ private static final String vocabularyServiceName = VocabularyClient.SERVICE_PATH_COMPONENT;
- private final static String VOCABULARIES_COMMON = "vocabularies_common";
+ private static final String VOCABULARIES_COMMON = "vocabularies_common";
- private final static String vocabularyItemServiceName = "vocabularyitems";
- private final static String VOCABULARYITEMS_COMMON = "vocabularyitems_common";
+ private static final String vocabularyItemServiceName = "vocabularyitems";
+ private static final String VOCABULARYITEMS_COMMON = "vocabularyitems_common";
final Logger logger = LoggerFactory.getLogger(VocabularyResource.class);
diff --git a/services/work/client/pom.xml b/services/work/client/pom.xml
index 1755a5ff05..c790d5a582 100644
--- a/services/work/client/pom.xml
+++ b/services/work/client/pom.xml
@@ -47,11 +47,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/work/jaxb/pom.xml b/services/work/jaxb/pom.xml
index 487c989c23..ce12cbd47b 100644
--- a/services/work/jaxb/pom.xml
+++ b/services/work/jaxb/pom.xml
@@ -13,19 +13,6 @@
services.work.jaxb
-
- org.collectionspace.services
- org.collectionspace.services.common
-
-
- com.sun.xml.bind
- jaxb-core
-
-
- org.collectionspace.services
- org.collectionspace.services.jaxb
- ${project.version}
-
org.collectionspace.services
org.collectionspace.services.authority.jaxb
@@ -39,8 +26,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/work/jaxb/src/main/resources/work_common.xsd b/services/work/jaxb/src/main/resources/work_common.xsd
index cfa95363b0..dbfc7e49f3 100644
--- a/services/work/jaxb/src/main/resources/work_common.xsd
+++ b/services/work/jaxb/src/main/resources/work_common.xsd
@@ -1,13 +1,11 @@
-
+
diff --git a/services/work/jaxb/src/main/resources/workauthority_common.xsd b/services/work/jaxb/src/main/resources/workauthority_common.xsd
index ce4beadad8..0f1e458784 100644
--- a/services/work/jaxb/src/main/resources/workauthority_common.xsd
+++ b/services/work/jaxb/src/main/resources/workauthority_common.xsd
@@ -9,15 +9,13 @@
-->
-
+
-
-
jaxb
service
diff --git a/services/work/service/pom.xml b/services/work/service/pom.xml
index 6f43e809b1..7150914ee6 100644
--- a/services/work/service/pom.xml
+++ b/services/work/service/pom.xml
@@ -64,11 +64,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/workflow/client/pom.xml b/services/workflow/client/pom.xml
index e4c171da45..701ea63f5f 100644
--- a/services/workflow/client/pom.xml
+++ b/services/workflow/client/pom.xml
@@ -41,11 +41,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy
diff --git a/services/workflow/jaxb/pom.xml b/services/workflow/jaxb/pom.xml
index a477e6518a..61e70f3501 100644
--- a/services/workflow/jaxb/pom.xml
+++ b/services/workflow/jaxb/pom.xml
@@ -25,8 +25,8 @@
install
- org.jvnet.jaxb2.maven2
- maven-jaxb2-plugin
+ org.jvnet.jaxb
+ jaxb-maven-plugin
org.codehaus.mojo
diff --git a/services/workflow/service/pom.xml b/services/workflow/service/pom.xml
index 41065d72dd..627496a374 100644
--- a/services/workflow/service/pom.xml
+++ b/services/workflow/service/pom.xml
@@ -50,11 +50,7 @@
org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
+ resteasy-client
org.jboss.resteasy