protected void runSetup ( final CommonDeploymentMechanism deploy, final DeploymentContext context, final IProgressMonitor monitor ) throws Exception { if ( deploy.getSetup () != null ) { SubModuleHandler.runSetup ( context, deploy.getSetup ().getModules (), this.deploy.getOperatingSystem () ); } SubModuleHandler.runSetup ( context, deploy.getAdditionalSetupModules (), deploy.getOperatingSystem () ); monitor.done (); }
protected void runSetup ( final CommonDeploymentMechanism deploy, final DeploymentContext context, final IProgressMonitor monitor ) throws Exception { if ( deploy.getSetup () != null ) { SubModuleHandler.runSetup ( context, deploy.getSetup ().getModules (), this.deploy.getOperatingSystem () ); } SubModuleHandler.runSetup ( context, deploy.getAdditionalSetupModules (), deploy.getOperatingSystem () ); monitor.done (); }
private StartupHandler createStartupHandler ( final StartupMechanism defaultStartupMechanism ) { final StartupMechanism sm = getStartupMechanism ( defaultStartupMechanism ); if ( sm == null ) { return null; } switch ( sm ) { case REDHAT_SYSV: return new RedhatSystemVHandler (); case UPSTART: return new UpstartHandler ( this.deploy.getOperatingSystem () ); case LSB_SYSV: return new LSBSystemVHandler (); case SYSTEMD: return new SystemdHandler (); case DEFAULT: return null; // we ran of options here } throw new IllegalStateException ( String.format ( "Startup method %s is unsupported", sm ) ); }
private StartupHandler createStartupHandler ( final StartupMechanism defaultStartupMechanism ) { final StartupMechanism sm = getStartupMechanism ( defaultStartupMechanism ); if ( sm == null ) { return null; } switch ( sm ) { case REDHAT_SYSV: return new RedhatSystemVHandler (); case UPSTART: return new UpstartHandler ( this.deploy.getOperatingSystem () ); case LSB_SYSV: return new LSBSystemVHandler (); case SYSTEMD: return new SystemdHandler (); case DEFAULT: return null; // we ran of options here } throw new IllegalStateException ( String.format ( "Startup method %s is unsupported", sm ) ); }
/** * Get the startup mechanism to use * * @param defaultStartupMechanism * the default if none is set * @return the startup mechanism, or the default */ private StartupMechanism getStartupMechanism ( final StartupMechanism defaultStartupMechanism ) { if ( this.deploy.getStartupMechanism () == null || this.deploy.getStartupMechanism () == StartupMechanism.DEFAULT ) { final String type = OperatingSystemDescriptors.getProperty ( this.deploy.getOperatingSystem (), "startup", defaultStartupMechanism.name () ); return StartupMechanism.valueOf ( type ); } else { return this.deploy.getStartupMechanism (); } }
/** * Get the startup mechanism to use * * @param defaultStartupMechanism * the default if none is set * @return the startup mechanism, or the default */ private StartupMechanism getStartupMechanism ( final StartupMechanism defaultStartupMechanism ) { if ( this.deploy.getStartupMechanism () == null || this.deploy.getStartupMechanism () == StartupMechanism.DEFAULT ) { final String type = OperatingSystemDescriptors.getProperty ( this.deploy.getOperatingSystem (), "startup", defaultStartupMechanism.name () ); return StartupMechanism.valueOf ( type ); } else { return this.deploy.getStartupMechanism (); } }