mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
ALF-4158: F1 Create a replication job [name, title, description]
ALF-4165: F3 Edit, delete action for replication job from list of existing jobs git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21902 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<shortname>PickerList</shortname>
|
||||
<description>Service to return metadata of child items in a parent space to display in the object finder</description>
|
||||
<url>/api/forms/picker/{type}/{store_type}/{store_id}/{id}/children</url>
|
||||
<url>/api/forms/picker/{type}/children</url>
|
||||
<format default="json"/>
|
||||
<authentication>user</authentication>
|
||||
<transaction allow="readonly">required</transaction>
|
||||
|
@@ -6,6 +6,7 @@ function main()
|
||||
argsSelectableType = args['selectableType'],
|
||||
argsSearchTerm = args['searchTerm'],
|
||||
argsMaxResults = args['size'],
|
||||
argsXPath = args['xpath'],
|
||||
parent = null,
|
||||
rootNode = companyhome,
|
||||
results = [],
|
||||
@@ -23,10 +24,19 @@ function main()
|
||||
|
||||
try
|
||||
{
|
||||
var nodeRef = url.templateArgs.store_type + "://" + url.templateArgs.store_id + "/" + url.templateArgs.id;
|
||||
if (argsXPath != null)
|
||||
{
|
||||
var nodes = search.xpathSearch(argsXPath);
|
||||
if (nodes.length > 0)
|
||||
{
|
||||
nodeRef = String(nodes[0].nodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
if (url.templateArgs.type == "node")
|
||||
{
|
||||
// nodeRef input
|
||||
var nodeRef = url.templateArgs.store_type + "://" + url.templateArgs.store_id + "/" + url.templateArgs.id;
|
||||
if (nodeRef == "alfresco://company/home")
|
||||
{
|
||||
parent = companyhome;
|
||||
@@ -53,7 +63,8 @@ function main()
|
||||
if (argsFilterType != null)
|
||||
{
|
||||
// map short name to long name
|
||||
var types = {
|
||||
var types =
|
||||
{
|
||||
'rma:dispositionSchedule': '{http://www.alfresco.org/model/recordsmanagement/1.0}dispositionSchedule',
|
||||
'rma:dispositionActionDefinition': '{http://www.alfresco.org/model/recordsmanagement/1.0}dispositionActionDefinition',
|
||||
'rma:dispositionAction': '{http://www.alfresco.org/model/recordsmanagement/1.0}dispositionAction',
|
||||
@@ -114,8 +125,7 @@ function main()
|
||||
}
|
||||
else if (url.templateArgs.type == "category")
|
||||
{
|
||||
var catAspect = (args["aspect"] != null) ? args["aspect"] : "cm:generalclassifiable",
|
||||
nodeRef = url.templateArgs.store_type + "://" + url.templateArgs.store_id + "/" + url.templateArgs.id;
|
||||
var catAspect = (args["aspect"] != null) ? args["aspect"] : "cm:generalclassifiable";
|
||||
|
||||
// TODO: Better way of finding this
|
||||
var rootCategories = classification.getRootCategories(catAspect);
|
||||
|
@@ -15,15 +15,33 @@ function main()
|
||||
|
||||
// convert the JSONArray object into a native JavaScript array
|
||||
var jsonItems = json.get("items"),
|
||||
itemValueType = "nodeRef",
|
||||
itemValueTypeHint = "",
|
||||
numItems = jsonItems.length(),
|
||||
item, result;
|
||||
|
||||
if (json.has("itemValueType"))
|
||||
{
|
||||
var jsonValueTypes = json.get("itemValueType").split(";");
|
||||
itemValueType = jsonValueTypes[0];
|
||||
itemValueTypeHint = (jsonValueTypes.length > 1) ? jsonValueTypes[1] : "";
|
||||
}
|
||||
|
||||
for (count = 0; count < numItems; count++)
|
||||
{
|
||||
item = jsonItems.get(count);
|
||||
if (item != "")
|
||||
{
|
||||
result = null;
|
||||
if (itemValueType == "nodeRef")
|
||||
{
|
||||
result = search.findNode(item);
|
||||
}
|
||||
else if (itemValueType == "xpath")
|
||||
{
|
||||
result = search.xpathSearch(itemValueTypeHint.replace("%VALUE%", search.ISO9075Encode(item)))[0];
|
||||
}
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
// create a separate object if the node represents a user or group
|
||||
|
Reference in New Issue
Block a user