dk.netarkivet.deploy
Class CreateTestInstance

java.lang.Object
  extended by dk.netarkivet.deploy.CreateTestInstance

public class CreateTestInstance
extends java.lang.Object

This class applies the test variables. It creates a new instance of the settings where the variables are changed, and then writes it out as a new deploy-configuration file (does not overwrite the original, but creates a new in same directory). This class is prompted by our need to be able to install and run multiple instances the NetarchiveSuite in our test-environment simultaneously.


Constructor Summary
CreateTestInstance(java.io.File configSource)
          The constructor.
 
Method Summary
 void applyTestArguments(java.lang.String offset, java.lang.String httpPort, java.lang.String environmentName, java.lang.String mailReceiver)
          Function to apply the variables.
 void createConfigurationFile(java.lang.String filename)
          Creates a file containing the new configuration instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateTestInstance

public CreateTestInstance(java.io.File configSource)
The constructor.

Parameters:
configSource - The source configuration file.
Method Detail

applyTestArguments

public void applyTestArguments(java.lang.String offset,
                               java.lang.String httpPort,
                               java.lang.String environmentName,
                               java.lang.String mailReceiver)
Function to apply the variables.

Parameters:
offset - The input offset value (1-9 below httpPort).
httpPort - The new value for the HTTP port.
environmentName - The new value for the environment name.
mailReceiver - The new value for the mailReceiver.

createConfigurationFile

public void createConfigurationFile(java.lang.String filename)
                             throws java.io.IOException
Creates a file containing the new configuration instance.

Parameters:
filename - The name of the file to be written.
Throws:
java.io.IOException - If anything goes wrong.