Merged V3.1 to HEAD

12982: Merged V3.0 to V3.1
      12921: Merged V2.2 to V3.0
         12524: Fix ETWOTWO-974: Submit Action Queue (...)
         12687: Add missing workflow to bootstrap (follow on from 12524)
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.0:r12921
      Merged /alfresco/BRANCHES/V2.2:r12524,12687
      Merged /alfresco/BRANCHES/V3.1:r12982


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13545 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-11 01:17:39 +00:00
parent 5c7525fc4a
commit 8c01eb0ffe
3 changed files with 85 additions and 198 deletions

View File

@@ -182,7 +182,6 @@ public class WebProject implements Serializable
private final NodeRef nodeRef;
private String storeId = null;
private Boolean hasWorkflow = null;
public WebProject(final NodeRef nodeRef)
{
@@ -339,27 +338,9 @@ public class WebProject implements Serializable
*/
public boolean hasWorkflow()
{
if (this.hasWorkflow == null)
{
final NodeService nodeService = this.getServiceRegistry().getNodeService();
List<ChildAssociationRef> webWorkflowRefs = nodeService.getChildAssocs(
this.nodeRef, WCMAppModel.ASSOC_WEBWORKFLOWDEFAULTS, RegexQNamePattern.MATCH_ALL);
this.hasWorkflow = (webWorkflowRefs.size() != 0);
if (!this.hasWorkflow)
{
// might have a workflow assigned to one of the forms used in the website
Map<String, Form> forms = getFormsImpl();
for (Form form : forms.values())
{
if (form.getDefaultWorkflow() != null)
{
this.hasWorkflow = Boolean.TRUE;
break;
}
}
}
}
return this.hasWorkflow.booleanValue();
// note: there's always a submit workflow, as direct to staging is now
// also routed via workflow
return true;
}
private Map<String, Form> getFormsImpl()