use of org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction in project records-management by Alfresco.
the class ListOfValuesGet method createDispositionActionsModel.
/**
* Creates the model for the list of disposition actions.
*
* @param baseUrl The base URL of the service
* @return model of disposition actions list
*/
protected Map<String, Object> createDispositionActionsModel(String baseUrl) {
// iterate over the disposition actions
List<RecordsManagementAction> dispositionActions = this.rmActionService.getDispositionActions();
List<Map<String, String>> items = new ArrayList<Map<String, String>>(dispositionActions.size());
for (RecordsManagementAction dispositionAction : dispositionActions) {
Map<String, String> item = new HashMap<String, String>(2);
item.put("label", dispositionAction.getLabel());
item.put("value", dispositionAction.getName());
items.add(item);
}
// create the model
Map<String, Object> model = new HashMap<String, Object>(2);
model.put("url", baseUrl + "/dispositionactions");
model.put("items", items);
return model;
}
use of org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction in project records-management by Alfresco.
the class DispositionActionParameterConstraint method getAllowableValuesImpl.
/**
* @see org.alfresco.service.cmr.action.ParameterConstraint#getAllowableValues()
*/
protected Map<String, String> getAllowableValuesImpl() {
List<RecordsManagementAction> rmActions = rmActionService.getDispositionActions();
Map<String, String> result = new HashMap<String, String>(rmActions.size());
for (RecordsManagementAction rmAction : rmActions) {
result.put(rmAction.getName(), rmAction.getLabel());
}
return result;
}
Aggregations