public String getResourceAsString( final String path, FileAccess access, IResponseTypeHandler response) throws IOException, AccessDeniedException { IRepositoryAccess repository = CdaEngine.getEnvironment().getRepositoryAccess(); if (repository.hasAccess(path, access)) { HashMap<String, String> keys = new HashMap<String, String>(); // Locale locale = LocaleHelper.getLocale(); Locale locale = response.getLocale(); if (logger.isDebugEnabled()) { logger.debug("Current user locale: " + locale.toString()); } keys.put("#{LANGUAGE_CODE}", locale.toString()); return getResourceAsString(path, keys); } else { throw new AccessDeniedException(path, null); } }
private void setResponseHeaders( final String mimeType, final int cacheDuration, final String attachmentName) { if (responseHandler.hasResponse()) responseHandler.setResponseHeaders(mimeType, cacheDuration, attachmentName); // else logger.warn("Parameter 'httpresponse' not found!"); }