mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-510 (CLONE - RM Email Mapping tool behaves strangely)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0-BUG-FIX@42532 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,17 +53,6 @@ public class EmailMapPost extends DeclarativeWebScript
|
|||||||
JSONObject json = null;
|
JSONObject json = null;
|
||||||
json = new JSONObject(new JSONTokener(req.getContent().getContent()));
|
json = new JSONObject(new JSONTokener(req.getContent().getContent()));
|
||||||
|
|
||||||
if(json.has("add"))
|
|
||||||
{
|
|
||||||
JSONArray toAdd = json.getJSONArray("add");
|
|
||||||
for(int i = 0 ; i < toAdd.length(); i++)
|
|
||||||
{
|
|
||||||
JSONObject val = toAdd.getJSONObject(i);
|
|
||||||
customEmailMappingService.addCustomMapping(val.getString("from"), val.getString("to"));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(json.has("delete"))
|
if(json.has("delete"))
|
||||||
{
|
{
|
||||||
JSONArray toDelete = json.getJSONArray("delete");
|
JSONArray toDelete = json.getJSONArray("delete");
|
||||||
@@ -74,6 +63,16 @@ public class EmailMapPost extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(json.has("add"))
|
||||||
|
{
|
||||||
|
JSONArray toAdd = json.getJSONArray("add");
|
||||||
|
for(int i = 0 ; i < toAdd.length(); i++)
|
||||||
|
{
|
||||||
|
JSONObject val = toAdd.getJSONObject(i);
|
||||||
|
customEmailMappingService.addCustomMapping(val.getString("from"), val.getString("to"));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set the return value.
|
// Set the return value.
|
||||||
Set<CustomMapping> emailMap = customEmailMappingService.getCustomMappings();
|
Set<CustomMapping> emailMap = customEmailMappingService.getCustomMappings();
|
||||||
|
Reference in New Issue
Block a user