#
# Copyright 2005-2016 The Kuali Foundation
#
# Licensed under the Educational Community License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/ecl2.php
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

/**
 * Copyright 2005-2013 The Kuali Foundation
 *
 * Licensed under the Educational Community License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.opensource.org/licenses/ecl2.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// krad conversion script properties
// script paths and general properties
script.path.template="./templates"
script.path.properties=""
script.dir.tmp=System.getProperty("java.io.tmpdir")

// project
project.app = "sampleapp"
project.namespace = "KR-SAP"
project.artifact.iswar=true
project.artifact.groupId = "org.kuali.rice"
project.artifact.artifactId = "rice-sampleapp"
project.artifact.version = "2.2.1"
project.artifact.type="war"

// experimental - use svn checkout rather than existing source
project.use.svn="false"
project.svn.path="https://svn.kuali.org/repos/rice/tags/2.2.1/rice-sampleapp/"
project.svn.bin="/usr/bin/svn"
project.src.dir= System.getProperty("java.io.tmpdir") + project.artifact.artifactId

// input directory and paths - use full path for input.dir
input.dir=""
input.path.src.default="/src"
input.path.src.resources="/src/main/resources"
input.path.src.java="/src/main/java"
input.path.src.webapp="/src/main/webapp"

// output directory and paths - use full path for output.dir
output.dir=""
output.path.src.default="/src/"
output.path.src.resources="/src/main/resources/"
output.path.test.java="/src/test/java/"
output.path.src.java="/src/main/java/"
output.path.src.webapp="/src/main/webapp/"

// used for building out directory structure
output.path.list = [output.path.src.default, output.path.src.resources, output.path.src.java, output.path.test.java, output.path.src.webapp ]

// servlet properties
servlet.app  = "kradconv"
servlet.path = "kr-krad"
servlet.count = "99"

// element mapping and lists
map.convert.dd_prop= [
                           "businessObjectClass":"dataObjectClass",
                           "BusinessObjectEntry":"DataObjectEntry",
                           "validationPattern":"validCharactersConstraint", "AnyCharacterValidationPattern":"AnyCharacterPatternConstraint",
                           "AlphaValidationPattern":"AlphaPatternConstraint", "AlphaNumericValidationPattern":"AlphaNumericPatternConstraint",
                           "CharsetValidationPattern":"CharsetPatternConstraint", "NumericValidationPattern":"NumericPatternConstraint",
                           "RegexValidationPattern":"RegexPatternConstraint", "FixedPointValidationPattern":"FixedPointValidationPattern",
                           "FloatingPointValidationPattern":"FloatingPointPatternConstraint","ZipcodeValidationPattern":"ZipcodePatternConstraint",
                           "YearValidationPattern":"YearPatternConstraint","TimestampValidationPattern":"TimestampPatternConstraint",
                           "PhoneNumberValidationPattern":"PhoneUSPatternConstraint","MonthValidationPattern":"MonthPatternConstraint",
                           "JavaClassValidationPattern":"JavaClassPatternConstraint","EmailAddressValidationPattern":"EmailPatternConstraint",
                           "DateValidationPattern":"DatePatternConstraint"
  ]

map.convert.dd_bean_control = ["CheckboxControlDefinition":"Uif-CheckboxControl",
                                              "DateControlDefinition":"Uif-DateControl",
                                              "FileControlDefinition":"Uif-FileControl",
                                              "HiddenControlDefinition":"Uif-HiddenControl",
                                              "SelectControlDefinition":"Uif-DropdownControl",
                                              "TextareaControlDefinition":"Uif-TextAreaControl",
                                              "TextControlDefinition":"Uif-TextControl"]

// action forms have related controller and view
map.convert.kns_action_class = [
  "default":[controller:"org.kuali.rice.krad.web.controller.UifControllerBase", form:"org.kuali.rice.krad.web.form.UifFormBase", view: "Uif-FormView"],
  "org.kuali.rice.kns.web.struts.form.KualiAction":[controller:"org.kuali.rice.krad.web.controller.UifControllerBase", form:"org.kuali.rice.krad.web.form.UifFormBase", view: "Uif-FormView"],
  "org.kuali.rice.kns.web.struts.form.KualiInquiryAction":[controller:"org.kuali.rice.krad.web.controller.InquiryController", form:"org.kuali.rice.krad.web.form.InquiryForm", view: "Uif-InquiryView"],
  "org.kuali.rice.kns.web.struts.form.KualiDocumentActionBase":[controller:"org.kuali.rice.krad.web.controller.DocumentControllerBase", form:"org.kuali.rice.krad.web.form.DocumentFormBase", view: "Uif-DocumentView"],
  "org.kuali.rice.kns.web.struts.form.KualiLookupAction":[controller:"org.kuali.rice.krad.web.controller.LookupController", form:"org.kuali.rice.krad.web.form.LookupForm", view: "Uif-InquiryView"],
  "org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentActionBase":[controller:"org.kuali.rice.krad.web.controller.TransactionalDocumentControllerBase", form:"org.kuali.rice.krad.web.form.TransactionalDocumentFormBase", view: "Uif-TransactionalDocumentView"],
  "org.kuali.rice.kns.web.struts.form.KualiMaintenanceDocumentActionBase":[controller:"org.kuali.rice.krad.web.controller.MaintenanceDocumentController", form:"org.kuali.rice.krad.web.form.MaintenanceDocumentForm", view: "Uif-MaintenanceView"]
  ]

// action forms have related controller and view
map.convert.kns_action_form = [
  "default":[controller:"org.kuali.rice.krad.web.controller.UifControllerBase", form:"org.kuali.rice.krad.web.form.UifFormBase", view: "Uif-FormView"],
  "org.kuali.rice.kns.web.struts.form.KualiForm":[controller:"org.kuali.rice.krad.web.controller.UifControllerBase", form:"org.kuali.rice.krad.web.form.UifFormBase", view: "Uif-FormView"],
  "org.kuali.rice.kns.web.struts.form.InquiryForm":[controller:"org.kuali.rice.krad.web.controller.InquiryController", form:"org.kuali.rice.krad.web.form.InquiryForm", view: "Uif-InquiryView"],
  "org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase":[controller:"org.kuali.rice.krad.web.controller.DocumentControllerBase", form:"org.kuali.rice.krad.web.form.DocumentFormBase", view: "Uif-DocumentView"],
  "org.kuali.rice.kns.web.struts.form.LookupForm":[controller:"org.kuali.rice.krad.web.controller.LookupController", form:"org.kuali.rice.krad.web.form.LookupForm", view: "Uif-InquiryView"],
  "org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase":[controller:"org.kuali.rice.krad.web.controller.TransactionalDocumentControllerBase", form:"org.kuali.rice.krad.web.form.TransactionalDocumentFormBase", view: "Uif-TransactionalDocumentView"],
  "org.kuali.rice.kns.web.struts.form.KualiMaintenanceDocumentFormBase":[controller:"org.kuali.rice.krad.web.controller.MaintenanceDocumentController", form:"org.kuali.rice.krad.web.form.MaintenanceDocumentForm", view: "Uif-MaintenanceView"]
  ]


map.convert.jsp_to_tag = ["kul:page":"Uif-Page",
                        "kul:documentpage":"Uif-Page",
                        "kul:hiddenDocumentFields":"",
                                     "kul:documentOverview":"Uif-DocumentOverviewSection",
                                     "kul:tab":"Uif-TabSection",
                                     "kul:notes":"Uif-DocumentNotesSection",
                                     "kul:adHocRecipients":"Uif-DocumentAdHocRecipientsSection",
                                     "kul:routeLog":"Uif-DocumentRouteLogSection",
                                     "kul:panelFooter":"",
                                     "kul:documentControls":"",
                                     "table":"Uif-GridLayoutBase"]

// default binding data model
map.binding.action_bean = ["name":"", "formName":"", "class":"", "jspFile":"", "uri":"", "controller":["name":"","class":"","package":"", "uri":""]]
map.binding.form_bean = ["name":"", "class":"", "path":""]
map.binding.file = [name:"", path:"", type:""]
map.binding.class = [header:"", author:"", className:"", parentClass:"", package:"", imports:[], members:[],methods:[]]
map.binding.method = [modifier:"", returnType:"", methodName:"", parameters:[], exceptions:[], body:"", annotations:[]]
map.binding.member = [modifier:"", classType:"", memberName:"", annotations:[]]
map.binding.uifform = [header:"", author:"", className:"", "parentClass":"", package:"", imports:[], members:[],methods:[]]
map.binding.uifview = [beanId:"", viewId:"", viewName:"", viewTitle:"", viewType:"", headerText:"", entryPageId:"", items:[], formClass:"", beans:[], pages:[]]
map.binding.uifpage = [beanId:"", template:"", cssClasses:[], validationMessagesBean:"", headerText:"", disclosureBean:"", layoutManagerBean:"", readOnly:"", autoFocus:"", disclosureBean:"", helpBean:""]
map.binding.uifcontroller = ["header":"", "author":"", "package":"", "imports":[], "uri":"", "className":"", "parentClassName":"", "formClassName":"", "actionMethods":[], "privateMethods":[], "oldActionClass":""]
list.remove.dd_beans = ["inquiryDefinition","lookupDefinition","relationships"]
list.convert.excludeActions = ["KualiSimpleAction.java,KualiDocumentActionBase.java" ]

// messages or strings
msg_bean_schema = 'http://www.springframework.org/schema/p'
msg_xml_schema_legacy = 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'

template.uifcontroller.path="./src/main/resources/templates/UifControllerBaseNew.template.java"
template.uifcontroller.binding = ["header":"",
                                     "author":"",
                                     "package":"",
                                     "imports":[],
                                     "uri":"",
                                     "class_name":"",
                                     "parent_class_name":"",
                                     "form_class_name":"",
                                     "action_methods":[:],
                                     "private_methods":[:]]