Examples of WorkspaceImpl


Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    /**
     * @see javax.servlet.jsp.tagext.TagSupport
     */
    public int doEndTag() throws JspTagException {

        WorkspaceImpl workspace = NavigationManager.lookup().getCurrentWorkspace();

        if (workspace != null) {
            Section section = workspace.getSection(getSection());

            if (section != null) {
                String linkStr = getLink((HttpServletRequest) pageContext.getRequest(), (HttpServletResponse) pageContext.getResponse(), section);
                try {
                    pageContext.getOut().print(StringEscapeUtils.escapeHtml(linkStr));
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

public class NavigationUpdater implements UserStatusListener {

    public void statusChanged(UserStatus us) {
        if (us.isRootUser()) return;

        WorkspaceImpl currentWorkspace = NavigationManager.lookup().getCurrentWorkspace();
        if (currentWorkspace != null && currentWorkspace.getHomeSearchMode() == Workspace.SEARCH_MODE_ROLE_HOME_PREFERENT) {
            Section section = currentWorkspace.getDefaultHomePageForRole(us.getUserRoleIds().iterator().next());
            if (section != null) {
                NavigationManager.lookup().setCurrentSection(section);
            }
        }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

        //Old commands depended on these parameters to affect navigation status
        String workspaceId = request.getRequestObject().getParameter("idWorkspace");
        String pageId = request.getRequestObject().getParameter("idSection");
        try {
            if (!StringUtils.isEmpty(workspaceId) && !StringUtils.isEmpty(pageId)) {
                WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
                Section page = workspace.getSection(Long.decode(pageId));
                getNavigatorManager().setCurrentSection(page);
            }
        } catch (Exception e) {
            log.error("Error in beforeInvokeAction: ", e);
        }
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

     * @param workspaceId Workspace id to be referenced.
     * @return a non-friendly link to a workspace.
     * @deprecated use URLMarkupGenerator methods directly
     */
    public static String getLink(HttpServletRequest request, HttpServletResponse response, String workspaceId) {
        WorkspaceImpl workspace = null;
        try {
            workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
        } catch (Exception e) {
            log.error("Error: ", e);
            return null;
View Full Code Here

Examples of org.jboss.dashboard.workspace.WorkspaceImpl

    public void service(HttpServletRequest request, HttpServletResponse response) throws FormatterException {
        Panel panel = (Panel) getParameter("panel");
        PanelSession status = SessionManager.getPanelSession(panel);
        SectionRegion sectionRegion = panel.getSection().getSectionRegion(panel.getRegion().getId());
        boolean columnRegion = panel.getRegion().isColumnRegion();
        WorkspaceImpl workspace = NavigationManager.lookup().getCurrentWorkspace();
        boolean userIsAdmin = false;
        if (workspace != null) {
            WorkspacePermission permToCheck = WorkspacePermission.newInstance(workspace, WorkspacePermission.ACTION_ADMIN);
            userIsAdmin = UserStatus.lookup().hasPermission(permToCheck);
        }
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.