Refine search
public void setMaxExpression(String maxExpression) { if (LOG.isDebugEnabled()) { LOG.debug("${maxExpression} was defined as [#0]", maxExpression); } this.maxExpression = maxExpression; }
public Object nullMethodResult(Map<String, Object> context, Object target, String methodName, Object[] args) { if (LOG.isDebugEnabled()) { LOG.debug("Entering nullMethodResult "); } return null; }
public void setMinExpression(String minExpression) { if (LOG.isDebugEnabled()) { LOG.debug("${minExpression} was defined as [#0]", minExpression); } this.minExpression = minExpression; }
public I18nInterceptor() { if (LOG.isDebugEnabled()) { LOG.debug("new I18nInterceptor()"); } }
protected Locale readStoredLocalFromSession(ActionInvocation invocation, Map<String, Object> session) { // check session for saved locale Object sessionLocale = session.get(attributeName); if (sessionLocale != null && sessionLocale instanceof Locale) { Locale locale = (Locale) sessionLocale; if (LOG.isDebugEnabled()) { LOG.debug("applied session locale=#0", locale); } return locale; } return null; }
public void registerValidator(String name, String className) { if (LOG.isDebugEnabled()) { LOG.debug("Registering validator of class " + className + " with name " + name); } validators.put(name, className); }
protected Object findLocaleParameter(Map<String, Object> params, String parameterName) { Object requestedLocale = params.remove(parameterName); if (requestedLocale != null && requestedLocale.getClass().isArray() && ((Object[]) requestedLocale).length > 0) { requestedLocale = ((Object[]) requestedLocale)[0]; if (LOG.isDebugEnabled()) { LOG.debug("requested_locale=#0", requestedLocale); } } return requestedLocale; }
public TypeConverter buildConverter(Class<? extends TypeConverter> converterClass, Map<String, Object> extraContext) throws Exception { if (LOG.isDebugEnabled()) { LOG.debug("Creating converter of type [#0]", converterClass.getCanonicalName()); } return container.getInstance(converterClass); }
private void notifyDeveloper(String message, String... parameters) { if (devMode) { LOG.warn(message, parameters); } else { if (LOG.isDebugEnabled()) { LOG.debug(message, parameters); } } }
/** * Process {@link ValidationWorkflowAware} interface */ private String processValidationWorkflowAware(final Object action, final String currentResultName) { String resultName = currentResultName; if (action instanceof ValidationWorkflowAware) { resultName = ((ValidationWorkflowAware) action).getInputResultName(); if (LOG.isDebugEnabled()) { LOG.debug("Changing result name from [#0] to [#1] because of processing [#2] interface applied to [#3]", currentResultName, resultName, ValidationWorkflowAware.class.getSimpleName(), action); } } return resultName; }
/** * Notify action if it implements {@see ValidationErrorAware} interface */ protected String processValidationErrorAware(final Object action, final String currentResultName) { String resultName = currentResultName; if (action instanceof ValidationErrorAware) { resultName = ((ValidationErrorAware) action).actionErrorOccurred(currentResultName); if (LOG.isDebugEnabled()) { LOG.debug("Changing result name from [#0] to [#1] because of processing interface [#2] on action [#3]", currentResultName, resultName, ValidationErrorAware.class.getSimpleName(), action); } } return resultName; }
/** * This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy. * <p/> * The reason for the builder methods is so that you can use a subclass to create your own DefaultActionProxy instance * (like a RMIActionProxy). */ protected DefaultActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) { this.invocation = inv; this.cleanupContext = cleanupContext; if (LOG.isDebugEnabled()) { LOG.debug("Creating an DefaultActionProxy for namespace [#0] and action name [#1]", namespace, actionName); } this.actionName = StringEscapeUtils.escapeHtml4(actionName); this.namespace = namespace; this.executeResult = executeResult; this.method = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(methodName)); }
private void updateReloadConfigsFlag() { reloadConfigs = Boolean.parseBoolean(configuration.getContainer().getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION)); if (LOG.isDebugEnabled()) { LOG.debug("Updating [#0], current value is [#1], new value [#2]", XWorkConstants.RELOAD_XML_CONFIGURATION, String.valueOf(reloadConfigs), String.valueOf(reloadConfigs)); } }
private List<String> jar(URL location) throws IOException { URL url = fileManager.normalizeToFileProtocol(location); if (url != null) { InputStream in = url.openStream(); try { JarInputStream jarStream = new JarInputStream(in); return jar(jarStream); } finally { in.close(); } } else if (LOG.isDebugEnabled()) LOG.debug("Unable to read [#0]", location.toExternalForm()); return Collections.emptyList(); }
@Inject(value = XWorkConstants.ADDITIONAL_EXCLUDED_PATTERNS, required = false) public void setAdditionalExcludePatterns(String excludePatterns) { if (LOG.isDebugEnabled()) { LOG.debug("Adding additional global patterns [#0] to excluded patterns!", excludePatterns); } for (String pattern : TextParseUtil.commaDelimitedStringToSet(excludePatterns)) { excludedPatterns.add(Pattern.compile(pattern, Pattern.CASE_INSENSITIVE)); } }
/** * Calcule pour une entrée donné, le hash de la clef unique * * @param o l'entree de la collection dont on va calculer le hash de la clef unique * @return le hashCode calclé de la clef unique sur l'entrée donné * @throws ValidationException if any pb to retreave properties values */ protected Integer getUniqueKeyHashCode(Object o) throws ValidationException { // calcul du hash à la volée HashCodeBuilder builder = new HashCodeBuilder(); for (String key : this.keys) { Object property = getFieldValue(key, o); if (log.isDebugEnabled()) { log.debug("key " + key + " : " + property); } builder.append(property); } return builder.toHashCode(); }
public FileManager getFileManager() { FileManager fileManager = lookupFileManager(); if (fileManager != null) { if (LOG.isDebugEnabled()) { LOG.debug("Using FileManager implementation [#0]", fileManager.getClass().getSimpleName()); } fileManager.setReloadingConfigs(reloadingConfigs); return fileManager; } if (LOG.isDebugEnabled()) { LOG.debug("Using default implementation of FileManager provided under name [system]: #0", systemFileManager.getClass().getSimpleName()); } systemFileManager.setReloadingConfigs(reloadingConfigs); return systemFileManager; }
@Override public void setProperty(Map context, Object target, Object name, Object value) throws OgnlException { if (LOG.isDebugEnabled()) { LOG.debug("Entering setProperty("+context+","+target+","+name+","+value+")"); } Object key = getKey(context, name); Map map = (Map) target; map.put(key, getValue(context, value)); }
private List<URL> getUrls(ClassLoaderInterface classLoader) throws IOException { List<URL> list = new ArrayList<URL>(); //find jars ArrayList<URL> urls = Collections.list(classLoader.getResources("META-INF")); for (URL url : urls) { if ("jar".equalsIgnoreCase(url.getProtocol())) { String externalForm = url.toExternalForm(); //build a URL pointing to the jar, instead of the META-INF dir url = new URL(StringUtils.substringBefore(externalForm, "META-INF")); list.add(url); } else if (LOG.isDebugEnabled()) LOG.debug("Ignoring URL [#0] because it is not a jar", url.toExternalForm()); } //usually the "classes" dir list.addAll(Collections.list(classLoader.getResources(""))); return list; }
public byte[] read(final String pResourceName) { FileInputStream fis = null; try { File file = getFile(pResourceName); byte[] data = new byte[(int) file.length()]; fis = new FileInputStream(file); fis.read(data); return data; } catch (Exception e) { if (LOG.isDebugEnabled()) LOG.debug("Unable to read file [#0]", e, pResourceName); return null; } finally { closeQuietly(fis); } }