package org.nuxeo.ecm.platform.userworkspace.web.ejb;

import static org.jboss.seam.ScopeType.CONVERSATION;
import static org.jboss.seam.ScopeType.EVENT;

import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.nuxeo.ecm.platform.ui.web.api.NavigationContext;
import org.nuxeo.ecm.platform.userworkspace.constants.UserWorkspaceConstants;

/**
 * Standalone class to check if navigation is in the user workspaces
 *
 * @author Thierry Martins <tm@nuxeo.com>
 */
@Scope(CONVERSATION)
@Name("userWorkspaceChecker")
public class UserWorkspaceCheckerActionsBean {

    @In(create = true)
    protected transient NavigationContext navigationContext;

    @Factory(value = "isUserWorkspace", scope = EVENT)
    public Boolean computeIsUserWorkspace() {
        return navigationContext.getCurrentDocument().getPathAsString().contains(
                UserWorkspaceConstants.USERS_PERSONAL_WORKSPACES_ROOT);
    }
}

@@ -1,8 +1,658 @@
+/*%0A * (C) Copyright 2006-2012 Nuxeo SA (http://nuxeo.com/) and contributors.%0A *%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the GNU Lesser General Public License%0A * (LGPL) version 2.1 which accompanies this distribution, and is available at%0A * http://www.gnu.org/licenses/lgpl.html%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU%0A * Lesser General Public License for more details.%0A *%0A * Contributors:%0A *     Thierry Martins%0A */%0A%0A
 package 
@@ -798,16 +798,46 @@
 EVENT;%0A%0A
+import java.io.Serializable;%0A%0A
 import o
@@ -1205,16 +1205,30 @@
 aces%0A *%0A
+ * @since 5.6%0A
  * @auth
@@ -1361,18 +1361,95 @@
 onsBean 
-%7B%0A
+implements Serializable %7B%0A%0A    private static final long serialVersionUID = 1L;
 %0A    @In

Add copyright, @since and serializable