mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
Merge WCM_SERVICES2 to HEAD 12236 Implementation of REST WCM Revert
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12308 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
ea7876203e
commit
d24b54b4e6
@ -149,7 +149,9 @@ public class Asset
|
||||
*/
|
||||
public void revert()
|
||||
{
|
||||
//getSandboxService().revertList(getSandbox().getSandboxRef(), items);
|
||||
List<String> items = new ArrayList<String>(1);
|
||||
items.add(this.getPath());
|
||||
getSandboxService().revertList(getSandbox().getSandboxRef(), items);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,6 +38,9 @@ import org.alfresco.wcm.webproject.script.WebProject;
|
||||
|
||||
/**
|
||||
* Sandbox object to expose via JavaScript
|
||||
*
|
||||
* Provides access to the sandbox metadata and its collection of assets.
|
||||
*
|
||||
* @author mrogers
|
||||
*
|
||||
*/
|
||||
@ -90,6 +93,36 @@ public class Sandbox implements Serializable
|
||||
{
|
||||
getSandboxService().submitAll(getSandboxRef(), submitLabel, submitComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert the specified assets (files and directories) modified contents of this sandbox
|
||||
*/
|
||||
public void revertAssets(Asset[] files)
|
||||
{
|
||||
List<String> items = new ArrayList<String>(files.length);
|
||||
|
||||
for(int i = 0; i < files.length; i++)
|
||||
{
|
||||
items.add(i, files[i].getPath());
|
||||
}
|
||||
|
||||
getSandboxService().revertList(getSandboxRef(), items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert the specified files and directories modified contents of this sandbox
|
||||
*/
|
||||
public void revert(String[] files)
|
||||
{
|
||||
List<String> items = new ArrayList<String>(files.length);
|
||||
|
||||
for(int i = 0; i < files.length; i++)
|
||||
{
|
||||
items.add(i, files[i]);
|
||||
}
|
||||
|
||||
getSandboxService().revertList(getSandboxRef(), items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit the specified assets (files and directories) modified contents of this sandbox
|
||||
@ -144,14 +177,15 @@ public class Sandbox implements Serializable
|
||||
getSandboxService().revertWebApp(getSandboxRef(), webApp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the snapshots
|
||||
* @param includeSystemGenerated
|
||||
*/
|
||||
public void getSnapshots(boolean includeSystemGenerated)
|
||||
{
|
||||
getSandboxService().listSnapshots(getSandboxRef(), includeSystemGenerated);
|
||||
}
|
||||
// /**
|
||||
// * Get the snapshots, Version Descriptors
|
||||
// * @param includeSystemGenerated
|
||||
// */
|
||||
// public void getSnapshots(boolean includeSystemGenerated)
|
||||
// {
|
||||
// //TODO - What is returned?
|
||||
// getSandboxService().listSnapshots(getSandboxRef(), includeSystemGenerated);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Get the unique reference for this sandbox
|
||||
|
Loading…
x
Reference in New Issue
Block a user