#
# WIZARD Section
#

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

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

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.correctBeans = true
task.correctBeans.name = Verify/Correct EJB for the selected server
task.correctBeans.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 = 4


#
# 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 temporary 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.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%%\\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

WL_HOME = c:\\wls45
WL_HOME.name = Root directory of WebLogic 4.51 installation
WL_HOME.type = DirectoryField
WL_HOME.page = dirs
WL_HOME.order = 4
WL_HOME.check.1 = %%WL_HOME%%
WL_HOME.check.1.type = DirExistence
WL_HOME.check.1.message = WebLogic directory '%%WL_HOME%%' does not exist
WL_HOME.check.2 = %%WL_HOME%%\\lib\\weblogicaux.jar
WL_HOME.check.2.type = FileExistence
WL_HOME.check.2.message = Unable to locate library under Weblogic Server root: %%WL_HOME%%\\lib\\weblogicaux.jar

WL_PASSWORD = together
WL_PASSWORD.name = System password
WL_PASSWORD.type = PasswordField
WL_PASSWORD.page = hotdeploy
WL_PASSWORD.order = 1

WL_PORT = 7001
WL_PORT.name = Server port
WL_PORT.type = IntField
WL_PORT.page = hotdeploy
WL_PORT.order = 2

WL_HOST = localhost
WL_HOST.name = Server host
WL_HOST.type = StringField
WL_HOST.page = hotdeploy
WL_HOST.order = 3

WL_HOTDEPLOY = true
WL_HOTDEPLOY.type = BooleanField
WL_HOTDEPLOY.name = hotdeploy
WL_HOTDEPLOY.order = 7

#
# PLUGIN Properties
#

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

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

ejb.type = 1.0
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_2.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.beasys.com/j2ee/dtds/weblogic-ejb-jar.dtd'>
#     <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://www.beasys.com/j2ee/dtds/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.beasus/com/weblogic-rdbms-persistence.dtd">
#<!DOCTYPE weblogic-rdbms-bean PUBLIC\n "-//BEA Systems, Inc.//DTD WebLogic EJB RDBMS Persistence Type 1.0//EN"\n "http://www.beasus/com/weblogic-rdbms-persistence.dtd">

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

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

env_WLLIB = %%WL_HOME%%\\lib\\unpacked_jars

env_CP = %%WL_HOME%%\\lib\\weblogicaux.jar;;\
         %%WL_HOME%%\\classes;\
         %%JAVA_HOME%%\\lib\\classes.zip;\
    %%env_WLLIB%%\\collections.zip;\
    %%env_WLLIB%%\\javax_ejb.zip;\
    %%env_WLLIB%%\\jsafe.zip;\
    %%$CLASSPATH_PROJECT%%;


env_EjbJar = %%env_DeployTemp%%\\META-INF\\ejb-jar.xml
env_WlsExtensions = %%env_DeployTemp%%\\META-INF\\weblogic-ejb-jar.xml
env_WlsRDBMSExtensions = %%env_DeployTemp%%\\META-INF\\weblogic-cmp-rdbms-jar.xml

execWeblogicEJBC = "%%env_JRE%%" -classpath "%%env_CP%%" weblogic.ejbc -d "%%env_DeployTemp%%" -nodeploy -compiler "%%env_JAVAC%%" %%fileDTDName%%

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

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

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.45 = Verify if EJB has no interface classes
write.step.45.label = >>>>>>>>>> Creating classes for EJBs 
write.step.45.type = ejbframework.step.verify.VerificationRemouteHome
write.step.45.param.Backup = %%DO_BACKUP%%
write.step.45.param.BackupCmd = cmd /c copy %%file_name%% %%BACKUP_DIR%%
write.step.45.param.BackupType = ejbframework.step.ExecuteCommandLine
write.step.45.param.StopIfError = %%STOP_IF_NOT_COMPLIANT%%
write.step.45.task = task.verify

write.step.50.label = >>>>>>>>>> Correct EJB for the selected server
write.step.50.type = ejbframework.step.CorrectEjb
write.step.50.task = task.correctBeans

write.step.60.label = >>>>>>>>>> Correct transaction attributes for the selected server
write.step.60.type = ejbframework.step.CorrectTransactions
write.step.60.param.Specification = 1.1
write.step.60.task = task.correctBeans

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.210 = %%env_WlsExtensions%%
#write.step.210.label = generating WebLogic Extensions of DeploymentDescriptor to %%env_WlsExtensions%%
#write.step.210.type = ejbframework.plugins.wls51.steps.Weblogic_ejb_jar
#write.step.210.task = task.generateDD

#write.step.220 = %%env_WlsRDBMSExtensions%%
#write.step.220.label = generating WebLogic Extensions of DeploymentDescriptor to %%env_WlsRDBMSExtensions%%
#write.step.220.type = ejbframework.plugins.wls51.steps.Weblogic_rdbms_jar
#write.step.220.task = task.generateDD

write.step.230 =
write.step.230.label = >>>>>>>>>> Generating serialized WLS45 deployment descriptor
write.step.230.type = ejbframework.plugins.wls45.steps.WLS45DTD
write.step.230.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 = "%%env_JAR%%" cvfm %%RESULT_OUT%%\\%%$PRJ_NAME%%.jar %%ManifestFile%% *.*
write.step.450.label = >>>>>>>>>> Creating JAR: %%RESULT_OUT%%\\%%$PRJ_NAME%%.jar
write.step.450.type = ejbframework.step.ExecuteCommandLine

# WLS 4.5 Hot Deploying
write.step.510 = "%%env_JRE%%" -classpath "%%env_CP%%" weblogic.deploy -port %%WL_PORT%% -host %%WL_HOST%% %%WL_PASSWORD%% file:%%RESULT_OUT%%\\%%$PRJ_NAME%%.jar
write.step.510.label = >>>>>>>>>> Hot deploying of %%WL_HOME%%\\myserver\\%%$PRJ_NAME%%.jar to running WLS 4.51 server
write.step.510.type = ejbframework.step.ExecuteCommandLine
write.step.510.task = task.hotdeploy

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