mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge DEV\WCM_SERVICES2 to HEAD
12513 Implementation of Asset.getProperties 12469 Implement paths relative to web app. And unit tests. Asset Test is now clean of TODOs. 12413 Implementation of WCM Asset. Still work remaining but this is 80% of the implementation. 12404 WCM Services - asset service - fix rename/move folder issue (folders are not locked) - sandbox service - fix delete sandbox test 12374 WCM Services - optimise get/is web project 12347 WCM Services - "asset service" - add/remove/has aspect, get aspects 12341 WCM Services - "asset service" checkpoint (locking fixes, bulk import, more tests added) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12547 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,7 +29,6 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.util.ISO8601DateFormat;
|
||||
import org.alfresco.wcm.asset.AssetInfo;
|
||||
import org.alfresco.wcm.asset.AssetService;
|
||||
@@ -277,28 +276,37 @@ public class Sandbox implements Serializable
|
||||
/**
|
||||
* Get the specified asset (Either folder or file)
|
||||
* @param path the full path e.g. /www/web_apps/ROOT/index.html
|
||||
* @return the asset
|
||||
* @return the asset or null if it does not exist
|
||||
*/
|
||||
public Asset getAsset(String path)
|
||||
{
|
||||
AssetService as = getAssetService();
|
||||
AssetInfo item = as.getAsset(getSandboxRef(), path);
|
||||
Asset newAsset = new Asset(this, item);
|
||||
return newAsset;
|
||||
if (item != null)
|
||||
{
|
||||
Asset newAsset = new Asset(this, item);
|
||||
return newAsset;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the specified asset with a path relative to the specified web app.
|
||||
* @param path e.g. index.html
|
||||
* @param webApp e.g. ROOT
|
||||
* @return the asset
|
||||
* @return the asset or null if it does not exist
|
||||
*/
|
||||
public Asset getAssetWebApp(String webApp, String path)
|
||||
{
|
||||
AssetService as = getAssetService();
|
||||
AssetInfo item = as.getAssetWebApp(getSandboxRef(), webApp, path);
|
||||
Asset newAsset = new Asset(this, item);
|
||||
return newAsset;
|
||||
if (item != null)
|
||||
{
|
||||
Asset newAsset = new Asset(this, item);
|
||||
return newAsset;
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user