public String makeId ( final ValueArchive archive, final int number, final String suffix ) { return String.format ( "%s/%s.%s", Names.makeName ( archive ), number, suffix ); } }
public String makeId ( final ValueArchive archive, final int number, final String suffix ) { return String.format ( "%s/%s.%s", Names.makeName ( archive ), number, suffix ); } }
public static String makeFullQualified ( final Component component, final String... local ) { final List<String> hier = Components.makeHierarchy ( component ); if ( component instanceof NamedDocumentable ) { hier.add ( Names.makeName ( (NamedDocumentable)component ) ); } hier.addAll ( Arrays.asList ( local ) ); return StringHelper.join ( hier, delimiter ); }
public static String makeFullQualified ( final Component component, final String... local ) { final List<String> hier = Components.makeHierarchy ( component ); if ( component instanceof NamedDocumentable ) { hier.add ( Names.makeName ( (NamedDocumentable)component ) ); } hier.addAll ( Arrays.asList ( local ) ); return StringHelper.join ( hier, delimiter ); }
private void createMonitorPool ( final MonitorPool pool ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "filter", pool.getFilter () ); //$NON-NLS-1$ addData ( Factories.FACTORY_AE_MONITOR_POOL, Names.makeName ( pool ), data ); }
private void createMonitorPool ( final MonitorPool pool ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "filter", pool.getFilter () ); //$NON-NLS-1$ addData ( Factories.FACTORY_AE_MONITOR_POOL, Names.makeName ( pool ), data ); }
private void createEventPool ( final EventPool pool ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "filter", pool.getFilter () ); //$NON-NLS-1$ data.put ( "size", "" + pool.getSize () ); //$NON-NLS-1$ //$NON-NLS-2$ addData ( Factories.FACTORY_AE_EVENT_POOL, Names.makeName ( pool ), data ); }
private String createSource ( final ValueArchive archive, final Item item, final int number ) { final Map<String, String> data = new HashMap<String, String> (); final DataAccessConnection connection = findConnection ( item ); data.put ( "item.id", item.getName () ); //$NON-NLS-1$ data.put ( "connection.id", Names.makeName ( connection ) ); //$NON-NLS-1$ final String id = makeId ( archive, number, "source" ); addData ( Factories.FACTORY_DA_SOURCE, id, data ); return id; }
private String createSource ( final ValueArchive archive, final Item item, final int number ) { final Map<String, String> data = new HashMap<String, String> (); final DataAccessConnection connection = findConnection ( item ); data.put ( "item.id", item.getName () ); //$NON-NLS-1$ data.put ( "connection.id", Names.makeName ( connection ) ); //$NON-NLS-1$ final String id = makeId ( archive, number, "source" ); addData ( Factories.FACTORY_DA_SOURCE, id, data ); return id; }
@Override protected String makeSourceId () { return String.format ( "%s.%s", Names.makeName ( this.item.getSource () ), this.item.getType ().getLiteral () ); } }
private String makeUri ( final MasterServer from, final NamedDocumentable remote ) { final MasterServer to = Locator.findApplication ( remote, MasterServer.class ); if ( to == null ) { throw new IllegalStateException ( String.format ( "No master server found for pool %s", remote.getName () ) ); } final AlarmsEventsConnection connection = Locator.findPossibleConnection ( from, to, AlarmsEventsConnection.class ); return connection.getName () + "#" + Names.makeName ( remote ); } }
private void processSimple ( final SimpleDataMapper dataMapper ) { final Map<String, String> data = new HashMap<String, String> (); for ( final DataMapperEntry entry : dataMapper.getEntries () ) { data.put ( "data." + entry.getKey (), entry.getValue () ); } addData ( Factories.FACTORY_SIMPLE_DATA_MAPPER, Names.makeName ( dataMapper ), data ); }
private String makeUri ( final MasterServer from, final NamedDocumentable remote ) { final MasterServer to = Locator.findApplication ( remote, MasterServer.class ); if ( to == null ) { throw new IllegalStateException ( String.format ( "No master server found for pool %s", remote.getName () ) ); } final AlarmsEventsConnection connection = Locator.findPossibleConnection ( from, to, AlarmsEventsConnection.class ); return connection.getName () + "#" + Names.makeName ( remote ); } }
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 ); }
private void createConnection ( final Connection connection ) { final Map<String, String> data = new HashMap<> ( 1 ); final String configurationId = Names.makeName ( connection ); final Endpoint ep = connection.getEndpoint (); final boolean isLocal = Nodes.isLocal ( ep.getNode (), this.app ); data.put ( "connection.uri", connection.makeUri ( isLocal ) ); //$NON-NLS-1$ addData ( connection.getFactoryId (), configurationId, data ); } }
@Override public void generate () { super.generate (); if ( this.item.getConnection () == null ) { throw new IllegalStateException ( String.format ( "Item '%s' has no connection set", this.item.getName () ) ); } addSource ( makeSourceId (), this.item.getSourceName (), Names.makeName ( this.item.getConnection () ), this.item.getInformation ().getDescription () ); }
@Override public void generate () { super.generate (); if ( this.item.getConnection () == null ) { throw new IllegalStateException ( String.format ( "Item '%s' has no connection set", this.item.getName () ) ); } addSource ( makeSourceId (), this.item.getSourceName (), Names.makeName ( this.item.getConnection () ), this.item.getInformation ().getDescription () ); }
private void processExporter ( final DataAccessExporter exporter ) { for ( final ItemExport export : exporter.getExports () ) { final String masterId = Items.makeMasterId ( export.getItem () ); final ItemInformation info = export.getItem ().getInformation (); final String description = info != null ? info.getDescription () : null; addAlias ( Names.makeName ( exporter ) + "/" + export.getExportName (), export.getExportName (), masterId, info.getIoDirections (), description ); } }
private void processExporter ( final DataAccessExporter exporter ) { for ( final ItemExport export : exporter.getExports () ) { final String masterId = Items.makeMasterId ( export.getItem () ); final ItemInformation info = export.getItem ().getInformation (); final String description = info != null ? info.getDescription () : null; addAlias ( Names.makeName ( exporter ) + "/" + export.getExportName (), export.getExportName (), masterId, info.getIoDirections (), description ); } }