]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6972: Made tenant ID and tenant name optional in config for sync/replicate...
authorremillet <remillet@yahoo.com>
Thu, 30 Jun 2016 22:56:46 +0000 (15:56 -0700)
committerremillet <remillet@yahoo.com>
Thu, 30 Jun 2016 22:56:46 +0000 (15:56 -0700)
services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java

index aebe5cceccf88dcabac2b5dee5586809148b5a75..f5c0c0d95cbcffc722840857d48b87e1d9d49986 100644 (file)
@@ -713,8 +713,16 @@ public abstract class AbstractServiceContextImpl<IT, OT>
         properties.setProperty(AuthorityClient.PASSWORD_PROPERTY, remoteClientConfig.getPassword());
         properties.setProperty(AuthorityClient.SSL_PROPERTY, remoteClientConfig.getSsl());
         properties.setProperty(AuthorityClient.AUTH_PROPERTY, remoteClientConfig.getAuth());
-        properties.setProperty(AuthorityClient.TENANT_ID_PROPERTY, remoteClientConfig.getTenantId());
-        properties.setProperty(AuthorityClient.TENANT_NAME_PROPERTY, remoteClientConfig.getTenantName());
+        //
+        // Optional values
+        String tenantId = remoteClientConfig.getTenantId();
+        if (tenantId != null) {
+               properties.setProperty(AuthorityClient.TENANT_ID_PROPERTY, tenantId);
+        }
+        String tenantName = remoteClientConfig.getTenantName();
+        if (tenantName != null) {
+               properties.setProperty(AuthorityClient.TENANT_NAME_PROPERTY, tenantName);
+        }
         
         result = getClient(properties);