mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'release/V3.0' of https://git.alfresco.com/records-management/records-management into feature-3-0/RM-6577_AutomatedRestApiTests
This commit is contained in:
@@ -89,7 +89,7 @@ public abstract class BaseAPI
|
||||
private AlfrescoHttpClientFactory alfrescoHttpClientFactory;
|
||||
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
protected ContentService contentService;
|
||||
|
||||
public static final String NODE_REF_WORKSPACE_SPACES_STORE = "workspace://SpacesStore/";
|
||||
private static final String FILE_PLAN_PATH = "/Sites/rm/documentLibrary";
|
||||
|
@@ -44,7 +44,6 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.dataprep.AlfrescoHttpClient;
|
||||
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
|
||||
import org.alfresco.dataprep.ContentService;
|
||||
import org.alfresco.dataprep.UserService;
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.alfresco.rest.core.v0.RMEvents;
|
||||
@@ -97,9 +96,6 @@ public class RMRolesAndActionsAPI extends BaseAPI
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
|
||||
/**
|
||||
* Get all the configured RM roles.
|
||||
*
|
||||
|
@@ -28,14 +28,12 @@ package org.alfresco.rest.v0;
|
||||
|
||||
import static org.apache.http.HttpStatus.SC_OK;
|
||||
|
||||
import org.alfresco.dataprep.ContentService;
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -49,9 +47,6 @@ public class RecordFoldersAPI extends BaseAPI
|
||||
{
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RecordFoldersAPI.class);
|
||||
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
|
||||
/**
|
||||
* Close the record folder
|
||||
*
|
||||
|
@@ -33,7 +33,6 @@ import java.text.MessageFormat;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil.DocumentType;
|
||||
import org.alfresco.dataprep.ContentService;
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.apache.chemistry.opencmis.client.api.CmisObject;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
@@ -42,7 +41,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -59,9 +57,6 @@ public class RecordsAPI extends BaseAPI
|
||||
|
||||
private static final String CREATE_NON_ELECTRONIC_RECORD_API = "{0}type/rma:nonElectronicDocument/formprocessor";
|
||||
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
|
||||
/**
|
||||
* Declare documents as records
|
||||
*
|
||||
|
@@ -675,6 +675,8 @@ public class BaseRMRestTest extends RestTest
|
||||
this.wait(waitInMilliSeconds);
|
||||
} catch (InterruptedException e)
|
||||
{
|
||||
// Restore interrupted state...
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,6 +728,8 @@ public class BaseRMRestTest extends RestTest
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
// Restore interrupted state...
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,6 +779,8 @@ public class BaseRMRestTest extends RestTest
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
// Restore interrupted state...
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
result = searchApi.searchForNodePropertyAsUser(user.getUsername(), user.getPassword(), nodeRef,
|
||||
|
@@ -156,8 +156,8 @@ public class DeclareDocumentAsRecordTests extends BaseRMRestTest
|
||||
try
|
||||
(
|
||||
InputStream recordInputStream = getRestAPIFactory().getRecordsAPI().getRecordContent(record.getId()).asInputStream();
|
||||
InputStream documentInputStream = documentPostFiling.getContentStream().getStream();
|
||||
)
|
||||
InputStream documentInputStream = documentPostFiling.getContentStream().getStream()
|
||||
)
|
||||
{
|
||||
assertEquals(DigestUtils.sha1(recordInputStream), DigestUtils.sha1(documentInputStream));
|
||||
}
|
||||
|
@@ -775,7 +775,6 @@ public class RecordCategoryTests extends BaseRMRestTest
|
||||
{
|
||||
//is unfiled container
|
||||
containerId = getRestAPIFactory().getUnfiledContainersAPI().getUnfiledContainer(containerAlias).getId();
|
||||
;
|
||||
}
|
||||
|
||||
// Create a record folder
|
||||
|
@@ -269,7 +269,7 @@ public class ReadRecordTests extends BaseRMRestTest
|
||||
try
|
||||
(
|
||||
InputStream recordContentStream = recordsAPI.getRecordContent(binaryRecordId).asInputStream();
|
||||
FileInputStream localFileStream = new FileInputStream(getFile(IMAGE_FILE));
|
||||
FileInputStream localFileStream = new FileInputStream(getFile(IMAGE_FILE))
|
||||
)
|
||||
{
|
||||
assertEquals(DigestUtils.sha1(recordContentStream), DigestUtils.sha1(localFileStream));
|
||||
|
Reference in New Issue
Block a user