Examples of ConfigService


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

    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

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 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.cxf.fediz.service.idp.service.ConfigService

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
        IOException {
        response.setContentType("text/xml");
        PrintWriter out = response.getWriter();
        try {
            ConfigService cs = (ConfigService)getApplicationContext().getBean("config");
            IDPConfig idpConfig = cs.getIDPConfig(realm);
            LOG.debug(idpConfig.toString());
            MetadataWriter mw = new MetadataWriter();
            Document metadata =  mw.getMetaData(idpConfig);
            out.write(DOM2Writer.nodeToString(metadata));
        } catch (Exception ex) {
View Full Code Here

Examples of org.apache.cxf.fediz.service.idp.service.ConfigService

        applicationContext = new ClassPathXmlApplicationContext("/idp-config.xml");
    }
   
    @Test
    public void testWriteIDPMetadata() {
        ConfigService config = (ConfigService)applicationContext.getBean("config");
        Assert.notNull(config, "ConfigService must not be null");
        IDPConfig idpConfig = config.getIDPConfig("urn:org:apache:cxf:fediz:idp:realm-A");
        Assert.notNull(idpConfig, "IDPConfig must not be null");
       
        MetadataWriter writer = new MetadataWriter();
        Document doc = writer.getMetaData(idpConfig);
        Assert.notNull(doc, "doc must not be null");
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.