Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.Section


        }
        return childrenNodes;
    }

    protected boolean hasDynamicChildren() {
        Section s = null;
        try {
            s = getSection();
            List<Section> children = s.getChildren();
            return !children.isEmpty();
        } catch (Exception e) {
            log.error("Error: ", e);
        }
        return false;
View Full Code Here


        return false;
    }

    protected TreeNode listChildrenById(String id) {
        try {
            Section s = ((WorkspaceImpl) getWorkspace()).getSection(Long.decode(id));
            if (getSectionId().equals(s.getParentSectionId())) {
                return getNewSectionNode(s);
            }
        } catch (Exception e) {
            log.error("Error: ", e);
        }
View Full Code Here

        return permissionsPropertiesHandler;
    }

    public boolean isEditable() {
        SectionNode parent = (SectionNode) getParent();
        Section section;
        try {
            section = parent.getSection();
            SectionPermission editPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_EDIT_PERMISSIONS);
            return super.isEditable() && UserStatus.lookup().hasPermission(editPerm);
        } catch (Exception e) {
View Full Code Here

                idPanel = panel.getPanelId().toString();
            }
        }
        Panel panel = null;
        if (idPanel != null) {
            Section currSection = NavigationManager.lookup().getCurrentSection();
            if (currSection != null) {
                panel = currSection.getPanel(idPanel);
            }
        }

        if (key != null && panel != null) {
View Full Code Here

        return currentWorkspace;
    }

    protected Section getCurrentPageFromCache() {
        RequestContext rqctx = RequestContext.lookup();
        Section currentPage = (Section) rqctx.getRequest().getRequestObject().getAttribute(CURRENT_PAGE_ATTR);
        return currentPage;
    }
View Full Code Here

     *
     * @return current page after checking ubication is correct
     */
    public synchronized Section getCurrentSection() {
        // First check in request cache
        Section currentSection = getCurrentPageFromCache();
        if (currentSection != null) return currentSection;
        if (!isValidUbication()) reposition();
        currentSection = doGetCurrentSection();
        return currentSection;
    }
View Full Code Here

        WorkspaceImpl workspace = doGetCurrentWorkspace();
        Section[] pages = workspace.getAllRootSections();

        // First search root sections in order
        for (int i = 0; i < pages.length; i++) {
            Section page = pages[i];
            setCurrentSectionId(page.getDbid());
            clearRequestCache();
            if (isValidUbication()) return;
        }
        // Then, the rest of sections
        pages = workspace.getAllSections();
        for (int i = 0; i < pages.length; i++) {
            Section page = pages[i];
            if (!page.isRoot()) {
                setCurrentSectionId(page.getId());
                clearRequestCache();
                if (isValidUbication()) return;
            }
        }
    }
View Full Code Here

            WorkspacePermission workspacePerm = WorkspacePermission.newInstance(workspace, WorkspacePermission.ACTION_LOGIN);
            if (!getUserStatus().hasPermission(workspacePerm)) {
                // No access permission in workspace
                return false;
            }
            Section section = navigationPoint.getPage();
            if (section != null) {
                SectionPermission sectionPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_VIEW);
                if (!getUserStatus().hasPermission(sectionPerm)) {
                    // No access permission in page
                    return false;
View Full Code Here

    public Section getPage() {
        if (getSectionId() == null) return null;
        WorkspaceImpl workspace = getWorkspace();
        if (workspace != null) {
            try {
                Section page = workspace.getSection(Long.decode(getSectionId()));
                if (page != null) return page;
            } catch (NumberFormatException nfe) {
            }
            return workspace.getSectionByUrl(getSectionId());
        }
View Full Code Here

        return null;
    }

    public Panel getPanel() {
        if (getPanelId() == null) return null;
        Section page = getPage();
        if (page != null) {
            return page.getPanel(getPanelId().toString());
        }
        return null;
    }
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.