. WCM UI is now sensitive to the 'wcmwf:submitted' aspect marking an item as currently part of a live workflow process

- most actions such as Submit, Edit, Delete, Revert etc. are unavailable when an item is within a workflow
. Fix to preview url generation after executing an action in the Staging area that changed the UI context
. Another icon from Linton

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4638 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-12-18 15:57:49 +00:00
parent c890a3d2c4
commit fd7c24cfd3
7 changed files with 64 additions and 10 deletions

View File

@@ -0,0 +1,44 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.avm.wf.AVMSubmittedAspect;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/**
* UI Action Evaluator - return true if the node is not part of an in-progress WCM workflow.
*
* @author Kevin Roast
*/
public class WCMWorkflowEvaluator implements ActionEvaluator
{
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
AVMService avm = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getAVMService();
String path = AVMNodeConverter.ToAVMVersionPath(node.getNodeRef()).getSecond();
return !avm.hasAspect(-1, path, AVMSubmittedAspect.ASPECT);
}
}