mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126542 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 123495 jvonka: Nodes (FileFolder) API - add optional relativePath (to make folders) when creating a folder, empty file or other custom node RA-703 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126887 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,8 @@ import static org.junit.Assert.assertTrue;
|
||||
/**
|
||||
* Representation of a node - initially for client tests for Nodes (aka File Folder) API
|
||||
*
|
||||
* TODO push null check down into AssertUtil (making sure that no other existing tests break)
|
||||
*
|
||||
* @author janv
|
||||
*/
|
||||
public class Node
|
||||
@@ -65,6 +67,8 @@ public class Node
|
||||
|
||||
protected List<String> allowableOperations;
|
||||
|
||||
protected String relativePath; // optionally used in create node request
|
||||
|
||||
public Node()
|
||||
{
|
||||
}
|
||||
@@ -219,6 +223,16 @@ public class Node
|
||||
this.allowableOperations = allowableOperations;
|
||||
}
|
||||
|
||||
public String getRelativePath()
|
||||
{
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
public void setRelativePath(String relativePath)
|
||||
{
|
||||
this.relativePath = relativePath;
|
||||
}
|
||||
|
||||
public void expected(Object o)
|
||||
{
|
||||
Node other = (Node) o;
|
||||
@@ -336,5 +350,14 @@ public class Node
|
||||
{
|
||||
assertNull(other.getAllowableOperations());
|
||||
}
|
||||
|
||||
if (relativePath != null)
|
||||
{
|
||||
assertEquals(relativePath, other.getRelativePath());
|
||||
}
|
||||
else
|
||||
{
|
||||
assertNull(other.getRelativePath());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user