Examples of WorkspaceImpl


Examples of org.jboss.dashboard.workspace.WorkspaceImpl


    public Map prepareGroupsMap() {
        String showedGroupId = getShowedGroupId();

        WorkspaceImpl workspace = (WorkspaceImpl) getNavigationManager().getCurrentWorkspace();
        Map panelStatistics = calculatePanelsStatistics(workspace);
        String[] groupList = UIServices.lookup().getPanelsProvidersManager().enumerateProvidersGroups(workspace);

        if (groupList == null || groupList.length == 0) return null;

        Set instances = workspace.getPanelInstancesSet();
        Map groups = new HashMap();
        String groupId;
        for (int i = 0; i < groupList.length; i++) {
            groupId = groupList[i];
            Map group = (HashMap) groups.get(groupId);
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

        return m;
    }


    public void initSections(Section rootSection, String indent, String preffix) throws Exception {
        WorkspaceImpl workspace;

        workspace = (WorkspaceImpl) getSectionsPropertiesHandler().getWorkspace();
        if (workspace != null) {
            Section[] sections = rootSection != null ?
                    workspace.getAllChildSections(rootSection.getId()) :
                    workspace.getAllRootSections();
            for (int i = 0; i < sections.length; i++) {
                SectionPermission viewPerm = SectionPermission.newInstance(sections[i], SectionPermission.ACTION_VIEW);
                if (UserStatus.lookup().hasPermission(viewPerm)) {
                    pageIds.add(sections[i].getId());
                    pageTitles.add(indent + getTitle(sections[i]));
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public List<WorkspaceImpl> getWorkspacesWithKPIs() throws Exception {
        List<WorkspaceImpl> results = new ArrayList<WorkspaceImpl>();
        WorkspaceImpl[] workspaces = UIServices.lookup().getWorkspacesManager().getWorkspaces();
        for (int i = 0; i < workspaces.length; i++) {
            WorkspaceImpl workspace = workspaces[i];
            List<Section> dashs = getSectionsWithKPIs(workspace);
            if (!dashs.isEmpty()) results.add(workspace);
        }
        return results;
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public List<KPI> getSelectedKPIs() throws Exception {
        List<KPI> results = new ArrayList<KPI>();
        DashboardHandler dashboardHandler = DashboardHandler.lookup();
        for (String workspaceId : selectedSectionIds.keySet()) {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            Set<Section> sections = getSelectedSections(workspace);
            for (Section section : sections) {
                Dashboard dash = dashboardHandler.getDashboard(section);
                Iterator it = section.getPanels().iterator();
                while (it.hasNext()) {
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

            sectionIds.add(Long.valueOf(sectionId));
        }
    }

    public void actionSelectAllSections(CommandRequest request) throws Exception {
        WorkspaceImpl workspace = getSelectedWorkspace();
        if (workspace != null) {
            List<Section> dashs = getSectionsWithKPIs(workspace);
            Set<Long> sectionIds = new HashSet<Long>();
            selectedSectionIds.put(selectedWorkspaceId, sectionIds);
            for (Section dash : dashs) {
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

        boolean isEditMode = SessionManager.getPanelSession(getPanel()).isEditMode();
        if (workspacesIdentifiers != null && workspacesIdentifiers.size() > 0) {
            Iterator itWorkspacesIdentifiers = workspacesIdentifiers.iterator();
            while (itWorkspacesIdentifiers.hasNext()) {
                String id = (String) itWorkspacesIdentifiers.next();
                WorkspaceImpl workspace;
                try {
                    workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(id);
                } catch (Exception e) {
                    throw new FormatterException("No workspace found: ", e);
                }
                MenuItem menuItem = new WorkspaceMenuItem();
                menuItem.setId(workspace.getId());
                menuItem.setText(workspace.getName());
                menuItem.setUrl(menuDriver.getChangeWorkspaceLink(request, response, workspace.getId()));
                menuItem.setSelected(Boolean.valueOf(selectedWorkspaceIds.contains(workspace.getId())));
                menuItem.setVisible(Boolean.TRUE);
                if (workspace.getId().equals(getWorkspace().getId())) {
                    menuItem.setCurrent(Boolean.TRUE);
                } else {
                    menuItem.setCurrent(Boolean.FALSE);
                }
                renderItem(menuItem, selectedWorkspaceIds.contains(MenuDriver.PARAMETER_ALL_ITEMS), isEditMode);
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

            while ((section = section.getParent()) != null) {
                openedPages.add(section.getDbid());
            }
        }

        WorkspaceImpl workspace = (WorkspaceImpl) getWorkspace();
        Section[] rootSections = workspace.getAllRootSections();
        renderFragment("outputStart");
        if (isEditMode) {
            if (rootSections != null) {
                for (int i = 0; i < rootSections.length; i++) {
                    Section rootSection = rootSections[i];
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public List<WorkspaceImpl> getWorkspacesWithKPIs() throws Exception {
        List<WorkspaceImpl> results = new ArrayList<WorkspaceImpl>();
        WorkspaceImpl[] workspaces = UIServices.lookup().getWorkspacesManager().getWorkspaces();
        for (int i = 0; i < workspaces.length; i++) {
            WorkspaceImpl workspace = workspaces[i];
            List<Section> dashs = getSectionsWithKPIs(workspace);
            if (!dashs.isEmpty()) results.add(workspace);
        }
        return results;
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public List<KPI> getSelectedKPIs() throws Exception {
        List<KPI> results = new ArrayList<KPI>();
        DashboardHandler dashboardHandler = DashboardHandler.lookup();
        for (String workspaceId : selectedSectionIds.keySet()) {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            Set<Section> sections = getSelectedSections(workspace);
            for (Section section : sections) {
                Dashboard dash = dashboardHandler.getDashboard(section);
                Iterator it = section.getPanels().iterator();
                while (it.hasNext()) {
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

            sectionIds.add(Long.valueOf(sectionId));
        }
    }

    public void actionSelectAllSections(CommandRequest request) throws Exception {
        WorkspaceImpl workspace = getSelectedWorkspace();
        if (workspace != null) {
            List<Section> dashs = getSectionsWithKPIs(workspace);
            Set<Long> sectionIds = new HashSet<Long>();
            selectedSectionIds.put(selectedWorkspaceId, sectionIds);
            for (Section dash : dashs) {
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.