Merged BRANCHES/DEV/V3.4-BUG-FIX to HEAD:

23654: Fix for ALF-5359: System error after open Summary page of Regenerate Renditions Wizard
   24757: Merged BRANCHES/V3.4 to BRANCHES/DEV/V3.4-BUG-FIX:
        24756: Fix for ALF-6269: WebForm (Edit Web Content Wizard) ERROR on Alfresco Community Edition 3.4.b and 3.4.c
   23964: Re-implemented fix for ALF-5783: Not possible to override the output path pattern anymore when a webform is edited for a specific website

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@24770 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2011-01-11 15:08:41 +00:00
parent 0ba6c8b2a9
commit d06e3a7b5e
3 changed files with 42 additions and 15 deletions

View File

@@ -234,18 +234,18 @@ public class EditWebContentWizard extends CreateWebContentWizard
if (rr.getLockOwner() != null)
{
this.existingLocks.add(path);
}
String renditionStoreId = AVMUtil.getStoreId(path);
String renditionStorePath = AVMUtil.getStoreRelativePath(path);
String renditionStoreName = AVMUtil.getCorrespondingMainStoreName(AVMUtil.getStoreName(path));
Map<String, String> renditionlockData = this.getAvmLockingService().getLockData(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
renditionlockData.put(WCMUtil.LOCK_KEY_STORE_NAME, renditionStoreName);
if (logger.isDebugEnabled())
logger.debug("transferring lock for " + path + " back to " + renditionStoreName);
this.getAvmLockingService().modifyLock(renditionStoreId, renditionStorePath, lockOwner, renditionStoreId, renditionStorePath, renditionlockData);
String renditionStoreId = AVMUtil.getStoreId(path);
String renditionStorePath = AVMUtil.getStoreRelativePath(path);
String renditionStoreName = AVMUtil.getCorrespondingMainStoreName(AVMUtil.getStoreName(path));
Map<String, String> renditionlockData = this.getAvmLockingService().getLockData(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
renditionlockData.put(WCMUtil.LOCK_KEY_STORE_NAME, renditionStoreName);
if (logger.isDebugEnabled())
logger.debug("transferring lock for " + path + " back to " + renditionStoreName);
this.getAvmLockingService().modifyLock(renditionStoreId, renditionStorePath, lockOwner, renditionStoreId, renditionStorePath, renditionlockData);
}
}
}
}

View File

@@ -45,6 +45,7 @@ import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.bean.wcm.WebProject;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
@@ -62,11 +63,21 @@ import org.xml.sax.SAXException;
private static final Log logger = LogFactory.getLog(RenditionImpl.class);
private final NodeRef nodeRef;
private final WebProject webProject;
private transient FormsService formsService;
/* package */ FormInstanceDataImpl(final NodeRef nodeRef,
final FormsService formsService)
final FormsService formsService)
{
this(nodeRef, formsService, null);
}
/* package */ FormInstanceDataImpl(final NodeRef nodeRef,
final FormsService formsService,
final WebProject webProject)
{
this.webProject = webProject;
if (nodeRef == null)
{
throw new NullPointerException();
@@ -145,6 +156,11 @@ import org.xml.sax.SAXException;
// TODO - forms should be identified by nodeRef rather than name (which can be non-unique)
if (getNodeRef().getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
{
if (webProject != null)
{
return webProject.getForm(parentFormName);
}
return this.getFormsService().getWebForm(parentFormName);
}
else
@@ -154,6 +170,11 @@ import org.xml.sax.SAXException;
}
catch (FormNotFoundException fnfe)
{
if (webProject != null)
{
throw new FormNotFoundException(parentFormName, webProject, this);
}
throw new FormNotFoundException(parentFormName, this);
}
}
@@ -279,9 +300,12 @@ import org.xml.sax.SAXException;
String storePath = AVMUtil.getStoreRelativePath(path);
String storeName = AVMUtil.getStoreName(path);
lockOwner = avmLockService.getLockOwner(storeId, storePath);
Map<String, String> lockData = avmLockService.getLockData(storeId, storePath);
currentLockStore = lockData.get(WCMUtil.LOCK_KEY_STORE_NAME);
if (lockData != null)
{
lockOwner = avmLockService.getLockOwner(storeId, storePath);
currentLockStore = lockData.get(WCMUtil.LOCK_KEY_STORE_NAME);
}
if (lockOwner != null)
{

View File

@@ -297,10 +297,13 @@ public final class FormsService
public FormInstanceData getFormInstanceData(final NodeRef nodeRef) throws FormNotFoundException
{
final String avmPath = AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond();
final WebProject webProject = new WebProject(avmPath);
FormInstanceData fid = null;
try
{
fid = new FormInstanceDataImpl(nodeRef, this);
fid = new FormInstanceDataImpl(nodeRef, this, webProject);
return fid;
}
catch (IllegalArgumentException iae)