use of com.manydesigns.portofino.upstairs.actions.support.ActionTypeInfo in project Portofino by ManyDesigns.
the class ActionsAction method getResourceActionTypes.
@Path(":types")
@GET
@RequiresPermissions(level = AccessLevel.NONE)
@Produces(MediaType.APPLICATION_JSON)
public Map<String, ActionTypeInfo> getResourceActionTypes() {
Map<String, ActionTypeInfo> result = new HashMap<>();
TextProvider textProvider = ElementsThreadLocals.getTextProvider();
actionRegistry.iterator().forEachRemaining(a -> {
String className = a.actionClass.getName();
result.put(a.description, new ActionTypeInfo(className, a.getActionName(textProvider), textProvider.getTextOrNull(className + ".description"), a.supportsDetail));
});
return result;
}
Aggregations