mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
118880 jkaabimofrad: Fixed test failure . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126353 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -63,7 +63,7 @@ import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
* A http client for talking to the rest apis. The caller can pass in a rest api
|
||||
* implementation class to the http method (get, post, put, delete supported)
|
||||
* and the url will be generated.
|
||||
*
|
||||
*
|
||||
* @author steveglover
|
||||
*/
|
||||
public class PublicApiHttpClient
|
||||
@@ -72,7 +72,7 @@ public class PublicApiHttpClient
|
||||
|
||||
private static final String OLD_BASE_URL = "{0}://{1}:{2}{3}{4}{5}/api/";
|
||||
private static final String INDEX_URL = "{0}://{1}:{2}{3}{4}";
|
||||
private static final String BASE_URL = "{0}://{1}:{2}{3}{4}{5}/{6}/{7}/versions/{8}/";
|
||||
private static final String BASE_URL = "{0}://{1}:{2}{3}{4}{5}/{6}/{7}/versions/{8}";
|
||||
private static final String PUBLICAPI_CMIS_SERVICE_URL = "{0}://{1}:{2}{3}{4}cmis/versions/{5}/{6}";
|
||||
private static final String PUBLICAPI_CMIS_URL = "{0}://{1}:{2}{3}{4}{5}/{6}/cmis/versions/{7}/{8}";
|
||||
private static final String PUBLICAPI_CMIS_URL_SUFFIX = "{0}/{1}/cmis/versions/{2}/{3}";
|
||||
@@ -617,20 +617,21 @@ public class PublicApiHttpClient
|
||||
String relationEntityIdString = encodeToString(relationEntityId);
|
||||
String collectionEntityIdString = encodeToString(collectionEntityId);
|
||||
|
||||
sb.append('/');
|
||||
sb.append(entityCollectionName);
|
||||
sb.append("/");
|
||||
sb.append('/');
|
||||
if (collectionEntityIdString != null)
|
||||
{
|
||||
sb.append(collectionEntityIdString);
|
||||
sb.append("/");
|
||||
sb.append('/');
|
||||
}
|
||||
|
||||
sb.append(relationshipCollectionName);
|
||||
sb.append("/");
|
||||
sb.append('/');
|
||||
if (relationEntityIdString != null)
|
||||
{
|
||||
sb.append(relationEntityIdString);
|
||||
sb.append("/");
|
||||
sb.append('/');
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -640,12 +641,13 @@ public class PublicApiHttpClient
|
||||
{
|
||||
String collectionEntityIdString = encodeToString(collectionEntityId);
|
||||
|
||||
sb.append('/');
|
||||
sb.append(entityCollectionName);
|
||||
sb.append("/");
|
||||
sb.append('/');
|
||||
if (collectionEntityIdString != null)
|
||||
{
|
||||
sb.append(collectionEntityIdString);
|
||||
sb.append("/");
|
||||
sb.append('/');
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -691,6 +693,7 @@ public class PublicApiHttpClient
|
||||
|
||||
if (collectionName != null)
|
||||
{
|
||||
sb.append('/');
|
||||
sb.append(collectionName);
|
||||
if (collectionEntityId != null)
|
||||
{
|
||||
@@ -701,10 +704,7 @@ public class PublicApiHttpClient
|
||||
|
||||
if (relationName != null)
|
||||
{
|
||||
if (!sb.toString().endsWith("/"))
|
||||
{
|
||||
sb.append('/');
|
||||
}
|
||||
sb.append('/');
|
||||
sb.append(relationName);
|
||||
if (relationEntityId != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user