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:
@@ -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