#
# WIZARD Section
#

#
# task is a checkbox on the 1st page of wizard
#
task.compile = true
task.compile.name = Compile classes from selected diagram
task.compile.order = 1

task.generateDD = true
task.generateDD.name = Generate Deployment Descriptor
task.generateDD.order = 2

task.hotdeploy = true
task.hotdeploy.name = Hot Deploy
task.hotdeploy.order = 3

task.deleteTempBefore = true
task.deleteTempBefore.name = Clear temp folder before start
task.deleteTempBefore.order = 4

task.deleteTempAfter = true
task.deleteTempAfter.name = Clear temp folder after finish
task.deleteTempAfter.order = 5

task.correctTA = true
task.correctTA.name = Correct transaction attributes for the selected server
task.correctTA.order = 6

#
# Wizard pages
#
page.dirs.name = Common Properties
page.dirs.order = 1

page.hotdeploy.name = Run-time deploy
page.hotdeploy.task = hotdeploy
page.hotdeploy.order = 2

#
# Wizard properties
#

#
# NAME = default value
# NAME.name = name of the field in wizard dialog
# NAME.type = type of property editor
# NAME.page = name of page of wizard dialog where the property should appear
# NAME.order = number specifying order of the property among others on the page

TEMP_OUT = c:\\temp
TEMP_OUT.name = Folder for the temp files
TEMP_OUT.type = DirectoryField
TEMP_OUT.page = dirs
TEMP_OUT.order = 1

RESULT_OUT = c:\\temp
RESULT_OUT.name = Folder for the generated JAR file
RESULT_OUT.type = DirectoryField
RESULT_OUT.page = dirs
RESULT_OUT.order = 2

JAVA_HOME = c:\\jdk1.2.2
JAVA_HOME.name = JDK 1.2 root directory
JAVA_HOME.type = DirectoryField
JAVA_HOME.page = dirs
JAVA_HOME.order = 3
JAVA_HOME.check.1 = %%JAVA_HOME%%
JAVA_HOME.check.1.type = DirExistence
JAVA_HOME.check.1.message = JDK directory '%%JAVA_HOME%%' does not exist
JAVA_HOME.check.2 = %%JAVA_HOME%%\\bin\\javac.exe
JAVA_HOME.check.2.type = FileExistence
JAVA_HOME.check.2.message = Unable to locate JAVAC.exe application under selected JDK root: %%JAVA_HOME%%\\bin\\javac.exe
# TODO: add checking for other tools presenting

J2EE_HOME = c:\\j2sdkee1.2
J2EE_HOME.name = JDK 1.2 Enterprise Edition root directory
J2EE_HOME.type = DirectoryField
J2EE_HOME.page = dirs
J2EE_HOME.order = 4
J2EE_HOME.check.1 = %%J2EE_HOME%%
J2EE_HOME.check.1.type = DirExistence
J2EE_HOME.check.1.message = JDK1.2EE directory '%%J2EE_HOME%%' does not exist
J2EE_HOME.check.2 = %%J2EE_HOME%%\\lib\\j2ee.jar
J2EE_HOME.check.2.type = FileExistence
J2EE_HOME.check.2.message = Unable to locate j2ee.jar under selected JDK1.2EE root: %%J2EE_HOME%%\\lib\\j2ee.jar

SS_HOME = c:\\SilverStream30
SS_HOME.name = Silver Stream AS 3.0 root directory
SS_HOME.type = DirectoryField
SS_HOME.page = dirs
SS_HOME.order = 5
SS_HOME.check.1 = %%SS_HOME%%
SS_HOME.check.1.type = DirExistence
SS_HOME.check.1.message = SilverStream 3.0 root directory '%%SS_HOME%%' does not exist
SS_HOME.check.2 = %%SS_HOME%%\\bin\\SilverCmd.exe
SS_HOME.check.2.type = FileExistence
SS_HOME.check.2.message = Unable to locate SilverCmd.exe under selected SilverStream3.0 root: %%SS_HOME%%\\bin\\SilverCmd.exe

SS_PORT = 80
SS_PORT.name = Server port
SS_PORT.type = IntField
SS_PORT.page = hotdeploy
SS_PORT.order = 1

SS_HOST = localhost
SS_HOST.name = Server host
SS_HOST.type = StringField
SS_HOST.page = hotdeploy
SS_HOST.order = 2

SS_DATABASE = Examples3_EJB
SS_DATABASE.name = Database name
SS_DATABASE.type = StringField
SS_DATABASE.page = hotdeploy
SS_DATABASE.order = 3

SS_HOTDEPLOY = true
SS_HOTDEPLOY.type = BooleanField
SS_HOTDEPLOY.name = hotdeploy
SS_HOTDEPLOY.order = 4

#
# PLUGIN Properties
#

#
# not editable properties
#
# ".page" is not defined; the property doesn't appear on any page of wizard

plugin.name = SilverStream 3.0
plugin.version = 1.1
plugin.message_tab = EJB Deployment
plugin.message_prefix = SilverStream:\u0020

