mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Revert r78925 to fix ACE-2393
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78933 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,7 +21,6 @@ package org.alfresco.repo.jscript;
|
|||||||
import org.alfresco.repo.jscript.app.CustomResponse;
|
import org.alfresco.repo.jscript.app.CustomResponse;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.springframework.extensions.webscripts.DefaultURLModel;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -50,9 +49,9 @@ public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorEx
|
|||||||
*
|
*
|
||||||
* @return The JSON string
|
* @return The JSON string
|
||||||
*/
|
*/
|
||||||
public String getJSON(DefaultURLModel url)
|
public String getJSON()
|
||||||
{
|
{
|
||||||
return this.getJSONObj(url).toString();
|
return this.getJSONObj().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,7 +59,7 @@ public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorEx
|
|||||||
*
|
*
|
||||||
* @return The JSON object
|
* @return The JSON object
|
||||||
*/
|
*/
|
||||||
protected Object getJSONObj(DefaultURLModel url)
|
protected Object getJSONObj()
|
||||||
{
|
{
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorEx
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Serializable response = ((CustomResponse) entry.getValue()).populate(url);
|
Serializable response = ((CustomResponse) entry.getValue()).populate();
|
||||||
json.put(entry.getKey(), response == null ? JSONObject.NULL: response);
|
json.put(entry.getKey(), response == null ? JSONObject.NULL: response);
|
||||||
}
|
}
|
||||||
catch (JSONException error)
|
catch (JSONException error)
|
||||||
|
@@ -21,8 +21,6 @@ package org.alfresco.repo.jscript.app;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.springframework.extensions.webscripts.DefaultURLModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for custom properties used by SlingshotDocLibCustomResponse
|
* Interface for custom properties used by SlingshotDocLibCustomResponse
|
||||||
*
|
*
|
||||||
@@ -32,8 +30,6 @@ public interface CustomResponse
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Populates the DocLib webscript response with custom metadata
|
* Populates the DocLib webscript response with custom metadata
|
||||||
*
|
|
||||||
* @param url the URL that initiated the webscript request
|
|
||||||
*/
|
*/
|
||||||
Serializable populate(DefaultURLModel url);
|
Serializable populate();
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,6 @@ import org.alfresco.repo.jscript.ScriptUtils;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.extensions.webscripts.DefaultURLModel;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@@ -112,7 +111,7 @@ public class VtiServerCustomResponse implements CustomResponse
|
|||||||
*
|
*
|
||||||
* @return JSONObject or null
|
* @return JSONObject or null
|
||||||
*/
|
*/
|
||||||
public Serializable populate(DefaultURLModel url)
|
public Serializable populate()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user