/** * @param stringWithPrefixAndSuffix * @param prefix * @param suffix * @return string */ public String processUnresolvableString(String stringWithPrefixAndSuffix, String prefix, String suffix){ String resolvedString = null; try{ if (helper == null){ helper = new CacheXmlPropertyResolverHelper(prefix, suffix); } /** A <code>resolvedString</code> can be same as <code>stringWithPrefixAndSuffix</code> if * <code>ignoreUnresolvedProperties</code> is set true and we just return it as is. */ resolvedString = helper.parseResolvablePropString(stringWithPrefixAndSuffix, this, new HashSet<String>()); } catch (IllegalArgumentException e) { if(ignoreUnresolvedProperties) { //Do Nothing } else { logger.error(LocalizedMessage.create(LocalizedStrings.CacheXmlPropertyResolver_UNSEROLVAVLE_STRING_FORMAT_ERROR__0, stringWithPrefixAndSuffix)); } } return resolvedString; }
/** * @param stringWithPrefixAndSuffix * @param prefix * @param suffix * @return string */ public String processUnresolvableString(String stringWithPrefixAndSuffix, String prefix, String suffix){ String resolvedString = null; try{ if (helper == null){ helper = new CacheXmlPropertyResolverHelper(prefix, suffix); } /** A <code>resolvedString</code> can be same as <code>stringWithPrefixAndSuffix</code> if * <code>ignoreUnresolvedProperties</code> is set true and we just return it as is. */ resolvedString = helper.parseResolvablePropString(stringWithPrefixAndSuffix, this, new HashSet<String>()); } catch (IllegalArgumentException e) { if(ignoreUnresolvedProperties) { //Do Nothing } else { if(getLogWriter() != null) { logWriter.error(LocalizedStrings.CacheXmlPropertyResolver_UNSEROLVAVLE_STRING_FORMAT_ERROR__0, stringWithPrefixAndSuffix); } else { throw e; } } } return resolvedString; }