From: Richard Millet Date: Tue, 15 Feb 2011 23:57:19 +0000 (+0000) Subject: CSPACE-3574: Merging Plain Old XML payload work into trunk. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e6a50c6f52f633a7dfb0d07c2d4e705e2b06f6c6;p=tmp%2Fjakarta-migration.git CSPACE-3574: Merging Plain Old XML payload work into trunk. --- diff --git a/services/person/3rdparty/nuxeo-platform-cs-person/.classpath b/services/person/3rdparty/nuxeo-platform-cs-person/.classpath index b61c5d843..04c4e000e 100644 --- a/services/person/3rdparty/nuxeo-platform-cs-person/.classpath +++ b/services/person/3rdparty/nuxeo-platform-cs-person/.classpath @@ -1,7 +1,7 @@ - - - - + - + + + + \ No newline at end of file diff --git a/services/person/3rdparty/nuxeo-platform-cs-person/.project b/services/person/3rdparty/nuxeo-platform-cs-person/.project index 748ad4ef9..6a6431e30 100644 --- a/services/person/3rdparty/nuxeo-platform-cs-person/.project +++ b/services/person/3rdparty/nuxeo-platform-cs-person/.project @@ -1,23 +1,17 @@ - org.collectionspace.services.person.3rdparty.nuxeo - Person Nuxeo Document Type - - + Person 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/person/client/.classpath b/services/person/client/.classpath index 425cd1620..6ed3013f9 100644 --- a/services/person/client/.classpath +++ b/services/person/client/.classpath @@ -1,10 +1,310 @@ - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/person/client/.project b/services/person/client/.project index ba2d51a96..104efd1fd 100644 --- a/services/person/client/.project +++ b/services/person/client/.project @@ -1,26 +1,26 @@ - org.collectionspace.services.person.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.contact.client + org.collectionspace.services.contact.jaxb + org.collectionspace.services.hyperjaxb + org.collectionspace.services.jaxb org.collectionspace.services.person.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/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClient.java b/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClient.java index 5b5fec6f8..b67138744 100644 --- a/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClient.java +++ b/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClient.java @@ -27,13 +27,6 @@ package org.collectionspace.services.client; //import javax.ws.rs.PathParam; -import javax.ws.rs.DELETE; -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.Produces; import javax.ws.rs.core.Response; //import org.collectionspace.services.common.authorityref.AuthorityRefList; @@ -47,50 +40,43 @@ import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.client.ProxyFactory; import org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor; import org.jboss.resteasy.plugins.providers.RegisterBuiltin; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.spi.ResteasyProviderFactory; /** * The Class PersonAuthorityClient. */ -/** - * @author pschmitz - * - */ -/** - * @author pschmitz - * - */ -/** - * @author pschmitz - * - */ -/** - * @author pschmitz - * - */ public class PersonAuthorityClient extends AbstractServiceClientImpl { - - /* (non-Javadoc) - * @see org.collectionspace.services.client.BaseServiceClient#getServicePathComponent() - */ + public static final String SERVICE_NAME = "personauthorities"; + public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME; + public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT; + public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME; + // + // Subitem constants + // + public static final String SERVICE_ITEM_NAME = "persons"; + public static final String SERVICE_PATH_ITEMS_COMPONENT = "items"; //FIXME: REM - This should be defined in an AuthorityClient base class + public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME; + // + // Payload Part/Schema part names + // + public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME + + PART_LABEL_SEPARATOR + PART_COMMON_LABEL; + public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME + + PART_LABEL_SEPARATOR + PART_COMMON_LABEL; + @Override + public String getServiceName() { + return SERVICE_NAME; + } + + @Override public String getServicePathComponent() { - return "personauthorities"; + return SERVICE_PATH_COMPONENT; } - /** - * Gets the item common part name. - * - * @return the item common part name - */ public String getItemCommonPartName() { - return getCommonPartName("persons"); + return getCommonPartName(SERVICE_ITEM_NAME); } - - /** The person authority proxy. */ -// private static final PersonAuthorityClient instance = new PersonAuthorityClient(); /** * @@ -150,7 +136,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid the csid * @return the client response */ - public ClientResponse read(String csid) { + public ClientResponse read(String csid) { return personAuthorityProxy.read(csid); } @@ -160,7 +146,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param name the name * @return the client response */ - public ClientResponse readByName(String name) { + public ClientResponse readByName(String name) { return personAuthorityProxy.readByName(name); } @@ -170,8 +156,8 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse create(MultipartOutput multipart) { - return personAuthorityProxy.create(multipart); + public ClientResponse create(PoxPayloadOut xmlPayload) { + return personAuthorityProxy.create(xmlPayload.getBytes()); } /** @@ -181,8 +167,8 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse update(String csid, MultipartOutput multipart) { - return personAuthorityProxy.update(csid, multipart); + public ClientResponse update(String csid, PoxPayloadOut xmlPayload) { + return personAuthorityProxy.update(csid, xmlPayload.getBytes()); } @@ -248,7 +234,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid the csid * @return the client response */ - public ClientResponse readItem(String vcsid, String csid) { + public ClientResponse readItem(String vcsid, String csid) { return personAuthorityProxy.readItem(vcsid, csid); } @@ -259,7 +245,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param shortId the shortIdentifier * @return the client response */ - public ClientResponse readNamedItem(String vcsid, String shortId) { + public ClientResponse readNamedItem(String vcsid, String shortId) { return personAuthorityProxy.readNamedItem(vcsid, shortId); } @@ -270,7 +256,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid the csid * @return the client response */ - public ClientResponse readItemInNamedAuthority(String authShortId, String csid) { + public ClientResponse readItemInNamedAuthority(String authShortId, String csid) { return personAuthorityProxy.readItemInNamedAuthority(authShortId, csid); } @@ -281,7 +267,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param itemShortId the shortIdentifier for the item * @return the client response */ - public ClientResponse readNamedItemInNamedAuthority(String authShortId, String itemShortId) { + public ClientResponse readNamedItemInNamedAuthority(String authShortId, String itemShortId) { return personAuthorityProxy.readNamedItemInNamedAuthority(authShortId, itemShortId); } @@ -292,8 +278,8 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse createItem(String vcsid, MultipartOutput multipart) { - return personAuthorityProxy.createItem(vcsid, multipart); + public ClientResponse createItem(String vcsid, PoxPayloadOut xmlPayload) { + return personAuthorityProxy.createItem(vcsid, xmlPayload.getBytes()); } /** @@ -304,8 +290,8 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse updateItem(String vcsid, String csid, MultipartOutput multipart) { - return personAuthorityProxy.updateItem(vcsid, csid, multipart); + public ClientResponse updateItem(String vcsid, String csid, PoxPayloadOut xmlPayload) { + return personAuthorityProxy.updateItem(vcsid, csid, xmlPayload.getBytes()); } @@ -335,8 +321,8 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @return the client response */ public ClientResponse createContact(String parentcsid, - String itemcsid, MultipartOutput multipart) { - return personAuthorityProxy.createContact(parentcsid, itemcsid, multipart); + String itemcsid, PoxPayloadOut xmlPayload) { + return personAuthorityProxy.createContact(parentcsid, itemcsid, xmlPayload.getBytes()); } /** @@ -350,8 +336,8 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { public ClientResponse createContactForNamedItem( String parentcsid, String itemspecifier, - MultipartOutput multipart) { - return personAuthorityProxy.createContactForNamedItem(parentcsid, itemspecifier, multipart); + PoxPayloadOut xmlPayload) { + return personAuthorityProxy.createContactForNamedItem(parentcsid, itemspecifier, xmlPayload.getBytes()); } /** * Creates the contact. @@ -364,8 +350,9 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { public ClientResponse createContactForItemInNamedAuthority( String parentspecifier, String itemcsid, - MultipartOutput multipart) { - return personAuthorityProxy.createContactForItemInNamedAuthority(parentspecifier, itemcsid, multipart); + PoxPayloadOut xmlPayload) { + return personAuthorityProxy.createContactForItemInNamedAuthority(parentspecifier, + itemcsid, xmlPayload.getBytes()); } /** * Creates the contact. @@ -378,8 +365,9 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { public ClientResponse createContactForNamedItemInNamedAuthority( String parentspecifier, String itemspecifier, - MultipartOutput multipart) { - return personAuthorityProxy.createContactForNamedItemInNamedAuthority(parentspecifier, itemspecifier, multipart); + PoxPayloadOut xmlPayload) { + return personAuthorityProxy.createContactForNamedItemInNamedAuthority(parentspecifier, itemspecifier, + xmlPayload.getBytes()); } /** @@ -390,7 +378,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid the csid * @return the client response */ - public ClientResponse readContact(String parentcsid, + public ClientResponse readContact(String parentcsid, String itemcsid, String csid) { return personAuthorityProxy.readContact(parentcsid, itemcsid, csid); } @@ -403,7 +391,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid * @return the client response */ - public ClientResponse readContactForNamedItem( + public ClientResponse readContactForNamedItem( String parentcsid, String itemspecifier, String csid){ @@ -418,7 +406,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid * @return the client response */ - public ClientResponse readContactInNamedAuthority( + public ClientResponse readContactInNamedAuthority( String parentspecifier, String itemcsid, String csid){ @@ -433,7 +421,7 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param csid * @return the client response */ - public ClientResponse readContactForNamedItemInNamedAuthority( + public ClientResponse readContactForNamedItemInNamedAuthority( String parentspecifier, String itemspecifier, String csid){ @@ -502,9 +490,9 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse updateContact(String parentcsid, - String itemcsid, String csid, MultipartOutput multipart) { - return personAuthorityProxy.updateContact(parentcsid, itemcsid, csid, multipart); + public ClientResponse updateContact(String parentcsid, + String itemcsid, String csid, PoxPayloadOut xmlPayload) { + return personAuthorityProxy.updateContact(parentcsid, itemcsid, csid, xmlPayload.getBytes()); } /** @@ -516,12 +504,12 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse updateContactForNamedItem( + public ClientResponse updateContactForNamedItem( String parentcsid, String itemspecifier, String csid, - MultipartOutput multipart) { - return personAuthorityProxy.updateContactForNamedItem(parentcsid, itemspecifier, csid, multipart); + PoxPayloadOut xmlPayload) { + return personAuthorityProxy.updateContactForNamedItem(parentcsid, itemspecifier, csid, xmlPayload.getBytes()); } /** @@ -533,12 +521,12 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse updateContactInNamedAuthority( + public ClientResponse updateContactInNamedAuthority( String parentspecifier, String itemcsid, String csid, - MultipartOutput multipart) { - return personAuthorityProxy.updateContactInNamedAuthority(parentspecifier, itemcsid, csid, multipart); + PoxPayloadOut xmlPayload) { + return personAuthorityProxy.updateContactInNamedAuthority(parentspecifier, itemcsid, csid, xmlPayload.getBytes()); } /** @@ -550,12 +538,13 @@ public class PersonAuthorityClient extends AbstractServiceClientImpl { * @param multipart the multipart * @return the client response */ - public ClientResponse updateContactForNamedItemInNamedAuthority( + public ClientResponse updateContactForNamedItemInNamedAuthority( String parentspecifier, String itemspecifier, String csid, - MultipartOutput multipart) { - return personAuthorityProxy.updateContactForNamedItemInNamedAuthority(parentspecifier, itemspecifier, csid, multipart); + PoxPayloadOut xmlPayload) { + return personAuthorityProxy.updateContactForNamedItemInNamedAuthority(parentspecifier, itemspecifier, csid, + xmlPayload.getBytes()); } diff --git a/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClientUtils.java b/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClientUtils.java index 903ad2c9a..7f1b28230 100644 --- a/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClientUtils.java +++ b/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClientUtils.java @@ -45,9 +45,7 @@ import org.collectionspace.services.person.PersonsCommon; import org.collectionspace.services.person.PersonauthoritiesCommon; import org.collectionspace.services.person.SchoolOrStyleList; 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.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,9 +65,10 @@ public class PersonAuthorityClientUtils { * @return */ public static String getAuthorityRefName(String csid, PersonAuthorityClient client){ - if(client==null) + if (client == null) { client = new PersonAuthorityClient(); - ClientResponse res = client.read(csid); + } + ClientResponse res = client.read(csid); try { int statusCode = res.getStatus(); if(!READ_REQ.isValidStatusCode(statusCode) @@ -78,11 +77,11 @@ public class PersonAuthorityClientUtils { } //FIXME: remove the following try catch once Aron fixes signatures try { - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); PersonauthoritiesCommon personAuthority = (PersonauthoritiesCommon) CollectionSpaceClientUtils.extractPart(input, client.getCommonPartName(), PersonauthoritiesCommon.class); - if(personAuthority==null) { + if(personAuthority == null) { throw new RuntimeException("Null personAuthority returned from service."); } return personAuthority.getRefName(); @@ -100,9 +99,10 @@ public class PersonAuthorityClientUtils { * @return */ public static String getPersonRefName(String inAuthority, String csid, PersonAuthorityClient client){ - if(client==null) + if ( client == null) { client = new PersonAuthorityClient(); - ClientResponse res = client.readItem(inAuthority, csid); + } + ClientResponse res = client.readItem(inAuthority, csid); try { int statusCode = res.getStatus(); if(!READ_REQ.isValidStatusCode(statusCode) @@ -111,11 +111,11 @@ public class PersonAuthorityClientUtils { } //FIXME: remove the following try catch once Aron fixes signatures try { - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); PersonsCommon person = (PersonsCommon) CollectionSpaceClientUtils.extractPart(input, client.getItemCommonPartName(), PersonsCommon.class); - if(person==null) { + if (person == null) { throw new RuntimeException("Null person returned from service."); } return person.getRefName(); @@ -135,7 +135,7 @@ public class PersonAuthorityClientUtils { * @param headerLabel the header label * @return the multipart output */ - public static MultipartOutput createPersonAuthorityInstance( + public static PoxPayloadOut createPersonAuthorityInstance( String displayName, String shortIdentifier, String headerLabel ) { PersonauthoritiesCommon personAuthority = new PersonauthoritiesCommon(); personAuthority.setDisplayName(displayName); @@ -143,9 +143,9 @@ public class PersonAuthorityClientUtils { String refName = createPersonAuthRefName(shortIdentifier, displayName); personAuthority.setRefName(refName); personAuthority.setVocabType("PersonAuthority"); - MultipartOutput multipart = new MultipartOutput(); - OutputPart commonPart = multipart.addPart(personAuthority, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", headerLabel); + PoxPayloadOut multipart = new PoxPayloadOut(PersonAuthorityClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = multipart.addPart(personAuthority, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(headerLabel); if(logger.isDebugEnabled()){ logger.debug("to be created, personAuthority common ", @@ -164,7 +164,7 @@ public class PersonAuthorityClientUtils { * @param headerLabel the header label * @return the multipart output */ - public static MultipartOutput createPersonInstance(String inAuthority, + public static PoxPayloadOut createPersonInstance(String inAuthority, String personAuthRefName, Map personInfo, String headerLabel){ final Map> EMPTY_PERSON_REPEATABLES_INFO = @@ -183,7 +183,7 @@ public class PersonAuthorityClientUtils { * @param headerLabel the header label * @return the multipart output */ - public static MultipartOutput createPersonInstance(String inAuthority, + public static PoxPayloadOut createPersonInstance(String inAuthority, String personAuthRefName, Map personInfo, Map> personRepeatablesInfo, String headerLabel){ PersonsCommon person = new PersonsCommon(); @@ -288,10 +288,10 @@ public class PersonAuthorityClientUtils { } - MultipartOutput multipart = new MultipartOutput(); - OutputPart commonPart = multipart.addPart(person, + PoxPayloadOut multipart = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME); + PayloadOutputPart commonPart = multipart.addPart(person, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", headerLabel); + commonPart.setLabel(headerLabel); if(logger.isDebugEnabled()){ logger.debug("to be created, person common ", person, PersonsCommon.class); @@ -353,7 +353,7 @@ public class PersonAuthorityClientUtils { logger.debug("Import: Create Item: \"" + displayName +"\" in personAuthorityulary: \"" + personAuthorityRefName +"\""); } - MultipartOutput multipart = + PoxPayloadOut multipart = createPersonInstance(vcsid, personAuthorityRefName, personMap, personRepeatablesMap, client.getItemCommonPartName()); diff --git a/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityProxy.java b/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityProxy.java index a4b966caf..5b4105c8b 100644 --- a/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityProxy.java +++ b/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityProxy.java @@ -18,40 +18,38 @@ import org.collectionspace.services.contact.ContactsCommonList; import org.collectionspace.services.person.PersonauthoritiesCommonList; import org.collectionspace.services.person.PersonsCommonList; 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.PoxPayloadOut; /** * @version $Revision:$ */ -@Path("/personauthorities/") -@Produces({"multipart/mixed"}) -@Consumes({"multipart/mixed"}) +@Path(PersonAuthorityClient.SERVICE_PATH + "/") +@Produces({"application/xml"}) +@Consumes({"application/xml"}) public interface PersonAuthorityProxy extends CollectionSpaceProxy { // List Personauthorities @GET - @Produces({"application/xml"}) ClientResponse readList(); //(C)reate @POST - ClientResponse create(MultipartOutput multipart); + ClientResponse create(byte[] xmlPayload); //(R)ead @GET @Path("/{csid}") - ClientResponse read(@PathParam("csid") String csid); + ClientResponse read(@PathParam("csid") String csid); //(R)ead by name @GET @Path("/urn:cspace:name({name})") - ClientResponse readByName(@PathParam("name") String name); + ClientResponse readByName(@PathParam("name") String name); //(U)pdate @PUT @Path("/{csid}") - ClientResponse update(@PathParam("csid") String csid, MultipartOutput multipart); + ClientResponse update(@PathParam("csid") String csid, byte[] xmlPayload); //(D)elete @DELETE @@ -93,32 +91,32 @@ public interface PersonAuthorityProxy extends CollectionSpaceProxy { //(C)reate Item @POST @Path("/{vcsid}/items/") - ClientResponse createItem(@PathParam("vcsid") String vcsid, MultipartOutput multipart); + ClientResponse createItem(@PathParam("vcsid") String vcsid, byte[] xmlPayload); //(R)ead Item @GET @Path("/{vcsid}/items/{csid}") - ClientResponse readItem(@PathParam("vcsid") String vcsid, @PathParam("csid") String csid); + ClientResponse readItem(@PathParam("vcsid") String vcsid, @PathParam("csid") String csid); //(R)ead Named Item @GET @Path("/{vcsid}/items/urn:cspace:name({specifier})") - ClientResponse readNamedItem(@PathParam("vcsid") String vcsid, @PathParam("specifier") String specifier); + ClientResponse readNamedItem(@PathParam("vcsid") String vcsid, @PathParam("specifier") String specifier); //(R)ead Item In Named Authority @GET @Path("/urn:cspace:name({specifier})/items/{csid}") - ClientResponse readItemInNamedAuthority(@PathParam("specifier") String specifier, @PathParam("csid") String csid); + ClientResponse readItemInNamedAuthority(@PathParam("specifier") String specifier, @PathParam("csid") String csid); //(R)ead Named Item In Named Authority @GET @Path("/urn:cspace:name({specifier})/items/urn:cspace:name({itemspecifier})") - ClientResponse readNamedItemInNamedAuthority(@PathParam("specifier") String specifier, @PathParam("itemspecifier") String itemspecifier); + ClientResponse readNamedItemInNamedAuthority(@PathParam("specifier") String specifier, @PathParam("itemspecifier") String itemspecifier); //(U)pdate Item @PUT @Path("/{vcsid}/items/{csid}") - ClientResponse updateItem(@PathParam("vcsid") String vcsid, @PathParam("csid") String csid, MultipartOutput multipart); + ClientResponse updateItem(@PathParam("vcsid") String vcsid, @PathParam("csid") String csid, byte[] xmlPayload); //(D)elete Item @DELETE @@ -157,48 +155,48 @@ public interface PersonAuthorityProxy extends CollectionSpaceProxy { ClientResponse createContact( @PathParam("parentcsid") String parentcsid, @PathParam("itemcsid") String itemcsid, - MultipartOutput multipart); + byte[] xmlPayload); @POST @Path("/{parentcsid}/items/urn:cspace:name({itemspecifier})/contacts/") ClientResponse createContactForNamedItem( @PathParam("parentcsid") String parentcsid, @PathParam("itemspecifier") String itemspecifier, - MultipartOutput multipart); + byte[] xmlPayload); @POST @Path("/urn:cspace:name({parentspecifier})/items/{itemcsid}/contacts/") ClientResponse createContactForItemInNamedAuthority( @PathParam("parentspecifier") String parentspecifier, @PathParam("itemcsid") String itemcsid, - MultipartOutput multipart); + byte[] xmlPayload); @POST @Path("/urn:cspace:name({parentspecifier})/items/urn:cspace:name({itemspecifier})/contacts/") ClientResponse createContactForNamedItemInNamedAuthority( @PathParam("parentspecifier") String parentspecifier, @PathParam("itemspecifier") String itemspecifier, - MultipartOutput multipart); + byte[] xmlPayload); //(R)ead Contact @GET @Path("/{parentcsid}/items/{itemcsid}/contacts/{csid}") - ClientResponse readContact( + ClientResponse readContact( @PathParam("parentcsid") String parentcsid, @PathParam("itemcsid") String itemcsid, @PathParam("csid") String csid); @GET @Path("/{parentcsid}/items/urn:cspace:name({itemspecifier})/contacts/{csid}") - ClientResponse readContactForNamedItem( + ClientResponse readContactForNamedItem( @PathParam("parentcsid") String parentcsid, @PathParam("itemspecifier") String itemspecifier, @PathParam("csid") String csid); @GET @Path("/urn:cspace:name({parentspecifier})/items/{itemcsid}/contacts/{csid}") - ClientResponse readContactInNamedAuthority( + ClientResponse readContactInNamedAuthority( @PathParam("parentspecifier") String parentspecifier, @PathParam("itemcsid") String itemcsid, @PathParam("csid") String csid); @GET @Path("/urn:cspace:name({parentspecifier})/items/urn:cspace:name({itemspecifier})/contacts/{csid}") - ClientResponse readContactForNamedItemInNamedAuthority( + ClientResponse readContactForNamedItemInNamedAuthority( @PathParam("parentspecifier") String parentspecifier, @PathParam("itemspecifier") String itemspecifier, @PathParam("csid") String csid); @@ -206,32 +204,32 @@ public interface PersonAuthorityProxy extends CollectionSpaceProxy { //(U)pdate Contact @PUT @Path("/{parentcsid}/items/{itemcsid}/contacts/{csid}") - ClientResponse updateContact( + ClientResponse updateContact( @PathParam("parentcsid") String parentcsid, @PathParam("itemcsid") String itemcsid, @PathParam("csid") String csid, - MultipartOutput multipart); + byte[] xmlPayload); @PUT @Path("/{parentcsid}/items/urn:cspace:name({itemspecifier})/contacts/{csid}") - ClientResponse updateContactForNamedItem( + ClientResponse updateContactForNamedItem( @PathParam("parentcsid") String parentcsid, @PathParam("itemspecifier") String itemspecifier, @PathParam("csid") String csid, - MultipartOutput multipart); + byte[] xmlPayload); @PUT @Path("/urn:cspace:name({parentspecifier})/items/{itemcsid}/contacts/{csid}") - ClientResponse updateContactInNamedAuthority( + ClientResponse updateContactInNamedAuthority( @PathParam("parentspecifier") String parentspecifier, @PathParam("itemcsid") String itemcsid, @PathParam("csid") String csid, - MultipartOutput multipart); + byte[] xmlPayload); @PUT @Path("/urn:cspace:name({parentspecifier})/items/urn:cspace:name({itemspecifier})/contacts/{csid}") - ClientResponse updateContactForNamedItemInNamedAuthority( + ClientResponse updateContactForNamedItemInNamedAuthority( @PathParam("parentspecifier") String parentspecifier, @PathParam("itemspecifier") String itemspecifier, @PathParam("csid") String csid, - MultipartOutput multipart); + byte[] xmlPayload); //(D)elete Contact @DELETE @@ -240,6 +238,7 @@ public interface PersonAuthorityProxy extends CollectionSpaceProxy { @PathParam("parentcsid") String parentcsid, @PathParam("itemcsid") String itemcsid, @PathParam("csid") String csid); + @DELETE @Path("/{parentcsid}/items/urn:cspace:name({itemspecifier})/contacts/{csid}") ClientResponse deleteContactForNamedItem( @@ -252,6 +251,7 @@ public interface PersonAuthorityProxy extends CollectionSpaceProxy { @PathParam("parentspecifier") String parentspecifier, @PathParam("itemcsid") String itemcsid, @PathParam("csid") String csid); + @DELETE @Path("/urn:cspace:name({parentspecifier})/items/urn:cspace:name({itemspecifier})/contacts/{csid}") ClientResponse deleteContactForNamedItemInNamedAuthority( diff --git a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthoritySearchTest.java b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthoritySearchTest.java index 96f561f19..9948d5202 100644 --- a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthoritySearchTest.java +++ b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthoritySearchTest.java @@ -36,10 +36,10 @@ import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.CollectionSpaceClient; import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.jaxb.AbstractCommonList; import org.collectionspace.services.person.PersonsCommonList; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -59,8 +59,15 @@ public class PersonAuthoritySearchTest extends BaseServiceTest { private final String CLASS_NAME = PersonAuthoritySearchTest.class.getName(); private final Logger logger = LoggerFactory.getLogger(CLASS_NAME); - /** The service path component. */ - final String SERVICE_PATH_COMPONENT = "personauthorities"; + @Override + public String getServicePathComponent() { + return PersonAuthorityClient.SERVICE_PATH_COMPONENT; + } + + @Override + protected String getServiceName() { + return PersonAuthorityClient.SERVICE_NAME; + } final String UTF8_CHARSET_NAME = "UTF-8"; @@ -567,14 +574,6 @@ public class PersonAuthoritySearchTest extends BaseServiceTest { // --------------------------------------------------------------- // Utility methods used by tests above // --------------------------------------------------------------- - /* (non-Javadoc) - * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent() - */ - @Override - public String getServicePathComponent() { - return SERVICE_PATH_COMPONENT; - } - // --------------------------------------------------------------- // Utilities: setup routines for search tests @@ -597,7 +596,7 @@ public class PersonAuthoritySearchTest extends BaseServiceTest { String shortId = createIdentifier(); String displayName = "displayName-" + shortId; String baseRefName = PersonAuthorityClientUtils.createPersonAuthRefName(shortId, null); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( displayName, shortId, client.getCommonPartName()); @@ -689,7 +688,7 @@ public class PersonAuthoritySearchTest extends BaseServiceTest { PersonAuthorityClient client, Map partialTermPersonMap, Map> partialTermRepeatablesMap) throws Exception { - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonInstance(authorityCsid, authRefName, partialTermPersonMap, partialTermRepeatablesMap, client.getItemCommonPartName() ); diff --git a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServicePerfTest.java b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServicePerfTest.java index 7f5f60aea..3fd836440 100644 --- a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServicePerfTest.java +++ b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServicePerfTest.java @@ -32,11 +32,11 @@ import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.CollectionSpaceClient; import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.jaxb.AbstractCommonList; import org.collectionspace.services.person.PersonsCommonList; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -57,8 +57,8 @@ public class PersonAuthorityServicePerfTest extends BaseServiceTest { private final Logger logger = LoggerFactory.getLogger(CLASS_NAME); // Instance variables specific to this test. - final String SERVICE_PATH_COMPONENT = "personauthorities"; - final String ITEM_SERVICE_PATH_COMPONENT = "items"; +// final String SERVICE_PATH_COMPONENT = "personauthorities"; +// final String ITEM_SERVICE_PATH_COMPONENT = "items"; private String authId = null; private String authRefName = null; private List allItemIdsCreated = new ArrayList(); @@ -93,6 +93,16 @@ public class PersonAuthorityServicePerfTest extends BaseServiceTest { shortTestLimit, }; private boolean runFullTest = false; + @Override + public String getServicePathComponent() { + return PersonAuthorityClient.SERVICE_PATH_COMPONENT; + } + + @Override + protected String getServiceName() { + return PersonAuthorityClient.SERVICE_NAME; + } + /* (non-Javadoc) * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance() */ @@ -147,7 +157,7 @@ public class PersonAuthorityServicePerfTest extends BaseServiceTest { String shortId = "perfTestPersons"; String displayName = "Perf Test Person Auth"; String baseRefName = PersonAuthorityClientUtils.createPersonAuthRefName(shortId, null); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( displayName, shortId, client.getCommonPartName()); @@ -201,7 +211,7 @@ public class PersonAuthorityServicePerfTest extends BaseServiceTest { personMap.put(PersonJAXBSchema.FORE_NAME, firstName); personMap.put(PersonJAXBSchema.SUR_NAME, lastName); Map> personRepeatablesMap = new HashMap>(); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonInstance(authId, authRefName, personMap, personRepeatablesMap, client.getItemCommonPartName() ); @@ -322,11 +332,6 @@ public class PersonAuthorityServicePerfTest extends BaseServiceTest { // --------------------------------------------------------------- // Utility methods used by tests above // --------------------------------------------------------------- - @Override - public String getServicePathComponent() { - return SERVICE_PATH_COMPONENT; - } - /** * Deletes all resources created by tests, after all tests have been run. * diff --git a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java index 456710a52..e75b462d0 100644 --- a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java +++ b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java @@ -29,23 +29,27 @@ import java.util.Map; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.CollectionSpaceClient; +import org.collectionspace.services.client.PayloadOutputPart; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; +import org.collectionspace.services.jaxb.AbstractCommonList; + import org.collectionspace.services.client.ContactClient; import org.collectionspace.services.client.ContactClientUtils; import org.collectionspace.services.contact.ContactsCommon; import org.collectionspace.services.contact.ContactsCommonList; + import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; -import org.collectionspace.services.jaxb.AbstractCommonList; +import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.person.PersonauthoritiesCommon; import org.collectionspace.services.person.PersonauthoritiesCommonList; import org.collectionspace.services.person.PersonsCommon; import org.collectionspace.services.person.PersonsCommonList; + 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.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -59,21 +63,25 @@ import org.testng.annotations.Test; * $LastChangedRevision: 753 $ * $LastChangedDate: 2009-09-23 11:03:36 -0700 (Wed, 23 Sep 2009) $ */ -public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { +public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME: Test classes for Vocab, Person, Org, and Location should have a base class! /** The logger. */ private final String CLASS_NAME = PersonAuthorityServiceTest.class.getName(); private final Logger logger = LoggerFactory.getLogger(CLASS_NAME); - - // Instance variables specific to this test. - /** The service path component. */ - final String SERVICE_PATH_COMPONENT = "personauthorities"; - /** The item service path component. */ - final String ITEM_SERVICE_PATH_COMPONENT = "items"; + @Override + public String getServicePathComponent() { + return PersonAuthorityClient.SERVICE_PATH_COMPONENT; + } + + @Override + protected String getServiceName() { + return PersonAuthorityClient.SERVICE_NAME; + } - /** The contact service path component. */ - final String CONTACT_SERVICE_PATH_COMPONENT = "contacts"; + public String getItemServicePathComponent() { + return PersonAuthorityClient.SERVICE_PATH_ITEMS_COMPONENT; + } /** The test forename. */ final String TEST_FORE_NAME = "John"; @@ -169,7 +177,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { String shortId = createIdentifier(); String displayName = "displayName-" + shortId; String baseRefName = PersonAuthorityClientUtils.createPersonAuthRefName(shortId, null); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( displayName, shortId, client.getCommonPartName()); @@ -319,7 +327,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonInstance(vcsid, authRefName, itemFieldProperties, itemRepeatableFieldProperties, client.getItemCommonPartName() ); @@ -395,8 +403,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); String identifier = createIdentifier(); - MultipartOutput multipart = - ContactClientUtils.createContactInstance(parentcsid, + PoxPayloadOut multipart = ContactClientUtils.createContactInstance(parentcsid, itemcsid, identifier, new ContactClient().getCommonPartName()); String newID = null; @@ -572,7 +579,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { PersonAuthorityClient client = new PersonAuthorityClient(); String shortId = createIdentifier() + "*" + createIdentifier(); String displayName = "displayName-" + shortId; - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( displayName, shortId, client.getCommonPartName()); @@ -622,7 +629,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, shortId); fieldProperties.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId); final Map NULL_REPEATABLE_FIELD_PROPERTIES = null; - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonInstance(knownResourceId, knownResourceRefName, fieldProperties, NULL_REPEATABLE_FIELD_PROPERTIES, client.getItemCommonPartName()); @@ -735,7 +742,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - ClientResponse res = null; + ClientResponse res = null; if(CSID!=null) { res = client.read(CSID); } else if(shortId!=null) { @@ -755,7 +762,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); //FIXME: remove the following try catch once Aron fixes signatures try { - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); PersonauthoritiesCommon personAuthority = (PersonauthoritiesCommon) extractPart(input, client.getCommonPartName(), PersonauthoritiesCommon.class); Assert.assertNotNull(personAuthority); @@ -829,7 +836,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - ClientResponse res = null; + ClientResponse res = null; if(authCSID!=null) { if(itemCSID!=null) { res = client.readItem(authCSID, itemCSID); @@ -862,7 +869,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Check whether we've received a person. - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); PersonsCommon person = (PersonsCommon) extractPart(input, client.getItemCommonPartName(), PersonsCommon.class); Assert.assertNotNull(person); @@ -904,8 +911,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartInput input =null; - ClientResponse res = client.readItem(knownResourceId, knownItemResourceId); + PoxPayloadIn input =null; + ClientResponse res = client.readItem(knownResourceId, knownItemResourceId); try { int statusCode = res.getStatus(); @@ -919,7 +926,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Check whether person has expected displayName. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -956,9 +963,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { "updated-" + TEST_FORE_NAME, null, TEST_SUR_NAME,null, null); // Submit the updated resource to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getItemCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getItemCommonPartName()); res = client.updateItem(knownResourceId, knownItemResourceId, output); try { int statusCode = res.getStatus(); @@ -972,7 +979,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Retrieve the updated resource and verify that its contents exist. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1000,9 +1007,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { person.setShortDisplayName(expectedDisplayName); // Submit the updated resource to the service and store the response. - output = new MultipartOutput(); + output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME); commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getItemCommonPartName()); + commonPart.setLabel(client.getItemCommonPartName()); res = client.updateItem(knownResourceId, knownItemResourceId, output); try { int statusCode = res.getStatus(); @@ -1016,7 +1023,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Retrieve the updated resource and verify that its contents exist. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1061,8 +1068,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartInput input = null; - ClientResponse res = client.readItem(knownResourceId, knownItemResourceId); + PoxPayloadIn input = null; + ClientResponse res = client.readItem(knownResourceId, knownItemResourceId); try { int statusCode = res.getStatus(); @@ -1076,7 +1083,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, Response.Status.OK.getStatusCode()); // Check whether Person has expected displayName. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1089,9 +1096,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { person.setDisplayName(null); // Submit the updated resource to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getItemCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getItemCommonPartName()); res = client.updateItem(knownResourceId, knownItemResourceId, output); try { int statusCode = res.getStatus(); @@ -1126,8 +1133,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartInput input = null; - ClientResponse res = + PoxPayloadIn input = null; + ClientResponse res = client.readContact(knownResourceId, knownItemResourceId, knownContactResourceId); try { @@ -1143,7 +1150,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Check whether we've received a contact. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1178,7 +1185,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - ClientResponse res = client.read(NON_EXISTENT_ID); + ClientResponse res = client.read(NON_EXISTENT_ID); try { int statusCode = res.getStatus(); // Check the status code of the response: does it match @@ -1211,7 +1218,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - ClientResponse res = client.readItem(knownResourceId, NON_EXISTENT_ID); + ClientResponse res = client.readItem(knownResourceId, NON_EXISTENT_ID); try { int statusCode = res.getStatus(); @@ -1245,7 +1252,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Submit the request to the service and store the response. PersonAuthorityClient client = new PersonAuthorityClient(); - ClientResponse res = + ClientResponse res = client.readContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID); try { int statusCode = res.getStatus(); @@ -1514,8 +1521,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Retrieve the contents of a resource to update. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartInput input = null; - ClientResponse res = client.read(knownResourceId); + PoxPayloadIn input = null; + ClientResponse res = client.read(knownResourceId); try { if(logger.isDebugEnabled()){ logger.debug(testName + ": read status = " + res.getStatus()); @@ -1525,7 +1532,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { if(logger.isDebugEnabled()){ logger.debug("got PersonAuthority to update with ID: " + knownResourceId); } - input = res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1543,9 +1550,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { } // Submit the updated resource to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(personAuthority, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(personAuthority, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getCommonPartName()); res = client.update(knownResourceId, output); try { int statusCode = res.getStatus(); @@ -1559,7 +1566,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Retrieve the updated resource and verify that its contents exist. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1593,8 +1600,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Retrieve the contents of a resource to update. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartInput input = null; - ClientResponse res = + PoxPayloadIn input = null; + ClientResponse res = client.readItem(knownResourceId, knownItemResourceId); try { if(logger.isDebugEnabled()){ @@ -1607,7 +1614,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { knownItemResourceId + " in PersonAuthority: " + knownResourceId ); } - input = res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1631,9 +1638,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { } // Submit the updated resource to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getItemCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getItemCommonPartName()); res = client.updateItem(knownResourceId, knownItemResourceId, output); try { int statusCode = res.getStatus(); @@ -1647,7 +1654,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Retrieve the updated resource and verify that its contents exist. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1686,8 +1693,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // Retrieve the contents of a resource to update. PersonAuthorityClient client = new PersonAuthorityClient(); - MultipartInput input = null; - ClientResponse res = + PoxPayloadIn input = null; + ClientResponse res = client.readContact(knownResourceId, knownItemResourceId, knownContactResourceId); try { if(logger.isDebugEnabled()){ @@ -1701,7 +1708,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { " in item: " + knownItemResourceId + " in parent: " + knownResourceId ); } - input = res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); } finally { res.releaseConnection(); } @@ -1719,9 +1726,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { } // Submit the updated resource to the service and store the response. - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(contact, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", new ContactClient().getCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(ContactClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(contact, MediaType.APPLICATION_XML_TYPE); //FIXME: REM - Replace with output.addPart(contact, client.getCommonPartName()) + commonPart.setLabel(client.getCommonPartName()); res = client.updateContact(knownResourceId, knownItemResourceId, knownContactResourceId, output); try { int statusCode = res.getStatus(); @@ -1735,7 +1742,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); // Retrieve the updated resource and verify that its contents exist. - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity());; } finally { res.releaseConnection(); } @@ -1777,7 +1784,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //Should this really be empty? } -/* +/* //FIXME: REM - Can we kill all this dead code please? @Override @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class, groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"}) @@ -1885,9 +1892,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // The only relevant ID may be the one used in update(), below. PersonAuthorityClient client = new PersonAuthorityClient(); String displayName = "displayName-NON_EXISTENT_ID"; - MultipartOutput multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( displayName, "NON_EXISTENT_SHORT_ID", client.getCommonPartName()); - ClientResponse res = + ClientResponse res = client.update(NON_EXISTENT_ID, multipart); try { int statusCode = res.getStatus(); @@ -1931,11 +1938,11 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { nonexMap.put(PersonJAXBSchema.SUR_NAME, "Wayne"); nonexMap.put(PersonJAXBSchema.GENDER, "male"); Map> nonexRepeatablesMap = new HashMap>(); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonInstance(NON_EXISTENT_ID, PersonAuthorityClientUtils.createPersonAuthRefName(NON_EXISTENT_ID, null), nonexMap, nonexRepeatablesMap, client.getItemCommonPartName() ); - ClientResponse res = + ClientResponse res = client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart); try { int statusCode = res.getStatus(); @@ -2331,32 +2338,15 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { // --------------------------------------------------------------- // Utility methods used by tests above // --------------------------------------------------------------- - /* (non-Javadoc) - * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent() - */ - @Override - public String getServicePathComponent() { - return SERVICE_PATH_COMPONENT; - } - - /** - * Gets the item service path component. - * - * @return the item service path component - */ - public String getItemServicePathComponent() { - return ITEM_SERVICE_PATH_COMPONENT; - } - /** * Gets the contact service path component. * * @return the contact service path component */ public String getContactServicePathComponent() { - return CONTACT_SERVICE_PATH_COMPONENT; + return ContactClient.SERVICE_PATH_COMPONENT; } - + /** * Returns the root URL for the item service. * diff --git a/services/person/import/src/main/java/org/collectionspace/services/person/importer/PersonAuthorityBaseImport.java b/services/person/import/src/main/java/org/collectionspace/services/person/importer/PersonAuthorityBaseImport.java index e7f628d3e..205485972 100644 --- a/services/person/import/src/main/java/org/collectionspace/services/person/importer/PersonAuthorityBaseImport.java +++ b/services/person/import/src/main/java/org/collectionspace/services/person/importer/PersonAuthorityBaseImport.java @@ -37,13 +37,13 @@ import org.apache.log4j.BasicConfigurator; import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.test.ServiceRequestType; import org.collectionspace.services.person.PersonauthoritiesCommon; import org.collectionspace.services.person.PersonauthoritiesCommonList; import org.collectionspace.services.person.PersonsCommon; import org.collectionspace.services.person.PersonsCommonList; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,7 +75,7 @@ public class PersonAuthorityBaseImport { } String basePersonRefName = PersonAuthorityClientUtils.createPersonAuthRefName(shortId, null); - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( displayName, shortId, client.getCommonPartName()); ClientResponse res = client.create(multipart); diff --git a/services/person/jaxb/.classpath b/services/person/jaxb/.classpath index 1707f3e6f..1c214e7c9 100644 --- a/services/person/jaxb/.classpath +++ b/services/person/jaxb/.classpath @@ -1,11 +1,302 @@ - - - - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/person/jaxb/.project b/services/person/jaxb/.project index 27c00a817..1b140159b 100644 --- a/services/person/jaxb/.project +++ b/services/person/jaxb/.project @@ -1,23 +1,23 @@ - org.collectionspace.services.person.jaxb - + 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/person/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/person/jaxb/.settings/org.maven.ide.eclipse.prefs index bcf9f7790..e3f7cf4ae 100644 --- a/services/person/jaxb/.settings/org.maven.ide.eclipse.prefs +++ b/services/person/jaxb/.settings/org.maven.ide.eclipse.prefs @@ -1,9 +1,9 @@ -#Fri Aug 06 11:16:01 PDT 2010 +#Wed Jan 19 22:49:39 PST 2011 activeProfiles= eclipse.preferences.version=1 fullBuildGoals=process-test-resources includeModules=false resolveWorkspaceProjects=true resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=false +skipCompilerPlugin=true version=1 diff --git a/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java b/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java index b8a815368..bf7cc9856 100644 --- a/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java +++ b/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java @@ -37,14 +37,13 @@ import org.apache.log4j.BasicConfigurator; import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.test.ServiceRequestType; import org.collectionspace.services.person.PersonauthoritiesCommon; import org.collectionspace.services.person.PersonauthoritiesCommonList; import org.collectionspace.services.person.PersonsCommon; import org.collectionspace.services.person.PersonsCommonList; 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.InputPart; import org.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.slf4j.Logger; @@ -85,7 +84,7 @@ public class Sample { String displaySuffix = "displayName-" + System.currentTimeMillis(); //TODO: Laramie20100728 temp fix, made-up displaySuffix. String basePersonRefName = PersonAuthorityClientUtils.createPersonAuthRefName(personAuthorityName, displaySuffix);//TODO: Laramie20100728 temp fix was personAuthorityName, false String fullPersonRefName = PersonAuthorityClientUtils.createPersonAuthRefName(personAuthorityName, displaySuffix); //TODO: Laramie20100728 temp fix was personAuthorityName, true - MultipartOutput multipart = + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance( personAuthorityName, fullPersonRefName, client.getCommonPartName() ); ClientResponse res = client.create(multipart); @@ -147,7 +146,7 @@ public class Sample { logger.debug("Import: Create Item: \""+builtName.toString() +"\" in personAuthorityulary: \"" + personAuthorityRefName +"\""); } - MultipartOutput multipart = createPersonInstance( vcsid, refName, + PoxPayloadOut multipart = createPersonInstance( vcsid, refName, personMap ); ClientResponse res = client.createItem(vcsid, multipart); @@ -216,7 +215,7 @@ public class Sample { // Submit the request to the service and store the response. PersonauthoritiesCommon personAuthority = null; try { - ClientResponse res = client.read(personAuthId); + ClientResponse res = client.read(personAuthId); int statusCode = res.getStatus(); if(!REQUEST_TYPE.isValidStatusCode(statusCode)) { throw new RuntimeException("Could not read personAuthority" @@ -226,7 +225,7 @@ public class Sample { throw new RuntimeException("Unexpected Status when reading " + "personAuthority, Status:"+ statusCode); } - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = (PoxPayloadIn) res.getEntity(); personAuthority = (PersonauthoritiesCommon) extractPart(input, client.getCommonPartName(), PersonauthoritiesCommon.class); } catch (Exception e) { @@ -333,13 +332,13 @@ public class Sample { // --------------------------------------------------------------- /* - private MultipartOutput createPersonAuthorityInstance( + private PoxPayloadOut createPersonAuthorityInstance( String displayName, String refName ) { PersonauthoritiesCommon personAuthority = new PersonauthoritiesCommon(); personAuthority.setDisplayName(displayName); personAuthority.setRefName(refName); personAuthority.setVocabType("PersonAuthority"); - MultipartOutput multipart = new MultipartOutput(); + PoxPayloadOut multipart = new PoxPayloadOut(); OutputPart commonPart = multipart.addPart(personAuthority, MediaType.APPLICATION_XML_TYPE); commonPart.getHeaders().add("label", client.getCommonPartName()); @@ -352,7 +351,7 @@ public class Sample { } */ - private MultipartOutput createPersonInstance(String inAuthority, + private PoxPayloadOut createPersonInstance(String inAuthority, String refName, Map personInfo ) { PersonsCommon person = new PersonsCommon(); person.setInAuthority(inAuthority); @@ -398,7 +397,7 @@ public class Sample { person.setBioNote(value); if((value = (String)personInfo.get(PersonJAXBSchema.NAME_NOTE))!=null) person.setNameNote(value); - MultipartOutput multipart = new MultipartOutput(); + PoxPayloadOut multipart = new PoxPayloadOut(); OutputPart commonPart = multipart.addPart(person, MediaType.APPLICATION_XML_TYPE); commonPart.getHeaders().add("label", client.getItemCommonPartName()); @@ -459,7 +458,7 @@ public class Sample { return sb.toString(); } - private Object extractPart(MultipartInput input, String label, + private Object extractPart(PoxPayloadIn input, String label, Class clazz) throws Exception { Object obj = null; for(InputPart part : input.getParts()){ diff --git a/services/person/service/.classpath b/services/person/service/.classpath index 83343792e..e83fc7242 100644 --- a/services/person/service/.classpath +++ b/services/person/service/.classpath @@ -1,7 +1,314 @@ - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/person/service/.project b/services/person/service/.project index 290bda033..4f77c3b76 100644 --- a/services/person/service/.project +++ b/services/person/service/.project @@ -1,26 +1,28 @@ - org.collectionspace.services.person.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.contact.client + org.collectionspace.services.contact.jaxb + org.collectionspace.services.contact.service + org.collectionspace.services.hyperjaxb org.collectionspace.services.jaxb + org.collectionspace.services.person.client org.collectionspace.services.person.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/person/service/pom.xml b/services/person/service/pom.xml index 8cddd39d2..09ede1b95 100644 --- a/services/person/service/pom.xml +++ b/services/person/service/pom.xml @@ -32,6 +32,11 @@ org.collectionspace.services.person.jaxb ${project.version} + + org.collectionspace.services + org.collectionspace.services.person.client + ${project.version} + org.collectionspace.services org.collectionspace.services.contact.service diff --git a/services/person/service/src/main/java/org/collectionspace/services/person/PersonAuthorityResource.java b/services/person/service/src/main/java/org/collectionspace/services/person/PersonAuthorityResource.java index 001a77550..9ae81cd1f 100644 --- a/services/person/service/src/main/java/org/collectionspace/services/person/PersonAuthorityResource.java +++ b/services/person/service/src/main/java/org/collectionspace/services/person/PersonAuthorityResource.java @@ -27,6 +27,7 @@ import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; +import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.contact.AuthorityResourceWithContacts; import org.collectionspace.services.person.nuxeo.PersonDocumentModelHandler; @@ -36,18 +37,18 @@ import org.slf4j.LoggerFactory; /** * The Class PersonAuthorityResource. */ -@Path("/personauthorities") -@Consumes("multipart/mixed") -@Produces("multipart/mixed") +@Path(PersonAuthorityClient.SERVICE_PATH) +@Consumes("application/xml") +@Produces("application/xml") public class PersonAuthorityResource extends -AuthorityResourceWithContacts { - private final static String personAuthorityServiceName = "personauthorities"; - private final static String PERSONAUTHORITIES_COMMON = "personauthorities_common"; +// private final static String personAuthorityServiceName = "personauthorities"; +// private final static String PERSONAUTHORITIES_COMMON = "personauthorities_common"; - private final static String personServiceName = "persons"; - private final static String PERSONS_COMMON = "persons_common"; +// private final static String personServiceName = "persons"; +// private final static String PERSONS_COMMON = "persons_common"; final Logger logger = LoggerFactory.getLogger(PersonAuthorityResource.class); @@ -56,7 +57,7 @@ AuthorityResourceWithContacts