mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-11-12 15:39:46 +00:00
Compare commits
10 Commits
18.4
...
APPS-1821-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06871bce8a | ||
|
|
58e595ce13 | ||
|
|
333a7dca98 | ||
|
|
0c810f5e80 | ||
|
|
4d930a6f18 | ||
|
|
ff68f92455 | ||
|
|
c88353ccb7 | ||
|
|
6b94ee41d4 | ||
|
|
a414aa3064 | ||
|
|
7914e87f77 |
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -71,7 +71,7 @@ ModuleDetails shareServicesModule = moduleService.getModule("alfresco-share-serv
|
||||
</div>
|
||||
|
||||
<div class="index-list">
|
||||
<h4><%=descriptorService.getServerDescriptor().getEdition()%> - <%=descriptorService.getServerDescriptor().getVersion()%></h4>
|
||||
<h4><%=descriptorService.getServerDescriptor().getEdition()%></h4>
|
||||
<p></p>
|
||||
<p><a href="http://docs.alfresco.com/">Online Documentation</a></p>
|
||||
<p></p>
|
||||
|
||||
6
pom.xml
6
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<dependency.jackson.version>2.14.0-rc1</dependency.jackson.version>
|
||||
<dependency.cxf.version>3.5.3</dependency.cxf.version>
|
||||
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
||||
<dependency.webscripts.version>8.32</dependency.webscripts.version>
|
||||
<dependency.webscripts.version>8.33</dependency.webscripts.version>
|
||||
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
|
||||
<dependency.mockito-core.version>4.6.1</dependency.mockito-core.version>
|
||||
<dependency.assertj.version>3.23.1</dependency.assertj.version>
|
||||
@@ -149,7 +149,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>18.4</tag>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -3,12 +3,13 @@ function main()
|
||||
// Get the args
|
||||
var siteShortName = url.templateArgs.shortname,
|
||||
site = siteService.getSite(siteShortName),
|
||||
filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]",
|
||||
maxResults = (args.maxResults == null) ? 10 : parseInt(args.maxResults, 10),
|
||||
authorityType = args.authorityType,
|
||||
zone = args.zone,
|
||||
sortBy = args.sortBy,
|
||||
sortAsc = args.dir != "desc";
|
||||
|
||||
var filter;
|
||||
|
||||
|
||||
if (authorityType != null)
|
||||
@@ -28,6 +29,7 @@ function main()
|
||||
|
||||
if (authorityType == null || authorityType == "USER")
|
||||
{
|
||||
filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]";
|
||||
// Get the collection of people
|
||||
peopleFound = sortBy != null ? people.getPeople(filter, maxResults, sortBy, sortAsc) : people.getPeople(filter, maxResults);
|
||||
|
||||
@@ -67,6 +69,7 @@ function main()
|
||||
|
||||
if (authorityType == null || authorityType == "GROUP")
|
||||
{
|
||||
filter = (args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "";
|
||||
// Get the collection of groups
|
||||
paging = utils.createPaging(maxResults, -1);
|
||||
groupsFound = groups.getGroupsInZone(filter, zone, paging, "displayName");
|
||||
@@ -96,4 +99,4 @@ function contains(arr, value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
main();
|
||||
main();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>18.4</version>
|
||||
<version>18.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
*/
|
||||
package org.alfresco.repo.content.transform;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
@@ -44,9 +48,6 @@ import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* Client class that transfers content (from a ContentReader) to a remote transformation agent together with
|
||||
* request parameters that will be used to transform the content. The transformed content is then returned and
|
||||
@@ -86,44 +87,33 @@ public class RemoteTransformerClient
|
||||
}
|
||||
|
||||
public void request(ContentReader reader, ContentWriter writer, String sourceMimetype, String sourceExtension,
|
||||
String targetExtension, long timeoutMs, Log logger, String... args)
|
||||
String targetExtension, long timeoutMs, Log logger, String... args)
|
||||
{
|
||||
|
||||
if (args.length % 2 != 0)
|
||||
{
|
||||
throw new IllegalArgumentException("There should be a value for each request property");
|
||||
}
|
||||
|
||||
StringJoiner sj = new StringJoiner(" ");
|
||||
HttpEntity reqEntity = getRequestEntity(reader, sourceMimetype, sourceExtension, targetExtension, timeoutMs, args, sj);
|
||||
|
||||
request(logger, sourceExtension, targetExtension, reqEntity, writer, sj.toString());
|
||||
try (InputStream contentStream = reader.getContentInputStream())
|
||||
{
|
||||
HttpEntity reqEntity = getRequestEntity(contentStream, sourceMimetype, sourceExtension, targetExtension, timeoutMs,
|
||||
args, sj);
|
||||
|
||||
request(logger, sourceExtension, targetExtension, reqEntity, writer, sj.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Failed to read content from reader", e);
|
||||
}
|
||||
}
|
||||
|
||||
HttpEntity getRequestEntity(ContentReader reader, String sourceMimetype, String sourceExtension,
|
||||
String targetExtension, long timeoutMs, String[] args, StringJoiner sj)
|
||||
HttpEntity getRequestEntity(ContentReader reader, String sourceMimetype, String sourceExtension, String targetExtension,
|
||||
long timeoutMs, String[] args, StringJoiner sj)
|
||||
{
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
ContentType contentType = ContentType.create(sourceMimetype);
|
||||
builder.addBinaryBody("file", reader.getContentInputStream(), contentType, "tmp."+sourceExtension);
|
||||
builder.addTextBody("targetExtension", targetExtension);
|
||||
sj.add("targetExtension" + '=' + targetExtension);
|
||||
for (int i=0; i< args.length; i+=2)
|
||||
{
|
||||
if (args[i+1] != null)
|
||||
{
|
||||
builder.addTextBody(args[i], args[i + 1]);
|
||||
|
||||
sj.add(args[i] + '=' + args[i + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (timeoutMs > 0)
|
||||
{
|
||||
String timeoutMsString = Long.toString(timeoutMs);
|
||||
builder.addTextBody("timeout", timeoutMsString);
|
||||
sj.add("timeout=" + timeoutMsString);
|
||||
}
|
||||
return builder.build();
|
||||
return getRequestEntity(reader.getContentInputStream(), sourceMimetype, sourceExtension, targetExtension, timeoutMs, args, sj);
|
||||
}
|
||||
|
||||
void request(Log logger, String sourceExtension, String targetExtension, HttpEntity reqEntity, ContentWriter writer, String args)
|
||||
@@ -331,6 +321,33 @@ public class RemoteTransformerClient
|
||||
return httpclient.execute(httpGet);
|
||||
}
|
||||
|
||||
private HttpEntity getRequestEntity(InputStream contentStream, String sourceMimetype, String sourceExtension,
|
||||
String targetExtension, long timeoutMs, String[] args, StringJoiner sj)
|
||||
{
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
ContentType contentType = ContentType.create(sourceMimetype);
|
||||
builder.addBinaryBody("file", contentStream, contentType, "tmp." + sourceExtension);
|
||||
builder.addTextBody("targetExtension", targetExtension);
|
||||
sj.add("targetExtension" + '=' + targetExtension);
|
||||
for (int i = 0; i < args.length; i += 2)
|
||||
{
|
||||
if (args[i + 1] != null)
|
||||
{
|
||||
builder.addTextBody(args[i], args[i + 1]);
|
||||
|
||||
sj.add(args[i] + '=' + args[i + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (timeoutMs > 0)
|
||||
{
|
||||
String timeoutMsString = Long.toString(timeoutMs);
|
||||
builder.addTextBody("timeout", timeoutMsString);
|
||||
sj.add("timeout=" + timeoutMsString);
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
// Strip out just the error message in the response
|
||||
private String getErrorMessage(HttpEntity resEntity) throws IOException
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user