# SS 3.0 properties
ejb.type = 1.1
ejb.ddprologue = <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise\
                 JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

ejb.extprologue = <?xml version=\"1.0\"?>\n\
                  <?AgMetaXML 1.0?>\n\
                  <!-- Uses DTD \"deploy_ejb.dtd\"  -->

# The directory where all temp files would be located
env_DeployTemp = %%TEMP_OUT%%\\DeployEJB

env_JAVAC = %%JAVA_HOME%%\\bin\\javac
env_JAR = %%JAVA_HOME%%\\bin\\jar
env_JRE = %%JAVA_HOME%%\\bin\\java

env_CP = %%JAVA_HOME%%\\jre\\lib\\rt.jar;\
    \
    %%JAVA_HOME%%\\lib\\rt.jar;\
    %%J2EE_HOME%%\\lib\\j2ee.jar;\
    %%$CLASSPATH_PROJECT%%;

env_EjbJar = %%env_DeployTemp%%\\META-INF\\ejb-jar.xml
env_SSExtensions = %%RESULT_OUT%%\\silverstream-ejb-jar-deployed.xml

read.step.1 = echo Not implemented yet
read.step.1.label = start

# Create directories if they are not existing yet
write.step.10 = Start Export
write.step.10.type = ejbframework.step.DisplayMessage

# Create directories if they are not existing yet
write.step.20 = %%RESULT_OUT%%
write.step.20.label = >>>>>>>>>> Creating directories
write.step.20.type = ejbframework.step.CreateDir

write.step.25 = %%env_DeployTemp%%
write.step.25.label = >>>>>>>>>> Deleting previous temp files
write.step.25.type = ejbframework.step.RemoveDirSilent
write.step.25.task = task.deleteTempBefore

write.step.30 = %%env_DeployTemp%%
write.step.30.label = >>>>>>>>>> Creating folder for the temp files
write.step.30.type = ejbframework.step.CreateDir

write.step.40 = %%env_DeployTemp%%\\META-INF
write.step.40.type = ejbframework.step.CreateDir

write.step.50.label = >>>>>>>>>> Correct transaction attributes for selected server
write.step.50.type = ejbframework.step.CorrectTransactions
write.step.50.param.Specification = 1.1
write.step.50.task = task.correctTA

write.step.100 = %%env_JAVAC%%  -d %%env_DeployTemp%% -classpath %%env_CP%% %%classes_to_compile%%
write.step.100.label = >>>>>>>>>> Compiling EJB(s) to %%env_DeployTemp%%
write.step.100.type = ejbframework.step.Compile
# make the step only if task is selected
write.step.100.task = task.compile

write.step.200 = %%env_EjbJar%%
write.step.200.label = >>>>>>>>>> Generating Deployment Descriptor to %%env_EjbJar%%
write.step.200.type = ejbframework.step.ProviderDDGenerator11
write.step.200.task = task.generateDD

write.step.250 = %%env_SSExtensions%%
write.step.250.label = >>>>>>>>>> Generating SilverStream Extensions of Deployment Descriptor to %%env_SSExtensions%%
write.step.250.type = ejbframework.plugins.ss30.steps.SSExtensionsDD
write.step.250.task = task.generateDD

# "-C %%TEMP_OUT%% ." means that root of directories to archive is located in TEMP_OUT and parent
# levels of directory tree should not arrive in result jar. All files and subdirectories
# of TEMP_OUT should be added
write.step.450 = -d %%env_DeployTemp%% %%env_JAR%% cvfM %%RESULT_OUT%%\\%%$PRJ_NAME%%.jar -C %%env_DeployTemp%%\\ .
write.step.450.label = >>>>>>>>>> Creating JAR: %%RESULT_OUT%%\\%%$PRJ_NAME%%.jar
write.step.450.type = ejbframework.step.ExecuteCommandLine

# SS 3.0
write.step.500 = -d %%SS_HOME%%\\bin %%SS_HOME%%\\bin\\SilverCmd.exe ImportMedia -o %%SS_HOST%%:%%SS_PORT%% %%SS_DATABASE%% %%RESULT_OUT%%\\%%$PRJ_NAME%%.jar
write.step.500.label = >>>>>>>>>> Importing Jar to the database
write.step.500.type = ejbframework.step.ExecuteJavaTool
write.step.500.task = task.hotdeploy

write.step.510 = -d %%SS_HOME%%\\bin %%SS_HOME%%\\bin\\SilverCmd.exe DeployEJB -f %%env_SSExtensions%% %%SS_HOST%% %%SS_DATABASE%% %%$PRJ_NAME%%.jar
write.step.510.label = >>>>>>>>>> Deploying EJB Jar
write.step.510.type = ejbframework.step.ExecuteJavaTool
write.step.510.task = task.hotdeploy

# delete temp directory
write.step.1000 = %%env_DeployTemp%%
write.step.1000.type = ejbframework.step.RemoveDir
write.step.1000.label = >>>>>>>>>> Deleting temporary folder %%env_DeployTemp%%
write.step.1000.task = task.deleteTempAfter
