]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5155: Minor change to boilerplate generation of term lists, used in client...
authorAron Roberts <aron@socrates.berkeley.edu>
Mon, 7 May 2012 21:26:02 +0000 (14:26 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Mon, 7 May 2012 21:26:02 +0000 (14:26 -0700)
services/location/client/src/main/java/org/collectionspace/services/client/LocationAuthorityClientUtils.java
services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java
services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClientUtils.java

index 992cedae807d99ee5c9f93adaa75dfbb09b8f919..41f51447044b430520c120799a0a541df290df92 100644 (file)
@@ -11,6 +11,7 @@ import javax.ws.rs.core.Response;
 import org.apache.commons.io.FileUtils;\r
 import org.collectionspace.services.LocationJAXBSchema;\r
 import org.collectionspace.services.client.test.ServiceRequestType;\r
+import org.collectionspace.services.common.api.Tools;\r
 import org.collectionspace.services.location.*;\r
 import org.dom4j.DocumentException;\r
 import org.jboss.resteasy.client.ClientResponse;\r
@@ -300,6 +301,9 @@ public class LocationAuthorityClientUtils {
     }\r
     \r
     public static List<LocTermGroup> getTermGroupInstance(String identifier) {\r
+        if (Tools.isBlank(identifier)) {\r
+            identifier = getGeneratedIdentifier();\r
+        }\r
         List<LocTermGroup> terms = new ArrayList<LocTermGroup>();\r
         LocTermGroup term = new LocTermGroup();\r
         term.setTermDisplayName(identifier);\r
index 8c60df3b7cd9adaf8386f82196b19f36105f237a..7ada74135ffcdb55f55ddaf15cf9dd11c8bf74dc 100644 (file)
@@ -26,6 +26,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;\r
 import org.collectionspace.services.OrganizationJAXBSchema;\r
 import org.collectionspace.services.client.test.ServiceRequestType;\r
+import org.collectionspace.services.common.api.Tools;\r
 import org.collectionspace.services.organization.ContactNameList;\r
 import org.collectionspace.services.organization.FunctionList;\r
 import org.collectionspace.services.organization.GroupList;\r
@@ -389,6 +390,9 @@ public class OrgAuthorityClientUtils {
     }\r
 \r
     public static List<OrgTermGroup> getTermGroupInstance(String identifier) {\r
+        if (Tools.isBlank(identifier)) {\r
+            identifier = getGeneratedIdentifier();\r
+        }\r
         List<OrgTermGroup> terms = new ArrayList<OrgTermGroup>();\r
         OrgTermGroup term = new OrgTermGroup();\r
         term.setTermDisplayName(identifier);\r
index 50563e42c2c29e66d9225c00143400d353cc1ced..83ccfd6e39ad3f5674b7059ee553ae23b69a549b 100644 (file)
@@ -34,6 +34,7 @@ import javax.ws.rs.core.Response;
 \r
 import org.collectionspace.services.PersonJAXBSchema;\r
 import org.collectionspace.services.client.test.ServiceRequestType;\r
+import org.collectionspace.services.common.api.Tools;\r
 import org.collectionspace.services.person.GroupList;\r
 import org.collectionspace.services.person.NationalityList;\r
 import org.collectionspace.services.person.OccupationList;\r
@@ -448,6 +449,9 @@ public class PersonAuthorityClientUtils {
     }\r
     \r
     public static List<PersonTermGroup> getTermGroupInstance(String identifier) {\r
+        if (Tools.isBlank(identifier)) {\r
+            identifier = getGeneratedIdentifier();\r
+        }\r
         List<PersonTermGroup> terms = new ArrayList<PersonTermGroup>();\r
         PersonTermGroup term = new PersonTermGroup();\r
         term.setTermDisplayName(identifier);\r