mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Removed the Environment from the Publishing REST API methods.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28939 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<webscript>
|
||||
<shortname>Query Publishing Events</shortname>
|
||||
<description>Queries for Publishing Events on an Environment.</description>
|
||||
<url>/api/publishing/{site_id}/{environment_id}/events/query</url>
|
||||
<url>/api/publishing/{site_id}/events/query</url>
|
||||
<format default="json"/>
|
||||
<authentication>user</authentication>
|
||||
@@ -12,10 +11,6 @@
|
||||
<shortname>site_id</shortname>
|
||||
<description>The id of the site to query.</description>
|
||||
</arg>
|
||||
<arg>
|
||||
<shortname>environment_id</shortname>
|
||||
<description>The id of the environment to query.</description>
|
||||
</arg>
|
||||
</args>
|
||||
<requests>
|
||||
<request>
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<webscript>
|
||||
<shortname>Post Content to Publishing Queue</shortname>
|
||||
<description>Place a new Publishing Event on the Publishing Queue for the specified Environment.</description>
|
||||
<url>/api/publishing/{site_id}/{environment_id}/queue</url>
|
||||
<url>/api/publishing/{site_id}/queue</url>
|
||||
<format default="json"/>
|
||||
<authentication>user</authentication>
|
||||
@@ -12,10 +11,6 @@
|
||||
<shortname>site_id</shortname>
|
||||
<description>The id of the site to publish to.</description>
|
||||
</arg>
|
||||
<arg>
|
||||
<shortname>environment_id</shortname>
|
||||
<description>The id of the environment to publish to. If unspecified the default environment is used.</description>
|
||||
</arg>
|
||||
</args>
|
||||
<requests>
|
||||
<request>
|
||||
|
@@ -19,7 +19,6 @@
|
||||
|
||||
package org.alfresco.repo.web.scripts.publishing;
|
||||
|
||||
import static org.alfresco.repo.web.scripts.publishing.PublishingWebScriptConstants.ENVIRONMENT_ID;
|
||||
import static org.alfresco.repo.web.scripts.publishing.PublishingWebScriptConstants.SITE_ID;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -58,21 +57,15 @@ public abstract class PublishingEnvironmentWebScript extends DeclarativeWebScrip
|
||||
String msg = "A Site ID must be specified!";
|
||||
throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, msg);
|
||||
}
|
||||
String environmentId = params.get(ENVIRONMENT_ID);
|
||||
if(environmentId == null)
|
||||
if (defaultEnvironmentId == null)
|
||||
{
|
||||
if(defaultEnvironmentId == null)
|
||||
{
|
||||
String msg = "An Environment ID must be specified!";
|
||||
throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, msg);
|
||||
}
|
||||
environmentId = defaultEnvironmentId;
|
||||
String msg = "An Environment ID must be specified!";
|
||||
throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, msg);
|
||||
}
|
||||
|
||||
Environment environment = publishingService.getEnvironment(siteId, environmentId);
|
||||
Environment environment = publishingService.getEnvironment(siteId, defaultEnvironmentId);
|
||||
if(environment == null)
|
||||
{
|
||||
String msg = "Environment " +environmentId + " does not exist in site " +siteId;
|
||||
String msg = "Environment " + defaultEnvironmentId + " does not exist in site " +siteId;
|
||||
throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, msg);
|
||||
}
|
||||
return new Pair<String, Environment>(siteId, environment);
|
||||
|
@@ -28,7 +28,6 @@ public interface PublishingWebScriptConstants
|
||||
{
|
||||
// URL Template Keys.
|
||||
public static final String SITE_ID = "site_id";
|
||||
public static final String ENVIRONMENT_ID = "environment_id";
|
||||
|
||||
// General Model Keys
|
||||
public static final String ID = "id";
|
||||
|
Reference in New Issue
Block a user