Package org.jboss.dashboard.ui.resources

Examples of org.jboss.dashboard.ui.resources.Resource


    }

    protected Resource getResource() {
        try {
            String resName = getResourceName();
            Resource resource = UIServices.lookup().getResourceManager().getResource(resName, useDefaults);
            if (resource == null) {
                try {
                    byte[] b = Base64.decode(resName);
                    log.warn("Cannot find resource with name " + resName + ". (" + new String(b) + ")");
                } catch (Exception e) {
View Full Code Here


            return null;
        }
    }

    protected String getResourceUrl() throws Exception {
        Resource resource = getResource();
        if (resource == null)
            return null;
        String url = resource.getResourceUrl(pageContext.getRequest(), pageContext.getResponse(), isPortableUrl());
        log.debug("Generated resource url: " + url);
        return url;
    }
View Full Code Here

                });
        }
    }

    protected String getResourceUrl() throws Exception {
        Resource resource = getResource();
        if (resource == null)
            return null;
        if (!(resource instanceof UrlResource)) {
            log.error("Cannot use resource as a page. Must be UrlResource.");
            handleError(new Exception("Cannot use resource as a page. Must be UrlResource."));
View Full Code Here

            log.warn("Cannot retrieve resource: " + resourceId);
            return null;
        }

        log.debug("Resource " + resourceId + " in category " + category + " has path: " + resName);
        Resource resource = UIServices.lookup().getResourceManager().getResource(resName, true);
        if (resource == null) {
            log.warn("Cannot retrieve resource named: " + resName);
            return null;
        }

        String url = resource.getResourceUrl(null, null, false);
        log.debug("Generated resource url: " + url);
        return url;
    }
View Full Code Here

    }

    public CommandResponse actionRetrieve(CommandRequest request) throws Exception {
        String name = request.getParameter("resName");
        log.debug("Retrieving resource " + name);
        Resource res = UIServices.lookup().getResourceManager().getResource(name);
        if (res != null)
            return res.getResourceAsResponse();
        log.warn("Not found resource " + name + " (" + new String(Base64.decode(name)) + ") ");
        return new SendErrorResponse(404);
    }
View Full Code Here

    private static transient org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ResourcesHandler.class.getName());

    public CommandResponse actionRetrieve(CommandRequest request) throws Exception {
        String name = request.getParameter("resName");
        log.debug("Retrieving resource " + name);
        Resource res = UIServices.lookup().getResourceManager().getResource(name);
        if (res != null)
            return res.getResourceAsResponse();
        log.warn("Not found resource " + name + " (" + new String(Base64.decode(name)) + ") ");
        return new SendErrorResponse(404);
    }
View Full Code Here

    }

    protected Resource getResource() {
        try {
            String resName = getResourceName();
            Resource resource = UIServices.lookup().getResourceManager().getResource(resName, useDefaults);
            if (resource == null) {
                try {
                    byte[] b = Base64.decode(resName);
                    log.warn("Cannot find resource with name " + resName + ". (" + new String(b) + ")");
                } catch (Exception e) {
View Full Code Here

            return null;
        }
    }

    protected String getResourceUrl() throws Exception {
        Resource resource = getResource();
        if (resource == null)
            return null;
        String url = resource.getResourceUrl(pageContext.getRequest(), pageContext.getResponse(), isPortableUrl());
        log.debug("Generated resource url: " + url);
        return url;
    }
View Full Code Here

                });
        }
    }

    protected String getResourceUrl() throws Exception {
        Resource resource = getResource();
        if (resource == null)
            return null;
        if (!(resource instanceof UrlResource)) {
            log.error("Cannot use resource as a page. Must be UrlResource.");
            throw new Exception("Cannot use resource as a page. Must be UrlResource.");
View Full Code Here

    }

    protected Resource getResource() {
        try {
            String resName = getResourceName();
            Resource resource = UIServices.lookup().getResourceManager().getResource(resName, useDefaults);
            if (resource == null) {
                try {
                    byte[] b = Base64.decode(resName);
                    log.warn("Cannot find resource with name " + resName + ". (" + new String(b) + ")");
                } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.resources.Resource

Copyright © 2018 www.massapicom. 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.