mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
17410: Merged V3.1 to V3.2 16667: (record-only) Fix ETHREEOH-2477 - group-based perms (MT env) 16883: Fix ETHREEOH-1544 - cannot paste an item, if cut from another web project (modifyLock errror) 16918: Fix ETHREEOH-3053 - Deployment of non-stale file in a stale layered folder removes the file from FSR 16947: (record-only) Temporarily comment-out testSubmitChangedAssets1 (intermittent permission failure) 17162: Fix ETHREEOH-2850 - submitting delete of (web form) xml instance does not submit the associated deleted renditions 17319: Fix ETHREEOH-3111 - ManageReviewTaskDialog (fix-up contributed patch) 17418: Merged V3.1 to V3.2 17141: Fix ETHREEOH-3088: Cut/Paste into self causes stack overflow 17216: Fixed ETHREEOH-3170: DB errors on MSSQL with Snapshot Isolation enabled while CIFS copying 17255: Fixed ETHREEOH-3180: Error appears when trying to search resources on Manage Task page 17419: Fix for ETHREEOH-3296: Enterprise 3.X / Permissions Error When Cut & Paste on Sub-Folder 17421: Review and tweaks of DB script port 17423: Follow-on for ETHREEOH-3088 17424: Missed check-in for ETHREEOH-3032 (CHK-10240) 17437: ETHREEOH-2790 - OpenOffice-startup-context.xml needs to also initiate the connection to OpenOffice 17441: Build fix: Fix AVM permission inheritance to match DM and fix common permission dao component 17470: Fix for ETHREEOH-3350: Admin Console - Viewing user properties for user without home folder throws exception ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r16667,16883,16918,16947,17141,17162,17216,17255,17319 Merged /alfresco/BRANCHES/V3.2:r17410,17418-17419,17421,17423-17424,17437,17441,17470 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18137 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -64,7 +64,7 @@ public class ManageReviewTaskDialog extends ManageTaskDialog
|
|||||||
protected String webapp;
|
protected String webapp;
|
||||||
protected NodeRef webProjectRef;
|
protected NodeRef webProjectRef;
|
||||||
protected AVMBrowseBean avmBrowseBean;
|
protected AVMBrowseBean avmBrowseBean;
|
||||||
transient protected PermissionService permissionService;
|
transient private PermissionService permissionService;
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(ManageReviewTaskDialog.class);
|
private static final Log logger = LogFactory.getLog(ManageReviewTaskDialog.class);
|
||||||
|
|
||||||
|
@@ -65,9 +65,7 @@ import org.alfresco.web.app.servlet.FacesHelper;
|
|||||||
import org.alfresco.web.bean.BrowseBean;
|
import org.alfresco.web.bean.BrowseBean;
|
||||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.forms.Form;
|
|
||||||
import org.alfresco.web.forms.FormInstanceData;
|
import org.alfresco.web.forms.FormInstanceData;
|
||||||
import org.alfresco.web.forms.FormNotFoundException;
|
|
||||||
import org.alfresco.web.forms.FormsService;
|
import org.alfresco.web.forms.FormsService;
|
||||||
import org.alfresco.web.forms.Rendition;
|
import org.alfresco.web.forms.Rendition;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
import org.alfresco.web.ui.common.Utils;
|
||||||
@@ -737,81 +735,63 @@ public class SubmitDialog extends BaseDialogBean
|
|||||||
this.warningItems.add(new ItemWrapper(node));
|
this.warningItems.add(new ItemWrapper(node));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeRef ref = AVMNodeConverter.ToNodeRef(-1, node.getPath());
|
NodeRef ref = AVMNodeConverter.ToNodeRef(-1, node.getPath());
|
||||||
if (submittedPaths.contains(node.getPath()))
|
if (submittedPaths.contains(node.getPath()))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (node.isDeleted())
|
|
||||||
{
|
|
||||||
// found a deleted node for submit
|
|
||||||
this.submitItems.add(new ItemWrapper(node));
|
|
||||||
submittedPaths.add(node.getPath());
|
|
||||||
}
|
|
||||||
|
|
||||||
// lookup if this item was created via a form - then lookup the workflow defaults
|
boolean isForm = getNodeService().hasAspect(ref, WCMAppModel.ASPECT_FORM_INSTANCE_DATA);
|
||||||
// for that form and store into the list of available workflows
|
boolean isRendition = getNodeService().hasAspect(ref, WCMAppModel.ASPECT_RENDITION);
|
||||||
else if (!getNodeService().hasAspect(ref, WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
|
|
||||||
|
if (((!isForm) && (!isRendition)) || (node.isDeleted() && (!isForm)))
|
||||||
{
|
{
|
||||||
|
// found single item for submit
|
||||||
|
// note: could be a single deleted rendition - to enable deletion of old renditions (eg. if template no longer applicable)
|
||||||
this.submitItems.add(new ItemWrapper(node));
|
this.submitItems.add(new ItemWrapper(node));
|
||||||
submittedPaths.add(node.getPath());
|
submittedPaths.add(node.getPath());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// item is a form (note: could be deleted) or a rendition
|
||||||
|
|
||||||
FormInstanceData fid = null;
|
FormInstanceData fid = null;
|
||||||
// check if this is a rendition - as they also have the forminstancedata aspect
|
if (isRendition)
|
||||||
if (getNodeService().hasAspect(ref, WCMAppModel.ASPECT_RENDITION))
|
|
||||||
{
|
{
|
||||||
// found a generated rendition asset - locate the parent form instance data file
|
// found a generated rendition asset - locate the parent form instance data file
|
||||||
// and use this to find all generated assets that are appropriate
|
// and use this to find all generated assets that are appropriate
|
||||||
// NOTE: this path value is store relative
|
// NOTE: this path value is store relative
|
||||||
fid = getFormsService().getRendition(ref).getPrimaryFormInstanceData();
|
fid = getFormsService().getRendition(ref).getPrimaryFormInstanceData(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fid = getFormsService().getFormInstanceData(ref);
|
fid = getFormsService().getFormInstanceData(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check form's default workflow (if any)
|
|
||||||
Form f = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
f = fid.getForm();
|
|
||||||
}
|
|
||||||
catch (FormNotFoundException fnfe)
|
|
||||||
{
|
|
||||||
String formName = (String)getNodeService().getProperty(ref, WCMAppModel.PROP_PARENT_FORM_NAME);
|
|
||||||
logger.warn("Cannot check default workflow (if any) for missing form '"+formName+"' (may have been deleted) - when submitting '"+node.getPath()+"'");
|
|
||||||
//Utils.addErrorMessage(fnfe.getMessage(), fnfe);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add the form instance data file to the list for submission
|
// add the form instance data file to the list for submission
|
||||||
if (!submittedPaths.contains(fid.getPath()))
|
if (!submittedPaths.contains(fid.getPath()))
|
||||||
{
|
{
|
||||||
this.submitItems.add(new ItemWrapper(getAvmService().lookup(-1, fid.getPath())));
|
this.submitItems.add(new ItemWrapper(getAvmService().lookup(-1, fid.getPath(), true)));
|
||||||
submittedPaths.add(fid.getPath());
|
submittedPaths.add(fid.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
// locate renditions for this form instance data file and add to list for submission
|
// locate renditions for this form instance data file and add to list for submission
|
||||||
for (final Rendition rendition : fid.getRenditions())
|
for (final Rendition rendition : fid.getRenditions(true))
|
||||||
{
|
{
|
||||||
final String renditionPath = rendition.getPath();
|
final String renditionPath = rendition.getPath();
|
||||||
if (!submittedPaths.contains(renditionPath))
|
if (!submittedPaths.contains(renditionPath))
|
||||||
{
|
{
|
||||||
this.submitItems.add(new ItemWrapper(getAvmService().lookup(-1, renditionPath)));
|
this.submitItems.add(new ItemWrapper(getAvmService().lookup(-1, renditionPath, true)));
|
||||||
submittedPaths.add(renditionPath);
|
submittedPaths.add(renditionPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f != null)
|
// lookup the workflow defaults for that form and store into the list of available workflows
|
||||||
{
|
WorkflowDefinition defaultWfDef = fid.getForm().getDefaultWorkflow();
|
||||||
WorkflowDefinition defaultWfDef = f.getDefaultWorkflow();
|
|
||||||
if (defaultWfDef != null)
|
if (defaultWfDef != null)
|
||||||
{
|
{
|
||||||
this.workflows.add(new FormWorkflowWrapper(defaultWfDef.getName(),
|
this.workflows.add(new FormWorkflowWrapper(defaultWfDef.getName(),
|
||||||
f.getDefaultWorkflowParameters()));
|
fid.getForm().getDefaultWorkflowParameters()));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// See WCM-1090 ACT-1551
|
// See WCM-1090 ACT-1551
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -123,4 +123,7 @@ public interface FormInstanceData
|
|||||||
|
|
||||||
/** returns all renditions of this form instance data */
|
/** returns all renditions of this form instance data */
|
||||||
public List<Rendition> getRenditions();
|
public List<Rendition> getRenditions();
|
||||||
|
|
||||||
|
/** returns all renditions of this form instance data (include deleted AVM nodes) */
|
||||||
|
public List<Rendition> getRenditions(boolean includeDeleted);
|
||||||
}
|
}
|
||||||
|
@@ -176,7 +176,9 @@ import org.xml.sax.SAXException;
|
|||||||
throws FormNotFoundException
|
throws FormNotFoundException
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("regenerating renditions of " + this);
|
logger.debug("regenerating renditions of " + this);
|
||||||
|
}
|
||||||
|
|
||||||
AVMLockingService avmLockService = this.getServiceRegistry().getAVMLockingService();
|
AVMLockingService avmLockService = this.getServiceRegistry().getAVMLockingService();
|
||||||
final AVMService avmService = this.getServiceRegistry().getAVMService();
|
final AVMService avmService = this.getServiceRegistry().getAVMService();
|
||||||
@@ -220,7 +222,9 @@ import org.xml.sax.SAXException;
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("regenerating rendition " + r + " using template " + ret);
|
logger.debug("regenerating rendition " + r + " using template " + ret);
|
||||||
|
}
|
||||||
|
|
||||||
renditionLockedBefore = false;
|
renditionLockedBefore = false;
|
||||||
path = r.getPath();
|
path = r.getPath();
|
||||||
@@ -230,8 +234,10 @@ import org.xml.sax.SAXException;
|
|||||||
renditionLockedBefore = true;
|
renditionLockedBefore = true;
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("Lock already exists for " + path);
|
logger.debug("Lock already exists for " + path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret.render(this, r);
|
ret.render(this, r);
|
||||||
allRets.remove(ret);
|
allRets.remove(ret);
|
||||||
@@ -247,10 +253,12 @@ import org.xml.sax.SAXException;
|
|||||||
avmLockService.removeLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
|
avmLockService.removeLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("Removed lock for " + path + " as it failed to generate");
|
logger.debug("Removed lock for " + path + " as it failed to generate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// render all renditions for newly added templates
|
// render all renditions for newly added templates
|
||||||
for (final RenderingEngineTemplate ret : allRets)
|
for (final RenderingEngineTemplate ret : allRets)
|
||||||
@@ -261,8 +269,10 @@ import org.xml.sax.SAXException;
|
|||||||
path = ret.getOutputPathForRendition(this, originalParentAvmPath, getName());
|
path = ret.getOutputPathForRendition(this, originalParentAvmPath, getName());
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("regenerating rendition of " + this.getPath() +
|
logger.debug("regenerating rendition of " + this.getPath() +
|
||||||
" at " + path + " using template " + ret);
|
" at " + path + " using template " + ret);
|
||||||
|
}
|
||||||
|
|
||||||
AVMLock lock = avmLockService.getLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
|
AVMLock lock = avmLockService.getLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
|
||||||
if (lock != null)
|
if (lock != null)
|
||||||
@@ -270,8 +280,10 @@ import org.xml.sax.SAXException;
|
|||||||
renditionLockedBefore = true;
|
renditionLockedBefore = true;
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("Lock already exists for " + path);
|
logger.debug("Lock already exists for " + path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result.add(new RegenerateResult(ret, path, ret.render(this, path)));
|
result.add(new RegenerateResult(ret, path, ret.render(this, path)));
|
||||||
}
|
}
|
||||||
@@ -285,14 +297,21 @@ import org.xml.sax.SAXException;
|
|||||||
avmLockService.removeLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
|
avmLockService.removeLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("Removed lock for " + path + " as it failed to generate");
|
logger.debug("Removed lock for " + path + " as it failed to generate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Rendition> getRenditions()
|
public List<Rendition> getRenditions()
|
||||||
|
{
|
||||||
|
return getRenditions(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Rendition> getRenditions(boolean includeDeleted)
|
||||||
{
|
{
|
||||||
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
|
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
|
||||||
final PropertyValue pv =
|
final PropertyValue pv =
|
||||||
@@ -304,24 +323,29 @@ import org.xml.sax.SAXException;
|
|||||||
final List<Rendition> result = new ArrayList<Rendition>(renditionPaths.size());
|
final List<Rendition> result = new ArrayList<Rendition>(renditionPaths.size());
|
||||||
for (Serializable path : renditionPaths)
|
for (Serializable path : renditionPaths)
|
||||||
{
|
{
|
||||||
if (avmService.lookup(-1, storeName + ':' + (String)path) == null)
|
String avmRenditionPath = AVMUtil.buildAVMPath(storeName, (String)path);
|
||||||
|
if (avmService.lookup(-1, avmRenditionPath, includeDeleted) == null)
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("ignoring dangling rendition at " + storeName + ':' + (String)path);
|
{
|
||||||
|
logger.debug("ignoring dangling rendition at: " + avmRenditionPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final Rendition r = new RenditionImpl(-1,
|
final Rendition r = new RenditionImpl(-1,
|
||||||
storeName + ':' + (String)path,
|
avmRenditionPath,
|
||||||
this.getFormsService());
|
this.getFormsService());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!this.equals(r.getPrimaryFormInstanceData()))
|
if (!this.equals(r.getPrimaryFormInstanceData(includeDeleted)))
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
logger.debug("rendition " + r +
|
logger.debug("rendition " + r +
|
||||||
" points at form instance data " + r.getPrimaryFormInstanceData() +
|
" points at form instance data " + r.getPrimaryFormInstanceData(includeDeleted) +
|
||||||
" instead of " + this + ". Not including in renditions list.");
|
" instead of " + this + ". Not including in renditions list.");
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -52,6 +52,10 @@ public interface Rendition
|
|||||||
public FormInstanceData getPrimaryFormInstanceData()
|
public FormInstanceData getPrimaryFormInstanceData()
|
||||||
throws FileNotFoundException;
|
throws FileNotFoundException;
|
||||||
|
|
||||||
|
/** the primary form instance data used to generate this rendition (include deleted AVM nodes) */
|
||||||
|
public FormInstanceData getPrimaryFormInstanceData(boolean includeDeleted)
|
||||||
|
throws FileNotFoundException;
|
||||||
|
|
||||||
/** the rendering engine template that generated this rendition */
|
/** the rendering engine template that generated this rendition */
|
||||||
public RenderingEngineTemplate getRenderingEngineTemplate();
|
public RenderingEngineTemplate getRenderingEngineTemplate();
|
||||||
|
|
||||||
|
@@ -136,6 +136,12 @@ import org.xml.sax.SAXException;
|
|||||||
|
|
||||||
public FormInstanceData getPrimaryFormInstanceData()
|
public FormInstanceData getPrimaryFormInstanceData()
|
||||||
throws FileNotFoundException
|
throws FileNotFoundException
|
||||||
|
{
|
||||||
|
return getPrimaryFormInstanceData(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormInstanceData getPrimaryFormInstanceData(boolean includeDeleted)
|
||||||
|
throws FileNotFoundException
|
||||||
{
|
{
|
||||||
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
|
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
|
||||||
final String fidAVMStoreRelativePath = (String)
|
final String fidAVMStoreRelativePath = (String)
|
||||||
@@ -145,7 +151,7 @@ import org.xml.sax.SAXException;
|
|||||||
String avmStore = AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond();
|
String avmStore = AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond();
|
||||||
avmStore = avmStore.substring(0, avmStore.indexOf(':'));
|
avmStore = avmStore.substring(0, avmStore.indexOf(':'));
|
||||||
final String path = avmStore + ':' + fidAVMStoreRelativePath;
|
final String path = avmStore + ':' + fidAVMStoreRelativePath;
|
||||||
if (avmService.lookup(-1, path) == null)
|
if (avmService.lookup(-1, path, includeDeleted) == null)
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException("unable to find primary form instance data " + path);
|
throw new FileNotFoundException("unable to find primary form instance data " + path);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user