From 3443cfdcdeaa07fa147828bc8933bc3788fd7016 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 15 Feb 2011 23:53:38 +0000 Subject: [PATCH] CSPACE-3574: Merging Plain Old XML payload work into trunk. --- .../nuxeo-platform-cs-relation/.classpath | 12 +- .../nuxeo-platform-cs-relation/.project | 12 +- services/relation/client/.classpath | 313 ++++++++++++++++- services/relation/client/.project | 11 +- .../services/client/RelationClient.java | 35 +- .../services/client/RelationProxy.java | 10 +- .../client/test/RelationServiceTest.java | 131 +++---- services/relation/service/.classpath | 312 ++++++++++++++++- services/relation/service/.project | 12 +- .../relation/NewRelationResource.java | 38 +- .../nuxeo/RelationDocumentModelHandler.java | 4 +- .../nuxeo/RelationValidatorHandler.java | 4 +- services/security/client/.classpath | 327 +++++++++++++++++- services/security/client/.project | 32 +- .../test/AuthenticationServiceTest.java | 32 +- .../client/test/AuthorizationServiceTest.java | 40 ++- .../client/test/MultiTenancyTest.java | 23 +- 17 files changed, 1159 insertions(+), 189 deletions(-) diff --git a/services/relation/3rdparty/nuxeo-platform-cs-relation/.classpath b/services/relation/3rdparty/nuxeo-platform-cs-relation/.classpath index 199bbbbdb..6fd3b8551 100644 --- a/services/relation/3rdparty/nuxeo-platform-cs-relation/.classpath +++ b/services/relation/3rdparty/nuxeo-platform-cs-relation/.classpath @@ -1,8 +1,8 @@ - - - - - + + - + + + + \ No newline at end of file diff --git a/services/relation/3rdparty/nuxeo-platform-cs-relation/.project b/services/relation/3rdparty/nuxeo-platform-cs-relation/.project index 1bf83cf66..1ea0abacf 100644 --- a/services/relation/3rdparty/nuxeo-platform-cs-relation/.project +++ b/services/relation/3rdparty/nuxeo-platform-cs-relation/.project @@ -1,23 +1,17 @@ - org.collectionspace.services.relation.3rdparty.nuxeo - CollectionSpace relation Nuxeo document type. - - + CollectionSpace relation Nuxeo document type. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.maven.ide.eclipse.maven2Nature org.eclipse.jdt.core.javanature - + \ No newline at end of file diff --git a/services/relation/client/.classpath b/services/relation/client/.classpath index 425cd1620..9792f6348 100644 --- a/services/relation/client/.classpath +++ b/services/relation/client/.classpath @@ -1,10 +1,307 @@ - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/relation/client/.project b/services/relation/client/.project index 63de0923b..c1f434b82 100644 --- a/services/relation/client/.project +++ b/services/relation/client/.project @@ -1,26 +1,23 @@ - org.collectionspace.services.relation.client - + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.collectionspace.services.3rdparty.nuxeo.quote-api org.collectionspace.services.client org.collectionspace.services.common + org.collectionspace.services.hyperjaxb org.collectionspace.services.jaxb org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.maven.ide.eclipse.maven2Nature org.eclipse.jdt.core.javanature - + \ No newline at end of file diff --git a/services/relation/client/src/main/java/org/collectionspace/services/client/RelationClient.java b/services/relation/client/src/main/java/org/collectionspace/services/client/RelationClient.java index ce45a321b..456eb0205 100644 --- a/services/relation/client/src/main/java/org/collectionspace/services/client/RelationClient.java +++ b/services/relation/client/src/main/java/org/collectionspace/services/client/RelationClient.java @@ -35,25 +35,26 @@ import org.jboss.resteasy.client.ProxyFactory; import org.jboss.resteasy.plugins.providers.RegisterBuiltin; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.spi.ResteasyProviderFactory; /** * The Class RelationClient. */ public class RelationClient extends AbstractServiceClientImpl { + public static final String SERVICE_NAME = "relations"; + public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME; + public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT; + public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/"; + public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME; + + @Override + public String getServiceName() { + return SERVICE_NAME; + } - /* - * (non-Javadoc) - * - * @see - * org.collectionspace.services.client.BaseServiceClient#getServicePathComponent - * () - */ @Override public String getServicePathComponent() { - return "relations"; + return SERVICE_PATH_COMPONENT; } /** The relation proxy. */ @@ -132,7 +133,7 @@ public class RelationClient extends AbstractServiceClientImpl { * @param csid the csid * @return the client response */ - public ClientResponse read(String csid) { + public ClientResponse read(String csid) { return relationProxy.read(csid); } @@ -142,8 +143,9 @@ public class RelationClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse create(MultipartOutput multipart) { - return relationProxy.create(multipart); + public ClientResponse create(PoxPayloadOut multipart) { + String payload = multipart.toXML(); + return relationProxy.create(payload); } /** @@ -153,9 +155,10 @@ public class RelationClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse update(String csid, - MultipartOutput multipart) { - return relationProxy.update(csid, multipart); + public ClientResponse update(String csid, + PoxPayloadOut multipart) { + String payload = multipart.toXML(); + return relationProxy.update(csid, payload); } /** diff --git a/services/relation/client/src/main/java/org/collectionspace/services/client/RelationProxy.java b/services/relation/client/src/main/java/org/collectionspace/services/client/RelationProxy.java index 73623cbce..672cfe324 100644 --- a/services/relation/client/src/main/java/org/collectionspace/services/client/RelationProxy.java +++ b/services/relation/client/src/main/java/org/collectionspace/services/client/RelationProxy.java @@ -22,8 +22,8 @@ import javax.ws.rs.QueryParam; * @version $Revision:$ */ @Path("/relations/") -@Produces({"multipart/mixed"}) -@Consumes({"multipart/mixed"}) +@Produces({"application/xml"}) +@Consumes({"application/xml"}) public interface RelationProxy extends CollectionSpaceProxy { @GET @@ -53,17 +53,17 @@ public interface RelationProxy extends CollectionSpaceProxy { //(C)reate @POST - ClientResponse create(MultipartOutput multipart); + ClientResponse create(String payload); //(R)ead @GET @Path("/{csid}") - ClientResponse read(@PathParam("csid") String csid); + ClientResponse read(@PathParam("csid") String csid); //(U)pdate @PUT @Path("/{csid}") - ClientResponse update(@PathParam("csid") String csid, MultipartOutput multipart); + ClientResponse update(@PathParam("csid") String csid, String payload); //(D)elete @DELETE diff --git a/services/relation/client/src/test/java/org/collectionspace/services/client/test/RelationServiceTest.java b/services/relation/client/src/test/java/org/collectionspace/services/client/test/RelationServiceTest.java index 04d624db3..95799715c 100644 --- a/services/relation/client/src/test/java/org/collectionspace/services/client/test/RelationServiceTest.java +++ b/services/relation/client/src/test/java/org/collectionspace/services/client/test/RelationServiceTest.java @@ -27,6 +27,10 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.collectionspace.services.client.CollectionSpaceClient; +import org.collectionspace.services.client.PayloadInputPart; +import org.collectionspace.services.client.PayloadOutputPart; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.RelationClient; import org.collectionspace.services.jaxb.AbstractCommonList; import org.collectionspace.services.relation.RelationsCommon; @@ -35,9 +39,6 @@ import org.collectionspace.services.relation.RelationshipType; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; -import org.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.testng.Assert; import org.testng.annotations.Test; @@ -102,7 +103,7 @@ public class RelationServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. RelationClient client = new RelationClient(); String identifier = createIdentifier(); - MultipartOutput multipart = createRelationInstance(identifier); + PoxPayloadOut multipart = createRelationInstance(identifier); ClientResponse res = client.create(multipart); int statusCode = res.getStatus(); @@ -160,7 +161,7 @@ public class RelationServiceTest extends AbstractServiceTestImpl { RelationsCommon relationsCommon = createRelationsCommon(identifier); // Make the subject ID equal to the object ID relationsCommon.setDocumentId1(relationsCommon.getDocumentId2()); - MultipartOutput multipart = createRelationInstance(relationsCommon); + PoxPayloadOut multipart = createRelationInstance(relationsCommon); ClientResponse res = client.create(multipart); int statusCode = res.getStatus(); @@ -313,7 +314,7 @@ public class RelationServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. RelationClient client = new RelationClient(); - ClientResponse res = client.read(knownResourceId); + ClientResponse res = client.read(knownResourceId); int statusCode = res.getStatus(); // Check the status code of the response: does it match @@ -325,11 +326,14 @@ public class RelationServiceTest extends AbstractServiceTestImpl { invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); - // Verify that the resource identifier ... - MultipartInput input = (MultipartInput) res.getEntity(); - RelationsCommon relation = (RelationsCommon) extractPart(input, - client.getCommonPartName(), RelationsCommon.class); - Assert.assertNotNull(relation); + // Get the common part from the response and check that it is not null. + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); + PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName()); + RelationsCommon relationCommon = null; + if (payloadInputPart != null) { + relationCommon = (RelationsCommon) payloadInputPart.getBody(); + } + Assert.assertNotNull(relationCommon); } @@ -350,7 +354,7 @@ public class RelationServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. RelationClient client = new RelationClient(); - ClientResponse res = client.read(NON_EXISTENT_ID); + ClientResponse res = client.read(NON_EXISTENT_ID); int statusCode = res.getStatus(); // Check the status code of the response: does it match @@ -489,8 +493,7 @@ public class RelationServiceTest extends AbstractServiceTestImpl { // Retrieve an existing resource that we can update. RelationClient client = new RelationClient(); - ClientResponse res = - client.read(knownResourceId); + ClientResponse res = client.read(knownResourceId); if(logger.isDebugEnabled()){ logger.debug(testName + ": read status = " + res.getStatus()); } @@ -498,26 +501,32 @@ public class RelationServiceTest extends AbstractServiceTestImpl { if(logger.isDebugEnabled()){ logger.debug("Got object to update with ID: " + knownResourceId); } - MultipartInput input = (MultipartInput) res.getEntity(); - RelationsCommon relation = (RelationsCommon) extractPart(input, - client.getCommonPartName(), RelationsCommon.class); - Assert.assertNotNull(relation); + + // Extract the common part and verify that it is not null. + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); + PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName()); + RelationsCommon relationCommon = null; + if (payloadInputPart != null) { + relationCommon = (RelationsCommon) payloadInputPart.getBody(); + } + Assert.assertNotNull(relationCommon); // Update the content of this resource. - relation.setDocumentId1("updated-" + relation.getDocumentId1()); - relation.setDocumentType1("updated-" + relation.getDocumentType1()); - relation.setDocumentId2("updated-" + relation.getDocumentId2()); - relation.setDocumentType2("updated-" + relation.getDocumentType2()); - relation.setPredicateDisplayName("updated-" + relation.getPredicateDisplayName()); + relationCommon.setDocumentId1("updated-" + relationCommon.getDocumentId1()); + relationCommon.setDocumentType1("updated-" + relationCommon.getDocumentType1()); + relationCommon.setDocumentId2("updated-" + relationCommon.getDocumentId2()); + relationCommon.setDocumentType2("updated-" + relationCommon.getDocumentType2()); + relationCommon.setPredicateDisplayName("updated-" + relationCommon.getPredicateDisplayName()); if(logger.isDebugEnabled()){ logger.debug("updated object"); - logger.debug(objectAsXmlString(relation, RelationsCommon.class)); + logger.debug(objectAsXmlString(relationCommon, RelationsCommon.class)); } - // Submit the request to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(relation, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getCommonPartName()); + // Submit the request containing the updated resource to the service + // and store the response. + PoxPayloadOut output = new PoxPayloadOut(this.getServicePathComponent()); + PayloadOutputPart commonPart = output.addPart(relationCommon, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getCommonPartName()); res = client.update(knownResourceId, output); int statusCode = res.getStatus(); @@ -529,24 +538,25 @@ public class RelationServiceTest extends AbstractServiceTestImpl { invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); - input = (MultipartInput) res.getEntity(); - RelationsCommon updatedObject = (RelationsCommon) extractPart( - input, client.getCommonPartName(), - RelationsCommon.class); - Assert.assertNotNull(updatedObject); + // Extract the common part of the updated resource and verify that it is not null. + input = new PoxPayloadIn(res.getEntity()); + RelationsCommon updatedRelationCommon = + (RelationsCommon) extractPart(input, + client.getCommonPartName(), RelationsCommon.class); + Assert.assertNotNull(updatedRelationCommon); final String msg = "Data in updated object did not match submitted data."; Assert.assertEquals( - updatedObject.getDocumentId1(), relation.getDocumentId1(), msg); + updatedRelationCommon.getDocumentId1(), relationCommon.getDocumentId1(), msg); Assert.assertEquals( - updatedObject.getDocumentType1(), relation.getDocumentType1(), msg); + updatedRelationCommon.getDocumentType1(), relationCommon.getDocumentType1(), msg); Assert.assertEquals( - updatedObject.getDocumentId2(), relation.getDocumentId2(), msg); + updatedRelationCommon.getDocumentId2(), relationCommon.getDocumentId2(), msg); Assert.assertEquals( - updatedObject.getDocumentType2(), relation.getDocumentType2(), msg); + updatedRelationCommon.getDocumentType2(), relationCommon.getDocumentType2(), msg); Assert.assertEquals( - updatedObject.getPredicateDisplayName(), relation.getPredicateDisplayName(), msg); + updatedRelationCommon.getPredicateDisplayName(), relationCommon.getPredicateDisplayName(), msg); } @@ -684,8 +694,8 @@ public class RelationServiceTest extends AbstractServiceTestImpl { // Note: The ID used in this 'create' call may be arbitrary. // The only relevant ID may be the one used in update(), below. RelationClient client = new RelationClient(); - MultipartOutput multipart = createRelationInstance(NON_EXISTENT_ID); - ClientResponse res = + PoxPayloadOut multipart = createRelationInstance(NON_EXISTENT_ID); + ClientResponse res = client.update(NON_EXISTENT_ID, multipart); int statusCode = res.getStatus(); @@ -811,16 +821,16 @@ public class RelationServiceTest extends AbstractServiceTestImpl { } private RelationsCommon createRelationsCommon(String identifier) { - RelationsCommon result = new RelationsCommon(); - fillRelation(result, identifier); - return result; + RelationsCommon relationCommon = new RelationsCommon(); + fillRelation(relationCommon, identifier); + return relationCommon; } - private MultipartOutput createRelationInstance(RelationsCommon relation) { - MultipartOutput result = new MultipartOutput(); - OutputPart commonPart = + private PoxPayloadOut createRelationInstance(RelationsCommon relation) { + PoxPayloadOut result = new PoxPayloadOut(this.getServicePathComponent()); + PayloadOutputPart commonPart = result.addPart(relation, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", new RelationClient().getCommonPartName()); + commonPart.setLabel(new RelationClient().getCommonPartName()); if(logger.isDebugEnabled()){ logger.debug("to be created, relation common"); logger.debug(objectAsXmlString(relation, RelationsCommon.class)); @@ -834,9 +844,9 @@ public class RelationServiceTest extends AbstractServiceTestImpl { * @param identifier the identifier * @return the multipart output */ - private MultipartOutput createRelationInstance(String identifier) { + private PoxPayloadOut createRelationInstance(String identifier) { RelationsCommon relation = createRelationsCommon(identifier); - MultipartOutput result = createRelationInstance(relation); + PoxPayloadOut result = createRelationInstance(relation); return result; } @@ -846,8 +856,8 @@ public class RelationServiceTest extends AbstractServiceTestImpl { * @param relation the relation * @param identifier the identifier */ - private void fillRelation(RelationsCommon relation, String identifier) { - fillRelation(relation, "Subject-" + identifier, + private void fillRelation(RelationsCommon relationCommon, String identifier) { + fillRelation(relationCommon, "Subject-" + identifier, "SubjectType-" + identifier + "-type", "Object-" + identifier, "ObjectType-" + identifier + "-type", @@ -865,17 +875,22 @@ public class RelationServiceTest extends AbstractServiceTestImpl { * @param documentType2 the document type2 * @param rt the rt */ - private void fillRelation(RelationsCommon relation, + private void fillRelation(RelationsCommon relationCommon, String documentId1, String documentType1, String documentId2, String documentType2, String rt, String rtDisplayName) { - relation.setDocumentId1(documentId1); - relation.setDocumentType1(documentType1); - relation.setDocumentId2(documentId2); - relation.setDocumentType2(documentType2); + relationCommon.setDocumentId1(documentId1); + relationCommon.setDocumentType1(documentType1); + relationCommon.setDocumentId2(documentId2); + relationCommon.setDocumentType2(documentType2); - relation.setRelationshipType(rt); - relation.setPredicateDisplayName(rtDisplayName); + relationCommon.setRelationshipType(rt); + relationCommon.setPredicateDisplayName(rtDisplayName); } + + @Override + protected String getServiceName() { + return RelationClient.SERVICE_NAME; + } } diff --git a/services/relation/service/.classpath b/services/relation/service/.classpath index 425cd1620..f2f6f8e99 100644 --- a/services/relation/service/.classpath +++ b/services/relation/service/.classpath @@ -1,10 +1,306 @@ - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/relation/service/.project b/services/relation/service/.project index 140388932..f87a1c0e3 100644 --- a/services/relation/service/.project +++ b/services/relation/service/.project @@ -1,25 +1,23 @@ - org.collectionspace.services.relation.service - + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.collectionspace.services.3rdparty.nuxeo.quote-api + org.collectionspace.services.client org.collectionspace.services.common + org.collectionspace.services.hyperjaxb org.collectionspace.services.jaxb org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.maven.ide.eclipse.maven2Nature org.eclipse.jdt.core.javanature - + \ No newline at end of file diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/NewRelationResource.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/NewRelationResource.java index f822ad694..4c27ff18b 100644 --- a/services/relation/service/src/main/java/org/collectionspace/services/relation/NewRelationResource.java +++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/NewRelationResource.java @@ -42,6 +42,8 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.common.query.IQueryManager; import org.collectionspace.services.common.relation.IRelationsManager; import org.collectionspace.services.common.relation.nuxeo.RelationsUtils; @@ -63,8 +65,8 @@ import org.slf4j.LoggerFactory; * The Class NewRelationResource. */ @Path("/relations") -@Consumes("multipart/mixed") -@Produces("multipart/mixed") +@Consumes("application/xml") +@Produces("application/xml") public class NewRelationResource extends AbstractMultiPartCollectionSpaceResourceImpl { @@ -108,9 +110,10 @@ public class NewRelationResource extends * @return the response */ @POST - public Response createRelation(MultipartInput input) { + public Response createRelation(String xmlText) { try { - ServiceContext ctx = createServiceContext(input); + PoxPayloadIn input = new PoxPayloadIn(xmlText); + ServiceContext ctx = createServiceContext(input); DocumentHandler handler = createDocumentHandler(ctx); String csid = getRepositoryClient(ctx).create(ctx, handler); UriBuilder path = UriBuilder @@ -148,7 +151,7 @@ public class NewRelationResource extends */ @GET @Path("{csid}") - public MultipartOutput getRelation(@Context UriInfo ui, + public String getRelation(@Context UriInfo ui, @PathParam("csid") String csid) { MultivaluedMap queryParams = ui.getQueryParameters(); if (logger.isDebugEnabled()) { @@ -161,12 +164,12 @@ public class NewRelationResource extends "text/plain").build(); throw new WebApplicationException(response); } - MultipartOutput result = null; + PoxPayloadOut result = null; try { - ServiceContext ctx = createServiceContext(queryParams); + ServiceContext ctx = createServiceContext(queryParams); DocumentHandler handler = createDocumentHandler(ctx); getRepositoryClient(ctx).get(ctx, csid, handler); - result = (MultipartOutput) ctx.getOutput(); + result = ctx.getOutput(); } catch (UnauthorizedException ue) { Response response = Response.status(Response.Status.UNAUTHORIZED) .entity("Get failed reason " + ue.getErrorReason()).type( @@ -198,7 +201,7 @@ public class NewRelationResource extends .build(); throw new WebApplicationException(response); } - return result; + return result.toXML(); } /** @@ -235,8 +238,8 @@ public class NewRelationResource extends */ @PUT @Path("{csid}") - public MultipartOutput updateRelation(@PathParam("csid") String csid, - MultipartInput theUpdate) { + public String updateRelation(@PathParam("csid") String csid, + String xmlText) { if (logger.isDebugEnabled()) { logger.debug("updateRelation with csid=" + csid); } @@ -247,12 +250,13 @@ public class NewRelationResource extends "text/plain").build(); throw new WebApplicationException(response); } - MultipartOutput result = null; + PoxPayloadOut result = null; try { - ServiceContext ctx = createServiceContext(theUpdate); + PoxPayloadIn update = new PoxPayloadIn(xmlText); + ServiceContext ctx = createServiceContext(update); DocumentHandler handler = createDocumentHandler(ctx); getRepositoryClient(ctx).update(ctx, csid, handler); - result = (MultipartOutput) ctx.getOutput(); + result = ctx.getOutput(); } catch (UnauthorizedException ue) { Response response = Response.status(Response.Status.UNAUTHORIZED) .entity("Update failed reason " + ue.getErrorReason()) @@ -272,7 +276,7 @@ public class NewRelationResource extends "Update failed").type("text/plain").build(); throw new WebApplicationException(response); } - return result; + return result.toXML(); } /** @@ -297,7 +301,7 @@ public class NewRelationResource extends throw new WebApplicationException(response); } try { - ServiceContext ctx = createServiceContext(); + ServiceContext ctx = createServiceContext(); getRepositoryClient(ctx).delete(ctx, csid); return Response.status(HttpResponseCodes.SC_OK).build(); } catch (UnauthorizedException ue) { @@ -343,7 +347,7 @@ public class NewRelationResource extends String objectType) throws WebApplicationException { RelationsCommonList relationList = new RelationsCommonList(); try { - ServiceContext ctx = createServiceContext(queryParams); + ServiceContext ctx = createServiceContext(queryParams); DocumentHandler handler = createDocumentHandler(ctx); String relationClause = RelationsUtils.buildWhereClause(subjectCsid, subjectType, predicate, objectCsid, objectType); 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 ff86a50cc..17ab12de0 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 @@ -26,6 +26,8 @@ package org.collectionspace.services.relation.nuxeo; import java.util.Iterator; import java.util.List; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.common.relation.RelationJAXBSchema; import org.collectionspace.services.common.relation.nuxeo.RelationConstants; import org.collectionspace.services.common.context.ServiceContext; @@ -157,7 +159,7 @@ public class RelationDocumentModelHandler * @return the relation list item * @throws Exception the exception */ - private RelationListItem getRelationListItem(ServiceContext ctx, + private RelationListItem getRelationListItem(ServiceContext ctx, DocumentModel docModel, String serviceContextPath) throws Exception { RelationListItem relationListItem = new RelationListItem(); diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java index 5f2466d6a..c59509d1f 100644 --- a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java +++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java @@ -2,6 +2,8 @@ package org.collectionspace.services.relation.nuxeo; //import junit.framework.Assert; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.common.document.InvalidDocumentException; import org.collectionspace.services.common.document.ValidatorHandlerImpl; import org.collectionspace.services.relation.RelationsCommon; @@ -13,7 +15,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; //import org.testng.Assert; -public class RelationValidatorHandler extends ValidatorHandlerImpl { +public class RelationValidatorHandler extends ValidatorHandlerImpl { /** The logger. */ private final Logger logger = LoggerFactory.getLogger(RelationValidatorHandler.class); diff --git a/services/security/client/.classpath b/services/security/client/.classpath index 6fdd7b06f..94f3028fc 100644 --- a/services/security/client/.classpath +++ b/services/security/client/.classpath @@ -1,8 +1,323 @@ - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/security/client/.project b/services/security/client/.project index b95f75d1b..6825813fc 100644 --- a/services/security/client/.project +++ b/services/security/client/.project @@ -1,23 +1,41 @@ - org.collectionspace.services.security.client - + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.collectionspace.services.3rdparty.nuxeo.quote-api + org.collectionspace.services.account.client + org.collectionspace.services.account.jaxb + org.collectionspace.services.authorization-mgt.client + org.collectionspace.services.authorization.jaxb + org.collectionspace.services.client + org.collectionspace.services.collectionobject.client + org.collectionspace.services.collectionobject.jaxb + org.collectionspace.services.common + org.collectionspace.services.contact.client + org.collectionspace.services.contact.jaxb + org.collectionspace.services.dimension.client + org.collectionspace.services.dimension.jaxb + org.collectionspace.services.hyperjaxb + org.collectionspace.services.intake.client + org.collectionspace.services.intake.jaxb + org.collectionspace.services.IntegrationTests + org.collectionspace.services.jaxb + org.collectionspace.services.organization.client + org.collectionspace.services.organization.jaxb + org.collectionspace.services.person.client + org.collectionspace.services.person.jaxb + org.collectionspace.services.relation.client org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.eclipse.jdt.core.javanature org.maven.ide.eclipse.maven2Nature - + \ No newline at end of file diff --git a/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthenticationServiceTest.java b/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthenticationServiceTest.java index 29aaffdf6..be6b5888c 100644 --- a/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthenticationServiceTest.java +++ b/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthenticationServiceTest.java @@ -41,6 +41,7 @@ import org.collectionspace.services.client.AccountFactory; import org.collectionspace.services.client.CollectionObjectClient; import org.collectionspace.services.client.CollectionObjectFactory; import org.collectionspace.services.client.CollectionSpaceClient; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.test.AbstractServiceTestImpl; import org.collectionspace.services.client.test.BaseServiceTest; import org.collectionspace.services.collectionobject.CollectionobjectsCommon; @@ -75,9 +76,16 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { protected String getServicePathComponent() { // no need to return anything but null since no auth resources are // accessed - return null; + throw new UnsupportedOperationException(); } + @Override + protected String getServiceName() { + // no need to return anything but null since no auth resources are + // accessed + throw new UnsupportedOperationException(); + } + /* (non-Javadoc) * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance() */ @@ -211,7 +219,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { CollectionObjectClient collectionObjectClient = new CollectionObjectClient(); collectionObjectClient.setAuth(true, "barney", true, "barney08", true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -241,7 +249,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { String pass = collectionObjectClient.getProperty(collectionObjectClient.PASSWORD_PROPERTY); collectionObjectClient.setAuth(false, user, true, pass, true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -262,7 +270,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { CollectionObjectClient collectionObjectClient = new CollectionObjectClient(); collectionObjectClient.setAuth(true, "george", true, "george08", true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); @@ -287,7 +295,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { String user = collectionObjectClient.getProperty(collectionObjectClient.USER_PROPERTY); collectionObjectClient.setAuth(true, user, true, "", false); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -308,7 +316,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { CollectionObjectClient collectionObjectClient = new CollectionObjectClient(); collectionObjectClient.setAuth(true, "foo", true, "bar", true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -330,7 +338,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { String user = collectionObjectClient.getProperty(collectionObjectClient.USER_PROPERTY); collectionObjectClient.setAuth(true, user, true, "bar", true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -351,7 +359,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { CollectionObjectClient collectionObjectClient = new CollectionObjectClient(); collectionObjectClient.setAuth(true, "foo", true, "bar", true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -373,7 +381,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { CollectionObjectClient collectionObjectClient = new CollectionObjectClient(); collectionObjectClient.setAuth(true, "babybop", true, "babybop09", true); String identifier = BaseServiceTest.createIdentifier(); - MultipartOutput multipart = createCollectionObjectInstance( + PoxPayloadOut multipart = createCollectionObjectInstance( collectionObjectClient.getCommonPartName(), identifier); ClientResponse res = collectionObjectClient.create(multipart); if (logger.isDebugEnabled()) { @@ -436,7 +444,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { * * @return the multipart output */ - private MultipartOutput createCollectionObjectInstance( + private PoxPayloadOut createCollectionObjectInstance( String commonPartName, String identifier) { return createCollectionObjectInstance(commonPartName, "objectNumber-" + identifier, "title-" + identifier); @@ -451,7 +459,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { * * @return the multipart output */ - private MultipartOutput createCollectionObjectInstance( + private PoxPayloadOut createCollectionObjectInstance( String commonPartName, String objectNumber, String title) { CollectionobjectsCommon collectionObject = new CollectionobjectsCommon(); @@ -462,7 +470,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl { titleGroup.setTitle(title); titleGroups.add(titleGroup); collectionObject.setTitleGroupList(titleGroupList); - MultipartOutput multipart = + PoxPayloadOut multipart = CollectionObjectFactory.createCollectionObjectInstance( commonPartName, collectionObject, null, null); diff --git a/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthorizationServiceTest.java b/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthorizationServiceTest.java index 93956036a..930ce12b1 100644 --- a/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthorizationServiceTest.java +++ b/services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthorizationServiceTest.java @@ -54,10 +54,13 @@ import org.collectionspace.services.client.CollectionSpaceClient; import org.collectionspace.services.client.DimensionClient; import org.collectionspace.services.client.DimensionFactory; import org.collectionspace.services.client.IntakeClient; +import org.collectionspace.services.client.PayloadOutputPart; import org.collectionspace.services.client.PermissionClient; import org.collectionspace.services.client.PermissionFactory; import org.collectionspace.services.client.PermissionRoleClient; import org.collectionspace.services.client.PermissionRoleFactory; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.RoleClient; import org.collectionspace.services.client.RoleFactory; import org.collectionspace.services.client.test.AbstractServiceTestImpl; @@ -109,9 +112,18 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { * This method is called only by the parent class, AbstractServiceTestImpl */ + @Override + protected String getServiceName() { + // no need to return anything but null since no auth resources are + // accessed + throw new UnsupportedOperationException(); + } + @Override protected String getServicePathComponent() { - return null; + // no need to return anything but null since no auth resources are + // accessed + throw new UnsupportedOperationException(); } @BeforeClass(alwaysRun = true) @@ -266,7 +278,7 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { dimension.setDimension("dimensionType"); dimension.setValue("value-" + identifier); dimension.setValueDate(new Date().toString()); - MultipartOutput multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(), + PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(), dimension); ClientResponse res = client.create(multipart); @@ -322,7 +334,7 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { * @param depositor the depositor * @return the multipart output */ - private MultipartOutput createIntakeInstance(String entryNumber, + private PoxPayloadOut createIntakeInstance(String entryNumber, String entryDate, String depositor) { IntakesCommon intake = new IntakesCommon(); @@ -330,10 +342,10 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { intake.setEntryDate(entryDate); intake.setDepositor(depositor); - MultipartOutput multipart = new MultipartOutput(); - OutputPart commonPart = + PoxPayloadOut multipart = new PoxPayloadOut(IntakeClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = multipart.addPart(intake, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", new IntakeClient().getCommonPartName()); + commonPart.setLabel(new IntakeClient().getCommonPartName()); if(logger.isDebugEnabled()){ logger.debug("to be created, intake common"); @@ -365,7 +377,7 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { dimension.setDimension("dimensionType"); dimension.setValue("value-" + identifier); dimension.setValueDate(new Date().toString()); - MultipartOutput multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(), + PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(), dimension); ClientResponse res = client.create(multipart); @@ -437,7 +449,7 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { DimensionClient client = new DimensionClient(); //elmo allowed to read client.setAuth(true, "elmo2010", true, "elmo2010", true); - ClientResponse res = client.read(knownResourceId); + ClientResponse res = client.read(knownResourceId); int statusCode = res.getStatus(); // Check the status code of the response: does it match @@ -449,7 +461,7 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); DimensionsCommon dimension = (DimensionsCommon) extractPart(input, client.getCommonPartName(), DimensionsCommon.class); Assert.assertNotNull(dimension); @@ -469,7 +481,7 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { DimensionClient client = new DimensionClient(); //lockedOut allowed to read client.setAuth(true, "lockedOut", true, "lockedOut", true); - ClientResponse res = client.read(knownResourceId); + ClientResponse res = client.read(knownResourceId); int statusCode = res.getStatus(); // Check the status code of the response: does it match @@ -536,11 +548,11 @@ public class AuthorizationServiceTest extends AbstractServiceTestImpl { dimension.setValue("updated-" + dimension.getValue()); dimension.setValueDate("updated-" + dimension.getValueDate()); // Submit the request to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(dimension, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(DimensionClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(dimension, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getCommonPartName()); - ClientResponse res = client.update(knownResourceId, output); + ClientResponse res = client.update(knownResourceId, output); int statusCode = res.getStatus(); // Check the status code of the response: does it match the expected response(s)? if (logger.isDebugEnabled()) { diff --git a/services/security/client/src/test/java/org/collectionspace/services/security/client/test/MultiTenancyTest.java b/services/security/client/src/test/java/org/collectionspace/services/security/client/test/MultiTenancyTest.java index fdb9ffcc9..5b4a18cec 100644 --- a/services/security/client/src/test/java/org/collectionspace/services/security/client/test/MultiTenancyTest.java +++ b/services/security/client/src/test/java/org/collectionspace/services/security/client/test/MultiTenancyTest.java @@ -53,10 +53,13 @@ import org.collectionspace.services.client.AccountRoleFactory; import org.collectionspace.services.client.CollectionSpaceClient; import org.collectionspace.services.client.DimensionClient; import org.collectionspace.services.client.DimensionFactory; +import org.collectionspace.services.client.PayloadOutputPart; import org.collectionspace.services.client.PermissionClient; import org.collectionspace.services.client.PermissionFactory; import org.collectionspace.services.client.PermissionRoleClient; import org.collectionspace.services.client.PermissionRoleFactory; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.RoleClient; import org.collectionspace.services.client.RoleFactory; import org.collectionspace.services.client.test.AbstractServiceTestImpl; @@ -339,7 +342,7 @@ public class MultiTenancyTest extends AbstractServiceTestImpl { dimension.setDimension("dimensionType"); dimension.setValue("value-" + identifier); dimension.setValueDate(new Date().toString()); - MultipartOutput multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(), + PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(), dimension); ClientResponse res = client.create(multipart); int statusCode = res.getStatus(); @@ -418,7 +421,7 @@ public class MultiTenancyTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. DimensionClient client = new DimensionClient(); client.setAuth(true, userName, true, userName, true); - ClientResponse res = client.read(id); + ClientResponse res = client.read(id); int statusCode = res.getStatus(); // Check the status code of the response: does it match @@ -430,7 +433,7 @@ public class MultiTenancyTest extends AbstractServiceTestImpl { invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); return (DimensionsCommon) extractPart(input, client.getCommonPartName(), DimensionsCommon.class); } @@ -499,11 +502,11 @@ public class MultiTenancyTest extends AbstractServiceTestImpl { dimension.setValue("updated-" + dimension.getValue()); dimension.setValueDate("updated-" + dimension.getValueDate()); // Submit the request to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(dimension, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(DimensionClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(dimension, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getCommonPartName()); - ClientResponse res = client.update(TENANT_RESOURCE_2, output); + ClientResponse res = client.update(TENANT_RESOURCE_2, output); int statusCode = res.getStatus(); // Check the status code of the response: does it match the expected response(s)? if (logger.isDebugEnabled()) { @@ -893,4 +896,10 @@ public class MultiTenancyTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); res.releaseConnection(); } + + @Override + protected String getServiceName() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException(); + } } -- 2.47.3