use of com.serotonin.m2m2.view.ImplDefinition in project ma-core-public by infiniteautomation.
the class DataPointDwr method getChartRendererOptions.
/**
* Get a list of available Chart Renderers for this point
*
* @param vo
* @return
*/
@DwrPermission(user = true)
public ProcessResult getChartRendererOptions(int dataTypeId) {
ProcessResult response = new ProcessResult();
List<ImplDefinition> list = BaseChartRenderer.getImplementations(dataTypeId);
response.addData("options", list);
return response;
}
use of com.serotonin.m2m2.view.ImplDefinition in project ma-modules-public by infiniteautomation.
the class GraphicalViewDwr method editInit.
//
//
// View editing
//
@DwrPermission(user = true)
public Map<String, Object> editInit() {
Map<String, Object> result = new HashMap<String, Object>();
User user = Common.getUser();
// Users with which to share.
// result.put("shareUsers", getShareUsers(user));
// Users already sharing with.
// Legacy code, can remove result.put("viewUsers", GraphicalViewsCommon.getUserEditView(user).getViewUsers());
// View component types
List<StringStringPair> components = new ArrayList<StringStringPair>();
for (ImplDefinition impl : ViewComponent.getImplementations()) components.add(new StringStringPair(impl.getName(), translate(impl.getNameKey())));
result.put("componentTypes", components);
// Available points
List<DataPointVO> allPoints = DataPointDao.instance.getDataPoints(DataPointExtendedNameComparator.instance, false);
List<DataPointBean> availablePoints = new ArrayList<DataPointBean>();
final boolean admin = Permissions.hasAdmin(user);
for (DataPointVO dataPoint : allPoints) {
if (admin || Permissions.hasDataPointReadPermission(user, dataPoint))
availablePoints.add(new DataPointBean(dataPoint));
}
result.put("pointList", availablePoints);
return result;
}
use of com.serotonin.m2m2.view.ImplDefinition in project ma-modules-public by infiniteautomation.
the class ViewComponent method getExportTypes.
public static List<String> getExportTypes() {
List<ImplDefinition> definitions = getImplementations();
List<String> result = new ArrayList<String>(definitions.size());
for (ImplDefinition def : definitions) result.add(def.getExportName());
return result;
}
use of com.serotonin.m2m2.view.ImplDefinition in project ma-core-public by infiniteautomation.
the class BaseChartRenderer method getExportTypes.
public static List<String> getExportTypes() {
ensureDefinitions();
List<String> result = new ArrayList<String>(definitions.size());
for (ImplDefinition def : definitions) result.add(def.getExportName());
return result;
}
Aggregations