/** * <p>A locale based lookup sequence is build using the supplied {@link Locale} and (if it is * different) the default {@link Locale}. * <ol><li>Lookup <{@code}descid><{@code}language_country_variant>.properties</li> * <li>Lookup <{@code}descid><{@code}language_country>.properties</li> * <li>Lookup <{@code}descid><{@code}language>.properties</li> * </ol> * The repeat but with the default {@link Locale}. Finally lookup <descid>.properties * </p> * @param description The current {@link WebScript} {@link Description}. * @param locale The requested {@link Locale}. * @return LinkedHashSet<String> */ private LinkedHashSet<String> buildLocalePathList(Description description, Locale locale) { LinkedHashSet<String> paths = buildLocalePathList(description.getId(), locale); return paths; }
public Map<String, Object> getStatusModel() { return createTemplateParameters(req, res, null); }
params.put("args", createArgs(req)); params.put("argsM", createArgsM(req)); params.put("headers", createHeaders(req)); params.put("headersM", createHeadersM(req)); params.put("guest", req.isGuest()); params.put("url", createURLModel(req)); params.put("message", getMessageMethod()); // for compatibility with repo templates params.put("msg", getMessageMethod()); // short form for presentation webscripts params.put("messages", renderJSONResources(getResources())); setupScriptConfig(); params.put("config", this.templateConfigModel);
params.put("args", createArgs(req)); params.put("argsM", createArgsM(req)); params.put("headers", createHeaders(req)); params.put("headersM", createHeadersM(req)); params.put("guest", req.isGuest()); params.put("url", createURLModel(req)); params.put("msg", getScriptMessage()); if (!(WebScriptRequestImpl.MULTIPART_FORM_DATA.equals(contentType) && getDescription().getMultipartProcessing() == false)) setupScriptConfig(); params.put("config", this.scriptConfigModel);
String webScriptId = getDescription().getId(); String suffix = webScriptId.substring(lastSlashIndex(webScriptId)); String prefix = bundlePath.substring(0, lastSlashIndex(bundlePath)); LinkedHashSet<String> paths = buildLocalePathList(prefix + suffix, I18NUtil.getLocale()); ResourceBundle moduleBundle = checkModuleBundleCache(moduleBundlePath); if (moduleBundle == null) moduleBundle = getBundleFromPath(moduleBundlePath); if (moduleBundle == null) this.addModuleBundleToCache(moduleBundlePath, ModuleBundleSentinel.getInstance()); this.addModuleBundleToCache(moduleBundlePath, moduleBundle);
Set<String> paths = buildLocalePathList(getDescription(), locale); Object[] arrayOfPaths = paths.toArray(); for (int i=arrayOfPaths.length-1; i>=0; i--) ResourceBundle currPathResult = getBundleFromPath(currPath); if (currPathResult != null) Set<String> importPaths = buildLocalePathList(includeBundle, locale); Object[] arrayOfImportPaths = importPaths.toArray(); for (int i=arrayOfImportPaths.length-1; i>=0; i--) WebScriptPropertyResourceBundle currPathResult = (WebScriptPropertyResourceBundle) getBundleFromPath(currPath); if (currPathResult != null) ((WebScriptPropertyResourceBundle) result).merge(getDescription().toString(), importedBundles); ResourceBundle extendedBundle = ((HandlesExtensibility) container).getCachedExtendedBundle(this.getDescription().getId()); if (extendedBundle != null) WebScriptPropertyResourceBundle extensionBundle = getExtensionBundle((HandlesExtensibility)container, result, this.getDescription().getId()); ((HandlesExtensibility) container).addExtensionBundleToCache(this.getDescription().getId(), extensionBundle); result = extensionBundle;
params.put("args", createArgs(req)); params.put("argsM", createArgsM(req)); params.put("headers", createHeaders(req)); params.put("headersM", createHeadersM(req)); params.put("guest", req.isGuest()); params.put("url", createURLModel(req)); params.put("message", getMessageMethod()); // for compatibility with repo templates params.put("msg", getMessageMethod()); // short form for presentation webscripts params.put("messages", renderJSONResources(getResources())); setupScriptConfig(); params.put("config", this.templateConfigModel);
params.put("args", createArgs(req)); params.put("argsM", createArgsM(req)); params.put("headers", createHeaders(req)); params.put("headersM", createHeadersM(req)); params.put("guest", req.isGuest()); params.put("url", createURLModel(req)); params.put("msg", getScriptMessage()); if (!(WebScriptRequestImpl.MULTIPART_FORM_DATA.equals(contentType) && getDescription().getMultipartProcessing() == false)) setupScriptConfig(); params.put("config", this.scriptConfigModel);
String webScriptId = getDescription().getId(); String suffix = webScriptId.substring(lastSlashIndex(webScriptId)); String prefix = bundlePath.substring(0, lastSlashIndex(bundlePath)); LinkedHashSet<String> paths = buildLocalePathList(prefix + suffix, I18NUtil.getLocale()); ResourceBundle moduleBundle = checkModuleBundleCache(moduleBundlePath); if (moduleBundle == null) moduleBundle = getBundleFromPath(moduleBundlePath); if (moduleBundle == null) this.addModuleBundleToCache(moduleBundlePath, ModuleBundleSentinel.getInstance()); this.addModuleBundleToCache(moduleBundlePath, moduleBundle);
Set<String> paths = buildLocalePathList(getDescription(), locale); Object[] arrayOfPaths = paths.toArray(); for (int i=arrayOfPaths.length-1; i>=0; i--) ResourceBundle currPathResult = getBundleFromPath(currPath); if (currPathResult != null) Set<String> importPaths = buildLocalePathList(includeBundle, locale); Object[] arrayOfImportPaths = importPaths.toArray(); for (int i=arrayOfImportPaths.length-1; i>=0; i--) WebScriptPropertyResourceBundle currPathResult = (WebScriptPropertyResourceBundle) getBundleFromPath(currPath); if (currPathResult != null) ((WebScriptPropertyResourceBundle) result).merge(getDescription().toString(), importedBundles); ResourceBundle extendedBundle = ((HandlesExtensibility) container).getCachedExtendedBundle(this.getDescription().getId()); if (extendedBundle != null) WebScriptPropertyResourceBundle extensionBundle = getExtensionBundle((HandlesExtensibility)container, result, this.getDescription().getId()); ((HandlesExtensibility) container).addExtensionBundleToCache(this.getDescription().getId(), extensionBundle); result = extensionBundle;
params.put("args", createArgs(req)); params.put("argsM", createArgsM(req)); params.put("headers", createHeaders(req)); params.put("headersM", createHeadersM(req)); params.put("guest", req.isGuest()); params.put("url", createURLModel(req)); params.put("message", getMessageMethod()); // for compatibility with repo templates params.put("msg", getMessageMethod()); // short form for presentation webscripts params.put("messages", renderJSONResources(getResources())); setupScriptConfig(); params.put("config", this.templateConfigModel);
params.put("args", createArgs(req)); params.put("argsM", createArgsM(req)); params.put("headers", createHeaders(req)); params.put("headersM", createHeadersM(req)); params.put("guest", req.isGuest()); params.put("url", createURLModel(req)); params.put("msg", getScriptMessage()); if (!(WebScriptRequestImpl.MULTIPART_FORM_DATA.equals(contentType) && getDescription().getMultipartProcessing() == false)) setupScriptConfig(); params.put("config", this.scriptConfigModel);
String webScriptId = getDescription().getId(); String suffix = webScriptId.substring(lastSlashIndex(webScriptId)); String prefix = bundlePath.substring(0, lastSlashIndex(bundlePath)); LinkedHashSet<String> paths = buildLocalePathList(prefix + suffix, I18NUtil.getLocale()); ResourceBundle moduleBundle = checkModuleBundleCache(moduleBundlePath); if (moduleBundle == null) moduleBundle = getBundleFromPath(moduleBundlePath); if (moduleBundle == null) this.addModuleBundleToCache(moduleBundlePath, ModuleBundleSentinel.getInstance()); this.addModuleBundleToCache(moduleBundlePath, moduleBundle);
Set<String> paths = buildLocalePathList(getDescription(), locale); Object[] arrayOfPaths = paths.toArray(); for (int i=arrayOfPaths.length-1; i>=0; i--) ResourceBundle currPathResult = getBundleFromPath(currPath); if (currPathResult != null) Set<String> importPaths = buildLocalePathList(includeBundle, locale); Object[] arrayOfImportPaths = importPaths.toArray(); for (int i=arrayOfImportPaths.length-1; i>=0; i--) WebScriptPropertyResourceBundle currPathResult = (WebScriptPropertyResourceBundle) getBundleFromPath(currPath); if (currPathResult != null) ((WebScriptPropertyResourceBundle) result).merge(getDescription().toString(), importedBundles); ResourceBundle extendedBundle = ((HandlesExtensibility) container).getCachedExtendedBundle(this.getDescription().getId()); if (extendedBundle != null) WebScriptPropertyResourceBundle extensionBundle = getExtensionBundle((HandlesExtensibility)container, result, this.getDescription().getId()); ((HandlesExtensibility) container).addExtensionBundleToCache(this.getDescription().getId(), extensionBundle); result = extensionBundle;
public Map<String, Object> getStatusModel() { return createTemplateParameters(req, res, null); }
/** * <p>A locale based lookup sequence is build using the supplied {@link Locale} and (if it is * different) the default {@link Locale}. * <ol><li>Lookup <{@code}descid><{@code}language_country_variant>.properties</li> * <li>Lookup <{@code}descid><{@code}language_country>.properties</li> * <li>Lookup <{@code}descid><{@code}language>.properties</li> * </ol> * The repeat but with the default {@link Locale}. Finally lookup <descid>.properties * </p> * @param description The current {@link WebScript} {@link Description}. * @param locale The requested {@link Locale}. * @return LinkedHashSet<String> */ private LinkedHashSet<String> buildLocalePathList(Description description, Locale locale) { LinkedHashSet<String> paths = buildLocalePathList(description.getId(), locale); return paths; }
public Map<String, Object> getStatusModel() { return createTemplateParameters(req, res, null); }
/** * <p>A locale based lookup sequence is build using the supplied {@link Locale} and (if it is * different) the default {@link Locale}. * <ol><li>Lookup <{@code}descid><{@code}language_country_variant>.properties</li> * <li>Lookup <{@code}descid><{@code}language_country>.properties</li> * <li>Lookup <{@code}descid><{@code}language>.properties</li> * </ol> * The repeat but with the default {@link Locale}. Finally lookup <descid>.properties * </p> * @param description The current {@link WebScript} {@link Description}. * @param locale The requested {@link Locale}. * @return */ private LinkedHashSet<String> buildLocalePathList(Description description, Locale locale) { LinkedHashSet<String> paths = buildLocalePathList(description.getId(), locale); return paths; }