From: Aron Roberts Date: Wed, 5 Sep 2012 19:32:15 +0000 (-0700) Subject: Merge remote-tracking branch 'upstream/master' into CSPACE-5271 X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=f44c8c8348044a9f8af7aa41ca1b38438ae724c4;p=tmp%2Fjakarta-migration.git Merge remote-tracking branch 'upstream/master' into CSPACE-5271 --- f44c8c8348044a9f8af7aa41ca1b38438ae724c4 diff --cc services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java index 4469f7a7a,e218427dd..1d739f4eb --- a/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java @@@ -472,28 -470,6 +472,28 @@@ public class TenantBindingConfigReaderI } public String getResourcesDir(){ - return getConfigRootDir() + File.separator + "resources"; + return getConfigRootDir() + File.separator + RESOURCES_DIR_NAME; } + + + /** + * Returns a list of tenant identifiers (tenant IDs). + * + * @return a list of tenant IDs + */ + public List getTenantIds() { + List tenantIds = new ArrayList(); + String tenantId; + Hashtable tenantBindings = getTenantBindings(); + if (tenantBindings != null && !tenantBindings.isEmpty()) { + Enumeration keys = tenantBindings.keys(); + while (keys.hasMoreElements()) { + tenantId = (String) keys.nextElement(); + if (Tools.notBlank(tenantId)) { + tenantIds.add(tenantId); + } + } + } + return tenantIds; + } }