mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
minor updates of the java doc and code style
This commit is contained in:
@@ -67,6 +67,7 @@ public class HoldsAPI extends BaseAPI
|
||||
* The URI to add items to hold or to remove items from hold
|
||||
*/
|
||||
private static final String RM_HOLDS_API = "{0}rma/holds";
|
||||
|
||||
/**
|
||||
* The URI to get holds.
|
||||
*/
|
||||
@@ -118,7 +119,6 @@ public class HoldsAPI extends BaseAPI
|
||||
* @param description hold description
|
||||
* @return node ref of the hold created
|
||||
*/
|
||||
|
||||
public String createHoldAndGetNodeRef(String user, String password,
|
||||
String holdName, String reason, String description)
|
||||
{
|
||||
@@ -141,8 +141,6 @@ public class HoldsAPI extends BaseAPI
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deletes hold
|
||||
*
|
||||
@@ -203,7 +201,8 @@ public class HoldsAPI extends BaseAPI
|
||||
}
|
||||
|
||||
/**
|
||||
* Util method to create the request body used adding an item to hold or to remove items from hold
|
||||
* Util method to create the request body used when adding an item to holds or when removing an item from holds
|
||||
*
|
||||
* @param user user to create the request body for add/remove an item to/from hold
|
||||
* @param password the user's password
|
||||
* @param itemNodeRef node ref to be added to hold
|
||||
|
@@ -221,12 +221,10 @@ public class AddToHoldsTests extends BaseRMRestTest
|
||||
public void addValidNodesToHoldWithAllowedUser(String nodeId) throws Exception
|
||||
{
|
||||
STEP("Add node to hold with user with permission.");
|
||||
holdsAPI.addItemToHold(userAddHoldPermission.getUsername(), userAddHoldPermission.getPassword(),
|
||||
nodeId, HOLD);
|
||||
holdsAPI.addItemToHold(userAddHoldPermission.getUsername(), userAddHoldPermission.getPassword(), nodeId, HOLD);
|
||||
|
||||
STEP("Check the node is frozen.");
|
||||
assertTrue(hasAspect(nodeId, FROZEN_ASPECT));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,8 +282,7 @@ public class AddToHoldsTests extends BaseRMRestTest
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test (dataProvider = "userWithoutPermissionForAddToHold")
|
||||
public void addContentToHoldWithUserWithoutHoldPermission(UserModel userModel, String nodeToBeAddedToHold) throws
|
||||
Exception
|
||||
public void addContentToHoldWithUserWithoutHoldPermission(UserModel userModel, String nodeToBeAddedToHold) throws Exception
|
||||
{
|
||||
users.add(userModel);
|
||||
STEP("Add the node to the hold with user without permission.");
|
||||
@@ -295,10 +292,8 @@ public class AddToHoldsTests extends BaseRMRestTest
|
||||
|
||||
STEP("Check the node is not frozen.");
|
||||
assertFalse(hasAspect(nodeToBeAddedToHold,FROZEN_ASPECT));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider with invalid node types that can be added to a hold
|
||||
*/
|
||||
@@ -319,7 +314,7 @@ public class AddToHoldsTests extends BaseRMRestTest
|
||||
//transfer container
|
||||
{ getTransferContainer(TRANSFERS_ALIAS).getId(), SC_BAD_REQUEST, INVALID_TYPE_ERROR_MESSAGE },
|
||||
// a record category
|
||||
{ category.getId(), SC_INTERNAL_SERVER_ERROR, ACCESS_DENIED_ERROR_MESSAGE },
|
||||
{ category.getId(), SC_BAD_REQUEST, INVALID_TYPE_ERROR_MESSAGE },
|
||||
// unfiled records root
|
||||
{ getUnfiledContainer(UNFILED_RECORDS_CONTAINER_ALIAS).getId(), SC_BAD_REQUEST,
|
||||
INVALID_TYPE_ERROR_MESSAGE },
|
||||
|
@@ -80,7 +80,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
contentHeld = dataContent.usingAdmin().usingSite(testSite)
|
||||
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
|
||||
|
||||
STEP("Add the content to the hold.");
|
||||
STEP("Add the file to the hold.");
|
||||
holdsAPI.addItemToHold(getAdminUser().getUsername(), getAdminUser().getPassword(), contentHeld
|
||||
.getNodeRefWithoutVersion(), HOLD_ONE);
|
||||
|
||||
@@ -91,6 +91,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
folderModel = dataContent.usingAdmin().usingSite(testSite)
|
||||
.createFolder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given active content on hold
|
||||
* When I try to edit the properties
|
||||
@@ -108,7 +109,6 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
STEP("Check the request failed.");
|
||||
restClient.assertStatusCodeIs(FORBIDDEN);
|
||||
restClient.assertLastError().containsSummary("Frozen nodes can not be updated.");
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -126,8 +126,8 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
STEP("Check the request failed.");
|
||||
restClient.assertStatusCodeIs(FORBIDDEN);
|
||||
restClient.assertLastError().containsSummary("Frozen nodes can not be updated.");
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Given active content on hold
|
||||
* When I try to delete the content
|
||||
@@ -142,7 +142,6 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
STEP("Check the request failed.");
|
||||
restClient.assertStatusCodeIs(FORBIDDEN);
|
||||
restClient.assertLastError().containsSummary("Frozen nodes can not be deleted.");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,7 +185,6 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
||||
{
|
||||
holdsAPI.deleteHold(getAdminUser().getUsername(), getAdminUser().getPassword(), HOLD_ONE);
|
||||
dataSite.usingAdmin().deleteSite(testSite);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ public class RemoveFromHoldsTests extends BaseRMRestTest
|
||||
contentAddToManyHolds = dataContent.usingSite(testSite)
|
||||
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
|
||||
|
||||
STEP("Add the content to the holds.");
|
||||
STEP("Add content to the holds.");
|
||||
holdsAPI.addItemToHold(getAdminUser().getUsername(), getAdminUser().getPassword(), contentHeld
|
||||
.getNodeRefWithoutVersion(), HOLD_ONE);
|
||||
holdsAPI.addItemToHold(getAdminUser().getUsername(), getAdminUser().getPassword(), contentAddToManyHolds
|
||||
@@ -194,7 +194,7 @@ public class RemoveFromHoldsTests extends BaseRMRestTest
|
||||
|
||||
/**
|
||||
* Data provider with user without right permission or capability to remove from hold a specific node
|
||||
* @return
|
||||
* @return user model and the node ref to be removed from hold
|
||||
* @throws Exception
|
||||
*/
|
||||
@DataProvider (name = "userWithoutPermissionForRemoveFromHold")
|
||||
@@ -263,7 +263,6 @@ public class RemoveFromHoldsTests extends BaseRMRestTest
|
||||
|
||||
STEP("Check node is frozen.");
|
||||
assertTrue(hasAspect(nodeIdToBeRemoved, FROZEN_ASPECT));
|
||||
|
||||
}
|
||||
|
||||
@AfterClass (alwaysRun = true)
|
||||
|
Reference in New Issue
Block a user