97 String key = OxTrustConstants.CACHE_ORGANIZATION_CUSTOM_MESSAGE_KEY +
"_" + organization.getInum();
98 @SuppressWarnings(
"unchecked")
99 Map<String, String> organizationCustomMessage = (Map<String, String>)
cacheService.get(OxConstants.CACHE_APPLICATION_NAME, key);
100 if (organizationCustomMessage == null) {
101 organizationCustomMessage =
new HashMap<String, String>();
103 String[] customMessages = organization.getCustomMessages();
104 if (ArrayHelper.isNotEmpty(customMessages)) {
105 for (String customMessage : customMessages) {
106 int idx = customMessage.indexOf(
':');
107 if ((idx > 0) && (idx + 1 < customMessage.length())) {
108 String msgKey = customMessage.substring(0, idx).trim();
109 String msgValue = customMessage.substring(idx + 1).trim();
111 if (StringHelper.isNotEmpty(msgKey) && StringHelper.isNotEmpty(msgValue)) {
112 organizationCustomMessage.put(msgKey, msgValue);
117 cacheService.put(OxConstants.CACHE_APPLICATION_NAME, key, organizationCustomMessage);
120 return organizationCustomMessage.get(customMessageId);
do if[-f "$CONFIG"]
Definition: oxd-https-extension.init.d:165
GluuOrganization getOrganization()
Definition: AuthOrganizationService.java:64
CacheService cacheService
Definition: AuthOrganizationService.java:43