Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.Section


     */
    public boolean hasVisibleChildren(Section section) {
        List l = section.getChildren();
        if (l == null) return false;
        for (int i = 0; i < l.size(); i++) {
            Section childSection = (Section) l.get(i);
            if (isShowable(childSection))
                return true;
        }
        return false;
    }
View Full Code Here


        return false;
    }

    protected List calculateOpenSections() {
        List l = new ArrayList();
        Section currentSection = getSection();
        if (currentSection != null) {
            l.add(currentSection.getId());
            Section s = currentSection;
            while ((s = s.getParent()) != null) {
                l.add(s.getId());
            }
        }
        return l;
    }
View Full Code Here

    public List<Section> getSectionsWithKPIs(WorkspaceImpl workspace) throws Exception {
        DashboardHandler dashboardHandler = DashboardHandler.lookup();
        List<Section> results = new ArrayList<Section>();
        Iterator sectionIt = workspace.getSections().iterator();
        while (sectionIt.hasNext()) {
            Section section = (Section) sectionIt.next();
            if (dashboardHandler.containsKPIs(section)) {
                results.add(section);
            }
        }
        return results;
View Full Code Here

        sectionsPropertiesHandler.setSelectedSectionId(getNavigationManager().getCurrentSection().getId().toString());
        navigateToConfigPath(getParsedValue(newPagePath));
    }

    public void actionPageConfig(CommandRequest request) throws Exception {
        Section section = getNavigationManager().getCurrentSection();
        SectionPermission sectionPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_EDIT);
        getUserStatus().checkPermission(sectionPerm);
        setWorkspaceValues(request);
        navigateToConfigPath(getParsedValue(section.getParent() != null ? childPageConfigPath : pageConfigPath));
    }
View Full Code Here

        setWorkspaceValues(request);
        navigateToConfigPath(getParsedValue(section.getParent() != null ? childPageConfigPath : pageConfigPath));
    }

    public void actionPageConfigFromTree(CommandRequest request, WorkspaceImpl workspace) throws Exception {
        Section section = workspace.getSection(new Long(request.getParameter("id")));
        SectionPermission sectionPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_EDIT);
        getUserStatus().checkPermission(sectionPerm);
        setWorkspaceValuesFromTree(workspace, section, null);
        navigateToConfigPath(getParsedValue(pageConfigPath));
    }
View Full Code Here

        }
        return path;
    }

    protected String getSectionIds(String workspaceId, Long sectionId) throws Exception {
        Section section = ((WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId)).getSection(sectionId);
        StringBuffer sb = new StringBuffer();
        while (section != null) {
            sb.insert(0, section.getId());
            section = section.getParent();
            if (section != null) {
                sb.insert(0, "/");
            }
        }
        return sb.toString();
View Full Code Here

        setPanelId(null);
        if (getNavigationManager().getCurrentWorkspace() != null) {
            setWorkspaceId(getNavigationManager().getCurrentWorkspace().getId());
        }
        if (getNavigationManager().getCurrentSection() != null) {
            Section section = getNavigationManager().getCurrentSection();
            setSectionId(section.getId());
            if (section.getParent() != null) setParentSectionId(section.getParent().getId());
        }
        if (request.getParameter("panelId") != null) {
            setPanelId(new Long(request.getParameter("panelId")));
        } else {
            setPanelId(null);
View Full Code Here

    }

    protected Comparator newSectionComparatorByName() {
        return new Comparator() {
            public int compare(Object o1, Object o2) {
                Section s1 = (Section) o1;
                Section s2 = (Section) o2;
                return getLocalizedValue(s1.getTitle()).compareTo(getLocalizedValue(s2.getTitle()));
            }
        };
    }
View Full Code Here

    }

    protected Comparator newSectionComparatorByName() {
        return new Comparator() {
            public int compare(Object o1, Object o2) {
                Section s1 = (Section) o1;
                Section s2 = (Section) o2;
                return getLocalizedValue(s1.getTitle()).compareTo(getLocalizedValue(s2.getTitle()));
            }
        };
    }
View Full Code Here

        // This is the case when embedding, for instance, the jBPM process dashboard as an UF panel because the login/logout is handled by the J2EE container & UF.
        Boolean embeddedMode = (Boolean) httpServletRequest.getSession().getAttribute(EmbeddedRequestProcessor.PARAM_SESSION_EMBEDDED);
        if (userIsAdminInCurrentWorkspace && (embeddedMode == null || !embeddedMode)) {
            renderFragment("administrationBar");
        }
        Section page = getNavigationManager().getCurrentSection();
        if (page == null) {
            renderFragment("noPage");
        } else {
            renderFragment("page");
        }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.workspace.Section

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.