]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3178: Quick hack to disable use of garbage refNames in location authority...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 12 Oct 2011 01:28:45 +0000 (01:28 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 12 Oct 2011 01:28:45 +0000 (01:28 +0000)
services/location/client/src/main/java/org/collectionspace/services/client/LocationAuthorityClientUtils.java
services/location/client/src/test/java/org/collectionspace/services/client/test/LocationAuthorityServiceTest.java

index d1ab2e8b1c5a99f963807a1cf4a92e78731da4c1..7175c5bf52dcdc100d7cb53605f6b68a3cae1670 100644 (file)
@@ -39,8 +39,8 @@ public class LocationAuthorityClientUtils {
         LocationauthoritiesCommon locationAuthority = new LocationauthoritiesCommon();\r
         locationAuthority.setDisplayName(displayName);\r
         locationAuthority.setShortIdentifier(shortIdentifier);\r
-        String refName = createLocationAuthRefName(shortIdentifier, displayName);\r
-        locationAuthority.setRefName(refName);\r
+        // String refName = createLocationAuthRefName(shortIdentifier, displayName);\r
+        // locationAuthority.setRefName(refName);\r
         locationAuthority.setVocabType("LocationAuthority"); //FIXME: REM - Should this really be hard-coded?\r
         PoxPayloadOut multipart = new PoxPayloadOut(LocationAuthorityClient.SERVICE_PAYLOAD_NAME);\r
         PayloadOutputPart commonPart = multipart.addPart(locationAuthority, MediaType.APPLICATION_XML_TYPE);\r
@@ -68,8 +68,8 @@ public class LocationAuthorityClientUtils {
        String shortId = locationInfo.get(LocationJAXBSchema.SHORT_IDENTIFIER);\r
        String displayName = locationInfo.get(LocationJAXBSchema.DISPLAY_NAME);\r
        location.setShortIdentifier(shortId);\r
-       String locationRefName = createLocationRefName(locationAuthRefName, shortId, displayName);\r
-               location.setRefName(locationRefName);\r
+       // String locationRefName = createLocationRefName(locationAuthRefName, shortId, displayName);\r
+               // location.setRefName(locationRefName);\r
                String value = null;\r
        value = locationInfo.get(LocationJAXBSchema.DISPLAY_NAME_COMPUTED);\r
        boolean displayNameComputed = (value==null) || value.equalsIgnoreCase("true"); \r
index c2e8b68b2d5405514ce0d5c522181015b206d7dd..fb43bf132aeb6a3627cd9e87ada9747fc4f1e204 100644 (file)
@@ -147,8 +147,7 @@ public class LocationAuthorityServiceTest extends AbstractServiceTestImpl { //FI
        LocationAuthorityClient client = new LocationAuthorityClient();
         String shortId = identifier;
        String displayName = "displayName-" + shortId;
-       String baseRefName = 
-               LocationAuthorityClientUtils.createLocationAuthRefName(shortId, null);
+       // String baseRefName = LocationAuthorityClientUtils.createLocationAuthRefName(shortId, null);
        PoxPayloadOut multipart = 
             LocationAuthorityClientUtils.createLocationAuthorityInstance(
            displayName, shortId, client.getCommonPartName());
@@ -179,8 +178,7 @@ public class LocationAuthorityServiceTest extends AbstractServiceTestImpl { //FI
         LocationAuthorityClient client = new LocationAuthorityClient();
         String shortId = createIdentifier();
        String displayName = "displayName-" + shortId;
-       String baseRefName = 
-               LocationAuthorityClientUtils.createLocationAuthRefName(shortId, null);
+       // String baseRefName = LocationAuthorityClientUtils.createLocationAuthRefName(shortId, null);
        
        PoxPayloadOut multipart = 
             LocationAuthorityClientUtils.createLocationAuthorityInstance(
@@ -209,8 +207,9 @@ public class LocationAuthorityServiceTest extends AbstractServiceTestImpl { //FI
         }
         // Store the ID returned from the first resource created
         // for additional tests below.
+        final String NULL_REFNAME = null;
         if (knownResourceId == null){
-               setKnownResource( newID, shortId, baseRefName );
+               setKnownResource( newID, shortId, NULL_REFNAME );
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
             }
@@ -1116,9 +1115,13 @@ public class LocationAuthorityServiceTest extends AbstractServiceTestImpl { //FI
         nonexMap.put(LocationJAXBSchema.SHORT_IDENTIFIER, "nonEx");
         nonexMap.put(LocationJAXBSchema.LOCATION_TYPE, TEST_LOCATION_TYPE);
         nonexMap.put(LocationJAXBSchema.TERM_STATUS, TEST_STATUS);
+        // PoxPayloadOut multipart = 
+       // LocationAuthorityClientUtils.createLocationInstance(
+       //              LocationAuthorityClientUtils.createLocationRefName(knownResourceRefName, "nonEx", "Non Existent"), 
+       //              nonexMap, client.getItemCommonPartName() );
+        final String NULL_REFNAME = null;
         PoxPayloadOut multipart = 
-       LocationAuthorityClientUtils.createLocationInstance(
-                       LocationAuthorityClientUtils.createLocationRefName(knownResourceRefName, "nonEx", "Non Existent"), 
+                LocationAuthorityClientUtils.createLocationInstance(NULL_REFNAME, 
                        nonexMap, client.getItemCommonPartName() );
         ClientResponse<String> res =
                 client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart);