120 String key = OxTrustConstants.CACHE_ORGANIZATION_CUSTOM_MESSAGE_KEY +
"_" + organization.getInum();
121 @SuppressWarnings(
"unchecked")
122 Map<String, String> organizationCustomMessage = (Map<String, String>)
cacheService.get(OxConstants.CACHE_APPLICATION_NAME, key);
123 if (organizationCustomMessage == null) {
124 organizationCustomMessage =
new HashMap<String, String>();
126 String[] customMessages = organization.getCustomMessages();
127 if (ArrayHelper.isNotEmpty(customMessages)) {
128 for (String customMessage : customMessages) {
129 int idx = customMessage.indexOf(
':');
130 if ((idx > 0) && (idx + 1 < customMessage.length())) {
131 String msgKey = customMessage.substring(0, idx).trim();
132 String msgValue = customMessage.substring(idx + 1).trim();
134 if (StringHelper.isNotEmpty(msgKey) && StringHelper.isNotEmpty(msgValue)) {
135 organizationCustomMessage.put(msgKey, msgValue);
140 cacheService.put(OxConstants.CACHE_APPLICATION_NAME, key, organizationCustomMessage);
143 return organizationCustomMessage.get(customMessageId);
do if[-f "$CONFIG"]
Definition: oxd-https-extension.init.d:165
GluuOrganization getOrganization()
Definition: OrganizationService.java:84
CacheService cacheService
Definition: OrganizationService.java:54