mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13033: Back end support for ETHREEOH-1179 13038: JAWS-436 - refactor WCM submit dialog to use WCM sandbox service + update unit tests 13046: Merged V3.0 to V3.1 13043: Merged V2.2 to V3.0 13016: Fix for ETWOTWO-1088 (reset layer using flatten rather than delete & add, users can flatten in stores they own but not delete) 13049: Build/test fix (WCM AssetTest) 13057: Merged V2.1-A to V3.1 8770: Added Flex SDK module 8771: Added Flex SDK binary (swc) DH: I'm not sure about the svn:eol-style property appearing here. SVN Clients? 13059: Added 'AIX' as a platform type, from Adobe V2.1A, missed checkin. 13060: [no comments] 13061: [no comments] 13063: [no comments] 13064: [no comments] 13066: [no comments] 13067: Add NodeService.getChildrenByName 13072: Added new NodeService.getChildrenByName() method to public-services-security-context. ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.0:r13043 Merged /alfresco/BRANCHES/V2.2:r13016 Merged /alfresco/BRANCHES/V3.1:r13033,13038,13046,13049,13057,13059-13061,13063-13064,13066-13067,13072 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13552 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -29,15 +29,20 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.model.WCMWorkflowModel;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.domain.PropertyValue;
|
||||
import org.alfresco.repo.workflow.WorkflowModel;
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.service.cmr.avm.AVMNotFoundException;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.service.cmr.avm.LayeringDescriptor;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowTask;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowTaskQuery;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.wcm.sandbox.SandboxInfo;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -52,6 +57,28 @@ public class WCMWorkflowUtil
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(WCMWorkflowUtil.class);
|
||||
|
||||
public static NodeRef createWorkflowPackage(WorkflowService workflowService, AVMService avmService, SandboxInfo sandboxInfo)
|
||||
{
|
||||
// create package paths (layered to user sandbox area as target)
|
||||
final String workflowMainStoreName = sandboxInfo.getMainStoreName();
|
||||
final String packagesPath = WCMUtil.buildStoreRootPath(workflowMainStoreName);
|
||||
|
||||
// convert package to workflow package
|
||||
final AVMNodeDescriptor packageDesc = avmService.lookup(-1, packagesPath);
|
||||
final NodeRef packageNodeRef = workflowService.createPackage(AVMNodeConverter.ToNodeRef(-1, packageDesc.getPath()));
|
||||
|
||||
avmService.setNodeProperty(packagesPath, WorkflowModel.PROP_IS_SYSTEM_PACKAGE, new PropertyValue(DataTypeDefinition.BOOLEAN, true));
|
||||
|
||||
// NOTE: WCM-1019: As permissions are now implemented for AVM nodes we no longer need to set permisssions here
|
||||
// as they will be inherited from the store the workflow store is layered over.
|
||||
|
||||
//final ServiceRegistry services = Repository.getServiceRegistry(FacesContext.getCurrentInstance());
|
||||
//final PermissionService permissionService = services.getPermissionService();
|
||||
//permissionService.setPermission(packageNodeRef, PermissionService.ALL_AUTHORITIES, PermissionService.ALL_PERMISSIONS, true);
|
||||
|
||||
return packageNodeRef;
|
||||
}
|
||||
|
||||
public static List<WorkflowTask> getAssociatedTasksForSandbox(WorkflowService workflowService, final String storeName)
|
||||
{
|
||||
String fromPath = WCMUtil.buildStoreRootPath(storeName);
|
||||
|
Reference in New Issue
Block a user