org.codehaus.mojo.appassembler.daemon.script
Class Platform

java.lang.Object
  extended by org.codehaus.mojo.appassembler.daemon.script.Platform

public class Platform
extends Object

Version:
$Id: Platform.java 15699 2012-01-06 19:07:03Z khmarbaise $
Author:
Trygve Laugstøl

Field Summary
static String UNIX_NAME
          Unix as Platform name.
static String WINDOWS_NAME
          Windows Platform name.
 
Method Summary
 boolean equals(Object o)
           
static Set getAllPlatformNames()
          Get the names of all available platforms.
static Set getAllPlatforms()
          Get all platforms.
 String getAppArguments(Daemon descriptor)
          Get the application arguments.
 String getBasedir()
           
 String getBinFileExtension()
           
 String getClassPath(Daemon daemon)
          Get the ClassPath based on the given Daemon.
 String getCommentPrefix()
           
 String getEnvSetup(Daemon daemon)
          Get the environment setup file.
 String getExtraJvmArguments(JvmSettings jvmSettings)
          Get the extra JVMArguments.
static Platform getInstance(String platformName)
          Get an instance of the named platform.
 String getInterpolationToken()
          The interpolation token either for windows or unix.
 String getName()
           
 String getNewLine()
           
 String getPathSeparator()
           
static Set getPlatformSet(List platformList)
          Redefine the list of platforms with the given one.
static Set getPlatformSet(List platformList, Set allSet)
          Get back all platforms.
 String getRepo()
           
 String getSeparator()
           
 int hashCode()
           
 boolean isShowConsoleWindow(Daemon daemon)
          ShowConsole window.
 void setBinFileExtension(String binFileExtension)
          Set the bin file extension.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIX_NAME

public static final String UNIX_NAME
Unix as Platform name.

See Also:
Constant Field Values

WINDOWS_NAME

public static final String WINDOWS_NAME
Windows Platform name.

See Also:
Constant Field Values
Method Detail

getInstance

public static Platform getInstance(String platformName)
                            throws DaemonGeneratorException
Get an instance of the named platform.

Parameters:
platformName - The name of the wished platform.
Returns:
Instance of the platform.
Throws:
DaemonGeneratorException - in case of an wrong platformname.

getAllPlatformNames

public static Set getAllPlatformNames()
Get the names of all available platforms.

Returns:
The names of the platform.

getAllPlatforms

public static Set getAllPlatforms()
Get all platforms.

Returns:
All platforms.

getPlatformSet

public static Set getPlatformSet(List platformList)
                          throws DaemonGeneratorException
Redefine the list of platforms with the given one.

Parameters:
platformList - The new list of platforms.
Returns:
Throws:
DaemonGeneratorException - in case of an error.

getPlatformSet

public static Set getPlatformSet(List platformList,
                                 Set allSet)
                          throws DaemonGeneratorException
Get back all platforms.

Parameters:
platformList -
allSet -
Returns:
Throws:
DaemonGeneratorException

getInterpolationToken

public String getInterpolationToken()
The interpolation token either for windows or unix.

Returns:
The token which is used.

getBinFileExtension

public String getBinFileExtension()
Returns:
The binary extension.

getBasedir

public String getBasedir()
Returns:
BASEDIR representation for windows or unix.

getRepo

public String getRepo()
Returns:
REPO representation for windows or unix.

getSeparator

public String getSeparator()
Returns:
The separator for windows or unix.

getPathSeparator

public String getPathSeparator()
Returns:
The path separator for windows or unix.

getCommentPrefix

public String getCommentPrefix()
Returns:
Comment prefix for windows or unix.

getNewLine

public String getNewLine()

getClassPath

public String getClassPath(Daemon daemon)
                    throws DaemonGeneratorException
Get the ClassPath based on the given Daemon.

Parameters:
daemon -
Returns:
The classpath as a string.
Throws:
DaemonGeneratorException

getExtraJvmArguments

public String getExtraJvmArguments(JvmSettings jvmSettings)
                            throws IOException
Get the extra JVMArguments.

Parameters:
jvmSettings -
Returns:
Throws:
IOException

getAppArguments

public String getAppArguments(Daemon descriptor)
Get the application arguments.

Parameters:
descriptor -
Returns:
The list of application arguments.

getEnvSetup

public String getEnvSetup(Daemon daemon)
Get the environment setup file.

Parameters:
daemon -
Returns:

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getName

public String getName()

isShowConsoleWindow

public boolean isShowConsoleWindow(Daemon daemon)
ShowConsole window.

Parameters:
daemon -
Returns:
true yes false otherwise.

setBinFileExtension

public void setBinFileExtension(String binFileExtension)
Set the bin file extension.

Parameters:
binFileExtension -


Copyright © 2006-2012 Codehaus. All Rights Reserved.