Search in sources :

Example 1 with EmportDefinition

use of com.serotonin.m2m2.module.EmportDefinition in project ma-core-public by infiniteautomation.

the class ConfigurationExportData method getAllExportDescriptions.

/**
 * Get a list of pairs of i18n property and export names for all export items
 * @return
 */
public static List<StringStringPair> getAllExportDescriptions() {
    List<StringStringPair> elements = new ArrayList<StringStringPair>();
    elements.add(new StringStringPair("header.dataSources", DATA_SOURCES));
    elements.add(new StringStringPair("header.dataPoints", DATA_POINTS));
    elements.add(new StringStringPair("header.eventHandlers", EVENT_HANDLERS));
    // TODO reinstate event detectors once there is a non-data-point event detector
    // elements.add(new StringStringPair("header.eventDetectors", EVENT_DETECTORS));
    elements.add(new StringStringPair("header.jsonData", JSON_DATA));
    elements.add(new StringStringPair("header.mailingLists", MAILING_LISTS));
    elements.add(new StringStringPair("header.publishers", PUBLISHERS));
    elements.add(new StringStringPair("header.pointHierarchy", POINT_HIERARCHY));
    elements.add(new StringStringPair("header.systemSettings", SYSTEM_SETTINGS));
    elements.add(new StringStringPair("header.pointPropertyTemplates", TEMPLATES));
    elements.add(new StringStringPair("header.users", USERS));
    elements.add(new StringStringPair("header.virtualSerialPorts", VIRTUAL_SERIAL_PORTS));
    for (EmportDefinition def : ModuleRegistry.getDefinitions(EmportDefinition.class)) {
        elements.add(new StringStringPair(def.getDescriptionKey(), def.getElementId()));
    }
    return elements;
}
Also used : EmportDefinition(com.serotonin.m2m2.module.EmportDefinition) StringStringPair(com.serotonin.db.pair.StringStringPair) ArrayList(java.util.ArrayList)

Example 2 with EmportDefinition

use of com.serotonin.m2m2.module.EmportDefinition in project ma-core-public by infiniteautomation.

the class ConfigurationExportData method getAllExportNames.

/**
 * Get a list of all available export elements
 * @return
 */
public static String[] getAllExportNames() {
    List<String> names = new ArrayList<>();
    names.add(DATA_SOURCES);
    names.add(DATA_POINTS);
    names.add(EVENT_HANDLERS);
    // TODO reinstate event detectors once there is a non-data-point event detector
    // names.add(EVENT_DETECTORS);
    names.add(JSON_DATA);
    names.add(MAILING_LISTS);
    names.add(PUBLISHERS);
    names.add(POINT_HIERARCHY);
    names.add(SYSTEM_SETTINGS);
    names.add(TEMPLATES);
    names.add(USERS);
    names.add(VIRTUAL_SERIAL_PORTS);
    for (EmportDefinition def : ModuleRegistry.getDefinitions(EmportDefinition.class)) names.add(def.getElementId());
    return names.toArray(new String[names.size()]);
}
Also used : EmportDefinition(com.serotonin.m2m2.module.EmportDefinition) ArrayList(java.util.ArrayList)

Aggregations

EmportDefinition (com.serotonin.m2m2.module.EmportDefinition)2 ArrayList (java.util.ArrayList)2 StringStringPair (com.serotonin.db.pair.StringStringPair)1