mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
MNT-18806 Remove some raw Exceptions from REST test framework.
This commit is contained in:
@@ -196,9 +196,9 @@ public class BaseRMRestTest extends RestTest
|
||||
* @param userModel The user under whose privileges this structure is going to be created
|
||||
* @param categoryName The name of the category
|
||||
* @return The created category
|
||||
* @throws Exception on unsuccessful component creation
|
||||
* @throws RuntimeException on unsuccessful component creation
|
||||
*/
|
||||
public RecordCategory createRootCategory(UserModel userModel, String categoryName) throws Exception
|
||||
public RecordCategory createRootCategory(UserModel userModel, String categoryName)
|
||||
{
|
||||
return createRootCategory(userModel, categoryName, RECORD_CATEGORY_TITLE);
|
||||
}
|
||||
@@ -223,9 +223,9 @@ public class BaseRMRestTest extends RestTest
|
||||
* @param categoryName The name of the category
|
||||
* @param categoryTitle The title of the category
|
||||
* @return The created category
|
||||
* @throws Exception on unsuccessful component creation
|
||||
* @throws RuntimeException on unsuccessful component creation
|
||||
*/
|
||||
public RecordCategory createRootCategory(UserModel userModel, String categoryName, String categoryTitle) throws Exception
|
||||
public RecordCategory createRootCategory(UserModel userModel, String categoryName, String categoryTitle)
|
||||
{
|
||||
RecordCategory recordCategoryModel = createRecordCategoryModel(categoryName, categoryTitle);
|
||||
return getRestAPIFactory().getFilePlansAPI(userModel).createRootRecordCategory(recordCategoryModel, FILE_PLAN_ALIAS);
|
||||
@@ -294,9 +294,9 @@ public class BaseRMRestTest extends RestTest
|
||||
* @param recordCategoryId The id of the record category
|
||||
* @param name The name of the folder
|
||||
* @return The created folder
|
||||
* @throws Exception on unsuccessful component creation
|
||||
* @throws RuntimeException on unsuccessful component creation
|
||||
*/
|
||||
public RecordCategoryChild createFolder(UserModel user, String recordCategoryId, String name) throws Exception
|
||||
public RecordCategoryChild createFolder(UserModel user, String recordCategoryId, String name)
|
||||
{
|
||||
RecordCategoryChild recordFolderModel = createRecordCategoryChildModel(name, RECORD_FOLDER_TYPE);
|
||||
return getRestAPIFactory().getRecordCategoryAPI(user).createRecordCategoryChild(recordFolderModel, recordCategoryId);
|
||||
@@ -434,13 +434,13 @@ public class BaseRMRestTest extends RestTest
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create a randomly-named <category>/<folder> structure in file plan
|
||||
* Helper method to create a randomly-named [category]/[folder] structure in file plan
|
||||
*
|
||||
* @param user The user under whose privileges this structure is going to be created
|
||||
* @return {@link RecordCategoryChild} which represents the record folder
|
||||
* @throws Exception on failed creation
|
||||
* @throws RuntimeException on failed creation
|
||||
*/
|
||||
public RecordCategoryChild createCategoryFolderInFilePlan(UserModel user) throws Exception
|
||||
public RecordCategoryChild createCategoryFolderInFilePlan(UserModel user)
|
||||
{
|
||||
// create root category
|
||||
RecordCategory recordCategory = createRootCategory(user, "Category " + getRandomAlphanumeric());
|
||||
@@ -450,12 +450,12 @@ public class BaseRMRestTest extends RestTest
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create a randomly-named <category>/<folder> structure in file plan as the admin user
|
||||
* Helper method to create a randomly-named [category]/[folder] structure in file plan as the admin user
|
||||
*
|
||||
* @return {@link RecordCategoryChild} which represents the record folder
|
||||
* @throws Exception on failed creation
|
||||
* @throws RuntimeException on failed creation
|
||||
*/
|
||||
public RecordCategoryChild createCategoryFolderInFilePlan() throws Exception
|
||||
public RecordCategoryChild createCategoryFolderInFilePlan()
|
||||
{
|
||||
return createCategoryFolderInFilePlan(getAdminUser());
|
||||
}
|
||||
|
Reference in New Issue
Block a user