mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
16030: Merged V3.1 to V3.2 16001: Merged V2.2 to V3.1 15999: Temp build/test (AVM permissions - testSimpleInternalLayer) 16223: WCM UI - simple perf improvement when displaying modified list (lock icon) 16472: Merged V3.1 to V3.2 16180: ETHREEOH-2821 - fix deployment of WCM layered (ie. across web project) file 16188: WCM - minor: display (localisable) "File" text (follow-on fix for r15970) 16255: WCM - ETHREEOH-2836 16257: AVM - minor updates to unit tests 16275: WCM - ETHREEOH-2844 16277: WCM - ETHREEOH-2829 - added simple unit test 16341: AVM - minor update to reuse core (path) utils 16344: Merged V2.2 to V3.1 16323: Fix ETWOTWO-1266 (unexpected AVM conflict) 16457: Fix ETHREEOH-2836 (WCM layered files) - follow-on fix, with additional unit test 16649: Fix ETHREEOH-1878 - configure WCM locking for CIFS/FTP 16654: Merged V3.1 to V3.2 16507: Fix ETHREEOH-2604 - update unsecured-public-services-security-context.xml.sample (to allow server to start) 16527: Fix ETHREEOH-2868 - can't submit removal of WCM layered file (Older version prevents update) 16607: AVM - additional tests when deleting LD + fix to avoid cycle 16612: AVM - console improvement (lsver, rmvers) to enable admin/support to list & purge snapshots between dates 16638: Fix ETHREEOH-2893 - stale WCM/AVM layered dir 16643: AVM - console improvement (setopacity) -> eg. to set stale/modifed WCM layered folder as opaque git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16895 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,6 +43,7 @@ import org.alfresco.model.ApplicationModel;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.action.executer.ImporterActionExecuter;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.avm.util.AVMUtil;
|
||||
import org.alfresco.repo.domain.PropertyValue;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
@@ -105,22 +106,11 @@ public class AssetServiceImpl implements AssetService
|
||||
this.virtServerRegistry = virtServerRegistry;
|
||||
}
|
||||
|
||||
|
||||
private String addLeadingSlash(String path)
|
||||
{
|
||||
if (path.charAt(0) != PATH_SEPARATOR)
|
||||
{
|
||||
path = PATH_SEPARATOR + path;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
private void checkMandatoryPath(String path)
|
||||
{
|
||||
ParameterCheck.mandatoryString("path", path);
|
||||
|
||||
if (path.indexOf(WCMUtil.AVM_STORE_SEPARATOR) != -1)
|
||||
if (path.indexOf(AVMUtil.AVM_STORE_SEPARATOR_CHAR) != -1)
|
||||
{
|
||||
throw new IllegalArgumentException("Unexpected path '"+path+"' - should not contain '"+WCMUtil.AVM_STORE_SEPARATOR+"'");
|
||||
}
|
||||
@@ -144,7 +134,7 @@ public class AssetServiceImpl implements AssetService
|
||||
|
||||
if (! isWebProjectStagingSandbox(sbStoreId))
|
||||
{
|
||||
parentFolderPathRelativeToWebApp = addLeadingSlash(parentFolderPathRelativeToWebApp);
|
||||
parentFolderPathRelativeToWebApp = AVMUtil.addLeadingSlash(parentFolderPathRelativeToWebApp);
|
||||
|
||||
String avmParentPath = WCMUtil.buildStoreWebappPath(sbStoreId, webApp) + parentFolderPathRelativeToWebApp;
|
||||
|
||||
@@ -165,9 +155,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("parentFolderPath", parentFolderPath);
|
||||
ParameterCheck.mandatoryString("name", name);
|
||||
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
|
||||
String avmParentPath = sbStoreId + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
String avmParentPath = AVMUtil.buildAVMPath(sbStoreId, parentFolderPath);
|
||||
|
||||
createFolderAVM(avmParentPath, name, properties);
|
||||
}
|
||||
@@ -208,7 +196,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("parentFolderPathRelativeToWebApp", parentFolderPathRelativeToWebApp);
|
||||
ParameterCheck.mandatoryString("name", name);
|
||||
|
||||
parentFolderPathRelativeToWebApp = addLeadingSlash(parentFolderPathRelativeToWebApp);
|
||||
parentFolderPathRelativeToWebApp = AVMUtil.addLeadingSlash(parentFolderPathRelativeToWebApp);
|
||||
|
||||
String avmParentPath = WCMUtil.buildStoreWebappPath(sbStoreId, webApp) + parentFolderPathRelativeToWebApp;
|
||||
|
||||
@@ -228,9 +216,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("parentFolderPath", parentFolderPath);
|
||||
ParameterCheck.mandatoryString("name", name);
|
||||
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
|
||||
String avmParentPath = sbStoreId + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
String avmParentPath = AVMUtil.buildAVMPath(sbStoreId, parentFolderPath);
|
||||
|
||||
createFileAVM(avmParentPath, name);
|
||||
|
||||
@@ -319,7 +305,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("webApp", webApp);
|
||||
ParameterCheck.mandatoryString("pathRelativeToWebApp", pathRelativeToWebApp);
|
||||
|
||||
pathRelativeToWebApp = addLeadingSlash(pathRelativeToWebApp);
|
||||
pathRelativeToWebApp = AVMUtil.addLeadingSlash(pathRelativeToWebApp);
|
||||
|
||||
String avmPath = WCMUtil.buildStoreWebappPath(sbStoreId, webApp) + pathRelativeToWebApp;
|
||||
|
||||
@@ -342,9 +328,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("sbStoreId", sbStoreId);
|
||||
ParameterCheck.mandatoryString("path", path);
|
||||
|
||||
path = addLeadingSlash(path);
|
||||
|
||||
String avmPath = sbStoreId + WCMUtil.AVM_STORE_SEPARATOR + path;
|
||||
String avmPath = AVMUtil.buildAVMPath(sbStoreId, path);
|
||||
|
||||
return getAssetAVM(version, avmPath, includeDeleted);
|
||||
}
|
||||
@@ -519,7 +503,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("webApp", webApp);
|
||||
ParameterCheck.mandatoryString("parentFolderPathRelativeToWebApp", parentFolderPathRelativeToWebApp);
|
||||
|
||||
parentFolderPathRelativeToWebApp = addLeadingSlash(parentFolderPathRelativeToWebApp);
|
||||
parentFolderPathRelativeToWebApp = AVMUtil.addLeadingSlash(parentFolderPathRelativeToWebApp);
|
||||
|
||||
String avmPath = WCMUtil.buildStoreWebappPath(sbStoreId, webApp) + parentFolderPathRelativeToWebApp;
|
||||
|
||||
@@ -534,9 +518,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("sbStoreId", sbStoreId);
|
||||
ParameterCheck.mandatoryString("parentFolderPath", parentFolderPath);
|
||||
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
|
||||
String avmPath = sbStoreId + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
String avmPath = AVMUtil.buildAVMPath(sbStoreId, parentFolderPath);
|
||||
|
||||
return listAssetsAVM(-1, avmPath, includeDeleted);
|
||||
}
|
||||
@@ -549,9 +531,7 @@ public class AssetServiceImpl implements AssetService
|
||||
ParameterCheck.mandatoryString("sbStoreId", sbStoreId);
|
||||
ParameterCheck.mandatoryString("parentFolderPath", parentFolderPath);
|
||||
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
|
||||
String avmPath = sbStoreId + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
String avmPath = AVMUtil.buildAVMPath(sbStoreId, parentFolderPath);
|
||||
|
||||
return listAssetsAVM(version, avmPath, includeDeleted);
|
||||
}
|
||||
@@ -606,7 +586,7 @@ public class AssetServiceImpl implements AssetService
|
||||
|
||||
if (! isWebProjectStagingSandbox(asset.getSandboxId()))
|
||||
{
|
||||
String avmParentPath = AVMNodeConverter.SplitBase(asset.getAvmPath())[0];
|
||||
String avmParentPath = AVMUtil.splitBase(asset.getAvmPath())[0];
|
||||
String oldName = asset.getName();
|
||||
|
||||
avmService.rename(avmParentPath, oldName, avmParentPath, newName);
|
||||
@@ -628,11 +608,9 @@ public class AssetServiceImpl implements AssetService
|
||||
|
||||
if (! isWebProjectStagingSandbox(asset.getSandboxId()))
|
||||
{
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
String avmDstPath = AVMUtil.buildAVMPath(asset.getSandboxId(), parentFolderPath);
|
||||
|
||||
String avmDstPath = asset.getSandboxId() + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
|
||||
String avmSrcPath = AVMNodeConverter.SplitBase(asset.getAvmPath())[0];
|
||||
String avmSrcPath = AVMUtil.splitBase(asset.getAvmPath())[0];
|
||||
String name = asset.getName();
|
||||
|
||||
avmService.rename(avmSrcPath, name, avmDstPath, name);
|
||||
@@ -654,9 +632,7 @@ public class AssetServiceImpl implements AssetService
|
||||
|
||||
if (! isWebProjectStagingSandbox(asset.getSandboxId()))
|
||||
{
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
|
||||
String avmDstParentPath = asset.getSandboxId() + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
String avmDstParentPath = AVMUtil.buildAVMPath(asset.getSandboxId(), parentFolderPath);
|
||||
|
||||
String avmSrcPath = asset.getAvmPath();
|
||||
String name = asset.getName();
|
||||
@@ -676,14 +652,12 @@ public class AssetServiceImpl implements AssetService
|
||||
{
|
||||
if (! isWebProjectStagingSandbox(sbStoreId))
|
||||
{
|
||||
parentFolderPath = addLeadingSlash(parentFolderPath);
|
||||
String avmDstPath = AVMUtil.buildAVMPath(sbStoreId, parentFolderPath);
|
||||
|
||||
String avmDstPath = sbStoreId + WCMUtil.AVM_STORE_SEPARATOR + parentFolderPath;
|
||||
|
||||
// convert the AVM path to a NodeRef so we can use the NodeService to perform import
|
||||
NodeRef importRef = AVMNodeConverter.ToNodeRef(-1, avmDstPath);
|
||||
processZipImport(zipFile, isHighByteZip, importRef);
|
||||
|
||||
|
||||
// After a bulk import, snapshot the store
|
||||
avmService.createSnapshot(sbStoreId, "Import of file: " + zipFile.getName(), null);
|
||||
|
||||
|
Reference in New Issue
Block a user