mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'master' into 'feature/RM-6302_EditDispositionSchedule'
Syncing with master See merge request records-management/records-management!985
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.7-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<name>Alfresco Records Management</name>
|
<name>Alfresco Records Management</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<version>2.7-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-automation</artifactId>
|
<artifactId>alfresco-rm-automation</artifactId>
|
||||||
<version>2.7-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -77,6 +77,7 @@ import org.alfresco.rest.search.RestRequestQueryModel;
|
|||||||
import org.alfresco.rest.search.SearchNodeModel;
|
import org.alfresco.rest.search.SearchNodeModel;
|
||||||
import org.alfresco.rest.search.SearchRequest;
|
import org.alfresco.rest.search.SearchRequest;
|
||||||
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
|
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
|
||||||
|
import org.alfresco.rest.v0.SearchAPI;
|
||||||
import org.alfresco.utility.data.DataUser;
|
import org.alfresco.utility.data.DataUser;
|
||||||
import org.alfresco.utility.model.ContentModel;
|
import org.alfresco.utility.model.ContentModel;
|
||||||
import org.alfresco.utility.model.FolderModel;
|
import org.alfresco.utility.model.FolderModel;
|
||||||
@@ -113,7 +114,11 @@ public class BaseRMRestTest extends RestTest
|
|||||||
@Autowired
|
@Autowired
|
||||||
@Getter(value = PROTECTED)
|
@Getter(value = PROTECTED)
|
||||||
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
|
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Getter(value = PROTECTED)
|
||||||
|
private SearchAPI searchApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asserts the given status code
|
* Asserts the given status code
|
||||||
*
|
*
|
||||||
@@ -505,7 +510,7 @@ public class BaseRMRestTest extends RestTest
|
|||||||
{
|
{
|
||||||
return getFilePlanAsUser(getAdminUser(), componentId);
|
return getFilePlanAsUser(getAdminUser(), componentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively delete a folder
|
* Recursively delete a folder
|
||||||
*
|
*
|
||||||
@@ -663,6 +668,46 @@ public class BaseRMRestTest extends RestTest
|
|||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns records search results for the given search term
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param term
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<String> searchForRMContentAsUser(UserModel user, String term, String expectedResult) throws Exception
|
||||||
|
{
|
||||||
|
List<String> results = new ArrayList<>();
|
||||||
|
// wait for solr indexing
|
||||||
|
int counter = 0;
|
||||||
|
int waitInMilliSeconds = 6000;
|
||||||
|
while (counter < 3)
|
||||||
|
{
|
||||||
|
results = searchApi.searchForRecordsAsUser(user.getUsername(), user.getPassword(), term);
|
||||||
|
if ((results != null && !results.isEmpty() && results.contains(expectedResult)))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
// double wait time to not overdo solr search
|
||||||
|
waitInMilliSeconds = (waitInMilliSeconds * 2);
|
||||||
|
synchronized (this)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.wait(waitInMilliSeconds);
|
||||||
|
} catch (InterruptedException e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method to return site document library content model
|
* Helper method to return site document library content model
|
||||||
*
|
*
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<version>2.7-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-community</artifactId>
|
<artifactId>alfresco-rm-community</artifactId>
|
||||||
<version>2.7-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-community</artifactId>
|
<artifactId>alfresco-rm-community</artifactId>
|
||||||
<version>2.7-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
Reference in New Issue
Block a user