org.apache.maven.dotnet.executable.impl
Class NetExecutableFactoryImpl

java.lang.Object
  extended by org.apache.maven.dotnet.executable.impl.NetExecutableFactoryImpl
All Implemented Interfaces:
NetExecutableFactory, org.codehaus.plexus.logging.LogEnabled

public class NetExecutableFactoryImpl
extends java.lang.Object
implements NetExecutableFactory, org.codehaus.plexus.logging.LogEnabled

Provides an implementation of NetExecutableFactory.

Author:
Shane Isbell

Field Summary
 
Fields inherited from interface org.apache.maven.dotnet.executable.NetExecutableFactory
ROLE
 
Constructor Summary
NetExecutableFactoryImpl()
           
 
Method Summary
 void enableLogging(org.codehaus.plexus.logging.Logger logger)
           
 CompilerExecutable getCompilerExecutableFor(CompilerRequirement compilerRequirement, CompilerConfig compilerConfig, org.apache.maven.project.MavenProject project, java.io.File assemblyPath)
          Returns an executable for compiling .NET applications.
 NetExecutable getJavaExecutableFromRepository(VendorInfo vendorInfo, java.util.List<java.lang.String> commands)
           
 NetExecutable getNetExecutableFor(java.lang.String vendor, java.lang.String frameworkVersion, java.lang.String profile, java.util.List<java.lang.String> commands, java.io.File netHome)
          Returns an executable that matches the vendor, framework version and profile.
 NetExecutable getNetExecutableFromRepository(java.lang.String groupId, java.lang.String artifactId, VendorInfo vendorInfo, java.io.File localRepository, java.util.List<java.lang.String> commands, boolean isIsolatedAppDomain)
          Returns an executable that resides within a maven repository.
 NetExecutable getPluginLoaderFor(java.lang.String groupId, java.lang.String artifactId, VendorInfo vendorInfo, java.lang.String localRepository, java.io.File parameterFile, java.lang.String mojoName)
          Returns a plugin loader for loading and executing a .NET plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetExecutableFactoryImpl

public NetExecutableFactoryImpl()
Method Detail

enableLogging

public void enableLogging(org.codehaus.plexus.logging.Logger logger)
Specified by:
enableLogging in interface org.codehaus.plexus.logging.LogEnabled
See Also:
LogEnabled.enableLogging(org.codehaus.plexus.logging.Logger)

getCompilerExecutableFor

public CompilerExecutable getCompilerExecutableFor(CompilerRequirement compilerRequirement,
                                                   CompilerConfig compilerConfig,
                                                   org.apache.maven.project.MavenProject project,
                                                   java.io.File assemblyPath)
                                            throws PlatformUnsupportedException
Description copied from interface: NetExecutableFactory
Returns an executable for compiling .NET applications.

Specified by:
getCompilerExecutableFor in interface NetExecutableFactory
Parameters:
compilerRequirement - the requirements for the compiler
compilerConfig - the configuration for the compiler
project - the maven project
assemblyPath - an optional parameter for replacing the system assemblies
Returns:
the executable for compiling .NET applications
Throws:
PlatformUnsupportedException - if no executable is found
See Also:
NetExecutableFactory.getCompilerExecutableFor(org.apache.maven.dotnet.executable.compiler.CompilerRequirement, org.apache.maven.dotnet.executable.compiler.CompilerConfig, org.apache.maven.project.MavenProject, java.io.File)

getPluginLoaderFor

public NetExecutable getPluginLoaderFor(java.lang.String groupId,
                                        java.lang.String artifactId,
                                        VendorInfo vendorInfo,
                                        java.lang.String localRepository,
                                        java.io.File parameterFile,
                                        java.lang.String mojoName)
                                 throws PlatformUnsupportedException
Description copied from interface: NetExecutableFactory
Returns a plugin loader for loading and executing a .NET plugin.

Specified by:
getPluginLoaderFor in interface NetExecutableFactory
Parameters:
groupId - the group ID of the executable artifact (as specified within the maven repo)
artifactId - the artifact ID of the executable artifact (as specified within the maven repo)
vendorInfo - the additional vendor information used to decide how to execute the net executable
localRepository - the local maven repository where the executable resides.
parameterFile - the file containing parameter information to inject into the .NET plugin
mojoName - the name of the .NET Mojo implementation
Returns:
the plugin loader for executing a .NET plugin
Throws:
PlatformUnsupportedException - if no executable is found
See Also:
NetExecutableFactory.getPluginLoaderFor(String,String,org.apache.maven.dotnet.vendor.VendorInfo,String,java.io.File,String)

getNetExecutableFromRepository

public NetExecutable getNetExecutableFromRepository(java.lang.String groupId,
                                                    java.lang.String artifactId,
                                                    VendorInfo vendorInfo,
                                                    java.io.File localRepository,
                                                    java.util.List<java.lang.String> commands,
                                                    boolean isIsolatedAppDomain)
                                             throws PlatformUnsupportedException
Description copied from interface: NetExecutableFactory
Returns an executable that resides within a maven repository. These are typically user-implemented executables.

Specified by:
getNetExecutableFromRepository in interface NetExecutableFactory
Parameters:
groupId - the group ID of the executable artifact (as specified within the maven repo)
artifactId - the artifact ID of the executable artifact (as specified within the maven repo)
vendorInfo - the additional vendor information used to decide how to execute the net executable
localRepository - the local maven repository where the executable resides.
isIsolatedAppDomain - the executable can load up assemblies into an isolated application domain. This should be set to true if the application needs to load up assemblies into another app domain and to remotly invoke methods on classes in the other app domain, otherwise it should be set to false.
Returns:
the executable that resides within a maven repository.
Throws:
PlatformUnsupportedException - if no executable is found

getJavaExecutableFromRepository

public NetExecutable getJavaExecutableFromRepository(VendorInfo vendorInfo,
                                                     java.util.List<java.lang.String> commands)
                                              throws PlatformUnsupportedException
Specified by:
getJavaExecutableFromRepository in interface NetExecutableFactory
Returns:
Throws:
PlatformUnsupportedException

getNetExecutableFor

public NetExecutable getNetExecutableFor(java.lang.String vendor,
                                         java.lang.String frameworkVersion,
                                         java.lang.String profile,
                                         java.util.List<java.lang.String> commands,
                                         java.io.File netHome)
                                  throws PlatformUnsupportedException
Description copied from interface: NetExecutableFactory
Returns an executable that matches the vendor, framework version and profile. These are typically framework-vendor executables.

Specified by:
getNetExecutableFor in interface NetExecutableFactory
Parameters:
vendor - the vendor of the executable
frameworkVersion - the version of the .NET framework that the executable works under
profile - the profile of the executable plugin. This is used to differentiate an executable that matches the same platform and framework version.
commands - the user-defined command options to use with the executable
netHome - the install root of the .NET framework
Returns:
the executable that matches the vendor, framework version and profile
Throws:
PlatformUnsupportedException - if no executable is found
See Also:
NetExecutableFactory


Copyright © 2007 NMaven. All Rights Reserved.