mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
125356 gjames: RA-917 Success code for restore operation should be 200 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126619 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
|||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ public class TrashcanEntityResource implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation("restore")
|
@Operation("restore")
|
||||||
@WebApiDescription(title = "Restore deleted Node", description="Restores an archived node")
|
@WebApiDescription(title = "Restore deleted Node", description="Restores an archived node",successStatus = HttpServletResponse.SC_OK)
|
||||||
public Node restoreDeletedNode(String nodeId, Void ignored, Parameters parameters, WithResponse withResponse)
|
public Node restoreDeletedNode(String nodeId, Void ignored, Parameters parameters, WithResponse withResponse)
|
||||||
{
|
{
|
||||||
return deletedNodes.restoreArchivedNode(nodeId);
|
return deletedNodes.restoreArchivedNode(nodeId);
|
||||||
|
@@ -174,7 +174,7 @@ public class DeletedNodesTest extends AbstractSingleNetworkSiteTest
|
|||||||
delete(URL_NODES, u1.getId(), documentSameName.getId(), 204);
|
delete(URL_NODES, u1.getId(), documentSameName.getId(), 204);
|
||||||
|
|
||||||
//Now we can restore it.
|
//Now we can restore it.
|
||||||
post(URL_DELETED_NODES+"/"+document.getId()+"/restore", u1.getId(), null, null, 201);
|
post(URL_DELETED_NODES+"/"+document.getId()+"/restore", u1.getId(), null, null, 200);
|
||||||
|
|
||||||
delete(URL_NODES, u1.getId(), createdFolder.getId(), 204);
|
delete(URL_NODES, u1.getId(), createdFolder.getId(), 204);
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ public class DeletedNodesTest extends AbstractSingleNetworkSiteTest
|
|||||||
|
|
||||||
//User 2 can't restore it but user 1 can.
|
//User 2 can't restore it but user 1 can.
|
||||||
post(URL_DELETED_NODES+"/"+createdFolder.getId()+"/restore", u2.getId(), null, null, Status.STATUS_FORBIDDEN);
|
post(URL_DELETED_NODES+"/"+createdFolder.getId()+"/restore", u2.getId(), null, null, Status.STATUS_FORBIDDEN);
|
||||||
post(URL_DELETED_NODES+"/"+createdFolder.getId()+"/restore", u1.getId(), null, null, 201);
|
post(URL_DELETED_NODES+"/"+createdFolder.getId()+"/restore", u1.getId(), null, null, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user