Examples of GraphConfig


Examples of org.jmanage.core.config.GraphConfig

        HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
        WebContext context = WebContext.get(request);
        ApplicationConfig appConfig = context.getApplicationConfig();
        // graphs at cluster level are not yet supported
        assert !appConfig.isCluster();
        GraphConfig graphConfig = appConfig.findGraph(id);

        HtmlElement applet = new HtmlElement("applet");
        applet.addAttribute("code", "org/jmanage/webui/applets/GraphApplet.class");
        applet.addAttribute("archive", "/applets/applets.jar,/applets/jfreechart-0.9.20.jar,/applets/jcommon-0.9.5.jar");
        applet.addAttribute("width", width);
        applet.addAttribute("height", height);

        ParamElement param = null;

        param = new ParamElement(GraphAppletParameters.GRAPH_TITLE, graphConfig.getName());
        applet.addChildElement(param);

        param = new ParamElement(GraphAppletParameters.POLLING_INTERVAL, graphConfig.getPollingInterval());
        applet.addChildElement(param);

        String remoteURL = Utils.getServerBaseURL(request) +
                "/app/fetchAttributeValues.do;jsessionid=" +
                Utils.getCookieValue(request, "JSESSIONID");
        param = new ParamElement(GraphAppletParameters.REMOTE_URL, remoteURL);
        applet.addChildElement(param);

        param = new ParamElement(GraphAppletParameters.ATTRIBUTE_DISPLAY_NAMES,
                graphConfig.getAttributeDisplayNames());
        applet.addChildElement(param);

        param = new ParamElement(GraphAppletParameters.ATTRIBUTES,
                graphConfig.getAttributesAsString());
        applet.addChildElement(param);

        param = new ParamElement(GraphAppletParameters.Y_AXIS_LABEL,
                graphConfig.getYAxisLabel());
        applet.addChildElement(param);

        if(graphConfig.getScaleFactor() != null){
            param = new ParamElement(GraphAppletParameters.SCALE_FACTOR,
                    graphConfig.getScaleFactor());
            applet.addChildElement(param);
        }

        if(graphConfig.isScaleUp() != null){
            param = new ParamElement(GraphAppletParameters.SCALE_UP,
                    graphConfig.isScaleUp());
            applet.addChildElement(param);
        }

        final JspWriter writer = pageContext.getOut();
View Full Code Here

Examples of org.jmanage.core.config.GraphConfig

            throws Exception {
        AccessController.checkAccess(Utils.getServiceContext(context),ACL_EDIT_GRAPH);
        GraphForm form = (GraphForm)actionForm;
        String graphId = form.getGraphId();
        ApplicationConfig appConfig = context.getApplicationConfig();
        GraphConfig graphConfig = appConfig.findGraph(graphId);
        if(graphConfig!=null){
            form.setGraphName(graphConfig.getName());
            form.setPollInterval(String.valueOf(graphConfig.getPollingInterval()));
            form.setYAxisLabel(graphConfig.getYAxisLabel());
            if(graphConfig.getScaleFactor() != null){
                form.setScaleFactor(graphConfig.getScaleFactor().toString());
                form.setScaleUp(graphConfig.isScaleUp().booleanValue());
            }

            List attributes = graphConfig.getAttributes();
            String[] attributeNames = new String[attributes.size()];
            String[] objectNames = new String[attributes.size()];
            String[] displayNames = new String[attributes.size()];
            int i=0;
            for(Iterator itr=attributes.iterator(); itr.hasNext();){
View Full Code Here

Examples of org.jmanage.core.config.GraphConfig

        // todo: do we need access control for graphs? probably not.
        //AccessController.checkAccess(context.getServiceContext(),
        //        ACLConstants.ACL_VIEW_APPLICATIONS);

        /*set current page for navigation*/
        GraphConfig graphConfig =
                appConfig.findGraph(request.getParameter("graphId"));
        assert graphConfig != null;
        request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE,
                graphConfig.getName());

        return mapping.findForward("success");
    }
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.