org.apache.continuum.installation
Class DefaultInstallationService
java.lang.Object
   org.apache.continuum.installation.DefaultInstallationService
org.apache.continuum.installation.DefaultInstallationService
- All Implemented Interfaces: 
- InstallationService, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
- @Service(value="installationService")
public class DefaultInstallationService 
- extends Object- implements InstallationService, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
- Since:
- 13 juin 07
- Version:
- $Id: DefaultInstallationService.java 1372260 2012-08-13 04:29:09Z brett $
          TODO use some cache mechanism to prevent always reading from store ?
- Author:
- olamy
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
DefaultInstallationService
public DefaultInstallationService()
initialize
public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
- 
- Specified by:
- initializein interface- org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
 
- 
- Throws:
- org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
 
add
public Installation add(Installation installation)
                 throws InstallationException,
                        AlreadyExistsInstallationException
- 
- Specified by:
- addin interface- InstallationService
 
- 
- Throws:
- InstallationException
- AlreadyExistsInstallationException
- See Also:
- InstallationService.add(org.apache.maven.continuum.model.system.Installation)
 
add
public Installation add(Installation installation,
                        boolean automaticProfile)
                 throws InstallationException,
                        AlreadyExistsProfileException,
                        AlreadyExistsInstallationException
- 
- Specified by:
- addin interface- InstallationService
 
- 
- Throws:
- InstallationException
- AlreadyExistsProfileException
- AlreadyExistsInstallationException
 
delete
public void delete(Installation installation)
            throws InstallationException
- 
- Specified by:
- deletein interface- InstallationService
 
- 
- Throws:
- InstallationException
- See Also:
- InstallationService.delete(org.apache.maven.continuum.model.system.Installation)
 
getAllInstallations
public List<Installation> getAllInstallations()
                                       throws InstallationException
- 
- Specified by:
- getAllInstallationsin interface- InstallationService
 
- 
- Throws:
- InstallationException
- See Also:
- InstallationService.getAllInstallations()
 
getInstallation
public Installation getInstallation(int installationId)
                             throws InstallationException
- 
- Specified by:
- getInstallationin interface- InstallationService
 
- 
- Throws:
- InstallationException
- See Also:
- InstallationService.getInstallation(int)
 
getInstallation
public Installation getInstallation(String installationName)
                             throws InstallationException
- 
- Specified by:
- getInstallationin interface- InstallationService
 
- 
- Throws:
- InstallationException
- See Also:
- InstallationService.getInstallation(String)
 
update
public void update(Installation installation)
            throws InstallationException,
                   AlreadyExistsInstallationException
- 
- Specified by:
- updatein interface- InstallationService
 
- 
- Throws:
- InstallationException
- AlreadyExistsInstallationException
- See Also:
- InstallationService.update(org.apache.maven.continuum.model.system.Installation)
 
getExecutorConfigurator
public ExecutorConfigurator getExecutorConfigurator(String type)
- 
- Specified by:
- getExecutorConfiguratorin interface- InstallationService
 
- 
- Returns:
- ExecutorConfigurator or null if unknown type
- See Also:
- InstallationService.getExecutorConfigurator(java.lang.String)
 
getEnvVar
public String getEnvVar(String type)
- 
- Specified by:
- getEnvVarin interface- InstallationService
 
- 
- See Also:
- InstallationService.getEnvVar(java.lang.String)
 
getDefaultJdkInformations
public List<String> getDefaultJdkInformations()
                                       throws InstallationException
- TODO replace with calling getExecutorConfiguratorVersion
 
- 
- Specified by:
- getDefaultJdkInformationsin interface- InstallationService
 
- 
- Returns:
- output of JAVA_HOME/bin/java -version
- Throws:
- InstallationException
- See Also:
- InstallationService.getDefaultJdkInformations()
 
getJdkInformations
public List<String> getJdkInformations(Installation installation)
                                throws InstallationException
- TODO replace with calling getExecutorConfiguratorVersion
 
- 
- Specified by:
- getJdkInformationsin interface- InstallationService
 
- 
- Returns:
- output of JAVA_HOME/bin/java -version (JAVA_HOME = installation.getVarValue()
- Throws:
- InstallationException
- See Also:
- InstallationService.getJdkInformations(org.apache.maven.continuum.model.system.Installation)
 
getExecutorConfiguratorVersion
public List<String> getExecutorConfiguratorVersion(String path,
                                                   ExecutorConfigurator executorConfigurator,
                                                   Profile profile)
                                            throws InstallationException
- 
- Specified by:
- getExecutorConfiguratorVersionin interface- InstallationService
 
- 
- executorConfigurator- (ec)
- Returns:
- the cli output of $path/ec.relativePath.ec.executable ec.versionArgument
- Throws:
- InstallationException
- See Also:
- InstallationService.getExecutorConfiguratorVersion(java.lang.String, org.apache.maven.continuum.execution.ExecutorConfigurator, Profile)
 
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.