use of com.serotonin.m2m2.module.AngularJSModuleDefinition in project ma-modules-public by infiniteautomation.
the class ModulesRestController method getPublicAngularJSModules.
@ApiOperation(value = "AngularJS Modules", notes = "Publicly Available Angular JS Modules")
@RequestMapping(method = RequestMethod.GET, value = "/angularjs-modules/public", produces = { "application/json" })
public ResponseEntity<AngularJSModuleDefinitionGroupModel> getPublicAngularJSModules(HttpServletRequest request) {
RestProcessResult<AngularJSModuleDefinitionGroupModel> result = new RestProcessResult<AngularJSModuleDefinitionGroupModel>(HttpStatus.OK);
List<AngularJSModuleDefinition> definitions = ModuleRegistry.getAngularJSDefinitions();
List<String> urls = new ArrayList<String>();
for (AngularJSModuleDefinition def : definitions) urls.add(def.getModule().getWebPath() + WEB + def.getJavaScriptFilename());
AngularJSModuleDefinitionGroupModel model = new AngularJSModuleDefinitionGroupModel();
model.setUrls(urls);
return result.createResponseEntity(model);
}
Aggregations