Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.Section


        return currentWorkspace;
    }

    protected Section getCurrentPageFromCache() {
        RequestContext rqctx = RequestContext.getCurrentContext();
        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

        return currentWorkspace;
    }

    protected Section getCurrentPageFromCache() {
        RequestContext rqctx = RequestContext.getCurrentContext();
        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();
View Full Code Here

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

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

public class BreadCrumbFormatter extends Formatter {

    public void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws FormatterException {
        List<Section> pagesList = new ArrayList<Section>();
        Section page = getSection();
        do {
            pagesList.add(page);
            page = page.getParent();
        } while (page != null);

        Collections.reverse(pagesList);
        List<SectionBreadCrumbItem> itemsList = new ArrayList<SectionBreadCrumbItem>();
        for (Section section : pagesList) {
View Full Code Here

    }

    protected List listChildren() {
        List childrenNodes = new ArrayList();
        try {
            Section s = getSection();
            for (Section childSection : s.getChildren()) {
                childrenNodes.add(getNewSectionNode(childSection));
            }
        } catch (Exception e) {
            log.error("Error: ", e);
        }
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.