Examples of GadgetResourceServiceClient


Examples of org.wso2.carbon.dashboard.ui.GadgetResourceServiceClient

    public static void getContent(HttpServletRequest request, HttpServletResponse response, ServletConfig config)
            throws Exception {

        try {
            GadgetResourceServiceClient client = new GadgetResourceServiceClient(config, request.getSession());
            String uri = request.getRequestURI();
            String path = uri.split("registry/resource")[1];
            if (path == null) {
                String msg = "Could not get the resource content. Path is not specified.";
                log.error(msg);
                response.setStatus(400);
                return;
            }

            ContentDownloadBean bean = client.getContentDownloadBean(path);

            InputStream contentStream;
            if (bean.getContent() != null) {
                contentStream = bean.getContent().getInputStream();
            } else {
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.