2 * This document is a part of the source code and related artifacts
3 * for CollectionSpace, an open source collections management system
4 * for museums and related institutions:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright © 2009 Regents of the University of California
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
15 * https://source.collectionspace.org/collection-space/LICENSE.txt
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 package org.collectionspace.services.client.test;
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.List;
30 import javax.ws.rs.core.MediaType;
31 import javax.ws.rs.core.Response;
33 import org.collectionspace.services.OrganizationJAXBSchema;
34 import org.collectionspace.services.PersonJAXBSchema;
35 import org.collectionspace.services.client.CollectionObjectClient;
36 import org.collectionspace.services.client.CollectionSpaceClient;
37 import org.collectionspace.services.client.OrgAuthorityClient;
38 import org.collectionspace.services.client.OrgAuthorityClientUtils;
39 import org.collectionspace.services.client.PayloadOutputPart;
40 import org.collectionspace.services.client.PersonAuthorityClient;
41 import org.collectionspace.services.client.PersonAuthorityClientUtils;
42 import org.collectionspace.services.client.PoxPayloadIn;
43 import org.collectionspace.services.client.PoxPayloadOut;
44 import org.collectionspace.services.common.authorityref.AuthorityRefList;
45 import org.collectionspace.services.collectionobject.AssocEventOrganizationList;
46 import org.collectionspace.services.collectionobject.AssocEventPersonList;
47 import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
48 import org.collectionspace.services.collectionobject.ContentOrganizationList;
49 import org.collectionspace.services.collectionobject.ContentPersonList;
50 import org.collectionspace.services.collectionobject.OwnerList;
51 import org.collectionspace.services.collectionobject.FieldCollectionSourceList;
52 import org.collectionspace.services.collectionobject.FieldCollectorList;
53 import org.collectionspace.services.collectionobject.TitleGroup;
54 import org.collectionspace.services.collectionobject.TitleGroupList;
55 import org.collectionspace.services.jaxb.AbstractCommonList;
57 import org.jboss.resteasy.client.ClientResponse;
59 import org.testng.Assert;
60 import org.testng.annotations.AfterClass;
61 import org.testng.annotations.Test;
63 import org.slf4j.Logger;
64 import org.slf4j.LoggerFactory;
67 * CollectionObjectAuthRefsTest, carries out tests against a
68 * deployed and running CollectionObject Service.
70 * $LastChangedRevision: 1327 $
71 * $LastChangedDate: 2010-02-12 10:35:11 -0800 (Fri, 12 Feb 2010) $
73 public class CollectionObjectAuthRefsTest extends BaseServiceTest<AbstractCommonList> {
76 protected CollectionSpaceClient getClientInstance() {
77 throw new UnsupportedOperationException(); //FIXME: REM - See http://issues.collectionspace.org/browse/CSPACE-3498
81 protected String getServiceName() {
82 throw new UnsupportedOperationException(); //FIXME: REM - See http://issues.collectionspace.org/browse/CSPACE-3498
86 private final String CLASS_NAME = CollectionObjectAuthRefsTest.class.getName();
87 private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
89 // Instance variables specific to this test.
90 /** The service path component. */
91 final String SERVICE_PATH_COMPONENT = "collectionobjects";
93 /** The person authority name. */
94 final String PERSON_AUTHORITY_NAME = "TestPersonAuth";
95 final String PERSON_AUTHORITY_NAME_DISPLAY = "TestPersonAuth_DisplayName";
97 /** The organization authority name. */
98 final String ORG_AUTHORITY_NAME = "TestOrgAuth";
100 /** The collection object ids created. */
101 private List<String> collectionObjectIdsCreated = new ArrayList<String>();
103 /** The person ids created. */
104 private List<String> personIdsCreated = new ArrayList<String>();
106 /** The person authority csid and refName. */
107 private String personAuthCSID = null;
108 private String personAuthRefName = null;
110 /** The organization ids created. */
111 private List<String> orgIdsCreated = new ArrayList<String>();
113 /** The org authority csid and refName. */
114 private String orgAuthCSID = null;
115 private String orgAuthRefName = null;
117 private String contentOrganizationRefName = null;
118 private String contentPersonRefName = null;
119 private String assocEventOrganizationRefName = null;
120 private String assocEventPersonRefName = null;
121 private String ownerRefName = null;
122 private String fieldCollectionSourceRefName = null;
123 private String fieldCollectorRefName = null;
125 // FIXME: As of 2012-01-04, the two assocEvent... fields
126 // and the ownerRefName field have been commented out in
127 // the list of authRef fields in CollectionObject, in tenant bindings,
128 // because those fields fall within to-be-created repeatable groups,
130 // As a result, the number of authority references expected to be found
131 // is currently 4, rather than 7. - Aron
132 public String toString(){
133 String result = "CollectionObjectauthRefsTest: "
134 + "\r\npersonAuthCSID: "+personAuthCSID
135 + "\r\npersonAuthRefName: "+personAuthRefName
136 + "\r\norgAuthCSID: "+orgAuthCSID
137 + "\r\norgAuthRefName: "+orgAuthRefName
139 + "\r\n contentOrganizationRefName: "+contentOrganizationRefName
140 + "\r\n contentPersonRefName: "+contentPersonRefName
141 + "\r\n assocEventOrganizationRefName: "+assocEventOrganizationRefName
142 + "\r\n assocEventPersonRefName: "+assocEventPersonRefName
143 + "\r\n ownerRefName: "+ownerRefName
144 + "\r\n fieldCollectionSourceRefName: "+fieldCollectionSourceRefName
145 + "\r\n fieldCollectorRefName: "+fieldCollectorRefName;
146 StringBuffer buff = new StringBuffer();
151 /** The number of authority references expected. */
152 private final int NUM_AUTH_REFS_EXPECTED = 4;
154 // ---------------------------------------------------------------
155 // CRUD tests : CREATE tests
156 // ---------------------------------------------------------------
159 * Creates the with auth refs.
161 * @param testName the test name
162 * @throws Exception the exception
164 @Test(dataProvider="testName")
165 public void createWithAuthRefs(String testName) throws Exception {
166 // Create all the person refs and entities
169 // Create all the organization refs and entities
170 createOrganizationRefs();
172 // Create an object record payload, containing
173 // authority reference values in a number of its fields
174 String identifier = createIdentifier();
175 PoxPayloadOut multipart =
176 createCollectionObjectInstance(
178 "ObjNum" + "-" + identifier,
179 contentOrganizationRefName,
180 contentPersonRefName,
181 assocEventOrganizationRefName,
182 assocEventPersonRefName,
184 fieldCollectionSourceRefName,
185 fieldCollectorRefName
188 // Submit the request to the service and store the response.
189 CollectionObjectClient collectionObjectClient = new CollectionObjectClient();
190 testSetup(STATUS_CREATED, ServiceRequestType.CREATE);
191 ClientResponse<Response> res = collectionObjectClient.create(multipart);
192 String newCsid = null;
194 assertStatusCode(res, testName);
195 newCsid = extractId(res);
198 res.releaseConnection();
201 // Store the ID returned from the first resource created
202 // for additional tests below.
203 if (knownResourceId == null){
204 knownResourceId = newCsid;
205 if (logger.isDebugEnabled()) {
206 logger.debug(testName + ": knownResourceId=" + knownResourceId);
210 // Store the IDs from every resource created by tests,
211 // so they can be deleted after tests have been run.
212 collectionObjectIdsCreated.add(extractId(res));
216 * Creates a Person Authority.
218 * @param displayName the display name of the authority
219 * @param shortIdentifier the short identifier for the authority
221 private void createPersonAuthority(String displayName, String shortIdentifier) {
222 testSetup(STATUS_CREATED, ServiceRequestType.CREATE);
223 PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
224 PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(
225 displayName, shortIdentifier, personAuthClient.getCommonPartName());
226 ClientResponse<Response> res = personAuthClient.create(multipart);
227 int statusCode = res.getStatus();
229 Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
230 invalidStatusCodeMessage(testRequestType, statusCode));
231 Assert.assertEquals(statusCode, STATUS_CREATED);
232 personAuthCSID = extractId(res);
233 personAuthRefName = PersonAuthorityClientUtils.getAuthorityRefName(personAuthCSID, null);
237 * Creates a person item.
239 * @param firstName the person's first name
240 * @param surName the person's surname
241 * @param shortIdentifier the short identifier for the item
242 * @return the CSID of the newly-created person record
244 protected String createPerson(String firstName, String surName, String shortIdentifier ) {
245 Map<String, String> personInfo = new HashMap<String,String>();
246 personInfo.put(PersonJAXBSchema.FORE_NAME, firstName);
247 personInfo.put(PersonJAXBSchema.SUR_NAME, surName);
248 personInfo.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortIdentifier);
249 PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
250 PoxPayloadOut multipart =
251 PersonAuthorityClientUtils.createPersonInstance(personAuthCSID,
252 personAuthRefName, personInfo, personAuthClient.getItemCommonPartName());
253 ClientResponse<Response> res = personAuthClient.createItem(personAuthCSID, multipart);
254 int statusCode = res.getStatus();
256 Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
257 invalidStatusCodeMessage(testRequestType, statusCode));
258 Assert.assertEquals(statusCode, STATUS_CREATED);
259 return extractId(res);
263 * Creates multiple Person items within a Person Authority,
264 * and stores the refNames referring to each.
266 protected void createPersonRefs(){
268 createPersonAuthority(PERSON_AUTHORITY_NAME_DISPLAY, PERSON_AUTHORITY_NAME);
272 csid = createPerson("Connie", "ContactPerson", "connieContactPerson");
273 contentPersonRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
274 personIdsCreated.add(csid);
276 // csid = createPerson("Ingrid", "ContentInscriber", "ingridContentInscriber");
277 // contentInscriberRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
278 // personIdsCreated.add(csid);
280 // csid = createPerson("Pacifico", "ProductionPerson", "pacificoProductionPerson");
281 // objectProductionPersonRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
282 // personIdsCreated.add(csid);
284 // csid = createPerson("Dessie", "DescriptionInscriber", "dessieDescriptionInscriber");
285 // descriptionInscriberRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
286 // personIdsCreated.add(csid);
288 csid = createPerson("Asok", "AssociatedEventPerson", "asokAssociatedEventPerson");
289 assocEventPersonRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
290 personIdsCreated.add(csid);
292 // csid = createPerson("Andrew", "AssociatedPerson", "andrewAssociatedPerson");
293 // assocPersonRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
294 // personIdsCreated.add(csid);
296 csid = createPerson("Owen", "Owner", "owenOwner");
297 ownerRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
298 personIdsCreated.add(csid);
300 csid = createPerson("Sally", "Field-CollectionSource", "sallyFieldCollectionSource");
301 fieldCollectionSourceRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
302 personIdsCreated.add(csid);
304 csid = createPerson("Fred", "Lector", "fredLector");
305 fieldCollectorRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
306 personIdsCreated.add(csid);
310 * Creates an organization authority.
312 * @param displayName the display name of the authority
313 * @param shortIdentifier the short identifier for the authority
315 private void createOrgAuthority(String displayName, String shortIdentifier) {
316 testSetup(STATUS_CREATED, ServiceRequestType.CREATE);
317 OrgAuthorityClient orgAuthClient = new OrgAuthorityClient();
318 PoxPayloadOut multipart = OrgAuthorityClientUtils.createOrgAuthorityInstance(
319 displayName, shortIdentifier, orgAuthClient.getCommonPartName());
320 ClientResponse<Response> res = orgAuthClient.create(multipart);
321 int statusCode = res.getStatus();
323 Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
324 invalidStatusCodeMessage(testRequestType, statusCode));
325 Assert.assertEquals(statusCode, STATUS_CREATED);
326 orgAuthCSID = extractId(res);
327 orgAuthRefName = OrgAuthorityClientUtils.getAuthorityRefName(orgAuthCSID, null);
331 * Creates an organization item.
333 * @param shortName the organization's short name
334 * @param foundingPlace the organization's founding place
335 * @param shortIdentifier the short identifier for the item
336 * @return the CSID of the newly-created organization record
338 protected String createOrganization(String shortName, String foundingPlace, String shortIdentifier ) {
339 Map<String, String> orgInfo = new HashMap<String,String>();
340 orgInfo.put(OrganizationJAXBSchema.SHORT_NAME, shortName);
341 orgInfo.put(OrganizationJAXBSchema.FOUNDING_PLACE, foundingPlace);
342 orgInfo.put(OrganizationJAXBSchema.SHORT_IDENTIFIER, shortIdentifier);
343 OrgAuthorityClient orgAuthClient = new OrgAuthorityClient();
344 PoxPayloadOut multipart =
345 OrgAuthorityClientUtils.createOrganizationInstance(
346 orgAuthRefName, orgInfo, orgAuthClient.getItemCommonPartName());
347 ClientResponse<Response> res = orgAuthClient.createItem(orgAuthCSID, multipart);
348 int statusCode = res.getStatus();
350 Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
351 invalidStatusCodeMessage(testRequestType, statusCode));
352 Assert.assertEquals(statusCode, STATUS_CREATED);
353 return extractId(res);
357 * Creates multiple Organization items within an Organization Authority,
358 * and stores the refNames referring to each.
360 private void createOrganizationRefs() {
362 createOrgAuthority(ORG_AUTHORITY_NAME, ORG_AUTHORITY_NAME);
366 csid = createOrganization("Content Org", "Content Org Town", "contentOrg");
367 contentOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
368 orgIdsCreated.add(csid);
370 // csid = createOrganization("Production Org", "Production Org Town", "productionOrg");
371 // objectProductionOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
372 // orgIdsCreated.add(csid);
374 csid = createOrganization("Associated Event Org", "Associated Event Org City", "associatedEventOrg");
375 assocEventOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
376 orgIdsCreated.add(csid);
378 // csid = createOrganization("Associated Org", "Associated Org City", "associatedOrg");
379 // assocOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
380 // orgIdsCreated.add(csid);
386 * Read and check auth refs.
388 * @param testName the test name
389 * @throws Exception the exception
391 @Test(dataProvider="testName",
392 dependsOnMethods = {"createWithAuthRefs"})
393 public void readAndCheckAuthRefs(String testName) throws Exception {
395 testSetup(STATUS_OK, ServiceRequestType.READ);
397 // First read the object
399 CollectionObjectClient collectionObjectClient = new CollectionObjectClient();
400 ClientResponse<String> res = collectionObjectClient.read(knownResourceId);
401 CollectionobjectsCommon collectionObject = null;
403 assertStatusCode(res, testName);
404 PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
405 collectionObject = (CollectionobjectsCommon) extractPart(input,
406 collectionObjectClient.getCommonPartName(), CollectionobjectsCommon.class);
407 Assert.assertNotNull(collectionObject);
410 res.releaseConnection();
414 // Next, get all of the auth refs and check that the expected number is returned
416 ClientResponse<AuthorityRefList> res2 = collectionObjectClient.getAuthorityRefs(knownResourceId);
417 AuthorityRefList list = null;
419 assertStatusCode(res2, testName);
420 list = res2.getEntity();
423 res2.releaseConnection();
427 List<AuthorityRefList.AuthorityRefItem> items = list.getAuthorityRefItem();
428 int numAuthRefsFound = items.size();
429 if(logger.isDebugEnabled()){
430 logger.debug("Expected " + NUM_AUTH_REFS_EXPECTED +
431 " authority references, found " + numAuthRefsFound);
433 Assert.assertEquals(numAuthRefsFound, NUM_AUTH_REFS_EXPECTED,
434 "Did not find all expected authority references! " +
435 "Expected " + NUM_AUTH_REFS_EXPECTED + ", found " + numAuthRefsFound);
437 // Check a sample of one or more person authority ref fields
438 // Assert.assertEquals(collectionObject.getAssocPersons().getAssocPerson().get(0), assocPersonRefName);
439 Assert.assertEquals(collectionObject.getOwners().getOwner().get(0), ownerRefName);
440 Assert.assertEquals(collectionObject.getFieldCollectionSources().getFieldCollectionSource().get(0), fieldCollectionSourceRefName);
442 // Check a sample of one or more organization authority ref fields
443 Assert.assertEquals(collectionObject.getContentOrganizations().getContentOrganization().get(0), contentOrganizationRefName);
444 Assert.assertEquals(collectionObject.getAssocEventOrganizations().getAssocEventOrganization().get(0), assocEventOrganizationRefName);
446 // Optionally output additional data about list members for debugging.
447 logger.info(this.toString());
448 boolean iterateThroughList = true;
449 if(iterateThroughList && logger.isDebugEnabled()){;
451 for(AuthorityRefList.AuthorityRefItem item : items){
452 logger.debug(testName + ": list-item[" + i + "] Field:" +
453 item.getSourceField() + " =" +
454 " item display name = " + item.getAuthDisplayName() +
455 " auth display name = " + item.getItemDisplayName());
456 logger.debug(testName + ": list-item[" + i + "] refName=" +
458 logger.debug(testName + ": list-item[" + i + "] URI=" +
466 // ---------------------------------------------------------------
467 // Cleanup of resources created during testing
468 // ---------------------------------------------------------------
471 * Deletes all resources created by tests, after all tests have been run.
473 * This cleanup method will always be run, even if one or more tests fail.
474 * For this reason, it attempts to remove all resources created
475 * at any point during testing, even if some of those resources
476 * may be expected to be deleted by certain tests.
478 @AfterClass(alwaysRun=true)
479 public void cleanUp() {
480 String noTest = System.getProperty("noTestCleanup");
481 if(Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
482 if (logger.isDebugEnabled()) {
483 logger.debug("Skipping Cleanup phase ...");
487 if (logger.isDebugEnabled()) {
488 logger.debug("Cleaning up temporary resources created for testing ...");
490 CollectionObjectClient collectionObjectClient = new CollectionObjectClient();
491 for (String resourceId : collectionObjectIdsCreated) {
492 // Note: Any non-success responses are ignored and not reported.
493 collectionObjectClient.delete(resourceId).releaseConnection();
495 // Note: Any non-success response is ignored and not reported.
496 PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
497 // Delete persons before PersonAuth
498 for (String resourceId : personIdsCreated) {
499 // Note: Any non-success responses are ignored and not reported.
500 personAuthClient.deleteItem(personAuthCSID, resourceId).releaseConnection();
502 personAuthClient.delete(personAuthCSID).releaseConnection();
503 // Note: Any non-success response is ignored and not reported.
504 OrgAuthorityClient orgAuthClient = new OrgAuthorityClient();
505 // Delete organizations before OrgAuth
506 for (String resourceId : orgIdsCreated) {
507 // Note: Any non-success responses are ignored and not reported.
508 orgAuthClient.deleteItem(orgAuthCSID, resourceId).releaseConnection();
510 orgAuthClient.delete(orgAuthCSID).releaseConnection();
513 // ---------------------------------------------------------------
514 // Utility methods used by tests above
515 // ---------------------------------------------------------------
517 * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent()
520 public String getServicePathComponent() {
521 return SERVICE_PATH_COMPONENT;
525 * Creates the collection object instance.
527 * @param title the title
528 * @param objNum the obj num
529 * @param contentOrganization the content organization
530 * @param contentPeople the content people
531 * @param contentPerson the content person
532 * @param inscriber the inscriber
533 * @return the multipart output
535 private PoxPayloadOut createCollectionObjectInstance(
538 String contentOrganization,
539 String contentPerson,
540 String assocEventOrganization,
541 String assocEventPerson,
543 String fieldCollectionSource,
544 String fieldCollector ) {
545 CollectionobjectsCommon collectionObject = new CollectionobjectsCommon();
546 TitleGroupList titleGroupList = new TitleGroupList();
547 List<TitleGroup> titleGroups = titleGroupList.getTitleGroup();
548 TitleGroup titleGroup = new TitleGroup();
549 titleGroup.setTitle("a title");
550 titleGroups.add(titleGroup);
551 collectionObject.setTitleGroupList(titleGroupList);
552 collectionObject.setObjectNumber(objNum);
554 ContentOrganizationList contentOrganizationList = new ContentOrganizationList();
555 List<String> contentOrganizations = contentOrganizationList.getContentOrganization();
556 contentOrganizations.add(contentOrganization);
557 collectionObject.setContentOrganizations(contentOrganizationList);
559 ContentPersonList contentPersonList = new ContentPersonList();
560 List<String> contentPersons = contentPersonList.getContentPerson();
561 contentPersons.add(contentPerson);
562 collectionObject.setContentPersons(contentPersonList);
564 AssocEventOrganizationList assocEventOrganizationList = new AssocEventOrganizationList();
565 List<String> assocEventOrganizations = assocEventOrganizationList.getAssocEventOrganization();
566 assocEventOrganizations.add(assocEventOrganization);
567 collectionObject.setAssocEventOrganizations(assocEventOrganizationList);
569 AssocEventPersonList assocEventPersonList = new AssocEventPersonList();
570 List<String> assocEventPersons = assocEventPersonList.getAssocEventPerson();
571 assocEventPersons.add(assocEventPerson);
572 collectionObject.setAssocEventPersons(assocEventPersonList);
574 // AssocOrganizationList assocOrganizationList = new AssocOrganizationList();
575 // List<String> assocOrganizations = assocOrganizationList.getAssocOrganization();
576 // assocOrganizations.add(assocOrganization);
577 // collectionObject.setAssocOrganizations(assocOrganizationList);
579 // AssocPersonList assocPersonList = new AssocPersonList();
580 // List<String> assocPersons = assocPersonList.getAssocPerson();
581 // assocPersons.add(assocPerson);
582 // collectionObject.setAssocPersons(assocPersonList);
584 OwnerList ownerList = new OwnerList();
585 List<String> owners = ownerList.getOwner();
587 collectionObject.setOwners(ownerList);
589 FieldCollectionSourceList fieldCollectionSourceList = new FieldCollectionSourceList();
590 List<String> fieldCollectionSources = fieldCollectionSourceList.getFieldCollectionSource();
591 fieldCollectionSources.add(fieldCollectionSource);
592 collectionObject.setFieldCollectionSources(fieldCollectionSourceList);
594 FieldCollectorList FieldCollectorList = new FieldCollectorList();
595 List<String> fieldCollectors = FieldCollectorList.getFieldCollector();
596 fieldCollectors.add(fieldCollector);
597 collectionObject.setFieldCollectors(FieldCollectorList);
599 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
600 PayloadOutputPart commonPart =
601 multipart.addPart(collectionObject, MediaType.APPLICATION_XML_TYPE);
602 commonPart.setLabel(new CollectionObjectClient().getCommonPartName());
604 if(logger.isDebugEnabled()){
605 logger.debug("to be created, collectionObject common");
606 logger.debug(objectAsXmlString(collectionObject, CollectionobjectsCommon.class));