public String getPackageName () { return Nodes.makeName ( this.applicationNode ) + "-configuration"; }
public String getPackageName () { return Nodes.makeName ( this.applicationNode ) + "-configuration"; }
public static void setSourceConnectionFromEndpoints ( final SourceItem item, final MasterServer master, final Collection<Endpoint> endpoints ) { final Connection connection = Locator.findConnection ( master, endpoints ); if ( connection == null ) { final String nodeName = Nodes.makeName ( Nodes.fromApp ( master ) ); throw new IllegalStateException ( String.format ( "Master '%s' on node '%s' does not have a connection to endpoints %s", master.getName (), nodeName, StringHelper.join ( endpoints, ", " ) ) ); } if ( ! ( connection instanceof DataAccessConnection ) ) { throw new IllegalStateException ( String.format ( "Connection is of type %s but must be of type %s (Endpoints: %s)", connection.getClass ().getName (), DataAccessConnection.class.getName (), StringHelper.join ( endpoints, ", " ) ) ); } item.setConnection ( (DataAccessConnection)connection ); }
public static void setSourceConnectionFromEndpoints ( final SourceItem item, final MasterServer master, final Collection<Endpoint> endpoints ) { final Connection connection = Locator.findConnection ( master, endpoints ); if ( connection == null ) { final String nodeName = Nodes.makeName ( Nodes.fromApp ( master ) ); throw new IllegalStateException ( String.format ( "Master '%s' on node '%s' does not have a connection to endpoints %s", master.getName (), nodeName, StringHelper.join ( endpoints, ", " ) ) ); } if ( ! ( connection instanceof DataAccessConnection ) ) { throw new IllegalStateException ( String.format ( "Connection is of type %s but must be of type %s (Endpoints: %s)", connection.getClass ().getName (), DataAccessConnection.class.getName (), StringHelper.join ( endpoints, ", " ) ) ); } item.setConnection ( (DataAccessConnection)connection ); }
public void process ( @Named ( "phase" ) final String phase, final World world, final IContainer output, final IProgressMonitor monitor ) throws Exception { monitor.beginTask ( "Processing world", world.getNodes ().size () ); for ( final Node node : world.getNodes () ) { monitor.subTask ( String.format ( "Processing node: %s", Nodes.makeName ( node ) ) ); if ( node instanceof ApplicationNode ) { processNode ( phase, world, (ApplicationNode)node, output, new SubProgressMonitor ( monitor, 1 ) ); } } monitor.done (); }
public void process ( @Named ( "phase" ) final String phase, final World world, final IContainer output, final IProgressMonitor monitor ) throws Exception { monitor.beginTask ( "Processing world", world.getNodes ().size () ); for ( final Node node : world.getNodes () ) { monitor.subTask ( String.format ( "Processing node: %s", Nodes.makeName ( node ) ) ); if ( node instanceof ApplicationNode ) { processNode ( phase, world, (ApplicationNode)node, output, new SubProgressMonitor ( monitor, 1 ) ); } } monitor.done (); }
throw new IllegalStateException ( String.format ( "Endpoint %s already exists on node %s and is bound by %s (re-binding service: %s)", port, Nodes.makeName ( node ), oldService, newService ) );
throw new IllegalStateException ( String.format ( "Endpoint %s already exists on node %s and is bound by %s (re-binding service: %s)", port, Nodes.makeName ( node ), oldService, newService ) );
wixBuilder.setName ( String.format ( "Deployment package for node %s", Nodes.makeName ( this.applicationNode ) ) ); //$NON-NLS-1$ wixBuilder.setVersion ( this.deployment.getVersion () ); wixBuilder.setManufacturer ( this.deployment.getManufacturer () );
wixBuilder.setName ( String.format ( "Deployment package for node %s", Nodes.makeName ( this.applicationNode ) ) ); //$NON-NLS-1$ wixBuilder.setVersion ( this.deployment.getVersion () ); wixBuilder.setManufacturer ( this.deployment.getManufacturer () );
private void processNode ( final String phase, final World world, final ApplicationNode applicationNode, final IContainer output, final IProgressMonitor monitor ) throws Exception { logger.debug ( "Processing node: {}", applicationNode ); //$NON-NLS-1$ final String name = Nodes.makeName ( applicationNode ); final IFolder nodeDir = output.getFolder ( new Path ( name ) ); if ( !nodeDir.exists () ) { nodeDir.create ( true, true, monitor ); } for ( final Application app : applicationNode.getApplications () ) { logger.debug ( "Processing application: {}", app ); //$NON-NLS-1$ final NodeElementProcessor processor = createProcessor ( app, world, applicationNode ); processor.process ( phase, nodeDir, monitor, getContext ().getProperties () ); } for ( final DeploymentMechanism deploy : applicationNode.getDeployments () ) { logger.debug ( "Processing deployment: {}", deploy ); //$NON-NLS-1$ final NodeElementProcessor processor = createProcessor ( deploy, world, applicationNode ); processor.process ( phase, nodeDir, monitor, getContext ().getProperties () ); } for ( final Service service : applicationNode.getServices () ) { logger.debug ( "Processing service: {}", service ); //$NON-NLS-1$ final NodeElementProcessor processor = createProcessor ( service, world, applicationNode ); processor.process ( phase, nodeDir, monitor, getContext ().getProperties () ); } }
packageControlFile.setSection ( "misc" ); //$NON-NLS-1$ packageControlFile.setMaintainer ( String.format ( "%s <%s>", this.deploy.getMaintainer ().getName (), this.deploy.getMaintainer ().getEmail () ) ); //$NON-NLS-1$ packageControlFile.setDescription ( String.format ( "Configuration package for %s", Nodes.makeName ( this.applicationNode ) ), "This is an automatically generated configuration package" );
private void processNode ( final String phase, final World world, final ApplicationNode applicationNode, final IContainer output, final IProgressMonitor monitor ) throws Exception { logger.debug ( "Processing node: {}", applicationNode ); //$NON-NLS-1$ final String name = Nodes.makeName ( applicationNode ); final IFolder nodeDir = output.getFolder ( new Path ( name ) ); if ( !nodeDir.exists () ) { nodeDir.create ( true, true, monitor ); } for ( final Application app : applicationNode.getApplications () ) { logger.debug ( "Processing application: {}", app ); //$NON-NLS-1$ final NodeElementProcessor processor = createProcessor ( app, world, applicationNode ); processor.process ( phase, nodeDir, monitor, getContext ().getProperties () ); } for ( final DeploymentMechanism deploy : applicationNode.getDeployments () ) { logger.debug ( "Processing deployment: {}", deploy ); //$NON-NLS-1$ final NodeElementProcessor processor = createProcessor ( deploy, world, applicationNode ); processor.process ( phase, nodeDir, monitor, getContext ().getProperties () ); } for ( final Service service : applicationNode.getServices () ) { logger.debug ( "Processing service: {}", service ); //$NON-NLS-1$ final NodeElementProcessor processor = createProcessor ( service, world, applicationNode ); processor.process ( phase, nodeDir, monitor, getContext ().getProperties () ); } }
packageControlFile.setSection ( "misc" ); //$NON-NLS-1$ packageControlFile.setMaintainer ( String.format ( "%s <%s>", this.deploy.getMaintainer ().getName (), this.deploy.getMaintainer ().getEmail () ) ); //$NON-NLS-1$ packageControlFile.setDescription ( String.format ( "Configuration package for %s", Nodes.makeName ( this.applicationNode ) ), "This is an automatically generated configuration package" );