mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Created channels.get Rest Api webscript. Tested in PublishingRestApiTest
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28454 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1023,6 +1023,17 @@
|
|||||||
class="org.alfresco.repo.web.scripts.workflow.WorkflowInstanceDelete"
|
class="org.alfresco.repo.web.scripts.workflow.WorkflowInstanceDelete"
|
||||||
parent="abstractWorkflowWebScript"></bean>
|
parent="abstractWorkflowWebScript"></bean>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- Publishing Service REST API -->
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
<!-- Get Channels web script -->
|
||||||
|
<bean id="webscript.org.alfresco.repository.publishing.channels.get"
|
||||||
|
class="org.alfresco.repo.web.scripts.publishing.ChannelsGet"
|
||||||
|
parent="webscript">
|
||||||
|
<property name="channelService" ref="channelService" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Audit Service REST API -->
|
<!-- Audit Service REST API -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@@ -218,15 +218,14 @@ public abstract class AbstractWorkflowWebscript extends DeclarativeWebScript
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the results model, applying pagination to the results if necessary.
|
* Builds the results model, applying pagination to the results if necessary.
|
||||||
*
|
|
||||||
* @param modelBuilder WorkflowModelBuilder instance to use
|
|
||||||
* @param req The WebScript request
|
* @param req The WebScript request
|
||||||
* @param dataPropertyName The name of the property to use in the model
|
* @param dataPropertyName The name of the property to use in the model
|
||||||
* @param results The full set of results
|
* @param results The full set of results
|
||||||
|
*
|
||||||
* @return List of results to return to the callee
|
* @return List of results to return to the callee
|
||||||
*/
|
*/
|
||||||
protected Map<String, Object> createResultModel(WorkflowModelBuilder modelBuilder, WebScriptRequest req,
|
protected Map<String, Object> createResultModel(WebScriptRequest req, String dataPropertyName,
|
||||||
String dataPropertyName, List<Map<String, Object>> results)
|
List<Map<String, Object>> results)
|
||||||
{
|
{
|
||||||
int totalItems = results.size();
|
int totalItems = results.size();
|
||||||
int maxItems = getIntParameter(req, PARAM_MAX_ITEMS, DEFAULT_MAX_ITEMS);
|
int maxItems = getIntParameter(req, PARAM_MAX_ITEMS, DEFAULT_MAX_ITEMS);
|
||||||
|
@@ -170,7 +170,7 @@ public class TaskInstancesGet extends AbstractWorkflowWebscript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create and return results, paginated if necessary
|
// create and return results, paginated if necessary
|
||||||
return createResultModel(modelBuilder, req, "taskInstances", results);
|
return createResultModel(req, "taskInstances", results);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -148,7 +148,7 @@ public class WorkflowInstancesGet extends AbstractWorkflowWebscript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create and return results, paginated if necessary
|
// create and return results, paginated if necessary
|
||||||
return createResultModel(modelBuilder, req, "workflowInstances", results);
|
return createResultModel(req, "workflowInstances", results);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user