Examples of ConfigService


Examples of org.alfresco.config.ConfigService

                    response.setContentType("text/html");
                    request.getPortletSession().setAttribute(PortletUtil.PORTLET_REQUEST_FLAG, "true");

                    // get the start location as configured by the web-client
                    // config
                    ConfigService configService = (ConfigService) ctx.getBean("webClientConfigService");
                    ClientConfigElement configElement = (ClientConfigElement) configService.getGlobalConfig().getConfigElement("client");
                    if (NavigationBean.LOCATION_MYALFRESCO.equals(configElement.getInitialLocation())) {
                        nonFacesRequest(request, response, "/jsp/dashboards/container.jsp");
                    } else {
                        nonFacesRequest(request, response, "/jsp/browse/browse.jsp");
                    }
View Full Code Here

Examples of org.apache.click.service.ConfigService

                }

                messages = Collections.unmodifiableMap(messages);

                ServletContext servletContext = Context.getThreadLocalContext().getServletContext();
                ConfigService configService = ClickUtils.getConfigService(servletContext);
                if (configService.isProductionMode() || configService.isProfileMode()) {
                    MESSAGES_CACHE.put(resourceKey, messages);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.click.service.ConfigService

        }

        Menu loadedMenu = loadRootMenu(accessController);

        ServletContext servletContext = Context.getThreadLocalContext().getServletContext();
        ConfigService configService = ClickUtils.getConfigService(servletContext);

        if (configService.isProductionMode() || configService.isProfileMode()) {
            // Cache menu in production modes
            rootMenu = loadedMenu;
        }

        return loadedMenu;
View Full Code Here

Examples of org.apache.click.service.ConfigService

     * @param context the request context
     * @return a template model as a map
     */
    public static Map createTemplateModel(final Page page, Context context) {

        ConfigService configService = ClickUtils.getConfigService(context.getServletContext());
        LogService logger = configService.getLogService();

        final Map model = new HashMap(page.getModel());

        final HttpServletRequest request = context.getRequest();

View Full Code Here

Examples of org.apache.click.service.ConfigService

     *
     * @param servletContext the servlet context to get the config service instance
     * @return the application config service instance
     */
    public static ConfigService getConfigService(ServletContext servletContext) {
        ConfigService configService = (ConfigService)
            servletContext.getAttribute(ConfigService.CONTEXT_NAME);

        if (configService != null) {
            return configService;

View Full Code Here

Examples of org.apache.click.service.ConfigService

    public static String getResourceVersionIndicator(Context context) {
        if (cachedResourceVersionIndicator != null) {
            return cachedResourceVersionIndicator;
        }

        ConfigService configService = getConfigService(context.getServletContext());

        boolean isProductionModes = configService.isProductionMode()
            || configService.isProfileMode();

        if (isProductionModes
            && isEnableResourceVersion(context)) {

            cachedResourceVersionIndicator = RESOURCE_VERSION_INDICATOR;
View Full Code Here

Examples of org.apache.click.service.ConfigService

        // Check if the Context has been set
        if (Context.hasThreadLocalContext()) {

            Context context = Context.getThreadLocalContext();
            ConfigService configService = ClickUtils.getConfigService(context.getServletContext());

            boolean isProductionModes = configService.isProductionMode()
                || configService.isProfileMode();

            if (isProductionModes && ClickUtils.isEnableResourceVersion(context)) {
                String version = getApplicationVersion();
                if (StringUtils.isNotBlank(version)) {
                    cachedApplicationVersionIndicator = VERSION_INDICATOR_SEP
View Full Code Here

Examples of org.apache.click.service.ConfigService

        String packageName = ClassUtils.getPackageName(controlClass);
        packageName = StringUtils.replaceChars(packageName, '.', '/');
        packageName = "/" + packageName;
        String controlName = ClassUtils.getShortClassName(controlClass);

        ConfigService configService = getConfigService(servletContext);
        LogService logService = configService.getLogService();
        String descriptorFile = packageName + "/" + controlName + ".files";
        logService.debug("Use deployment descriptor file:" + descriptorFile);

        try {
            InputStream is = getResourceAsStream(descriptorFile, ClickUtils.class);
View Full Code Here

Examples of org.apache.click.service.ConfigService

     * @return the application LogService instance
     */
    public static LogService getLogService() {
        Context context = Context.getThreadLocalContext();
        ServletContext servletContext = context.getServletContext();
        ConfigService configService = getConfigService(servletContext);
        LogService logService = configService.getLogService();
        return logService;
    }
View Full Code Here

Examples of org.apache.click.service.ConfigService

    public void doFilter(ServletRequest request, ServletResponse response,
            FilterChain chain) throws IOException, ServletException {

        if (logger == null) {
             ServletContext servletContext = getFilterConfig().getServletContext();
             ConfigService configService = ClickUtils.getConfigService(servletContext);
             logger = configService.getLogService();
        }

        // Obtain the users DataContext
        DataContext dataContext = getDataContext((HttpServletRequest) request);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.