#
# 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.deleteTempBefore = true
task.deleteTempBefore.name = Clear temp folder before start
task.deleteTempBefore.order = 3

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

task.correctBeans = true
task.correctBeans.name = Verify/Correct EJB for the selected server
task.correctBeans.order = 5

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

page.correcture.name = Verify/Correct sources
page.correcture.task = correctBeans
page.correcture.order = 5
#
# Wizard properties
#

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

TEMP_OUT = /tmp
TEMP_OUT.name = Folder for temporary files
TEMP_OUT.type = DirectoryField
TEMP_OUT.page = dirs
TEMP_OUT.order = 1
TEMP_OUT.check.1 = %%TEMP_OUT%%
TEMP_OUT.check.1.type = DirExistence
TEMP_OUT.check.1.message = Temp directory '%%TEMP_OUT%%' does not exist

RESULT_OUT = /tmp
RESULT_OUT.name = Folder for the generated JAR file
RESULT_OUT.type = DirectoryField
RESULT_OUT.page = dirs
RESULT_OUT.order = 2
RESULT_OUT.check.1 = %%RESULT_OUT%%
RESULT_OUT.check.1.type = DirExistence
RESULT_OUT.check.1.message = Target directory '%%RESULT_OUT%%' does not exist

JAVA_HOME = /usr/local/jdk1.1
JAVA_HOME.name = JDK 1.1 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%%/lib/classes.zip
JAVA_HOME.check.2.type = FileExistence
JAVA_HOME.check.2.message = Unable to locate classes.zip library under selected JDK1.1 root: %%JAVA_HOME%%/lib/classes.zip
# TODO: add checking for other tools presenting

J2EE_HOME = /usr/local/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

CORRECT_SRC = true
CORRECT_SRC.name = Correct sources to comply with EJB 1.0 specification
CORRECT_SRC.type = BooleanField
CORRECT_SRC.order = 10
CORRECT_SRC.page = correcture

DO_BACKUP = true
DO_BACKUP.name = Backup original sources before correction?
DO_BACKUP.type = BooleanField
DO_BACKUP.order = 15
DO_BACKUP.page = correcture

BACKUP_DIR = /tmp/backup
BACKUP_DIR.name = Backup directory for the sources files (if "Correct sources" is selected)
BACKUP_DIR.type = DirectoryField
BACKUP_DIR.order = 20
BACKUP_DIR.page = correcture

DO_RETURN = true
DO_RETURN.name = Change return types in the Create methods
DO_RETURN.type = BooleanField
DO_RETURN.order = 25
DO_RETURN.page = correcture
#
# PLUGIN Properties
#

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


plugin.name = Generic 1.0
plugin.version = 1.1
plugin.message_tab = EJB Deployment
plugin.message_prefix = EJB10:\u0020

#ejb.type = 1.1
#ejb.ddprologue = <?xml version="1.0"?>\n\
#      <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.2//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd'>

ejb.type = 1.1
ejb.ddprologue = <?xml version="1.0"?>\n\
      <!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\
      <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>

ejb.extrdbmsprologue = <!DOCTYPE weblogic-rdbms-bean PUBLIC\n '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN'\n 'http://www.bea.com/servers/wls510/dtd/weblogic-rdbms-persistence.dtd'>



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

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

#Manifest file path
ManifestFile = %%RESULT_OUT%%/manifest.mf

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

env_bin = %%WL_HOME%%/bin
env_wlCP = %%WL_HOME%%/classes
env_hotdeploy = %%env_bin%%/deploy

# delete temp directory
#write.step.0 = %%TEMP_OUT%%
#write.step.0.type = ejbframework.step.RemoveDir
#write.step.0.task = task.compile

env_CP = %%JAVA_HOME%%/lib/classes.zip:\
    \
    %%J2EE_HOME%%/lib/j2ee.jar:%%$CLASSPATH_PROJECT%%

write.step.1 = Start Export
write.step.1.type = ejbframework.step.DisplayMessage
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 of dirs
write.step.20.type = ejbframework.step.CreateDir

write.step.25 = %%env_DeployTemp%%
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 temp files %%env_DeployTemp%%
write.step.30.type = ejbframework.step.CreateDir

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

# create backup dir if Verify task is selected and Backup checkbox is on
write.step.50 = CREATE_BACKUP_DIR
write.step.50.type = ejbframework.step.EvaluateLogicalExpr
write.step.50.param.oper = AND
write.step.50.param.arg1 = %%task.correctBeans%%
write.step.50.param.arg2 = %%DO_BACKUP%%

write.step.51 = %%BACKUP_DIR%%
write.step.51.label = >>>>>>>>>> Creating folder for backup files
write.step.51.type = ejbframework.step.CreateDir
write.step.51.task = CREATE_BACKUP_DIR

write.step.52 = VERIFY_AND_CORRECT
write.step.52.type = ejbframework.step.EvaluateLogicalExpr
write.step.52.param.oper = AND
write.step.52.param.arg1 = %%task.correctBeans%%
write.step.52.param.arg2 = %%CORRECT_SRC%%

write.step.53.label = >>>>>>>>>> Correct EJB for selected server
write.step.53.type = ejbframework.step.CorrectEjb
write.step.53.task = VERIFY_AND_CORRECT

write.step.54 = Correct CMP ejbCreate methods to EJB1.0 Spec
write.step.54.label = >>>>>>>>>> Correction of CMP EJBs ejbCreate methods to EJB1.0
write.step.54.type = ejbframework.step.migrate.CorrectEjbCreateCMP10
write.step.54.param.Backup = %%DO_BACKUP%%
write.step.54.param.BackupCmd = cp %%file_name%% %%BACKUP_DIR%%
write.step.54.param.BackupType = ejbframework.step.ExecuteCommandLine
write.step.54.param.remarkReturn = %%DO_RETURN%%
write.step.54.task = VERIFY_AND_CORRECT

write.step.55.label = >>>>>>>>>> Correct transaction attributes for selected server
write.step.55.type = ejbframework.step.CorrectTransactions
write.step.55.param.Specification = 1.0
write.step.55.task = VERIFY_AND_CORRECT

write.step.100 = -e null  %%env_JAVAC%%  -d %%env_DeployTemp%% -classpath %%env_CP%% %%classes_to_compile%%
write.step.100.label = >>>>>>>>>> Compiling classes to %%env_DeployTemp%%
write.step.100.type = ejbframework.step.Compile
write.step.100.task = task.compile

write.step.210 =
write.step.210.label = >>>>>>>>>> Generating serialized deployment descriptor
write.step.210.type = ejbframework.plugins.ejb10.steps.SerDTD
write.step.210.task = task.generateDD

write.step.450 = -e null -d %%env_DeployTemp%% %%env_JAR%% cvfm %%RESULT_OUT%%/%%$PRJ_NAME%%.jar %%ManifestFile%% .
write.step.450.label = >>>>>>>>>> Creating JAR file %%RESULT_OUT%%/%%$PRJ_NAME%%.jar
write.step.450.type = ejbframework.step.ExecuteCommandLine
write.step.450.task = task.generateDD

# 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
