public static Map<String, String> makeAttributes ( final Collection<PropertyEntry> properties ) { return makeAttributes ( null, properties ); }
public static Map<String, String> makeAttributes ( final Collection<PropertyEntry> properties ) { return makeAttributes ( null, properties ); }
private void processJdbc ( final JdbcDataMapper dataMapper ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "jdbcDriver", dataMapper.getJdbcDriver () ); data.put ( "sql", dataMapper.getSql () ); data.putAll ( Properties.makeAttributes ( "properties.", dataMapper.getProperties () ) ); addData ( Factories.FACTORY_JDBC_DATA_MAPPER, Names.makeName ( dataMapper ), data ); }
private void processJdbc ( final JdbcDataMapper dataMapper ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "jdbcDriver", dataMapper.getJdbcDriver () ); data.put ( "sql", dataMapper.getSql () ); data.putAll ( Properties.makeAttributes ( "properties.", dataMapper.getProperties () ) ); addData ( Factories.FACTORY_JDBC_DATA_MAPPER, Names.makeName ( dataMapper ), data ); }
private void createExternalEventMonitor ( final ExternalEventMonitor eventMonitor ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "filter", eventMonitor.getFilter () ); //$NON-NLS-1$ Configurations.applyInfoAttributes ( Properties.makeAttributes ( eventMonitor.getProperties () ), data ); addData ( Factories.FACTORY_AE_EXTERNAL, Names.makeName ( eventMonitor ), data ); }
private void createExternalEventMonitor ( final ExternalEventMonitor eventMonitor ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "filter", eventMonitor.getFilter () ); //$NON-NLS-1$ Configurations.applyInfoAttributes ( Properties.makeAttributes ( eventMonitor.getProperties () ), data ); addData ( Factories.FACTORY_AE_EXTERNAL, Names.makeName ( eventMonitor ), data ); }
@Override protected void process ( final RestExporter exporter, final EquinoxApplication app, final OscarContext ctx, final IProgressMonitor monitor ) { final Profile profile = Profiles.createOrGetCustomizationProfile ( app ); Profiles.addStartBundle ( profile, "org.eclipse.scada.da.server.exporter.rest" ); final Map<String, String> data = new HashMap<String, String> ( exporter.getItems ().size () + exporter.getHiveProperties ().size () ); data.putAll ( Properties.makeAttributes ( "hive.", exporter.getHiveProperties () ) ); for ( final Item item : exporter.getItems () ) { data.put ( "items." + item.getName (), item.getName () ); } ctx.addData ( Factories.FACTORY_DA_REST_EXPORTER, exporter.getContextId (), data ); }
@Override protected void process ( final RestExporter exporter, final EquinoxApplication app, final OscarContext ctx, final IProgressMonitor monitor ) { final Profile profile = Profiles.createOrGetCustomizationProfile ( app ); Profiles.addStartBundle ( profile, "org.eclipse.scada.da.server.exporter.rest" ); final Map<String, String> data = new HashMap<String, String> ( exporter.getItems ().size () + exporter.getHiveProperties ().size () ); data.putAll ( Properties.makeAttributes ( "hive.", exporter.getHiveProperties () ) ); for ( final Item item : exporter.getItems () ) { data.put ( "items." + item.getName (), item.getName () ); } ctx.addData ( Factories.FACTORY_DA_REST_EXPORTER, exporter.getContextId (), data ); }
private void createService ( final JdbcUserService service ) { final Map<String, String> data = new HashMap<> (); data.put ( "driver", service.getJdbcDriver () ); data.put ( "passwordType", service.getPasswordType ().toString () ); data.put ( "findUserSql", service.getFindUserSql () ); Helper.addOptional ( data, "findRolesForUserSql", service.getFindRolesForUserSql () ); Helper.addOptional ( data, "userIdColumnName", service.getUserIdColumnName () ); Helper.addOptional ( data, "passwordColumnName", service.getPasswordColumnName () ); Helper.addOptional ( data, "updatePasswordSql", service.getUpdatePasswordSql () ); data.put ( "authoritative", service.isAuthorative () ? "true" : "false " ); data.putAll ( Properties.makeAttributes ( "jdbc.properties.", service.getJdbcPropeties () ) ); addData ( Factories.FACTORY_SEC_JDBC, Names.makeName ( service ), data ); } }
private void createService ( final JdbcUserService service ) { final Map<String, String> data = new HashMap<> (); data.put ( "driver", service.getJdbcDriver () ); data.put ( "passwordType", service.getPasswordType ().toString () ); data.put ( "findUserSql", service.getFindUserSql () ); Helper.addOptional ( data, "findRolesForUserSql", service.getFindRolesForUserSql () ); Helper.addOptional ( data, "userIdColumnName", service.getUserIdColumnName () ); Helper.addOptional ( data, "passwordColumnName", service.getPasswordColumnName () ); Helper.addOptional ( data, "updatePasswordSql", service.getUpdatePasswordSql () ); data.put ( "authoritative", service.isAuthorative () ? "true" : "false " ); data.putAll ( Properties.makeAttributes ( "jdbc.properties.", service.getJdbcPropeties () ) ); addData ( Factories.FACTORY_SEC_JDBC, Names.makeName ( service ), data ); } }
public void validate () { final String version = Properties.get ( this.os.getProperties (), POSTGRES_VERSION_KEY, null ); if ( version == null ) { this.ctx.add ( "Operating system does not provide PostgreSQL" ); } else if ( !POSTGRES_VERSION_VALUE.equals ( version ) ) { this.ctx.add ( "Requires '{0}' = {1} but found ({2})", POSTGRES_VERSION_KEY, POSTGRES_VERSION_VALUE, version ); } final Map<String, String> props = Properties.makeAttributes ( this.os.getProperties () ); getConfigurationFile ( props ); getHostBasedAccessFile ( props ); } }
private void processPullEvents ( final PullEvents pull ) { final Map<String, String> data = new HashMap<String, String> (); final DatabaseSettings db = pull.getDatabase (); data.put ( "driverName", db.getDriverName () ); if ( db.getLoginTimeout () != null ) { data.put ( "loginTimeout", "" + db.getLoginTimeout () ); } Helper.addOptional ( data, "customDeleteSql", pull.getCustomDeleteSql () ); Helper.addOptional ( data, "customSelectSql", pull.getCustomSelectSql () ); data.putAll ( Properties.makeAttributes ( "jdbcProperties", db.getProperties () ) ); Helper.addOptional ( data, "delay", pull.getJobInterval () ); addData ( Factories.FACTORY_AE_PULL_EVENTS, Names.makeName ( pull ), data ); final Profile p = Profiles.createOrGetCustomizationProfile ( this.app ); p.getInstallationUnits ().addAll ( db.getBundles () ); }
private void processPullEvents ( final PullEvents pull ) { final Map<String, String> data = new HashMap<String, String> (); final DatabaseSettings db = pull.getDatabase (); data.put ( "driverName", db.getDriverName () ); if ( db.getLoginTimeout () != null ) { data.put ( "loginTimeout", "" + db.getLoginTimeout () ); } Helper.addOptional ( data, "customDeleteSql", pull.getCustomDeleteSql () ); Helper.addOptional ( data, "customSelectSql", pull.getCustomSelectSql () ); data.putAll ( Properties.makeAttributes ( "jdbcProperties", db.getProperties () ) ); Helper.addOptional ( data, "delay", pull.getJobInterval () ); addData ( Factories.FACTORY_AE_PULL_EVENTS, Names.makeName ( pull ), data ); final Profile p = Profiles.createOrGetCustomizationProfile ( this.app ); p.getInstallationUnits ().addAll ( db.getBundles () ); }