Examples of WorkspaceImpl


Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    }

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

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    }

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

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

        rqctx.getRequest().getRequestObject().removeAttribute(CURRENT_PAGE_ATTR);
    }

    protected WorkspaceImpl getCurrentWorkspaceFromCache() {
        RequestContext rqctx = RequestContext.getCurrentContext();
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) rqctx.getRequest().getRequestObject().getAttribute(CURRENT_WORKSPACE_ATTR);
        return currentWorkspace;
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

     * Get the current workspace, repositioning the navigation in case it is not correct.
     *
     * @return current workspace after checking ubication is correct
     */
    public synchronized WorkspaceImpl getCurrentWorkspace() {
        WorkspaceImpl currentWorkspace = getCurrentWorkspaceFromCache();
        if (currentWorkspace != null) return currentWorkspace;
        if (!isValidUbication()) reposition();
        currentWorkspace = doGetCurrentWorkspace();
        return currentWorkspace;
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

        clearRequestCache();
        log.warn("Couldn't reposition navigation to a valid ubication.");
    }

    protected void repositionSection() {
        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();
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public void actionNavigateToPage(CommandRequest request) throws Exception {
        String workspaceId = request.getParameter(WORKSPACE_ID);
        String pageId = request.getParameter(PAGE_ID);
        if (workspaceId != null && pageId != null) {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            if (workspace != null) {
                setCurrentSection(workspace.getSection(Long.decode(pageId)));
            }
        }
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public void actionNavigateToPage(CommandRequest request) throws Exception {
        String workspaceId = request.getParameter(WORKSPACE_ID);
        String pageId = request.getParameter(PAGE_ID);
        if (workspaceId != null && pageId != null) {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            if (workspace != null)
                setCurrentSection(workspace.getSection(Long.decode(pageId)));
        }
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

        rqctx.getRequest().getRequestObject().removeAttribute(CURRENT_PAGE_ATTR);
    }

    protected WorkspaceImpl getCurrentWorkspaceFromCache() {
        RequestContext rqctx = RequestContext.getCurrentContext();
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) rqctx.getRequest().getRequestObject().getAttribute(CURRENT_WORKSPACE_ATTR);
        return currentWorkspace;
    }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

     *
     * @return current workspace after checking ubication is correct
     */
    public synchronized WorkspaceImpl getCurrentWorkspace() {
        // First check in request cache
        WorkspaceImpl currentWorkspace = getCurrentWorkspaceFromCache();
        if (currentWorkspace != null)
            return currentWorkspace;
        if (!isValidUbication())
            reposition();
        currentWorkspace = doGetCurrentWorkspace();
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    protected void reposition() {
        try {
            List workspaceIds = getSortedWorkspacesList();
            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();
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.