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,6 +53,16 @@ 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("delete"))
|
||||||
|
{
|
||||||
|
JSONArray toDelete = json.getJSONArray("delete");
|
||||||
|
for(int i = 0 ; i < toDelete.length(); i++)
|
||||||
|
{
|
||||||
|
JSONObject val = toDelete.getJSONObject(i);
|
||||||
|
customEmailMappingService.deleteCustomMapping(val.getString("from"), val.getString("to"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(json.has("add"))
|
if(json.has("add"))
|
||||||
{
|
{
|
||||||
JSONArray toAdd = json.getJSONArray("add");
|
JSONArray toAdd = json.getJSONArray("add");
|
||||||
@@ -64,17 +74,6 @@ public class EmailMapPost extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(json.has("delete"))
|
|
||||||
{
|
|
||||||
JSONArray toDelete = json.getJSONArray("delete");
|
|
||||||
for(int i = 0 ; i < toDelete.length(); i++)
|
|
||||||
{
|
|
||||||
JSONObject val = toDelete.getJSONObject(i);
|
|
||||||
customEmailMappingService.deleteCustomMapping(val.getString("from"), val.getString("to"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Set the return value.
|
// Set the return value.
|
||||||
Set<CustomMapping> emailMap = customEmailMappingService.getCustomMappings();
|
Set<CustomMapping> emailMap = customEmailMappingService.getCustomMappings();
|
||||||
// create model object with the lists model
|
// create model object with the lists model
|
||||||
|
Reference in New Issue
Block a user