You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(178) |
Feb
(169) |
Mar
(286) |
Apr
(117) |
May
(98) |
Jun
(68) |
Jul
(63) |
Aug
(121) |
Sep
(88) |
Oct
(124) |
Nov
(2) |
Dec
(111) |
2007 |
Jan
(224) |
Feb
(69) |
Mar
(10) |
Apr
(72) |
May
(7) |
Jun
(21) |
Jul
(33) |
Aug
(35) |
Sep
(12) |
Oct
(22) |
Nov
(5) |
Dec
(6) |
2008 |
Jan
(2) |
Feb
(10) |
Mar
(39) |
Apr
(58) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(10) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Eric C. <ecr...@us...> - 2006-09-25 19:12:44
|
User: ecrutchfield Date: 06/09/25 12:12:44 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003 renderFormInput.vm Added: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005 renderFormInput.vm Log: support rendering of form fields for both .NET 1.1 and 2.0. Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/renderFormInput.vm Index: renderFormInput.vm =================================================================== ## ## A macro that renders the appropriate action form input field for the code-behind ## #macro( render2005ActionInput ) protected System.Web.UI.WebControls.Literal ${webform.normalizedName}Page; #foreach($action in ${webform.actions}) #foreach($parameter in ${action.parameters}) #set($aspType = "${parameter.getViewType()}") #if(!${parameter.inputHidden}) protected System.Web.UI.WebControls.Label $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl; #end #if($aspType.equals('file')) protected System.Web.UI.WebControls.FileUpload ${parameter.name}FileSelector; #elseif (${parameter.inputHidden}) protected System.Web.UI.WebControls.HiddenField $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden; #else protected System.Web.UI.WebControls.$aspType $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$aspType; #end #end protected System.Web.UI.WebControls.Button ${action.actionMethodName}Button; #end ##Now deal with tables #foreach($parameter in $webform.tables) protected System.Web.UI.WebControls.GridView ${parameter.name}DG; protected System.Web.UI.WebControls.Label ${parameter.name}Count; #end #end 1.2 +20 -25 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003/renderFormInput.vm Index: renderFormInput.vm =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003/renderFormInput.vm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- renderFormInput.vm 17 Sep 2006 17:30:44 -0000 1.1 +++ renderFormInput.vm 25 Sep 2006 19:12:44 -0000 1.2 @@ -1,33 +1,28 @@ ## -## A macro that renders the appropriate action form input field +## A macro that renders the appropriate action form input field for the code-behind ## -## parameters: -## o $parameter - the actual parameter to render -## o $ownerParameter - the parameter that is the owner of this parameter (in the case of complex objects) -## o $renderLabel - whether or not a labeled should be rendered (i.e. we don't render labels with input tables) -## -#macro(renderActionInput $parameter $ownerParameter) - protected System.Web.UI.WebControls.Literal ${webform.getNormalizedName()}Page; -#foreach($transition in ${webform.getOutgoing()}) -#if(!$transition.isHyperlink()) -#foreach($parameter in ${transition.getParameters()}) -#if(!${parameter.isHidden()}) - protected System.Web.UI.WebControls.Label ${parameter.getName()}lbl; -#end -#if(${parameter.getViewType().equals('file')}) - protected System.Web.UI.HtmlControls.HtmlInputFile ${parameter.getName()}FileSelector; +#macro( render2003ActionInput ) + protected System.Web.UI.WebControls.Literal ${webform.normalizedName}Page; +#foreach($action in ${webform.actions}) +#foreach($parameter in ${action.parameters}) +#set($aspType = "${parameter.getViewType()}") +#if(!${parameter.inputHidden}) + protected System.Web.UI.WebControls.Label $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl; +#end +#if(${aspType.equalsIgnoreCase('file')}) + protected System.Web.UI.HtmlControls.HtmlInputFile ${parameter.name}FileSelector; +#elseif ($parameter.inputHidden) + protected System.Web.UI.HtmlControls.HtmlInputHidden $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden; #else - protected System.Web.UI.WebControls.${parameter.getViewType()} ${parameter.getName()}${parameter.getViewType()}; -#end + protected System.Web.UI.WebControls.$aspType $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$aspType; #end - protected System.Web.UI.WebControls.Button ${transition.getSignalName()}Button; -#end -#end -#foreach($transition in $webform.getIncomingWithTable()) -#foreach($parameter in $transition.getParameters()) - protected System.Web.UI.WebControls.DataGrid ${parameter.getName()}DG; - protected System.Web.UI.WebControls.Label ${parameter.getName()}Count; #end + protected System.Web.UI.WebControls.Button ${action.actionMethodName}Button; #end +##Now deal with tables +#foreach($parameter in $webform.tables) + protected System.Web.UI.WebControls.DataGrid ${parameter.name}DG; + protected System.Web.UI.WebControls.Label ${parameter.name}Count; +#end #end |
From: Eric C. <ecr...@us...> - 2006-09-25 19:11:47
|
User: ecrutchfield Date: 06/09/25 12:11:46 Removed: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003 renderActionFormInput.vm Log: remove JSF code |
From: Eric C. <ecr...@us...> - 2006-09-25 19:11:22
|
User: ecrutchfield Date: 06/09/25 12:11:22 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005 webformBase.cs.vsl andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers formImplMacros.vm andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003 webformBase.aspx.cs.vsl Added: andromda-aspdotnet/src/main/resources/templates/aspdotnet validation.vm Log: refactor form population and add validation of fields Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/validation.vm Index: validation.vm =================================================================== ## ## renderValidationControl - Renders the appropriate validation control ## based on the type of field being evaluated. ## #macro (renderValidationControl $field $ownerParameter ) #if ($field.backingListName) #set ($fieldName = $field.name) #else #set ($fieldName = $field.getFormPropertyId($ownerParameter)) #end #foreach ($validatorType in $field.validatorTypes) ########### CompareValidator - DataType check #if ($validatorType.equalsIgnoreCase("integer") || $validatorType.equalsIgnoreCase("short") || $validatorType.equalsIgnoreCase("double") || $validatorType.equalsIgnoreCase("float") || $validatorType.equalsIgnoreCase("date")) #if ($validatorType.equalsIgnoreCase("integer") || $validatorType.equalsIgnoreCase("short")) #set ($dataType = "Integer") #elseif ($validatorType.equalsIgnoreCase("float") || $validatorType.equalsIgnoreCase("double")) #set ($dataType = "Double") #elseif ($validatorType.equalsIgnoreCase("date")) #set ($dataType = "Date") #else #set ($dataType = "String") #end <asp:CompareValidator runat="server" id="${fieldName}CV_$validatorType" Operator="DataTypeCheck" Type="$dataType" ControlToValidate="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$type" /> #end ########### CompareValidator - validWhen #if ($validatorType.equalsIgnoreCase("validwhen")) <asp:CompareValidator runat="server" id="${fieldName}CV_$validatorType" ControlToValidate="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$type" #foreach ($validatorVar in $field.validatorVars) #set ($operator = $validatorVar.get(0)) #set ($dataType = $stringUtils.capitalise($validatorVar.get(2))) #if ($validatorVar.get(2).toString().equalsIgnoreCase("param")) #set ($compareType = "ControlToCompare") #set ($compareTo = "$stringUtils.lowerCamelCaseName(${action.name})_$validatorVar.get(1)") #else #set ($compareType = "ValueToCompare") #set ($compareTo = "$validatorVar.get(1)") #end Operator="#convertOperator($operator)" ${compareType}="$compareTo" Type="$dataType" #end /> #end ########### RangeValidator #if ($validatorType.equalsIgnoreCase("intRange") || $validatorType.equalsIgnoreCase("doubleRange") || $validatorType.equalsIgnoreCase("floatRange") || $validatorType.equalsIgnoreCase("minlength") || $validatorType.equalsIgnoreCase("maxlength")) #if ($validatorType.equalsIgnoreCase("intRange") || $validatorType.equalsIgnoreCase("minlength") || $validatorType.equalsIgnoreCase("maxlength")) #set ($dataType = "Integer") #elseif ($validatorType.equalsIgnoreCase("floatRange") || $validatorType.equalsIgnoreCase("doubleRange")) #set ($dataType = "Double") #end <asp:RangeValidator runat="server" id="${fieldName}RV_$validatorType" Type="$dataType" ControlToValidate="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$type" #foreach ($validatorVar in $field.validatorVars) #set ($varValue = $validatorVar.get(1)) #set ($rangeMin = $validatorVar.get(0).startsWith("min")) #set ($rangeMax = $validatorVar.get(0).startsWith("max")) #if ($rangeMin) MinimumValue="${varValue}" #elseif ($rangeMax) MaximumValue="${varValue}" #end #end /> #end ########### RegularExpressionValidator #if ($validatorType.equalsIgnoreCase("mask")) <asp:RegularExpressionValidator runat="server" id="${fieldName}REV_$validatorType" ControlToValidate="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$type" #foreach ($validatorVar in $field.validatorVars) ValidationExpression="$validatorVar.get(1)" #end /> #end #end #end ## ## renderValidationAttribute - Renders the appropriate attribute ## for the validation control. ## #macro(renderValidationAttribute $field $ownerParameter) #if ($field.backingListName) #set ($fieldName = $field.name) #else #set ($fieldName = $field.getFormPropertyId($ownerParameter)) #end #foreach ($validatorType in $field.validatorTypes) ########### CompareValidator - DataType/validWhen check #if ($validatorType.equalsIgnoreCase("integer") || $validatorType.equalsIgnoreCase("short") || $validatorType.equalsIgnoreCase("double") || $validatorType.equalsIgnoreCase("float") || $validatorType.equalsIgnoreCase("date") || $validatorType.equalsIgnoreCase("validwhen")) protected System.Web.UI.WebControls.CompareValidator ${fieldName}CV_$validatorType; #end ########### RangeValidator #if ($validatorType.equalsIgnoreCase("intRange") || $validatorType.equalsIgnoreCase("doubleRange") || $validatorType.equalsIgnoreCase("floatRange") || $validatorType.equalsIgnoreCase("minlength") || $validatorType.equalsIgnoreCase("maxlength")) protected System.Web.UI.WebControls.RangeValidator ${fieldName}RV_$validatorType; #end ########### RegularExpressionValidator #if ($validatorType.equalsIgnoreCase("mask")) protected System.Web.UI.WebControls.RegularExpressionValidator ${fieldName}REV_$validatorType; #end #end #end ## ## renderValidationErrorMessage - Renders the appropriate error message ## for the validation control. ## #macro(renderValidationErrorMessage $field $ownerParameter) #if ($dotNetVersion=="2.0") #set ($resourceBegin = "Resources.GeneratedResources.errors_") #set ($resourceEnd = "") #else #set ($resourceBegin = 'resourceManager.GetString("') #set ($resourceEnd = '")') #end #if ($field.backingListName) #set ($fieldName = $field.name) #else #set ($fieldName = $field.getFormPropertyId($ownerParameter)) #end #set ($displayName = $stringUtils.capitalise($fieldName)) #foreach ($validatorType in $field.validatorTypes) ########### CompareValidator - DataType/validWhen check #if ($validatorType.equalsIgnoreCase("integer") || $validatorType.equalsIgnoreCase("short") || $validatorType.equalsIgnoreCase("double") || $validatorType.equalsIgnoreCase("float")) this.${fieldName}CV_${validatorType}.ErrorMessage = String.Format(${resourceBegin}${validatorType}${resourceEnd}, "$displayName"); #end #if ($validatorType.equalsIgnoreCase("date")) this.${fieldName}CV_${validatorType}.ErrorMessage = String.Format(${resourceBegin}${validatorType}${resourceEnd}, "$displayName", "$defaultDateFormat"); #end ########### RangeValidator #if ($validatorType.equalsIgnoreCase("intRange") || $validatorType.equalsIgnoreCase("doubleRange") || $validatorType.equalsIgnoreCase("floatRange") || $validatorType.equalsIgnoreCase("minlength") || $validatorType.equalsIgnoreCase("maxlength")) #foreach ($validatorVar in $field.validatorVars) #if ($validatorVar.get(0).startsWith("min")) #set ($rangeMin = $validatorVar.get(1)) #else #set ($rangeMax = $validatorVar.get(1)) #end #end this.${fieldName}RV_${validatorType}.ErrorMessage = String.Format(${resourceBegin}range${resourceEnd}, new object[]{"${displayName}", "${rangeMin}", "${rangeMax}"}); #end ########### RegularExpressionValidator #if ($validatorType.equalsIgnoreCase("mask")) this.${fieldName}REV_${validatorType}.ErrorMessage = String.Format(${resourceBegin}invalid${resourceEnd}, "${displayName}"); #end #if ($validatorType.equalsIgnoreCase("validwhen")) this.${fieldName}CV_${validatorType}.ErrorMessage = String.Format(${resourceBegin}invalid${resourceEnd}, "${displayName}"); #end #end #end ## ## convertOperator - converts a C# style operator to an operator ## compatible with the Operator property of a validation control ## #macro(convertOperator $op) #if ($op.equals("=="))Equal#elseif ($op.equals("!="))NotEqual#elseif ($op.equals("<"))LessThan#elseif ($op.equals("<="))LessThanEqual#elseif ($op.equals(">"))GreaterThan#elseif ($op.equals(">="))GreaterThanEqual#end #end 1.2 +33 -39 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webformBase.cs.vsl Index: webformBase.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webformBase.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- webformBase.cs.vsl 17 Sep 2006 17:30:41 -0000 1.1 +++ webformBase.cs.vsl 25 Sep 2006 19:11:21 -0000 1.2 @@ -1,23 +1,3 @@ -## -## This macro renders the line that sets the property -## on the controllers form using the value of the input field defined on the page -## -#macro( populateFormProperties ) -#if(!$action.tableAction && !$action.tableLink) -#foreach($parameter in ${action.parameters}) -#if(!${parameter.hidden} && !${parameter.inputTable}) -#set($viewType = ${parameter.viewType}) -#set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$viewType") -## if we can't get the value from the field (e.g. Label) then we need to get it from it's Hidden counterpart. -#if($viewType.equalsIgnoreCase("HyperLink") || $viewType.equalsIgnoreCase("Label")) -#set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden") -#end -#set($formProperty = "$parameter.capitalisedName") - org.andromda.cartridges.aspdotnet.FormPopulator.PopulateForm(${fieldName}, base.Controller.${action.formImplementationPropertyName}, "${formProperty}"); -#end -#end -#end -#end #set($generatedFile = "${webform.fullyQualifiedPath}/${webform.normalizedName}Base.cs") #set($key = "@${webform.useCase.normalizedName}.${webform.normalizedName}") using System; @@ -41,29 +21,23 @@ /// </summary> public abstract class ${webform.normalizedName}Base : ${webform.useCase.normalizedName}PageBase { - protected System.Web.UI.WebControls.Literal ${webform.normalizedName}Page; -#foreach($action in ${webform.actions}) +## Render attributes for any controls on the page +#render2005ActionInput() +## Now render attributes for any validator controls on the page +#foreach($action in ${webform.outgoing}) #foreach($parameter in ${action.parameters}) -#set($aspType = "${parameter.getViewType()}") -#if(!${parameter.hidden}) - protected System.Web.UI.WebControls.Label $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl; -#end -#if($aspType.equals('file')) - protected System.Web.UI.WebControls.FileUpload ${parameter.name}FileSelector; +#if ($parameter.validationRequired) +#if (!$parameter.complex) +#renderValidationAttribute($parameter "") #else - protected System.Web.UI.WebControls.${parameter.getViewType()} $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$aspType; -#if(${aspType.equalsIgnoreCase('hyperlink')}||${aspType.equalsIgnoreCase('label')}) - protected System.Web.UI.HtmlControls.HtmlInputHidden $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden; +#foreach ($attribute in $parameter.attributes) +#if ($attribute.validationRequired) +#renderValidationAttribute($attribute $parameter) +#end #end #end #end - protected System.Web.UI.WebControls.Button ${action.actionMethodName}Button; #end - -##Now deal with tables -#foreach($parameter in $webform.tables) - protected System.Web.UI.WebControls.GridView ${parameter.name}DG; - protected System.Web.UI.WebControls.Label ${parameter.name}Count; #end protected void Page_Load(object sender, System.EventArgs e) @@ -79,10 +53,30 @@ this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.viewType}.DataSource = base.Controller.${action.formImplementationPropertyName}.Get$stringUtils.capitalize(${parameter.backingListName})(); this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.viewType}.DataBind(); #end +## Now render any error messages for the validation controls. This is done +## here because we need to do some string manipulation on the value we pull from +## the resource. +#if ($parameter.validationRequired) +#if (!$parameter.complex) +#renderValidationErrorMessage($parameter "") +#else +#foreach ($attribute in $parameter.attributes) +#if ($attribute.validationRequired) +#renderValidationErrorMessage($attribute $parameter) +#end +#end +#end +#end #end #end #end #foreach($parameter in $webform.tables) +##@todo We should be able to set the data source for this.${parameter.name}DG, +## but how do we know which Form object to pull it from. There could have +## been multiple views incoming to this view, so we can't be sure of +## the name of the property on the controller where the value was set. +## this.${parameter.name}DG.DataSource = this.Controller.${parameter.action.formImplementationPropertyName}.$stringUtils.capitalise(${parameter.name}); +## this.${parameter.name}DG.DataBind(); if(!(this.${parameter.name}DG.PageCount > 1)) ${parameter.name}DG.AllowPaging = false; if(this.${parameter.name}DG.Rows.Count < 1) @@ -103,7 +97,7 @@ protected void $stringUtils.capitalize(${parameter.name})DG_SelectedIndexChanged(object sender, System.EventArgs e) { //${toDoTag} Not really sure what to do here. - //${action.getNavigation()} + //action.getNavigation() } protected void $stringUtils.capitalize(${parameter.name})DG_Page(Object sender, GridViewPageEventArgs e) @@ -135,7 +129,7 @@ protected abstract void PageLoad(); #foreach($table in $webform.tables) - protected void ${table.name}DG_ItemCommand(object source, DataGridCommandEventArgs e) + protected void $stringUtils.capitalise(${table.name})_RowCommand(object source, GridViewCommandEventArgs e) { System.Collections.Specialized.StringDictionary nameValuePairs = org.andromda.cartridges.aspdotnet.StringUtils.ParseCommandArgument(e.CommandArgument); switch (e.CommandName) 1.2 +20 -0 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/formImplMacros.vm Index: formImplMacros.vm =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/formImplMacros.vm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- formImplMacros.vm 17 Sep 2006 17:30:51 -0000 1.1 +++ formImplMacros.vm 25 Sep 2006 19:11:21 -0000 1.2 @@ -72,6 +72,26 @@ ## +## This macro renders the code that sets the property +## of the form using the value of the input field defined on the page. +## +#macro( populateFormProperties ) +#if(!$action.tableAction && !$action.tableLink) +#foreach($parameter in ${action.parameters}) +#if(!${parameter.inputHidden} && !${parameter.inputTable}) +#set($viewType = ${parameter.viewType}) +#set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$viewType") +## if we can't get the value from the field (e.g. Label) then we need to get it from it's Hidden counterpart. +#if($viewType.equalsIgnoreCase("HyperLink") || $viewType.equalsIgnoreCase("Label")) +#set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden") +#end +#set($formProperty = "$parameter.capitalisedName") + org.andromda.cartridges.aspdotnet.FormPopulator.PopulateForm(${fieldName}, base.Controller.${action.formImplementationPropertyName}, "${formProperty}"); +#end +#end +#end +#end +## ## This macro renders the date/time formatters within the form implementation ## #macro(renderDateTimeFormatters $field $ownerParameter) 1.2 +26 -39 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003/webformBase.aspx.cs.vsl Index: webformBase.aspx.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003/webformBase.aspx.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- webformBase.aspx.cs.vsl 17 Sep 2006 17:30:45 -0000 1.1 +++ webformBase.aspx.cs.vsl 25 Sep 2006 19:11:21 -0000 1.2 @@ -1,23 +1,3 @@ -## -## This macro renders the line that sets the property -## on the controllers form using the value of the input field defined on the page -## -#macro( populateFormProperties ) -#if(!$action.tableAction && !$action.tableLink) -#foreach($parameter in ${action.parameters}) -#if(!${parameter.hidden} && !${parameter.inputTable}) -#set($viewType = ${parameter.viewType}) -#set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$viewType") -## if we can't get the value from the field (e.g. Label) then we need to get it from it's Hidden counterpart. -#if($viewType.equalsIgnoreCase("HyperLink") || $viewType.equalsIgnoreCase("Label")) -#set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden") -#end -#set($formProperty = "$parameter.capitalisedName") - org.andromda.cartridges.aspdotnet.FormPopulator.PopulateForm(${fieldName}, base.Controller.${action.formImplementationPropertyName}, "${formProperty}"); -#end -#end -#end -#end #set($generatedFile = "${webform.fullyQualifiedPath}/${webform.normalizedName}Base.cs") #set($key = "@${webform.useCase.normalizedName}.${webform.normalizedName}") using System; @@ -41,29 +21,22 @@ /// </summary> public abstract class ${webform.normalizedName}Base : ${webform.useCase.normalizedName}PageBase { - protected System.Web.UI.WebControls.Literal ${webform.normalizedName}Page; -#foreach($action in ${webform.actions}) +#render2003ActionInput() +## Now render attributes for any validator controls on the page +#foreach($action in ${webform.outgoing}) #foreach($parameter in ${action.parameters}) -#set($aspType = "${parameter.getViewType()}") -#if(!${parameter.hidden}) - protected System.Web.UI.WebControls.Label $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl; -#end -#if(${aspType.equalsIgnoreCase('file')}) - protected System.Web.UI.HtmlControls.HtmlInputFile ${parameter.name}FileSelector; +#if ($parameter.validationRequired) +#if (!$parameter.complex) +#renderValidationAttribute($parameter "") #else - protected System.Web.UI.WebControls.${parameter.getViewType()} $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$aspType; -#if(${aspType.equalsIgnoreCase('hyperlink')}||${aspType.equalsIgnoreCase('label')}) - protected System.Web.UI.HtmlControls.HtmlInputHidden $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden; +#foreach ($attribute in $parameter.attributes) +#if ($attribute.validationRequired) +#renderValidationAttribute($attribute $parameter) +#end #end #end #end - protected System.Web.UI.WebControls.Button ${action.actionMethodName}Button; #end - -##Now deal with tables -#foreach($parameter in $webform.tables) - protected System.Web.UI.WebControls.DataGrid ${parameter.name}DG; - protected System.Web.UI.WebControls.Label ${parameter.name}Count; #end #region Web Form Designer generated code @@ -103,7 +76,7 @@ #foreach($action in ${webform.outgoing}) #if(!$action.hyperlink) #foreach($parameter in ${action.parameters}) -#if(!${parameter.isHidden()}) +#if(!${parameter.inputHidden}) this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl.Text = resourceManager.GetString("${key}.${parameter.name}lbl"); #if(!${parameter.getViewType().equals('file')}) $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.getViewType()}.ToolTip = resourceManager.GetString("${key}.${parameter.name}${parameter.getViewType()}.Help"); @@ -122,6 +95,20 @@ this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.viewType}.DataSource = base.Controller.${action.formImplementationPropertyName}.Get$stringUtils.capitalize(${parameter.backingListName})(); this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.viewType}.DataBind(); #end +## Now render any error messages for the validation controls. This is done +## here because we need to do some string manipulation on the value we pull from +## the resource. +#if ($parameter.validationRequired) +#if (!$parameter.complex) +#renderValidationErrorMessage($parameter "") +#else +#foreach ($attribute in $parameter.attributes) +#if ($attribute.validationRequired) +#renderValidationErrorMessage($attribute $parameter) +#end +#end +#end +#end #end #end #end @@ -155,7 +142,7 @@ private void ${parameter.name}DG_SelectedIndexChanged(object sender, System.EventArgs e) { //${toDoTag} Not really sure what to do here. - //${action.getNavigation()} + //\${action.getNavigation()} } protected void $stringUtils.capitalize(${parameter.name})DG_Page(Object sender, DataGridPageChangedEventArgs e) |
From: Eric C. <ecr...@us...> - 2006-09-25 19:09:49
|
User: ecrutchfield Date: 06/09/25 12:09:49 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet sessionObject.cs.vsl Log: fix visibility reference Revision Changes Path 1.3 +2 -2 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/sessionObject.cs.vsl Index: sessionObject.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/sessionObject.cs.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- sessionObject.cs.vsl 20 Sep 2006 17:00:41 -0000 1.2 +++ sessionObject.cs.vsl 25 Sep 2006 19:09:49 -0000 1.3 @@ -11,7 +11,7 @@ { #region Private attributes #foreach($attribute in ${sessionObject.attributes}) -#set($vis = $attribute.visibilty) +#set($vis = $attribute.visibility) #if(!$vis.equalsIgnoreCase("public")) #set($vis = "private") #end @@ -34,7 +34,7 @@ #foreach($attribute in ${sessionObject.attributes}) #if($attribute.visibility.equalsIgnoreCase("public")) /// <summary> -$attribute.getDocumentation(" /// "); +$attribute.getDocumentation(" /// ") /// </summary> $attribute.visibility ${attribute.type.fullyQualifiedName} $stringUtils.capitalize(${attribute.name}) { |
From: Eric C. <ecr...@us...> - 2006-09-25 19:08:25
|
User: ecrutchfield Date: 06/09/25 12:08:22 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers UIPController.cs.vsl Log: fix problem with final state transition logic Revision Changes Path 1.2 +10 -6 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/UIPController.cs.vsl Index: UIPController.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/UIPController.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- UIPController.cs.vsl 17 Sep 2006 17:30:51 -0000 1.1 +++ UIPController.cs.vsl 25 Sep 2006 19:08:22 -0000 1.2 @@ -11,7 +11,7 @@ namespace $controller.packageName { /// <summary> -$controller.getDocumentation(" /// ") +$controller.getDocumentation(" /// ", 80, false) /// </summary> public abstract class $controller.name { @@ -40,7 +40,6 @@ /// </summary> public void StartUseCase() { - //TODO: instantiate form and populate HttpContext.Current.Response.Redirect(this.${stringUtils.capitalize(${controller.useCase.normalizedName})}()); } @@ -50,7 +49,7 @@ #region Abstract methods #foreach($operation in ${controller.operations}) /// <summary> -$operation.getDocumentation(" /// ") +$operation.getDocumentation(" /// ", 80, false) /// </summary> ${operation.formSignature}; @@ -86,21 +85,26 @@ #foreach ($action in $controller.useCase.actions) /// <summary> -$action.getDocumentation(" /// ") +$action.getDocumentation(" /// ", 80, false) /// </summary> public virtual string ${stringUtils.capitalize(${action.triggerName})}() { - //${toDoTag} How does the form get populated? +#if ($action.finalStateTarget) +#set ($targetUseCase = $action.target.targetUseCase) + $targetUseCase.controller.fullyQualifiedName nextController = new ${targetUseCase.controller.fullyQualifiedName}(); + return nextController.StartUseCase(); +#else string forward = String.Empty; ${action.fullyQualifiedFormImplementationName} form = this.${action.formImplementationPropertyName}; forward = #processTransition($action) this.${action.formImplementationPropertyName} = form; return forward; +#end } #foreach ($actionState in $action.actionStates) /// <summary> -$actionState.getDocumentation(" /// ") +$actionState.getDocumentation(" /// ", 80, false) /// </summary> private string ${actionState.actionMethodName}(#if (!$action.formFields.empty) $action.fullyQualifiedFormImplementationName form#end) { |
From: Eric C. <ecr...@us...> - 2006-09-25 19:07:39
|
User: ecrutchfield Date: 06/09/25 12:07:39 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers Form.cs.vsl formMacros.vm formImpl.cs.vsl Log: basic formatting changes Revision Changes Path 1.2 +4 -3 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/Form.cs.vsl Index: Form.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/Form.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- Form.cs.vsl 17 Sep 2006 17:30:50 -0000 1.1 +++ Form.cs.vsl 25 Sep 2006 19:07:38 -0000 1.2 @@ -4,7 +4,7 @@ #set($folder = "target/src/") #end #set ($generatedFile = "${folder}${operation.fullyQualifiedFormPath}/I${operation.formName}.cs") -// license-header java merge-point +// license-header cs merge-point using System; namespace $operation.owner.packageName @@ -16,7 +16,7 @@ /// <seealso cref="${operation.owner.fullyQualifiedName}.${operation.signature}"/> /// </summary> /// <remarks> -$operation.getDocumentation(" /// ") +$operation.getDocumentation(" /// ", 80, false) /// </remarks> public interface I${operation.formName} { @@ -29,7 +29,7 @@ #set ($fieldTypeName = $field.type.fullyQualifiedName) #end /// <summary> -$field.getDocumentation(" /// ") +$field.getDocumentation(" /// ", 80, false) /// </summary> $fieldTypeName $stringUtils.capitalize(${field.name}) { @@ -39,6 +39,7 @@ set; #end } + ## - don't allow fields with default values to be set #if (!$field.defaultValuePresent) #if (!$field.complex && $field.selectable) 1.2 +1 -2 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/formMacros.vm Index: formMacros.vm =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/formMacros.vm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- formMacros.vm 17 Sep 2006 17:30:50 -0000 1.1 +++ formMacros.vm 25 Sep 2006 19:07:38 -0000 1.2 @@ -11,12 +11,10 @@ #set ($valueListName = $field.getValueListName($ownerParameter)) #set ($backingListName = $field.getBackingListName($ownerParameter)) #end - #set ($listType = "System.Object[]") #set ($labelListMethod = $stringUtils.capitalize($labelListName)) #set ($valueListMethod = $stringUtils.capitalize($valueListName)) #set ($backingListMethod = $stringUtils.capitalize($backingListName)) - /// <summary> /// Get the backing list for the ${action.name} field. You must have first set the labels /// and values via the <cref="Set${labelListMethod}"/> and <cref="Set${valueListMethod}"/> methods. @@ -36,4 +34,5 @@ /// </summary> /// <param name="list">a string array of the values</param> void Set${valueListMethod}(string[] list); + #end \ No newline at end of file 1.2 +2 -2 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/formImpl.cs.vsl Index: formImpl.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/formImpl.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- formImpl.cs.vsl 17 Sep 2006 17:30:50 -0000 1.1 +++ formImpl.cs.vsl 25 Sep 2006 19:07:39 -0000 1.2 @@ -10,7 +10,7 @@ namespace ${action.packageName} { /// <summary> -$action.getDocumentation(" /// ") +$action.getDocumentation(" /// ", 80, false) /// </summary> [Serializable] public class $action.formImplementationName #if ($stringUtils.isNotBlank($action.formImplementationInterfaceList)) : $action.formImplementationInterfaceList#end @@ -39,7 +39,7 @@ /// Get/set the value for the ${field.name} field. /// </summary> /// <remarks> -$field.getDocumentation(" /// ") +$field.getDocumentation(" /// ", 80, false) /// </remarks> public $fieldTypeName ${stringUtils.capitalize($field.name)} { |
From: Eric C. <ecr...@us...> - 2006-09-25 19:05:18
|
User: ecrutchfield Date: 06/09/25 12:05:18 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers Controller.cs.vm Log: removed comment since final state transitions are supposedly handled Revision Changes Path 1.2 +1 -1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/Controller.cs.vm Index: Controller.cs.vm =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers/Controller.cs.vm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- Controller.cs.vm 17 Sep 2006 17:30:51 -0000 1.1 +++ Controller.cs.vm 25 Sep 2006 19:05:18 -0000 1.2 @@ -6,7 +6,7 @@ null; #elseif ($transition.enteringFinalState) #set ($targetUseCase = $transition.target.targetUseCase) -this.${targetUseCase.normalizedName}(); //TODO: deal with final state transitions +this.${targetUseCase.normalizedName}(); #elseif ($transition.enteringView) "~/target/src/${transition.target.fullyQualifiedPath}/${transition.target.normalizedName}.aspx"; #elseif ($transition.enteringDecisionPoint) |
From: Eric C. <ecr...@us...> - 2006-09-25 19:03:16
|
User: ecrutchfield Date: 06/09/25 12:02:48 Modified: andromda-aspdotnet/src/main/resources/resources FormPopulator.cs Log: added better error handling Revision Changes Path 1.2 +13 -0 cartridges/andromda-aspdotnet/src/main/resources/resources/FormPopulator.cs Index: FormPopulator.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/resources/FormPopulator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- FormPopulator.cs 17 Sep 2006 17:30:52 -0000 1.1 +++ FormPopulator.cs 25 Sep 2006 19:02:48 -0000 1.2 @@ -22,6 +22,15 @@ /// <param name="propertyName">The property of the form where the value will be written.</param> public static void PopulateForm(System.Web.UI.Control fromControl, object toForm, string propertyName) { + if (fromControl == null) + throw new ArgumentNullException("fromControl"); + + if (toForm == null) + throw new ArgumentNullException("toForm"); + + if (propertyName == null) + throw new ArgumentNullException("propertyName"); + object val = null; switch(fromControl.GetType().FullName) { @@ -47,6 +56,10 @@ default: throw new ArgumentException(String.Format("The {0} control is not yet supported.", fromControl.GetType().FullName)); } + + if (val == null) + throw new ArgumentNullException(String.Format("The value of the {0} control can't be null.", fromControl.GetType().FullName)); + PropertyInfo propInfo = toForm.GetType().GetProperty(propertyName); object assignedValue = null; switch (propInfo.PropertyType.Name) |
From: Chris M. <cm...@us...> - 2006-09-21 02:33:09
|
User: cmicali Date: 06/09/20 19:33:08 Modified: andromda-cs pom.xml andromda-nhibernate pom.xml andromda-nspring pom.xml Log: - Updated to 1.0 Revision Changes Path 1.7 +1 -0 cartridges/andromda-cs/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/pom.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- pom.xml 15 Aug 2006 22:48:43 -0000 1.6 +++ pom.xml 21 Sep 2006 02:33:08 -0000 1.7 @@ -11,6 +11,7 @@ <packaging>andromda-cartridge</packaging> <name>AndroMDA C# Cartridge</name> <description>Produces C# objects from a model.</description> + <version>1.0</version> <developers> <developer> <name>Naresh Bhatia</name> 1.9 +1 -0 cartridges/andromda-nhibernate/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/pom.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- pom.xml 8 Sep 2006 14:48:54 -0000 1.8 +++ pom.xml 21 Sep 2006 02:33:08 -0000 1.9 @@ -10,6 +10,7 @@ <artifactId>andromda-nhibernate-cartridge</artifactId> <packaging>andromda-cartridge</packaging> <name>AndroMDA NHibernate Cartridge</name> + <version>1.0</version> <description> Produces NHibernate entities optionally services implemented as Session EJB facades. </description> 1.4 +1 -0 cartridges/andromda-nspring/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/pom.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- pom.xml 15 Aug 2006 22:48:47 -0000 1.3 +++ pom.xml 21 Sep 2006 02:33:08 -0000 1.4 @@ -11,6 +11,7 @@ <packaging>andromda-cartridge</packaging> <name>AndroMDA NSpring Cartridge</name> <description>Generates NSpring with NHibernate support</description> + <version>1.0</version> <developers> <developer> <name>Naresh Bhatia</name> |
From: Eric C. <ecr...@us...> - 2006-09-20 17:00:47
|
User: ecrutchfield Date: 06/09/20 10:00:44 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet sessionObject.cs.vsl Log: make Serializable, don't create public properties for attributes unless they're marked public, apply standard private attribute naming conventions Revision Changes Path 1.2 +25 -6 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/sessionObject.cs.vsl Index: sessionObject.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/sessionObject.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- sessionObject.cs.vsl 17 Sep 2006 17:30:50 -0000 1.1 +++ sessionObject.cs.vsl 20 Sep 2006 17:00:41 -0000 1.2 @@ -6,25 +6,44 @@ /// <summary> ${sessionObject.getDocumentation(" /// ")} /// </summary> + [Serializable] public class ${sessionObject.name} { + #region Private attributes #foreach($attribute in ${sessionObject.attributes}) - private ${attribute.type.fullyQualifiedName} ${attribute.name}; +#set($vis = $attribute.visibilty) +#if(!$vis.equalsIgnoreCase("public")) +#set($vis = "private") #end + $vis ${attribute.type.fullyQualifiedName} _${attribute.name}; +#end + #endregion + + #region Constructor(s) public ${sessionObject.name}() {} ${sessionObject.constructorSignature} { #foreach($attribute in ${sessionObject.attributes}) - this.${attribute.name} = ${attribute.name}; + this._${attribute.name} = ${attribute.name}; #end } + #endregion + + #region Properties #foreach($attribute in ${sessionObject.attributes}) - public ${attribute.type.fullyQualifiedName} $stringUtils.capitalize(${attribute.name}) +#if($attribute.visibility.equalsIgnoreCase("public")) + /// <summary> +$attribute.getDocumentation(" /// "); + /// </summary> + $attribute.visibility ${attribute.type.fullyQualifiedName} $stringUtils.capitalize(${attribute.name}) { - get { return this.${attribute.name};} - set { this.${attribute.name} = value;} + get { return this._${attribute.name};} + set { this._${attribute.name} = value;} } + +#end #end + #endregion } } \ No newline at end of file |
From: Eric C. <ecr...@us...> - 2006-09-20 16:55:26
|
User: ecrutchfield Date: 06/09/20 09:55:22 Modified: andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades AspParameterLogicImpl.java Log: Fix bug with handleGetRadioButtonGroup and override getDefaultValue to handle strings. Revision Changes Path 1.2 +21 -2 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspParameterLogicImpl.java Index: AspParameterLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspParameterLogicImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- AspParameterLogicImpl.java 17 Sep 2006 17:30:04 -0000 1.1 +++ AspParameterLogicImpl.java 20 Sep 2006 16:55:22 -0000 1.2 @@ -41,6 +41,25 @@ protected Logger logger = Logger.getLogger(this.getClass()); /** + * Overridden to provide quotes around string types. + * + * @see org.andromda.metafacades.uml.ParameterFacade#getDefaultValue() + */ + public String getDefaultValue() + { + String defaultValue = super.getDefaultValue(); + if (StringUtils.isNotBlank(defaultValue)) + { + final ClassifierFacade type = this.getType(); + if (type != null && type.isStringType()) + { + defaultValue = "\"" + defaultValue + "\""; + } + } + return defaultValue; + } + + /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getViewType() */ protected java.lang.String handleGetViewType() { @@ -279,8 +298,8 @@ } protected String handleGetRadioButtonGroup() { - return this.findTaggedValue(CommonProperties.RADIO_BUTTON_GROUP) - .toString(); + Object val = this.findTaggedValue(CommonProperties.RADIO_BUTTON_GROUP); + return val == null ? "" : val.toString(); } /** |
From: Eric C. <ecr...@us...> - 2006-09-18 00:11:27
|
User: ecrutchfield Date: 06/09/17 17:11:26 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003 webform.aspx.cs.vsl Log: fix method call when generating dummy data Revision Changes Path 1.2 +2 -2 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003/webform.aspx.cs.vsl Index: webform.aspx.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003/webform.aspx.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- webform.aspx.cs.vsl 17 Sep 2006 17:30:44 -0000 1.1 +++ webform.aspx.cs.vsl 18 Sep 2006 00:11:26 -0000 1.2 @@ -16,8 +16,8 @@ #foreach($action in $webform.outgoing) #foreach($parameter in $action.parameters) #if ($parameter.isSelectable()) - base.Controller.${action.formImplementationPropertyName}.Set${parameter.labelListName}(new string[]{"Dummy Item 1", "Dummy Item 2", "Dummy Item 3"}); - base.Controller.${action.formImplementationPropertyName}.Set${parameter.valueListName}(new string[]{"1", "2", "3"}); + base.Controller.${action.formImplementationPropertyName}.Set$stringUtils.capitalize($parameter.labelListName)(new string[]{"Dummy Item 1", "Dummy Item 2", "Dummy Item 3"}); + base.Controller.${action.formImplementationPropertyName}.Set$stringUtils.capitalize($parameter.valueListName)(new string[]{"1", "2", "3"}); #end #end #end |
From: Eric C. <ecr...@us...> - 2006-09-18 00:10:39
|
User: ecrutchfield Date: 06/09/17 17:10:38 Modified: andromda-aspdotnet/src/site/axdoc howto2.xml Log: removed screenshots for now Revision Changes Path 1.2 +0 -61 cartridges/andromda-aspdotnet/src/site/axdoc/howto2.xml Index: howto2.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/site/axdoc/howto2.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto2.xml 17 Sep 2006 17:31:53 -0000 1.1 +++ howto2.xml 18 Sep 2006 00:10:38 -0000 1.2 @@ -365,67 +365,6 @@ be edited manually when using AndroMDA. </p> </subsection> - <subsection name="Screenshots"> - <p> - The screenshots shown here are taken from the - <a href="samples.html#online-store">Online-Store</a> sample, which is part - of the main AndroMDA distribution. - </p> - <div class="screenshot"> - <table> - <tr> - <td><img src="images/org/andromda/test/screenshots/thumb1.gif"/></td> - <td> - <a href="images/org/andromda/test/screenshots/screen1.gif">(Larger View)</a> - <p> - This screenshot shows a typical custom login screen, - note how the passwords are masked using asterisks. - The password confirmation is also automatically rendered into the page using - JavaScript (server-side validation will also be performed). The tooltip is shown - when hovering over an input field, in this case the password field. Also notice the - online-help link at the bottom of the screen. - </p> - </td> - </tr> - <tr> - <td><img src="images/org/andromda/test/screenshots/thumb2.gif"/></td> - <td> - <a href="images/org/andromda/test/screenshots/screen2.gif">(Larger View)</a> - <p> - Another screen showing some different types of input fields, depending - on the type of the - expected input (integer, date, email, creditcard, url, ...) a specific validation - will be performed to make sure the user does not needlessly call the server. This - validation makes use of the Struts validation framework. - </p> - </td> - </tr> - <tr> - <td><img src="images/org/andromda/test/screenshots/thumb3.gif"/></td> - <td> - <a href="images/org/andromda/test/screenshots/screen3.gif">(Larger View)</a> - <p> - This screen is what you see when you click on the online-help link: a list of - actions, input fields and corresponding documentation. What you see here is - (like everything else in this how-to) 100% generated by the cartridge, - information can be added on the corresponding element in the UML model. - </p> - </td> - </tr> - <tr> - <td><img src="images/org/andromda/test/screenshots/thumb4.gif"/></td> - <td> - <a href="images/org/andromda/test/screenshots/screen4.gif">(Larger View)</a> - <p> - Did you notice the little calendar icon next to the date input field ? If you click - it you will get a popup like this from which the date can be selected. Depending - on the desired input format it will be formatted correctly. - </p> - </td> - </tr> - </table> - </div> - </subsection> </section> <section name="Next"> <p> |
From: Eric C. <ecr...@us...> - 2006-09-17 17:43:47
|
User: ecrutchfield Date: 06/09/17 10:43:45 Modified: andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2 pom.xml.vsl Log: remove unnecessary dependencies... they're covered in mda/pom.xml Revision Changes Path 1.4 +0 -54 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/pom.xml.vsl Index: pom.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/pom.xml.vsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- pom.xml.vsl 4 Aug 2006 22:42:11 -0000 1.3 +++ pom.xml.vsl 17 Sep 2006 17:43:45 -0000 1.4 @@ -42,60 +42,6 @@ <dependencyManagement> <dependencies> <dependency> - <groupId>org.andromda.profiles.uml14</groupId> - <artifactId>andromda-profile</artifactId> - <version>$andromdaVersion</version> - <type>xml.zip</type> - <scope>runtime</scope> - </dependency> - <!-- Specify and configure our cartridges --> - <dependency> - <groupId>org.andromda.cartridges</groupId> - <artifactId>andromda-cs-cartridge</artifactId> - <version>$andromdapluginsVersion</version> - <type>jar</type> - </dependency> -#if ($web) - <dependency> - <groupId>org.andromda.cartridges</groupId> - <artifactId>andromda-aspdotnet-cartridge</artifactId> - <version>$andromdapluginsVersion</version> - <type>jar</type> - </dependency> -#end -#if ($nspring) - <dependency> - <groupId>org.andromda.cartridges</groupId> - <artifactId>andromda-nspring-cartridge</artifactId> - <version>$andromdapluginsVersion</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.andromda.translationlibraries</groupId> - <artifactId>andromda-ocl-translation-core</artifactId> - <version>$andromdaVersion</version> - </dependency> - <dependency> - <groupId>org.andromda.translationlibraries</groupId> - <artifactId>andromda-ocl-validation-library</artifactId> - <version>$andromdaVersion</version> - </dependency> - <dependency> - <groupId>org.andromda.translationlibraries</groupId> - <artifactId>andromda-ocl-query-library</artifactId> - <version>$andromdaVersion</version> - <type>jar</type> - </dependency> -#end -#if ($nhibernate) - <dependency> - <groupId>org.andromda.cartridges</groupId> - <artifactId>andromda-nhibernate-cartridge</artifactId> - <version>$andromdapluginsVersion</version> - <type>jar</type> - </dependency> -#end - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> |
From: Eric C. <ecr...@us...> - 2006-09-17 17:42:27
|
User: ecrutchfield Date: 06/09/17 10:42:26 Modified: andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/web pom.xml.vsl Log: add extra 'clean' info for VS2005 solutions Revision Changes Path 1.2 +17 -0 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/web/pom.xml.vsl Index: pom.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/web/pom.xml.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- pom.xml.vsl 5 Mar 2006 06:16:54 -0000 1.1 +++ pom.xml.vsl 17 Sep 2006 17:42:26 -0000 1.2 @@ -37,6 +37,23 @@ <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromda-multi-source-plugin</artifactId> </plugin> +#if($visualStudioVersion.equals("2005")) + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.1</version> + <configuration> + <filesets> + <fileset> + <directory>${basedir}/App_Code</directory> + <includes> + <include>target</include> + </includes> + </fileset> + </filesets> + </configuration> + </plugin> +#end </plugins> </build> </project> \ No newline at end of file |
From: Eric C. <ecr...@us...> - 2006-09-17 17:40:13
|
User: ecrutchfield Date: 06/09/17 10:40:12 Modified: andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/mda/conf andromda.xml.vsl Added: andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/mda/conf log4j.xml Log: add AndroMDA logging Revision Changes Path 1.9 +1 -1 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/mda/conf/andromda.xml.vsl Index: andromda.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/mda/conf/andromda.xml.vsl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- andromda.xml.vsl 4 Aug 2006 22:42:11 -0000 1.8 +++ andromda.xml.vsl 17 Sep 2006 17:40:11 -0000 1.9 @@ -2,7 +2,7 @@ <properties> <property name="modelValidation">true</property> <property name="cartridgeFilter">${filter}</property> - <!-- <property name="loggingConfigurationUri">file:log4j.xml</property> --> + <property name="loggingConfigurationUri">file:${conf.dir}/log4j.xml</property> </properties> <server> <host>localhost</host> 1.1 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2/mda/conf/log4j.xml Index: log4j.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- the log configuration file for the AndroMDA project --> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <!-- ============================================ Append error messages to a local error log ============================================ --> <appender name="FILE" class="org.apache.log4j.FileAppender"> <param name="File" value="andromda.log"/> <param name="Threshold" value="DEBUG"/> <param name="Append" value="false"/> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Message\n --> <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> </layout> </appender> <!-- ================================ Append messages to the console ================================ --> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <param name="Threshold" value="INFO"/> <param name="Target" value="System.out"/> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Message\n --> <param name="ConversionPattern" value="%-5p [%c{1}] %m%n"/> </layout> </appender> <!-- ================== Limit categories ================== --> <category name="org.apache"> <priority value="INFO" /> </category> <category name="org.andromda"> <priority value="INFO" /> </category> <category name="org.andromda.namespaces"> <priority value="INFO" /> </category> <!-- uncomment the following line to recieve debug messages for the aspdotnet cartridge --> <!-- category name="org.andromda.cartridges.aspdotnet"> <priority value="DEBUG" /> </category --> <!-- ========================= Setup the Root category ========================= --> <root> <priority value="INFO" /> <appender-ref ref="FILE"/> <appender-ref ref="CONSOLE"/> </root> </log4j:configuration> |
From: Eric C. <ecr...@us...> - 2006-09-17 17:32:25
|
User: ecrutchfield Date: 06/09/17 10:32:24 Added: andromda-aspdotnet pom.xml .cvsignore Log: initial version Revision Changes Path 1.1 cartridges/andromda-aspdotnet/pom.xml Index: pom.xml =================================================================== <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.andromda.cartridges</groupId> <artifactId>andromda-cartridge-plugins</artifactId> <version>1.0-SNAPSHOT</version> </parent> <artifactId>andromda-aspdotnet-cartridge</artifactId> <name>AndroMDA ASP.NET Cartridge</name> <description> The ASP.NET cartridge is used to generate ASP.NET applications from UML models using both static and dynamic model elements. </description> <packaging>andromda-cartridge</packaging> <developers> <developer> <name>Eric Crutchfield</name> <id>ecrutchfield</id> <email>ecr...@co...</email> <roles> <role>Developer</role> </roles> </developer> <developer> <name>Louis Coude</name> <id>Louis</id> <email>l_...@ho...</email> <roles> <role>Developer</role> </roles> </developer> <developer> <name>Naresh Bhatia</name> <id>nbhatia</id> <email>na...@an...</email> <roles> <role>Developer</role> </roles> </developer> </developers> <contributors/> <build> <plugins> <plugin> <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromda-maven-plugin</artifactId> <dependencies> <dependency> <groupId>org.andromda.cartridges</groupId> <artifactId>andromda-meta-cartridge</artifactId> <version>3.2-SNAPSHOT</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromda-cartridge-plugin</artifactId> <dependencies> <dependency> <groupId>org.andromda.translationlibraries</groupId> <artifactId>andromda-ocl-query-library</artifactId> <version>3.2-SNAPSHOT</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.andromda.maven.site</groupId> <artifactId>andromda-site-plugin</artifactId> <version>3.2-SNAPSHOT</version> <executions> <execution> <id>profile-transform</id> <goals> <goal>profile-xsl</goal> </goals> </execution> <execution> <id>namespace-transform</id> <goals> <goal>namespace-xsl</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <dependencies> <dependency> <groupId>org.andromda.maven.site</groupId> <artifactId>andromda-doxia-module-xdoc</artifactId> <version>3.2-SNAPSHOT</version> </dependency> </dependencies> <configuration> <locales>en</locales> <outputEncoding>UTF-8</outputEncoding> </configuration> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <minmemory>128m</minmemory> <maxmemory>512</maxmemory> <sourcepath>src/main/java;target/src</sourcepath> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> <targetJdk>1.5</targetJdk> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> <reportSets> <reportSet> <reports> <report>changes-report</report> <report>jira-report</report> </reports> </reportSet> </reportSets> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <reportSets> <reportSet> <id>All Reports</id> <configuration> <type>range</type> <range>90</range> </configuration> <reports> <report>changelog</report> <report>file-activity</report> <report>dev-activity</report> </reports> </reportSet> </reportSets> </plugin> --> </plugins> </reporting> <properties> <maven.test.skip>true</maven.test.skip> <model.uri>jar:file:${pom.basedir}/src/main/uml/AspDotNetMetafacadeModelv4.xml.zip!/AspDotNetMetafacadeModelv4.xml</model.uri> <!--test.model.uri>jar:file:${pom.basedir}/src/test/uml/AspDotNetMetafacadeTestModel.xml.zip!/AspDotNetMetafacadeTestModel.xml</test.model.uri--> </properties> </project> 1.1 cartridges/andromda-aspdotnet/.cvsignore Index: .cvsignore =================================================================== target *.log |
From: Eric C. <ecr...@us...> - 2006-09-17 17:31:55
|
User: ecrutchfield Date: 06/09/17 10:31:55 Added: andromda-aspdotnet/src/site/resources/images/org/andromda/test controllers.gif back-end.gif other-content.gif deferring-param-ctrl.gif online-store-table.gif event-parameters.gif inter-usecase-target.gif custom-code.gif decision-points.gif final-states.gif security.gif use-cases.gif page-variables.gif inter-usecase-source.gif session-objects.gif deferring-param.gif action-states.gif initial-states.gif andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots thumb3.gif thumb4.gif thumb2.gif screen2.gif screen1.gif screen4.gif thumb1.gif thumb5.gif screen3.gif screen5.gif andromda-aspdotnet/src/site/axdoc config.xml samples.xml index.xml howto11.xml howto10.xml howto.xml installation.xml howto1.xml howto3.xml Building.xml user-guide.xml project.xml howto9.xml faq.fml howto2.xml howto4.xml howto6.xml .cvsignore howto7.xml howto5.xml m2settings.xml tips.xml howto8.xml andromda-aspdotnet/src/site/resources/howto HowToModel.xml.zip andromda-aspdotnet/src/site/resources/images Generate_app.png andromda-aspdotnet/src/site site.xml Log: initial version Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/controllers.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/back-end.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/other-content.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/deferring-param-ctrl.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/online-store-table.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/event-parameters.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/inter-usecase-target.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/custom-code.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/decision-points.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/final-states.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/security.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/use-cases.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/page-variables.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/inter-usecase-source.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/session-objects.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/deferring-param.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/action-states.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/initial-states.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb3.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb4.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb2.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen2.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen1.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen4.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb1.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/thumb5.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen3.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda/test/screenshots/screen5.gif <<Binary file>> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/config.xml Index: config.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Configuration</title> </properties> <body> <section name="Adding aspdotnet Cartridge to an Existing Project"> <p> These instructions are for those who have an existing project and want to add support for generating aspdotnet cartridges. You'll need to add a Maven dependency and some properties to your POM, as well as a 'namespace' section to your andromda.xml file. The following sections provide the necessary information to configure these items. </p> </section> <section name="Maven Configuration"> <p> You must add a dependency for the aspdotnet cartridge to your POM to generate ASP.NET applications. The dependency should go in your <code><![CDATA[${project.basedir}/mda/pom.xml]]></code> file. </p> <p> The dependency is as follows. <source language="xml"><![CDATA[ <dependency> <groupId>org.andromda.cartridges</groupId> <artifactId>andromda-aspdotnet-cartridge</artifactId> <version>1.0-SNAPSHOT</version> </dependency> ]]> </source> </p> </section> <section name="Andromda Configuration"> You'll need to add the required namespace properties to your <code><![CDATA[${project.basedir}/mda/conf/andromda.xml]]></code> file. These properties are defined in detail on the <a href="Namespace.html">Namespace</a> page. For each element, enter the value as appropriate. <p> <source language="xml"><![CDATA[ <namespace name="aspdotnet"> <properties> <property name="web">${project.build.sourceDirectory}/../../../../web</property> <property name="web_generated">${project.build.sourceDirectory}/../../../../web/target/src</property> <property name="web_manual">${project.build.sourceDirectory}/../../../../web/src/main</property> <property name="webAssemblyName"></property> <property name="dotNetVersion">2.0</property> <property name="AssemblyTitle"></property> <property name="AssemblyDescription"></property> <property name="AssemblyConfiguration"></property> <property name="AssemblyCompany"></property> <property name="AssemblyProduct"></property> <property name="AssemblyCopyright"></property> <property name="AssemblyTrademark"></property> <property name="AssemblyCulture"></property> <property name="AssemblyVersion">1.0.*</property> <property name="AssemblyDelaySign">true</property> <property name="AssemblyKeyFile"></property> <property name="AssemblyKeyName"></property> </properties> </namespace> ]]> </source> </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/samples.xml Index: samples.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="wo...@an...">Wouter Zoons</author> <title>AndroMDA - Bpm4Struts - Samples</title> <gennews>no</gennews> </properties> <body> On this page you will find some samples generated by bpm4struts, you are able to download both UML models and web application bundles. <a name="online-store"/> <section name="Samples"> <h3>Online-store</h3> <p class="std"> This sample is the one explained in the how-to, take a look at the model in the <a href="http://team.andromda.org/maven/andromda/distributions/">binary distribution</a>, you will find it in <code>/samples/online-store/mda/src/uml/online-store.xml.zip</code>; you will be able to build a deployable .ear bundle from there (you will need to have <a href="http://maven.apache.org/">Maven</a> installed to build, and <a href="http://www.jboss.org">JBoss</a> to be able to deploy). </p> <p class="std"> In order to get the most out of this sample you should take note of the following points: </p> <p class="std"> <ul> <li>Any web container able to deploy EAR bundles should work.</li> <li>Point your browser to the following URL: <a href="http://127.0.0.1:8080/OnlineStore/" target="_blank"> http://127.0.0.1:8080/OnlineStore/</a> </li> </ul> </p> <p class="std"> Follow this link to see this sample application running, what you will see is purely generated from UML using bpm4struts, no manual implementation has been added. <ul> <li> <a href="http://team.andromda.org/OnlineStore/" target="_blank"> http://team.andromda.org/OnlineStore/</a> </li> </ul> </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/index.xml Index: index.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Introduction</title> </properties> <body> <section name="Abstract"> <p class="abstract"> These pages describe the 'aspdotnet' cartridge. The purpose of this cartridge is to generate ASP.NET web pages from an input UML model in which the flow of the application is modeled. </p> </section> <section name="Goal"> <p> We aim to have a means of generating a stable and flexible front-end by modeling dynamic business processes from UML. The transformation from UML to ASP.NET should be open enough to allow anybody to easily change this process, for example by simply editing some templates. </p> <p> Any feature provided by ASP.NET should also be available in the cartridge. </p> <p> The generated code should be consistent and in-line with the most common best-practices in web development. It must also help the user adding the final pieces of code in order to finish the implementation. Except for the business logic that will need to be implemented manually, the user should not need to have knowledge of the rest of the generated application, although it can never hurt. </p> <p> Regeneration of code from UML should not overwrite manually written code. Classes can attain this goal by using a construction such as inheritance. We use MasterPages and WebControls to isolage those pieces of the ASPX page that need regeneration. </p> <p> When a complete application has been modeled it should be possible to generate and deploy the application without any further changes to the code. The application should work right-away, this allows the user to test-drive and see if it is what he expected, optionally updating the model where necessary. </p> </section> <section name="Features"> <h3>Generation of the complete set of required ASP.NET files</h3> <p> From a UML model the aspdotnet cartridge is used to generate a fully deployable web application, complete with a security implementation, validation rules (client & server), exception handling and page forwarding. These features are all available and easily updatable via the UML model. </p> <p> The generated files include: <ul> <li>ASPX pages</li> <li>code-behind classes</li> <li>controller classes</li> <li>resource file for all text on the site</li> <li>a default page redirecting to the first use-case</li> <li>menu bar</li> <li>web.config</li> <li>page access security based on roles</li> <li>field validation</li> <li><font color="red">[Partially implemented]</font>calendar date-selection popup windows</li> <li><font color="red">[Not yet implemented]</font>online help pages</li> <li><font color="red">[Not yet implemented]</font>error pages for the most common HTTP error codes as well as for uncaught exceptions</li> </ul> </p> <h3>Globalization and Localization</h3> <p> ASP.NET will automatically load the appropriate resource bundle for your localization (l10n) and globalization (i18n) settings whenever available. </p> <p> The aspdotnet cartridge will generate a default resource bundle generated in the language used for modeling. In order to port this file to another language you will need to: <ul> <li> copy it into the same directory, suffix the filename with something as "_fr", "_nl", "_de" (see <a href="http://msdn2.microsoft.com/en-us/library/ms227427.aspx"> ASP.NET Web Page Resources Overview</a> for more details) </li> <li> translate all the message values (leave the message keys untouched)</li> </ul> </p> <h3>Role-based security</h3> <p> For each user there will be a role, depending on the use-cases associated to that user he will gain the privileges to access that use-case's resources and call the corresponding actions. </p> <p> <font color="red">[Not yet implemented]</font> Users can inherit roles from each other, a user that inherits from two other users will be assigned a role which has the accumulated privileges of the roles from both other users. </p> <h3>Client-side validation</h3> <p> Per request sent by the client to the server it is possible to specify the validation rules for the included parameters. The appropriate validator controls will be rendered to handle this validation. This will avoid unneccessary calls to the server. </p> <h3>Server-side validation</h3> <p> <font color="red">[Not yet implemented]</font> In case for some reason an invalid parameter format would arrive at the server the user will be returned to the page of origin with a message indicating what went wrong. </p> <h3>Customizable exception handling</h3> <p> <font color="red">[Not yet implemented]</font> For each action it is possible to forward exceptions to a specific page. By default, however, all exceptions are forwarded to the page where the action call was triggered, a suitable message will be shown. </p> <h3>Consistent page layout</h3> <p> Thanks to the combined use of MasterPages and CSS it is possible to abstract the style & layout from the content of the pages. All pages will be rendered in a similar style, it will be sufficient to update or extend the existing style in order to customize the look and feel of the application. </p> <h3>Tabular resultsets</h3> <p> A very common feature in web pages is the displaying of tabular data. The aspdotnet cartridge directly supports this feature through the use of the the GridView or the DataGrid. You will be able to have control over the following features: <ul> <li><font color="red">[Partially implemented]</font>Paging: by default pages of 15 entries are rendered, this value can be changed</li> <li><font color="red">[Not yet implemented]</font>Exporting: the data can be exported to XML, CSV or Excel</li> <li><font color="red">[Partially implemented]</font>Sorting: you will be able to sort any column you want</li> </ul> </p> <h3>Online help</h3> <p> <font color="red">[Not yet implemented]</font> For each page an online help will be generated that is accessible from a link somewhere on the page (typically at the bottom). The information is gathered from the documentation entered in the UML model. </p> <h3>Breadcrumbs</h3> <p> <font color="red">[Not yet implemented]</font> To make it easier when navigating through a use-case, breadcrumbs will be rendered on screen. For each action/page traversed in the the use-case and breadcrumb will be present, allowing you to go back if needed. Going back will post a copy of the original request. </p> <h3>Dummy data</h3> <p> <font color="red">[Partially implemented]</font> In order to be able to deploy the generated application without the need for manual editing we made it possible to have a dummy implementation generated. It will make sure that the parameters used between the client and the server are populated with dummy data. This way you can check out your application without needing to code one single letter. </p> <h3>Dates and calendars</h3> <p> <font color="red">[Partially implemented]</font> It has always been a burden to properly format dates but the aspdotnet cartridge makes all of this completely transparent for the user. When a date is needed on screen the proper conversion will be taken into account (which of course can be overridden if desired). It is even possible to have a calendar popup rendered next to the ASPX input field, allowing you to easily select a date from the calendar and have if be properly formatted on selection. </p> </section> <section name="ASP.NET"> <p> In order to adhere to a pattern of web development we tried to follow the basic requirements of a Model-View-Controller (MVC) implementation. </p> <h3>Model</h3> <p> The model corresponds to the form object used in the request and subsequently stored in the HttpSession. This form object encapsulates all request parameters for the use-case. No more logic should be put in there. Models are generated by looking at the parameters sent between action states. </p> <h3>View</h3> <p> In an ASP.NET application you will use ASPX pages to represent the view components. In the application's activity graphs views are tagged with the <![CDATA[<<FrontEndView>>]]> stereotype. </p> <h3>Controller</h3> <p> A Controller class defines the business operations performed by the actions on the front-end. Typically it is the user who triggers an event by clicking on a button or a hyperlink. This event is handled by an action that will defer any business operation to the controller. Typically in an ASP.NET application this is handled by the code-behind class for a given page. To better support the regeneration capabilities that are a key component of AndroMDA, we create a seperate controller class for each use case. The code-behind class still exists, though, as is used to insert manual implementations as required (more about this later). </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto11.xml Index: howto11.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Security</title> </properties> <body> <section name="Input Validation"> <p> By default the cartridge generates client-side and server-side validation code. On the client side this is implemented using Javascript, rendered dynamically into the JSP pages by the <![CDATA[<html:javascript ... />]]> struts tag. </p> <p> The server-side code is perfectly equivalent to the validation on the client-side. Client-side validation is interesting because it can warn the user of errors without having to go to the server (which can take time and resources), server-side validation is a safety net that will guarantee input fields are present or properly formatted. </p> <p> Client-side and/or server-side validation can be enabled or disabled using the <code>clientValidation</code> and <code>serverValidation</code> <a href="namespace.html">namespace properties</a> respectively. </p> <p> Different types of validation exist and depending on how you model your application different validation routines will be activated. For example, numeric input fields will be checked, email addresses will be checked for valid format, URLs must be well-formed, input needs to be in a certain range, creditcard numbers must pass the <a href="http://www.beachnet.com/~hstiles/cardtype.html">Luhn</a> check, .. even regular expressions can be matched. </p> <p> Check the table at the bottom of the <a href="profile.html">Profile</a> page to learn what's possible. <em>Please note that more than one validator tagged value can be added to an event parameter.</em> </p> <p> Adding your own validator is simple, you can specify the validator's name so it will be checked if you just make sure your validator has been added to the <code>validator-rules.xml</code> file. To do this make use of the <![CDATA[<!-- validator-rules merge-point -->]]> <a href="../andromda-cartridges/index.html#mergeMappingsUri">merge point</a>. </p> </section> <section name="Next"> <p> Next section: <a href="howto7.html">Calling back-end services</a>. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto10.xml Index: howto10.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - HowTo - Internationalization</title> </properties> <body> <section name="Internationalization"> <p> The aspdotnet cartridge has been designed with Internationalization in mind. All text on a page is pulled from a resource which is built from the documentation included in your model. You can add additional locales and regions by copying this generated resource and translating them to different languages. </p> <p> For <em>ASP.NET v2.0</em> applications, the resource file is output to the <em>App_GlobalResources</em> folder. For <em>ASP.NET v1.1</em> applications, the resource file is output to the <em>Resources</em> folder.</p> <p class="highlight"> <font color="red">[Not yet implemented]</font> A very interesting feature exists that might make it considerably easier for you if you have lots of similar messages in the resource bundle. Set the <a href="namespace.html"><code>normalizeMessages</code></a> namespace property to <code>true</code>. This will make sure elements with the same name will use the same message, when translating such a resource bundle you will never need to do the same work twice. This feature is disabled by default, enabling you to customize each possible message. In most cases it's better to enable it though. </p> <p> In order to port the resource file to another language you will need to: <ul> <li> copy it into the same directory and suffix the filename with something like "_fr", "_nl", "_de" (see <a href="http://msdn2.microsoft.com/en-us/library/ms227427.aspx"> ASP.NET Web Page Resources Overview</a> for more details) </li> <li> translate all the message values (leave the message keys untouched)</li> </ul> </p> <subsection name="Custom Resources"> <p> <font color="red">[Not yet implemented]</font> If you want your own resource messages to be displayed you will need to make use of the merge point inside the generated resource bundle, as explained in this section. </p> <p> In order to do just that you will need to create your own resource bundle with your custom set of messages and put it somewhere in your source tree, for example in <code>/web/src/properties/custom.properties</code>. </p> <p> Next, tell AndroMDA to merge this file into the generated resource bundle, if you generated your project using <code>andromdapp:generate</code> it is sufficient to add the following to <code>/mda/conf/mappings/Bpm4StrutsMergeMappings.xml</code>: </p> <source language="xml"><!-- <mapping> <from><![CDATA[# custom-messages merge-point]]></from> <to> <path>../../../web/src/properties/custom.properties</path> </to> </mapping> --></source> <p> That's it, now you can start using your own resource messages. It is even possible to override the default generated ones by simply repeating them in your custom resource bundle. If you want you can specify multiple <![CDATA[<path>]]> elements, that way all of them will be merged. </p> <p class="highlight"> This feature is particularly interesting when you want to have messages displayed in a more dynamic fashion: you can decide in the controller what message to show, save them (using <code>saveMessages(..)</code>), and have them picked up from the bundle. </p> </subsection> <subsection name="Date Formats"> <p> <font color="red">[Not yet implemented]</font> It is also possible to have input fields representing dates automatically formatted. Two ways to do this exist: on a global level you can use the <code>defaultDateFormat</code> namespace property which defaults to <code>dd/MM/yyyy</code> (go <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html">here</a> to learn more about possible date formats) , it sets the format for all dates in the modeled application; on a field level it is possible to use the <code>@andromda.struts.view.field.format</code> tagged value, just make sure the parameter is a date type and it will override the global setting. </p> <p> Use the <code>strict</code> keyword in front of the date format, that way the application will strictly check the format, without being lenient. </p> <p class="highlight"> Use dates in combination with the <code>@andromda.presentation.web.view.field.calendar=true</code> tagged value to have a popup calendar trigger rendered next to the input field, the selected date will immediately be converted into the correct format. A screenshot is shown here: <a href="howto2.html">Activity Graphs</a> <em>(bottom of the page)</em> </p> </subsection> </section> <section name="Nice to know"> <subsection name="Action Forms"> <p> <font color="red">[Not yet implemented]</font> Using dates for action parameters will yield a specific date formatter to be generated in the corresponding action form, this in addition to other convenience methods. </p> </subsection> </section> <section name="End of How-To Guide"> <p> That's it for the how-to guide. Please check our our <a href="tips.html">Tips & and Tricks</a> page for further information about the in's and out's of the aspdotnet cartridge. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto.xml Index: howto.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - How To</title> </properties> <body> <section name="Modeling example"> <p> This guide borrows heavily from Wouter Zoons' How-To guide for the <a href="http://galaxy.andromda.org/docs/andromda-bpm4struts-cartridge/howto.html">Bpm4Struts cartridge</a>. In fact, we're going to leverage the same models as the Bpm4Struts How-To so that you can see that while the platforms are completely different, the models will be exactly the same. For another great example of this "model once"/"generate different systems" ability, check out the Getting Started Guides for <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=11&id=42&Itemid=89">Java</a> and <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=12&id=43&Itemid=90">.NET</a>. </p> <p> The following How-To attempts to get you productive with this cartridge as quickly as possible. To accomplish this, the following sections describe a very small example that will allow us to explain more features with less application complexity. </p> <p> Please note that ALMOST everything happens in UML! While this version supports generating a lot of functionality out-of-the-box, a lot of UI features will still need to be setup manually. </p> <p> In this how-to we will cover the following topics: <ul> <li><a href="howto1.html">UseCases</a></li> <li> <a href="howto2.html">Activity Graphs</a> <ul> <li><a href="howto2.html#Initial_States">Initial states</a></li> <li><a href="howto2.html#Action_States">Action states</a></li> <li><a href="howto2.html#Transitions">Transitions</a></li> <li><a href="howto2.html#Event_Parameters">Event Parameters</a></li> <li><a href="howto2.html#Page_Variables">Page Variables</a></li> <li><a href="howto2.html#Decision_Points">Decision Points</a></li> <li><a href="howto2.html#Final_States">Final States</a></li> </ul> </li> <li><a href="howto3.html">Controllers</a></li> <li><a href="howto4.html">Custom Code</a></li> <li><a href="howto5.html">Session Objects</a></li> <li><a href="howto6.html">Security</a></li> <li><a href="howto7.html">Calling Back-End Services</a></li> <li><a href="howto8.html">Tables</a></li> <li><a href="howto9.html">Other Content</a></li> <li><a href="howto10.html">Internationalization</a></li> </ul> </p> <p> You can download the UML model containing all models for all sections <a href="howto/HowToModel.xml.zip">here</a>. </p> <p> In order to start the tutorial click <a href="howto1.html">here</a>. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/installation.xml Index: installation.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Installation & Configuration</title> </properties> <body> <section name="Installation"> <p> If you are <strong>new</strong> to AndroMDA and have Visual Studio 2005 then you should follow the <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=12&id=43&Itemid=90">Getting Started .NET</a> guide. The guide will walk you through setting up your environment and modeling a complete application from data to web. </p> <p> If you don't have Visual Studio 2005, you can follow these steps to generate a web project using Maven. </p> <a name="Install"/> <subsection name="Pre-install Tasks"> <p> Again, if you are new to AndroMDA and have Visual Studio 2005, you <em>should</em> use the <a href="http://galaxy.andromda.org/index.php?option=com_content&task=category&sectionid=12&id=43&Itemid=90">Getting Started .NET</a> guide, instead of this How-To. Once you've gone through that guide, you can return here to get a more in-depth look at the aspdotnet cartridge. </p> <p> If you are new to AndroMDA and <em>don't</em> have VS 2005, you should follow steps 1-4 of the <a href="http://galaxy.andromda.org/index.php?option=com_content&task=view&id=118&Itemid=90">Environment Setup</a> guide, and then return here to install the AndroMDA .NET Application plugin. </p> <p> If you are an old hat with AndroMDA, then you can jump right in and start using the cartridge by following these steps. </p> </subsection> <subsection name="Install AndroMDA .NET Application plugin"> <p> To generate a .NET application without the Visual Studio 2005 plugin, you will need the <code>andromdanetapp</code> plugin. You will need to download and install the AndroMDA .NET Application plugin into your Maven repository, but this is the only AndroMDA artifact that you will explicitly install. All other artifacts, such as AndroMDA cartridges, will be automatically downloaded by the Maven scripts generated by the plugin. Install the plugin by following the steps below. <ol> <li> Download the <a href="http://team.andromda.org/maven2/org/andromda/maven/plugins/andromdapp-maven-plugin/3.2-SNAPSHOT/andromdapp-maven-plugin-install-3.2-SNAPSHOT.zip">AndroMDA plugin installer</a>. </li> <li> Unzip the contents of the installer into your Maven repository at C:\Documents and Settings\<strong>your user name</strong>\.m2\repository. </li> <li> Verify that the following directory was created: C:\Documents and Settings\<strong>your user name</strong>\.m2\repository\org\apache\maven\plugins\andromdanetapp-maven-plugin\1.0-SNAPSHOT </li> </ol> </p> </subsection> <a name="Getting_the_Cartridge"/> <subsection name="Getting the Cartridge"> <p> Once you have met the requirements above, checkout the latest ASP.NET cartridge from CVS HEAD. You have two options: <ul> <li> <p> Follow the anonymous CVS access at <a href="http://sourceforge.net/cvs/?group_id=154568">andromdaplugins project</a> on SourceForge to checkout the latest <b>andromda-plugins</b> module from <code>HEAD</code>. </p> </li> <li> <p> If you are using an IDE like Eclipse, open your CVS repository exploring perspective, create a new repository with connection type (pserver), username (anonymous), password(<i>blank</i>) host (andromdaplugins.cvs.sourceforge.net) and repository path (/cvsroot/andromdaplugins). Once connected, expand HEAD and check out <code>andromda-plugins</code>. </p> </li> </ul> Note that this will check out all cartridges and plugins which are not relevant to the ASP.NET cartridge, but will ease your build process. </p> </subsection> <a name="Building_the_Cartridge"/> <subsection name="Building the Cartridge"> <p> Once you have checked out the <code>andromda-plugins</code> project, you should build the entire <b>andromda-plugins</b> repository by running <i>mvn install</i> in the <code>andromda-plugins</code> folder. This builds the andromda-aspdotnet cartridge as well as the andromdanetapp maven plugin and the csharp project generator. Note: this can take 5 minutes or more, depending on what needs to be downloaded from the remote repository, and the speed of your computer. </p> </subsection> </section> <section name="Next"> <p> Before starting with the ASP.NET howtos, find out how to generate your <a href="project.html">ASP.NET project</a>. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto1.xml Index: howto1.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - HowTo - Use-Cases</title> </properties> <body> <section name="Use-Cases"> <p> Before you start modeling your application front-end you will want to think about how to split the application in different <em>use-cases</em>. Each use-case should define a unique set of processing logic operations that are specific to your application. Typical use-cases are: 'Login', 'Place order', 'Add new user'. No two use-cases should have the same name. </p> <p> For the sake of simplicity our application will consist of only a single use-case, though your application can have as many use-cases as is appropriate. </p> <p> Let's call our use-case <code>Purchase Items</code> (spaces are allowed in the name). We will put it in a suitable package, and label it with the <![CDATA[<<FrontEndUseCase>>]]> stereotype. </p> <p class="highlight"> You must have exactly one <i>Front End Application</i> use-case, which will be considered the application's entry point. This use-case must be labeled with the <![CDATA[<<FrontEndApplication>>]]> stereotype. </p> <p> <img src="images/org/andromda/test/use-cases.gif"/> </p> </section> <section name="Nice to know"> <p> Use-cases split up the application in distinct parts, the generated code will reflect this by emitting files related to a specific use-case in a single package. </p> </section> <section name="Next"> <p> The next step is to specify in detail how our application's presentation layer is going to behave. This is done by means of an <a href="howto2.html">activity graph</a> </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/howto3.xml Index: howto3.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Controllers</title> </properties> <body> <section name="Controllers"> <p> Modeling activity graphs allows you to clearly express the way your application flows from one state into another. This already helps a great deal in the code generation process, but all this effort only makes sense when you are actually able to insert your own code fragments into this process. UML elegantly allows this. </p> <p> Per use-case you will need to model a class in which you will put all the operations that can be called from within that use-case's activity. </p> <p> You will need to associate this class to the use-case, since the cartridge can't just guess which use-case it corresponds to. Therefore we have two options depending on the maturity of the UML tool you are using: </p> <p> <ul> <li>Assign this class as the context of the activity graph (MagicDraw supports this), this is a standard UML feature that, unfortunately, is often overlooked by CASE tools vendors. </li> <li>Add a tagged value to the controller, pointing to the use-case, like this: <code>@andromda.presentation.controller.usecase=My UseCase</code> (the value is the name of the use-case). </li> </ul> </p> <p> While either one of these options will do, we recommend using the former because that way you won't need to update the tagged value whenever you decide to change the name of the use-case (which can be a pain). </p> <p> <img src="images/org/andromda/test/controllers.gif"/> </p> <subsection name="Operation parameters"> <p> So what exactly happens with the parameters you model inside the controller operations? By specifying the name and type of a parameter you can gain access to an event parameter or page-variable defined in another part of the application. Just make sure the name and type perfectly match. </p> <p> In the next example you see how a controller operation is called before entering the <![CDATA[<<FrontEndView>>]]> action state. This operation has a single argument <code>data : List</code> which exactly matches the page variable on the outgoing transition. Doing this will allow you to control this page's variables in the implementation of the controller operation. </p> <p class="highlight"> Please note that it is possible your CASE tool is not showing the operation parameters in the diagram, as in the image below. </p> <p> <img src="images/org/andromda/test/deferring-param.gif"/> </p> <p> <img src="images/org/andromda/test/deferring-param-ctrl.gif"/> </p> <p> Not only can page-variables be controlled like this, it also works for any existing event parameters (e.g. buttons or hyperlinks on items in a table), as long as you include them as an argument on the operation of the controller. </p> <p> What might look strange at first is the fact that you don't need a return value on the controller operation. This is because you are not modeling code, you are modeling the behavior of the state machine. The cartridge is responsible for determining the code to generate. You just need to remember to include a parameter for each form field you wish to use. (Note: return values are only needed when using controller operations in a decision process as we have seen <a href="howto2.html#Decision_Points">here</a>). </p> <p> It is not needed to add tagged values on controller operation parameters. Any tagged values will be fetched from the actual page-variables or event parameters. </p> </subsection> </section> <section name="Next"> <p> Now that we know how to define custom code operations we need to learn how to <a href="howto4.html">call them</a> from within your activity graph. </p> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/Building.xml Index: Building.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="ecr...@us...">Eric Crutchfield</author> <title>AndroMDA - ASP.NET - Building the Cartridge</title> </properties> <body> <section name="Building the Cartridge"> <p> Once you have checked out the <code>andromda-plugins</code> project, you can simply build the <b>andromda-aspdotnet</b> catridge in <code>andromda-plugins/cartridges/andromda-aspdotnet</code> by running <i>mvn</i> in the latter location. </p> <a name="Building_Reports"/> <subsection name="Building Reports"> <p> To build the ASP.NET cartridge site documentation requires a few extra Maven 2 plugins to be downloaded from the Maven 2 sandbox in SVN. The <a href="http://maven.apache.org/guides/development/guide-building-m2.html">Maven build</a> documentation will give you some information on how to access their SVN. </p> <p> You will need to check out the following plugins from Maven <b>sandbox</b>. <ul> <li><p>maven-changes-plugin</p></li> <li><p>maven-changelog-plugin</p></li> </ul> Once you have built them (mvn install), these plugins will reside in your local repo. </p> <p> In adopting the existing AndroMDA site format for the documentation, the Maven Doxia plugin needs a patch to be applied. You can check out <b>doxia-1.0-alpha-8</b> from Maven SVN and apply the patch <a href="http://jira.codehaus.org/browse/MNG-545">here</a>. It is not critical to apply this patch, but if it's not applied, the generated XHTML will not be formated correctly but still acceptable. </p> <p> All other required plugins will be downloaded to your local repo if they don't already exist. </p> <p> You can download the source examples used in the howto for all sections <a href="HowToModel-src.zip">here</a> and extract to the target/site folder of the andromda-aspdotnet plugin. </p> </subsection> </section> </body> </document> 1.1 cartridges/andromda-aspdotnet/src/site/axdoc/user-guide.xml Index: user-guide.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="wo...@an...">Wouter Zoons</author> <title>AndroMDA - Bpm4Struts - User Guide</title> <gennews>no</gennews> </properties> <body> <section name="Abstract"> <p class="abstract"> This page is a user guide to the bpm4struts cartridge, here you will find information on specific modeling features. If you are looking for a place describing what you need to do with your UML tool in order to model an application for bpm4struts you should read on. </p> </section> <section name="Model elements"> <p> With model elements we mean the collection of all those elements that allow us to express ourselves and formally describe process flow. We will use these elements to model our Struts application. What follows is a list of elements and a description on how they map onto Struts specific objects. </p> <h3>Classes</h3> <p> In bpm4struts classes are only used to model controllers, a controller is the component that contains the logic to perform business operations. Most of the time, in J2EE applications, you will want to delegate your call from the controller to a service running in the back-end. </p> <p> A class is assigned to be the context of an activity graph and it contains operations that are referenced by CallEvents. A CallEvent is an event that you can model in the activity graph but that allows you to create a link with the controller class. You will see what this means in more detail when taking a look at the sample application. </p> <h3>Actors</h3> <p> An actor represents a user in the system, typically you will model an actor for each different type of user that exists in your application, this might be a 'Manager', 'Administrator', 'Guest', etc... </p> <p> Actors may generalize eachother, making it possible to combine several roles into a single one. </p> <p> Modeling actors will activate security in the generated application, an actor is only authorized to request those pages and actions belonging to the use-case he has been associated with. </p> <h3>Use-Cases</h3> <p> Each unit of processing logic is combined into a single use-case. Typical use-cases are: 'Login', 'Place order', 'Add new user'. No two use-cases should have the same name. </p> <p> Put your use-case in a dedicated namespace (such as a package in Java) so there is no confusion on what is supposed to be happening inside. </p> <h3>Activity Graphs</h3> <p> Each use-case is described in more detail using an activity graph. Such a graph allows you to model the process flow from one state into another. By doing so you will determine when the user is presented a page and when he will be calling actions. </p> <p> In an activity graph you will model: one initial state, action states, one or more final states, transitions. </p> <h3>Transitions</h3> <p> Transitions are the 'arrows' that denote a flow from the source state to the target state. Every state in an activity graph has at least one outgoing transition, except for the final state, no outgoing transitions are allowed on a final state. </p> <p> Optionally a transition may carry a trigger, a trigger indicates that something happened at the source that triggered the application into following the path represented by the transition. In bpm4struts you will use a trigger when you want to model an action such as a button-click on a page, because this will trigger a specific call to an action on the server. </p> <p> In addition, triggers are also interesting because they can have parameters, so each time the client and server exchange information you will want to use the trigger to specify the parameter to transport in the request. </p> <p> It is also possible for a transition to carry a guard, but this is only valid when the transition is coming out of a decision point (see below). The decision point represent a specific question ... [truncated message content] |
From: Eric C. <ecr...@us...> - 2006-09-17 17:31:13
|
User: ecrutchfield Date: 06/09/17 10:31:11 Added: andromda-aspdotnet/src/main/uml .cvsignore AspDotNetMetafacadeModelv4.xml.zip Log: initial version Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/main/uml/.cvsignore Index: .cvsignore =================================================================== AspDotNetMetafacadeModel.xml.zip AspDotNetMetafacadeModelv2.xml.zip AspDotNetMetafacadeModelv3.xml.zip *.bak *.xml 1.1 cartridges/andromda-aspdotnet/src/main/uml/AspDotNetMetafacadeModelv4.xml.zip <<Binary file>> |
From: Eric C. <ecr...@us...> - 2006-09-17 17:30:54
|
User: ecrutchfield Date: 06/09/17 10:30:52 Added: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005 table.ascx.vsl inputWebform.aspx.vsl webform.aspx.cs.vsl global.asax.vsl menu.ascx.vsl Default.aspx.vsl Default.master.cs.vsl Default.master.vsl webformBase.cs.vsl inputWebform.aspx.cs.vsl webform.aspx.vsl inputWebformBase.cs.vsl menu.ascx.cs.vsl Default.aspx.cs.vsl web.config.vsl resources.resx.vsl andromda-aspdotnet/src/main/resources/META-INF/andromda namespace.xml metafacades.xml cartridge.xml profile.xml andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2003 inputWebform.aspx.vsl inputWebform.aspx.cs.vsl renderFormInput.vm default.aspx.cs.vsl menu.ascx.vsl web.config.vsl assemblyInfo.cs.vsl webform.aspx.cs.vsl global.asax.cs.vsl error.aspx.cs.vsl menu.ascx.cs.vsl default.aspx.vsl inputWebformBase.aspx.cs.vsl resources.resx.vsl global.asax.vsl webform.aspx.vsl renderActionFormInput.vm webformBase.aspx.cs.vsl error.aspx.vsl andromda-aspdotnet/src/main/resources/templates/aspdotnet pageBase.cs.vsl sessionObject.cs.vsl project.csproj.vsl andromda-aspdotnet/src/main/resources/templates/aspdotnet/uicontrollers formMacros.vm formImpl.cs.vsl UIPControllerImpl.cs.vsl Form.cs.vsl UIPController.cs.vsl Controller.cs.vm formImplMacros.vm andromda-aspdotnet/src/main/resources/layout default.JPG button.JPG default.css banner.JPG andromda-aspdotnet/src/main/resources/calendar oboutCalendar.js style.css calendar.gif andromda-aspdotnet/src/main/resources/resources FormPopulator.cs StringUtils.cs Log: initial version Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/table.ascx.vsl Index: table.ascx.vsl =================================================================== <asp:DataGrid id="tableGrid" runat="server"></asp:DataGrid> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/inputWebform.aspx.vsl Index: inputWebform.aspx.vsl =================================================================== #set($generatedFile = "${usecase.fullyQualifiedPath}/${usecase.normalizedName}UC.aspx") <%@ Page language="c#" CodeFile="~/src/main/${usecase.fullyQualifiedPath}/${usecase.normalizedName}UC.cs" CodeFileBaseClass="${usecase.packageName}.${usecase.normalizedName}UCBase" AutoEventWireup="true" Inherits="${usecase.packageName}.${usecase.normalizedName}UC" MasterPageFile="~/Default.master" Title="${usecase.name}"%> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webform.aspx.cs.vsl Index: webform.aspx.cs.vsl =================================================================== #set($generatedFile = "${webform.fullyQualifiedPath}/${webform.normalizedName}.cs") using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace ${webform.packageName} { /// <summary> /// This is the code-behind for the ${webform.normalizedName} view. /// </summary> public partial class ${webform.getNormalizedName()} : ${webform.getNormalizedName()}Base { protected override void PageLoad() { //${toDoTag} put your implementation here #if ($dummyData) #foreach($action in $webform.outgoing) #foreach($parameter in $action.parameters) #if ($parameter.isSelectable()) base.Controller.${action.formImplementationPropertyName}.Set$stringUtils.capitalise(${parameter.labelListName})(new string[]{"Dummy Item 1", "Dummy Item 2", "Dummy Item 3"}); base.Controller.${action.formImplementationPropertyName}.Set$stringUtils.capitalise(${parameter.valueListName})(new string[]{"1", "2", "3"}); #end #end #end #end } #foreach($action in ${webform.outgoing}) protected override void ${action.actionMethodName}() { ##todo create Form instance and populate with data from form?? //The base method will call the appropriate method on the controller then redirect to //the page specified by the controller. //You can perform actions prior to the controller call by adding code before this line //add code to the appropriate method of the ControllerImpl class. base.${action.actionMethodName}(); } #end #foreach($parameter in $webform.tables) protected override void $stringUtils.capitalise(${parameter.name})DG_SortCommand(object source, GridViewSortEventArgs e) { //${toDoTag} put your implementation here to sort the datagrid } #end } } 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/global.asax.vsl Index: global.asax.vsl =================================================================== <%@ Application Language="C#" %> <script runat="server"> void Application_Start(object sender, EventArgs e) { // Code that runs on application startup } void Application_End(object sender, EventArgs e) { // Code that runs on application shutdown } void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs } void Session_Start(object sender, EventArgs e) { // Code that runs when a new session is started } void Session_End(object sender, EventArgs e) { // Code that runs when a session ends. // Note: The Session_End event is raised only when the sessionstate mode // is set to InProc in the Web.config file. If session mode is set to StateServer // or SQLServer, the event is not raised. } void Authenticate_Request(object sender, EventArgs e) { #if($security.equals('true')) AssignRoles(); #end } #if($security.equals('true')) private void AssignRoles() { bool cookieFound = false; HttpCookie cookie = null; for(int i=0; i < Request.Cookies.Count; i++) { cookie = Request.Cookies[i]; if (cookie.Name.Equals("Roles")) { cookieFound = true; break; } } if (cookieFound) { // Extract the roles from the DB, and assign to our current principal, which is attached to the // HttpContext. FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(cookie.Value); string[] roles = ticket.UserData.Split(';'); GenericPrincipal princ = new GenericPrincipal(Thread.CurrentPrincipal.Identity,roles); HttpContext.Current.User = princ; } } #end </script> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/menu.ascx.vsl Index: menu.ascx.vsl =================================================================== #if (${dotNetVersion}=="2.0") <%@ Control CodeFile="Menu.ascx.cs" Language="c#" AutoEventWireup="false" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" Inherits="${webAssemblyName}.Menu"%> <script type="text/javascript"> <!-- <!--StartFragment --> window.onload=montre; function montre(id) { var d = document.getElementById(id); for (var i = 1; i<=10; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} } if (d) {d.style.display='block';} } //--> </script> <style type="text/css"> BODY { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: white; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 80% verdana, arial, sans-serif; PADDING-TOP: 0px } DL { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none } DT { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none } DD { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none } UL { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none } LI { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none } DL#menuVertical { WIDTH: 15em } DL#menuVertical DT { BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; FONT-WEIGHT: bold; BACKGROUND: #e6e6fa; MARGIN: 2px 0px; BORDER-LEFT: gray 1px solid; CURSOR: pointer; LINE-HEIGHT: 20px; BORDER-BOTTOM: gray 1px solid; HEIGHT: 20px; TEXT-ALIGN: center } DL#menuVertical DD { BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid } DL#menuVertical LI { BACKGROUND: #fff; TEXT-ALIGN: center } DL#menuVertical LI A { BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: block; BORDER-LEFT: 0px; COLOR: #000; BORDER-BOTTOM: 0px; HEIGHT: 100%; TEXT-DECORATION: none } DL#menuVertical DT A { BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: block; BORDER-LEFT: 0px; COLOR: #000; BORDER-BOTTOM: 0px; HEIGHT: 100%; TEXT-DECORATION: none } DL#menuVertical LI A:hover { BACKGROUND: #eee } DL#menuVertical DT A:hover { BACKGROUND: #eee } #mentions { LEFT: 10px; COLOR: #000; BOTTOM: 200px; FONT-FAMILY: verdana, arial, sans-serif; POSITION: absolute; BACKGROUND-COLOR: #ddd } #mentions A { COLOR: #222; TEXT-DECORATION: none } #mentions A:hover { TEXT-DECORATION: underline } </style> <div class="box1"> <dl id="menuVertical"> #foreach($usecase in $usecases) #if($usecase.isFrontEndApplication()) #foreach($group in ${usecase.getMenuGroups()}) <dt onclick="javascript:montre('smenu$velocityCount');"> <asp:Literal ID="${group.getName()}Literal" Text="<%$ Resources:GeneratedResources, menu_${group.getName()}Literal%>" Runat="server">${group.getName()}</asp:Literal> <dd id="smenu$velocityCount"> <ul> #foreach($smenu in ${group.getUseCases()}) <li> <asp:LinkButton id="${smenu.getNormalizedName()}LinkButton" Text="<%$ Resources:GeneratedResources, menu_${smenu.getNormalizedName()}LinkButton%>" runat="server" CausesValidation="False" OnClick="${smenu.getNormalizedName()}LinkButton_Click" ></asp:LinkButton> #end </ul> </dd> #end #end #end </dl> </div> #end 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/Default.aspx.vsl Index: Default.aspx.vsl =================================================================== <%@ Page language="c#" CodeFile="Default.aspx.cs" AutoEventWireup="true" Inherits="${webAssemblyName}._Default" MasterPageFile="~/Default.master" Title="Default"%> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/Default.master.cs.vsl Index: Default.master.cs.vsl =================================================================== using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { } } 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/Default.master.vsl Index: Default.master.vsl =================================================================== <%@ Register TagPrefix="menuUserControl" TagName="menu" Src="~/target/src/Common/menu.ascx" %> <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Default.master.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <link href="~/layout/default.css" rel="stylesheet" type="text/css" /> </head> <body > <form id="form1" runat="server"> <div id="menu"> <asp:contentplaceholder id="MenuPlaceHolder" runat="server"> <menuUserControl:menu id="menu1" runat="server"></menuUserControl:menu> </asp:contentplaceholder> </div> <div id="caption" align="left"> <asp:contentplaceholder id="CaptionPlaceHolder" runat="server"> Page Caption Goes Here </asp:contentplaceholder> </div> <div id="content"> <asp:contentplaceholder id="ContentPlaceHolder" runat="server"> Content Goes Here </asp:contentplaceholder> </div> </form> </body> </html> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webformBase.cs.vsl Index: webformBase.cs.vsl =================================================================== ## ## This macro renders the line that sets the property ## on the controllers form using the value of the input field defined on the page ## #macro( populateFormProperties ) #if(!$action.tableAction && !$action.tableLink) #foreach($parameter in ${action.parameters}) #if(!${parameter.hidden} && !${parameter.inputTable}) #set($viewType = ${parameter.viewType}) #set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$viewType") ## if we can't get the value from the field (e.g. Label) then we need to get it from it's Hidden counterpart. #if($viewType.equalsIgnoreCase("HyperLink") || $viewType.equalsIgnoreCase("Label")) #set($fieldName = "this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden") #end #set($formProperty = "$parameter.capitalisedName") org.andromda.cartridges.aspdotnet.FormPopulator.PopulateForm(${fieldName}, base.Controller.${action.formImplementationPropertyName}, "${formProperty}"); #end #end #end #end #set($generatedFile = "${webform.fullyQualifiedPath}/${webform.normalizedName}Base.cs") #set($key = "@${webform.useCase.normalizedName}.${webform.normalizedName}") using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Resources; using System.Reflection; using System.Globalization; namespace ${webform.packageName} { /// <summary> /// Summary description for ${webform.normalizedName}Base. /// </summary> public abstract class ${webform.normalizedName}Base : ${webform.useCase.normalizedName}PageBase { protected System.Web.UI.WebControls.Literal ${webform.normalizedName}Page; #foreach($action in ${webform.actions}) #foreach($parameter in ${action.parameters}) #set($aspType = "${parameter.getViewType()}") #if(!${parameter.hidden}) protected System.Web.UI.WebControls.Label $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl; #end #if($aspType.equals('file')) protected System.Web.UI.WebControls.FileUpload ${parameter.name}FileSelector; #else protected System.Web.UI.WebControls.${parameter.getViewType()} $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$aspType; #if(${aspType.equalsIgnoreCase('hyperlink')}||${aspType.equalsIgnoreCase('label')}) protected System.Web.UI.HtmlControls.HtmlInputHidden $stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden; #end #end #end protected System.Web.UI.WebControls.Button ${action.actionMethodName}Button; #end ##Now deal with tables #foreach($parameter in $webform.tables) protected System.Web.UI.WebControls.GridView ${parameter.name}DG; protected System.Web.UI.WebControls.Label ${parameter.name}Count; #end protected void Page_Load(object sender, System.EventArgs e) { if (!this.IsPostBack) { PageLoad(); ## this will load any fields with backingList data if it's appropriate #foreach($action in ${webform.outgoing}) #if(!$action.hyperlink) #foreach($parameter in ${action.parameters}) #if($parameter.inputSelect) this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.viewType}.DataSource = base.Controller.${action.formImplementationPropertyName}.Get$stringUtils.capitalize(${parameter.backingListName})(); this.$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}${parameter.viewType}.DataBind(); #end #end #end #end #foreach($parameter in $webform.tables) if(!(this.${parameter.name}DG.PageCount > 1)) ${parameter.name}DG.AllowPaging = false; if(this.${parameter.name}DG.Rows.Count < 1) ${parameter.name}DG.Visible = false; ${parameter.name}Count.Text = "Number Of result: "+this.${parameter.name}DG.Rows.Count; #end } } #foreach($action in ${webform.outgoing}) #if(!$action.hyperlink) protected void ${action.actionMethodName}Button_Click(object sender, System.EventArgs e) { ${action.actionMethodName}(); } #end #end #foreach($parameter in $webform.tables) protected void $stringUtils.capitalize(${parameter.name})DG_SelectedIndexChanged(object sender, System.EventArgs e) { //${toDoTag} Not really sure what to do here. //${action.getNavigation()} } protected void $stringUtils.capitalize(${parameter.name})DG_Page(Object sender, GridViewPageEventArgs e) { ${parameter.name}DG.PageIndex = e.NewPageIndex; ${parameter.name}DG.DataBind(); } #end #foreach($action in ${webform.outgoing}) protected virtual void ${action.actionMethodName}() { //we need to take the parameters for the given action and persist them across views #populateFormProperties() Response.Redirect(this.Controller.${webform.normalizedName}$stringUtils.capitalize(${action.actionMethodName})()); } #end #foreach($parameter in $webform.tables) protected abstract void $stringUtils.capitalise(${parameter.name})DG_SortCommand(object source, System.Web.UI.WebControls.GridViewSortEventArgs e); #end /// <summary> /// This method is called part way through processing the Load event for the page. Before this /// method is called, all the names and tooltips have been set from the appropriate resource. /// After this call, any "DropDownList" fields will be populated. /// </summary> protected abstract void PageLoad(); #foreach($table in $webform.tables) protected void ${table.name}DG_ItemCommand(object source, DataGridCommandEventArgs e) { System.Collections.Specialized.StringDictionary nameValuePairs = org.andromda.cartridges.aspdotnet.StringUtils.ParseCommandArgument(e.CommandArgument); switch (e.CommandName) { #foreach ($action in $table.tableHyperlinkActions) case "${action.triggerName}": #foreach ($parameter in $action.parameters) base.Controller.${action.formImplementationPropertyName}.${parameter.capitalisedName} = nameValuePairs["${parameter.name}"]; #end this.${action.actionMethodName}(); break; #end #foreach ($action in $table.tableFormActions) case "${action.triggerName}": #foreach ($parameter in $action.parameters) base.Controller.${action.formImplementationPropertyName}.${parameter.capitalisedName} = nameValuePairs["${parameter.name}"]; #end this.${action.actionMethodName}(); break; #end } } #end } } 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/inputWebform.aspx.cs.vsl Index: inputWebform.aspx.cs.vsl =================================================================== #set($generatedFile = "${usecase.fullyQualifiedPath}/${usecase.normalizedName}UC.cs") using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace ${usecase.packageName} { /// <summary> /// <see cref="${usecase.normalizedName}UCBase"/> /// </summary> public partial class ${usecase.normalizedName}UC : ${usecase.normalizedName}UCBase { //Override OnLoad to perform actions prior to entering this use case. } } 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webform.aspx.vsl Index: webform.aspx.vsl =================================================================== ## ## This macro renders the CommandArgument parameter for a command link ## #macro ( renderTableCommandArgumentParameters ) #foreach( $parameter in $action.parameters )#if($velocityCount>1) + #end DataBinder.Eval("DataItem.${parameter.name}","#if($velocityCount>1),#end${parameter.name}={0}")#end #end ## ## #set($generatedFile = "${webform.fullyQualifiedPath}/${webform.normalizedName}.aspx") #set($key = "${webform.useCase.normalizedName}_${webform.normalizedName}") <%@ Page Language="C#" AutoEventWireup="true" CodeFile="~/src/main/${webform.fullyQualifiedPath}/${webform.normalizedName}.cs" CodeFileBaseClass="${webform.packageName}.${webform.normalizedName}Base" Inherits="${webform.packageName}.${webform.normalizedName}" MasterPageFile="~/Default.master" Title="${webform.name}"%> <asp:Content ID="CPHTitle" ContentPlaceHolderID="CaptionPlaceHolder" Runat="Server"> <h4> <asp:Literal ID="${webform.normalizedName}Page" runat="server" Text="<%$ Resources:GeneratedResources, ${key}Page %>"></asp:Literal> </h4> </asp:Content> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server"> <div id="content"> #foreach($action in ${webform.outgoing}) #if(!$action.hyperlink) <div class="action"> <table id="${action.name}Table" cellspacing="0" cellpadding="1" width="100%" border="0"> #foreach($parameter in ${action.parameters}) #if(!${parameter.isHidden()}) #set($type = ${parameter.getViewType()}) <tr> <td> <asp:label id="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}lbl" runat="server" Text="<%$ Resources:GeneratedResources, ${key}_${parameter.name}lbl %>"></asp:label></td> <td> #if($type.equals('file')) <asp:FileUpload ID="${parameter.name}FileSelector" runat="server" /></td> #else <asp:$type id="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}$type" ToolTip="<%$ Resources:GeneratedResources, ${key}_${parameter.name}_${parameter.getViewType()}_Help %>" #if(${parameter.isCalendar()})ReadOnly="True" #end#if(${parameter.isReadOnly()})ReadOnly="True" #end #if(${parameter.isTextarea()})TextMode="MultiLine" #end #if(${parameter.isPassword()})TextMode="Password" #end #if($type.equalsIgnoreCase('ListBox'))SelectionMode=Multiple #end#if($type.equals('RadioButton')) GroupName="${parameter.getRadioButtonGroup()}" #end runat="server"></asp:$type> #if(${parameter.isMandatoryField()}) #if(!$type.equalsIgnoreCase("checkbox")) <asp:RequiredFieldValidator id="${parameter.name}RF" runat="server" ErrorMessage="*" ControlToValidate="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}TextBox"></asp:RequiredFieldValidator> #end #end #if(${parameter.isCalendar()}) <asp:Calendar ID="${parameter.name}Calendar" runat="server" ></asp:Calendar> #end </td> #if($type.equals('TextBox')) #if(!${parameter.isCalendar()}) #if(${parameter.isValidator()}) <asp:RegularExpressionValidator id="${parameter.name}REV" runat="server" ErrorMessage="Warning: type of the field ''${parameter.name}'' is not ${parameter.getComparatorType()}!" ValidationExpression="${parameter.getValidator()}"></asp:RegularExpressionValidator> #else <asp:CompareValidator id="${parameter.name}CV" runat="server" ErrorMessage="Warning: type of the field ''${parameter.name}'' is not ${parameter.getComparatorType()}!" Operator="DataTypeCheck" Type="${parameter.getComparatorType()}" Display="Dynamic" ControlToValidate="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}TextBox"></asp:CompareValidator> #end #end #end #end </tr> #end #end <tr> <td> ##@todo Add resource assignment to this button <asp:button CssClass="body1" OnClick="${action.actionMethodName}Button_Click" id="${action.actionMethodName}Button" runat="server" Text="<%$ Resources:GeneratedResources, ${key}_${action.actionMethodName}Button%>" #if(${action.parameters.empty}) CausesValidation="False"#end ForeColor=MidnightBlue Style="background: url(${webform.getLayoutPath()}button.JPG) repeat;"></asp:button></td> <td></td> </tr> </table> </div> #end #end #foreach($table in $webform.tables) <div class="action1"> <table cellspacing="10" cellpadding="1" width="100%" border="0"> <tr> <td> <asp:GridView id="${table.name}DG" runat="server" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" OnPageIndexChanging="$stringUtils.capitalize(${table.name})DG_Page" OnSelectedIndexChanged="$stringUtils.capitalize(${table.name})DG_SelectedIndexChanged" OnSorting="$stringUtils.capitalize(${table.name})DG_SortCommand"> <AlternatingRowStyle BackColor="Lavender"></AlternatingRowStyle> <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" BackColor="#e8e2b6"></HeaderStyle> <Columns> #if (!$table.tableColumns.empty) #foreach ($column in $table.tableColumns) #if($column.name) #set($columnName = $column.name) #else #set($columnName = $column) #end #set ($tableColumnActions = $table.getTableColumnActions($columnName)) #if ($tableColumnActions.empty) <asp:BoundField DataField="$columnName" HeaderText="<%$ Resources:GeneratedResources, ${key}_${table.name}DG_$columnName %>" SortExpression="${stringUtils.capitalise($columnName)}" /> #else #set ($action = $tableColumnActions.iterator().next()) <asp:TemplateField> <HeaderTemplate><asp:Literal runat="server" Text="<%$ Resources:GeneratedResources, ${key}_${table.name}DG_$columnName %>"></asp:Literal></HeaderTemplate> <ItemTemplate> <asp:LinkButton ID="${action.tableLinkColumnName}Link" Runat="server" CommandArgument='<%# #renderTableCommandArgumentParameters() %>' CommandName="${action.triggerName}" Text='<%# Eval("DataItem.${action.tableLinkColumnName}")%>'></asp:LinkButton></ItemTemplate> </asp:TemplateField> #end #end #end #foreach ($action in $table.tableFormActions) <asp:ButtonField ButtonType=Link Text="<%$ Resources:GeneratedResources, ${key}_${table.name}DG_$columnName %>" SortExpression="${stringUtils.capitalise($action.triggerName)}" /> #end </Columns> <PagerSettings Mode=NumericFirstLast /> </asp:GridView> </td> </tr> <tr> <td align=center> <asp:Label ID="${table.name}Count" Runat=server ForeColor=DarkGreen></asp:Label> </td> </tr> </table> </div> #end </div> </asp:Content> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/inputWebformBase.cs.vsl Index: inputWebformBase.cs.vsl =================================================================== #set($generatedFile = "${usecase.fullyQualifiedPath}/${usecase.normalizedName}UCBase.cs") using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace ${usecase.packageName} { /// <summary> $usecase.getDocumentation(" /// ") /// </summary> /// <remarks>This is the entry page for the ${usecase.name} use case. There will be one /// of these classes for each of the use cases defined in your model. To start a use /// case, you can simply redirect the user to the ${usecase.normalizedName}UC.aspx page. /// </remarks> public abstract class ${usecase.normalizedName}UCBase : ${usecase.normalizedName}PageBase { protected override void OnLoad(System.EventArgs e) { if (!this.IsPostBack) { base.Controller.StartUseCase(); } } } } 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/menu.ascx.cs.vsl Index: menu.ascx.cs.vsl =================================================================== #if (${dotNetVersion}=="2.0") namespace ${webAssemblyName} { using System; using System.Data; using System.Drawing; using System.Web; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Security.Principal; using System.Resources; using System.Reflection; using System.Threading; using System.Globalization; /// <summary> /// Summary description for menu. /// </summary> public partial class Menu : System.Web.UI.UserControl { private void Page_Load(object sender, System.EventArgs e) { if (!this.IsPostBack) { string culturePref = ""; if (Request.Cookies["CulturePref"] != null) { culturePref = Request.Cookies["CulturePref"].Value; } Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture (culturePref); Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; ResourceManager resourceManager = new ResourceManager("${webAssemblyName}.Resources.AppResources",Assembly.GetExecutingAssembly()); #foreach($usecase in $usecases) #if($usecase.isFrontEndApplication()) #foreach($group in ${usecase.getMenuGroups()}) this.${group.getName()}Literal.Text = resourceManager.GetString("@menu.${group.getName()}"); #foreach($smenu in ${group.getUseCases()}) #if($security) ${smenu.getRolesConditions()} this.${smenu.getNormalizedName()}LinkButton.Enabled = false; #end this.${smenu.getNormalizedName()}LinkButton.Text = resourceManager.GetString("@menu.${smenu.getNormalizedName()}"); #end #end #end #end } } #foreach($usecase in $usecases) protected void ${usecase.getNormalizedName()}LinkButton_Click(object sender, System.EventArgs e) { Response.Redirect("~/target/src/${usecase.getFullyQualifiedPath()}/${usecase.getNormalizedName()}UC.aspx"); } #end } } #end 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/Default.aspx.cs.vsl Index: Default.aspx.cs.vsl =================================================================== using System; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Web.Security; namespace ${webAssemblyName} { /// <summary> /// Summary description for _default. /// </summary> public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, System.EventArgs e) { #if(${usecase.secured}) // Assigning roles string roleData = "Admin;User";//${toDoTag} assign roles FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,"Roles",DateTime.Now,DateTime.Now.AddMinutes(30),false,roleData,"/"); string encTicket = FormsAuthentication.Encrypt(ticket); Response.Cookies.Add(new HttpCookie("Roles",encTicket)); #end //Pass control to the use case marked with the FrontEndApplication stereotype. Response.Redirect("~/target/src/${usecase.fullyQualifiedPath}/${usecase.normalizedName}UC.aspx"); } } } 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/web.config.vsl Index: web.config.vsl =================================================================== <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <!-- DYNAMIC DEBUG COMPILATION Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to false will improve runtime performance of this application. Set compilation debug="true" to insert debugging symbols (.pdb information) into the compiled page. Because this creates a larger file that executes more slowly, you should set this value to true only when debugging and to false at all other times. For more information, refer to the documentation about debugging ASP.NET files. --> <compilation defaultLanguage="c#" debug="true" /> <!-- CUSTOM ERROR MESSAGES Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable. Add <error> tags for each of the errors you want to handle. "On" Always display custom (friendly) messages. "Off" Always display detailed ASP.NET error information. "RemoteOnly" Display custom (friendly) messages only to users not running on the local Web server. This setting is recommended for security purposes, so that you do not display application detail information to remote clients. --> <customErrors defaultRedirect="error.aspx" mode="On" /> <!-- AUTHENTICATION This section sets the authentication policies of the application. Possible modes are "Windows", "Forms", "Passport" and "None" "None" No authentication is performed. "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to its settings for the application. Anonymous access must be disabled in IIS. "Forms" You provide a custom form (Web page) for users to enter their credentials, and then you authenticate them in your application. A user credential token is stored in a cookie. "Passport" Authentication is performed via a centralized authentication service provided by Microsoft that offers a single logon and core profile services for member sites. --> <authentication mode="Windows" /> <!-- AUTHORIZATION This section sets the authorization policies of the application. You can allow or deny access to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous (unauthenticated) users. --> <authorization> <deny users="?" /> <allow users="*" /> <!-- <allow users="[comma separated list of users]" roles="[comma separated list of roles]"/> <deny users="[comma separated list of users]" roles="[comma separated list of roles]"/> --> </authorization> <!-- APPLICATION-LEVEL TRACE LOGGING Application-level tracing enables trace log output for every page within an application. Set trace enabled="true" to enable application trace logging. If pageOutput="true", the trace information will be displayed at the bottom of each page. Otherwise, you can view the application trace log by browsing the "trace.axd" page from your web application root. --> <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" /> <!-- SESSION STATE SETTINGS By default ASP.NET uses cookies to identify which requests belong to a particular session. If cookies are not available, a session can be tracked by adding a session identifier to the URL. To disable cookies, set sessionState cookieless="true". --> <sessionState mode="InProc" cookieless="false" timeout="720" /> <!-- GLOBALIZATION This section sets the globalization settings of the application. --> <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> </system.web> #if($security.equals('true')) #foreach($usecase in $usecases) #foreach($webform in ${usecase.getWebForms()}) <location path="target/${webform.getFullyQualifiedPath()}/${webform.getNormalizedName()}.aspx"> <system.web> <authorization> <allow roles="${usecase.getRolesAsString()}"/> <deny users="?,*" /> </authorization> </system.web> </location> #end #end #end </configuration> 1.1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/resources.resx.vsl Index: resources.resx.vsl =================================================================== <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> #foreach($usecase in $usecases) #foreach($webform in ${usecase.getWebForms()}) #set($key = "${usecase.normalizedName}_${webform.normalizedName}") <!-- *************************************************************************--> <!-- ${webform.normalizedName} webform in ${usecase.normalizedName} usecase--> <!-- *************************************************************************--> <data name="${key}Page" xml:space="preserve"> <value><![CDATA[${webform.getDocumentation("")}]]></value> </data> #foreach($action in ${webform.outgoing}) #if(!$action.isHyperlink()) #foreach($parameter in ${action.parameters}) #if(!${parameter.hidden}) <data name="${key}_${parameter.name}lbl" xml:space="preserve"> <value><![CDATA[$stringUtils.toPhrase(${parameter.name})]]></value> </data> #if(!${parameter.getViewType().equals('file')}) <data name="${key}_${parameter.name}_${parameter.getViewType()}_Help" xml:space="preserve"> <value><![CDATA[${parameter.getDocumentation("")}]]></value> </data> #end #end #end <data name="${key}_${action.actionMethodName}Button"> <value><![CDATA[$stringUtils.toPhrase(${action.name})]]></value> </data> #end #end <!-- Table actions for the ${webform.normalizedName} webform in ${usecase.normalizedName} usecase--> <!-- TODO: Still need to add resources for table actions --> <!-- Tables for the ${webform.normalizedName} webform in ${usecase.normalizedName} usecase--> #foreach($table in $webform.tables) #foreach ($column in $table.tableColumns) <data name="${key}_${table.name}DG_${column.name}"> <value><![CDATA[$stringUtils.toPhrase(${column.name})]]></value> </data> #end #end #end #end <!-- *************************************************************************--> <!-- Menu --> <!-- *************************************************************************--> #foreach($usecase in $usecases) #if($usecase.isFrontEndApplication()) #foreach($group in ${usecase.getMenuGroups()}) <data name="menu_${group.name}Literal"> <value>${group.name}</value> </data> #foreach($smenu in ${group.getUseCases()}) <data name="menu_${smenu.normalizedName}LinkButton"> <value>$stringUtils.toPhrase(${smenu.name})</value> </data> #end #end #end #end <!-- *************************************************************************--> <!-- Error page --> <!-- *************************************************************************--> <data name="error_errorMessage"> <value>An exception occured, if the problem persists contact your system administrator.</value> </data> </root> 1.1 cartridges/andromda-aspdotnet/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1" ?> <namespace name="aspdotnet"> <components> <component name="cartridge"> <path>META-INF/andromda/cartridge.xml</path> </component> <component name="metafacades"> <path>META-INF/andromda/metafacades.xml</path> </component> <component name="profile"> <path>META-INF/andromda/profile.xml</path> </component> </components> <properties> <!-- namespace-propertyGroup merge-point --> <propertyGroup name="Outlets"> <documentation> Defines the locations to which output is generated. </documentation> <property name="web"> <documentation> </documentation> </property> <property name="web_generated"> <documentation> </documentation> </property> <property name="web_manual"> <documentation> </documentation> </property> </propertyGroup> <propertyGroup name="Environment"> <documentation> The properties related to the target IDE and .NET framework versions. </documentation> <property name="dotNetVersion"> <default>1.1</default> <documentation> The target version for the .NET framework. Supports either Microsoft .NET 1.1 or 2.0. </documentation> </property> <property name="visualStudioVersion"> <default>2003</default> <documentation> The target version of the IDE. Currently supports Microsoft Visual Studio .NET 2003 and 2005. </documentation> </property> </propertyGroup> <propertyGroup name="AssemblyNames"> <documentation> The properties that provide names of all dependent assemblies. </documentation> <property name="webAssemblyName"> <documentation> </documentation> </property> <property name="coreAssemblyName"> <documentation> </documentation> </property> <property name="commonAssemblyName"> <documentation> </documentation> </property> </propertyGroup> <propertyGroup name="AssemblyConfiguration"> <documentation> The properties that provide configuration of the assembly. </documentation> <property name="AssemblyTitle"> <documentation> </documentation> </property> <property name="AssemblyDescription"> <documentation> </documentation> </property> <property name="AssemblyConfiguration"> <documentation> </documentation> </property> <property name="AssemblyCompany"> <documentation> </documentation> </property> <property name="AssemblyProduct"> <documentation> </documentation> </property> <property name="AssemblyCopyright"> <documentation> </documentation> </property> <property name="AssemblyTrademark"> <documentation> </documentation> </property> <property name="AssemblyCulture"> <documentation> </documentation> </property> <property name="AssemblyVersion"> <documentation> </documentation> </property> <property name="AssemblyDelaySign"> <documentation> </documentation> </property> <property name="AssemblyKeyFile"> <documentation> </documentation> </property> <property name="AssemblyKeyName"> <documentation> </documentation> </property> <property name="security"> <default>false</default> <documentation> To enable role based security set security property to true </documentation> </property> </propertyGroup> <propertyGroup name="Other"> <property name="backingListPattern"> <default>{0}BackingList</default> <documentation> The pattern used for constructing a parameter's backing list name. A backing list is used when you want to select the value of the parameter from a list (typically used for drop-down select input types). </documentation> </property> <property name="backingValuePattern"> <default>{0}BackingValue</default> <documentation> The pattern used for constructing a parameter's backing value name. A backing value is used with an input table type (when you want to submit values from a table of complex objects). </documentation> </property> <property name="labelListPattern"> <default>{0}LabelList</default> <documentation> The pattern used for constructing the label list name (stores the list of possible parameter value labels). </documentation> </property> <property name="valueListPattern"> <default>{0}ValueList</default> <documentation> The pattern used for constructing the values list name (stores the list of possible parameter values when selecting from a list). </documentation> </property> <property name="dummyData"> <default>false</default> <documentation> Denotes whether or not to render dummy data in places like controllers. </documentation> </property> <property name="toDoTag"> <default>TODO:</default> <documentation> The text to render for 'todo' items in source code. </documentation> </property> </propertyGroup> </properties> </namespace> 1.1 cartridges/andromda-aspdotnet/src/main/resources/META-INF/andromda/metafacades.xml Index: metafacades.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1" ?> <metafacades> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspWebFormLogicImpl"> <mapping> <property name="frontEndView"/> <property name="containedInFrontEndUseCase"/> </mapping> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperationLogicImpl"> <mapping> <property name="ownerIsController"/> </mapping> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspControllerLogicImpl"> <mapping> <property name="useCase"/> </mapping> <!-- property reference="controllerImplementationPattern"/ --> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspSessionObjectLogicImpl"> <mapping> <stereotype>FRONT_END_SESSION_OBJECT</stereotype> </mapping> </metafacade> <!-- mapping rule for uml14 support --> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspEventLogicImpl"> <mapping class="org.omg.uml.behavioralelements.statemachines.SignalEvent$Impl"> <property name="containedInFrontEndUseCase"/> </mapping> </metafacade> <!-- mapping rule for uml14 support --> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspEventLogicImpl"> <mapping class="org.omg.uml.behavioralelements.statemachines.CallEvent$Impl"> <property name="containedInFrontEndUseCase"/> </mapping> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspParameterLogicImpl"> <mapping> <property name="containedInFrontEndUseCase"/> </mapping> <property reference="backingListPattern"/> <property reference="backingValuePattern"/> <property reference="labelListPattern"/> <property reference="valueListPattern"/> </metafacade> <!-- metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspTransitionLogicImpl"> <mapping class="org.omg.uml.behavioralelements.statemachines.Transition$Impl"/> </metafacade --> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspActionLogicImpl"> <mapping> <property name="exitingInitialState"/> <property name="containedInFrontEndUseCase"/> </mapping> <!-- property reference="formImplementationPattern"/> <property reference="formBeanPattern"/> <property reference="formScope"/> <property reference="actionFormKey"/ --> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspActionLogicImpl"> <mapping> <property name="exitingView"/> </mapping> <!-- property reference="formImplementationPattern"/> <property reference="formBeanPattern"/> <property reference="formScope"/> <property reference="actionFormKey"/ --> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspForwardLogicImpl"> <mapping> <property name="containedInFrontEndUseCase"/> </mapping> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspActivityGraphLogicImpl"> <mapping class="org.omg.uml.behavioralelements.activitygraphs.ActivityGraph$Impl"/> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspFinalStateLogicImpl"> <mapping class="org.omg.uml.behavioralelements.statemachines.FinalState$Impl"/> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspUseCaseLogicImpl"> <mapping> <stereotype>FRONT_END_USE_CASE</stereotype> </mapping> </metafacade> <metafacade class="org.andromda.cartridges.aspdotnet.metafacades.AspUseCaseLogicImpl"> <mapping> <stereotype>FRONT_END_APPLICATION</stereotype> </mapping> <!-- property reference="actionFormKey"/ --> </metafacade> </metafacades> 1.1 cartridges/andromda-aspdotnet/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== <cartridge> <templateEngine className="org.andromda.templateengines.velocity.VelocityTemplateEngine"> <macrolibrary name="templates/aspdotnet/web2003/renderFormInput.vm"/> <macrolibrary name="templates/aspdotnet/uicontrollers/formImplMacros.vm"/> <macrolibrary name="templates/aspdotnet/uicontrollers/formMacros.vm"/> <macrolibrary name="templates/aspdotnet/uicontrollers/Controller.cs.vm"/> <!--macrolibrary name="templates/aspdotnet/web2005/renderActionCommandLinkParameter.vm"/--> <!-- cartridge-macrolibrary merge-point--> </templateEngine> <!-- define the template objects that are made available to the template --> <templateObject name="dateUtils" className="org.andromda.utils.DateUtilsHelper"/> <templateObject name="stringUtils" className="org.andromda.utils.StringUtilsHelper"/> <!-- cartridge-templateObject merge-point--> <property reference="dotNetVersion"/> <property reference="AssemblyTitle"/> <property reference="AssemblyDescription"/> <property reference="AssemblyConfiguration"/> <property reference="AssemblyCompany"/> <property reference="AssemblyProduct"/> <property reference="AssemblyCopyright"/> <property reference="AssemblyTrademark"/> <property reference="AssemblyCulture"/> <property reference="AssemblyVersion"/> <property reference="AssemblyDelaySign"/> <property reference="AssemblyKeyFile"/> <property reference="AssemblyKeyName"/> <property reference="web"/> <property reference="... [truncated message content] |
From: Eric C. <ecr...@us...> - 2006-09-17 17:30:12
|
User: ecrutchfield Date: 06/09/17 10:30:11 Added: andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades AspControllerLogicImpl.java AspFinalStateLogicImpl.java .cvsignore AspActionLogicImpl.java AspActivityGraphLogicImpl.java AspParameterLogicImpl.java AspControllerOperationLogicImpl.java AspWebFormLogicImpl.java AspTransitionLogicImpl.java AspForwardLogicImpl.java AspEventLogicImpl.java AspSessionObjectLogicImpl.java AspUseCaseLogicImpl.java andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet MenuGroup.java AspProfile.java CommonProperties.java Log: initial version Revision Changes Path 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspControllerLogicImpl.java Index: AspControllerLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; import org.andromda.metafacades.uml.DependencyFacade; import org.andromda.metafacades.uml.ModelElementFacade; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspController. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspController */ public class AspControllerLogicImpl extends AspControllerLogic { public AspControllerLogicImpl(Object metaObject, String context) { super(metaObject, context); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspController#getFullyQualifiedImplementationName() */ protected String handleGetFullyQualifiedImplementationName() { final StringBuffer fullyQualifiedName = new StringBuffer(); final String packageName = this.getPackageName(); if (StringUtils.isNotBlank(packageName)) { fullyQualifiedName.append(packageName + '.'); } return fullyQualifiedName.append(this.getImplementationName()).toString(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspController#getFullyQualifiedImplementationPath() */ protected String handleGetFullyQualifiedImplementationPath() { return this.getFullyQualifiedImplementationName().replace('.', '/'); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspController#getImplementationName() */ protected java.lang.String handleGetImplementationName() { //final String pattern = ObjectUtils.toString(this.getConfiguredProperty(CommonProperties.CONTROLLER_IMPLEMENTATION_PATTERN)); // @todo add CONTROLLER_IMPLEMENTATION_PATTERN to namespace and profile, then use here final String pattern = "{0}Impl"; return pattern.replaceFirst("\\{0\\}", StringUtils.capitalize(this.getName())); } protected java.util.List handleGetSessionObjects() { final List references = new ArrayList(this.getSourceDependencies()); for (final Iterator iterator = references.iterator(); iterator.hasNext();) { final ModelElementFacade targetElement = ((DependencyFacade)iterator.next()).getTargetElement(); if (!(targetElement instanceof AspSessionObject)) { iterator.remove(); } } return references; } } 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspFinalStateLogicImpl.java Index: AspFinalStateLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspFinalState. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspFinalState */ public class AspFinalStateLogicImpl extends AspFinalStateLogic { public AspFinalStateLogicImpl(Object metaObject, String context) { super(metaObject, context); } } 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/.cvsignore Index: .cvsignore =================================================================== *.bak 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspActionLogicImpl.java Index: AspActionLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.andromda.cartridges.aspdotnet.AspProfile; import org.andromda.cartridges.aspdotnet.CommonProperties; import org.andromda.metafacades.uml.EventFacade; import org.andromda.utils.StringUtilsHelper; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; import org.apache.commons.lang.StringUtils; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspAction. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction */ public class AspActionLogicImpl extends AspActionLogic { public AspActionLogicImpl (Object metaObject, String context) { super (metaObject, context); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#isHyperlink() */ protected boolean handleIsHyperlink() { final Object value = findTaggedValue(AspProfile.TAGGEDVALUE_ACTION_TYPE); return CommonProperties.WEB_ACTION_HYPERLINK.equalsIgnoreCase(value == null ? null : value.toString()); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#isTableLink() */ protected boolean handleIsTableLink() { return this.getTableLinkParameter() != null; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#isTableAction() */ protected boolean handleIsTableAction() { return CommonProperties.ACTION_TYPE_TABLE.equals(this.findTaggedValue(AspProfile.TAGGEDVALUE_ACTION_TYPE)); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getFormImplementationName() */ protected java.lang.String handleGetFormImplementationName() { //final String pattern = ObjectUtils.toString(this.getConfiguredProperty(CommonProperties.FORM_IMPLEMENTATION_PATTERN)); //@todo add FORM_IMPLEMENTATION_PATTERN to CommonProperties, then use here final String pattern = "{0}FormImpl"; return pattern.replaceFirst( "\\{0\\}", StringUtils.capitalize(this.getTriggerName())); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getFullyQualifiedFormImplementationName() */ protected java.lang.String handleGetFullyQualifiedFormImplementationName() { final StringBuffer fullyQualifiedName = new StringBuffer(); final String packageName = this.getPackageName(); if (StringUtils.isNotBlank(packageName)) { fullyQualifiedName.append(packageName + '.'); } return fullyQualifiedName.append(this.getFormImplementationName()).toString(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getFullyQualifiedFormImplementationPath() */ protected java.lang.String handleGetFullyQualifiedFormImplementationPath() { return this.getFullyQualifiedFormImplementationName().replace( '.', '/'); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getHiddenParameters() */ protected List handleGetHiddenParameters() { final List hiddenParameters = new ArrayList(this.getParameters()); CollectionUtils.filter( hiddenParameters, new Predicate() { public boolean evaluate(final Object object) { boolean valid = false; if (object instanceof AspParameter) { final AspParameter parameter = (AspParameter)object; valid = parameter.isHidden(); } return valid; } }); return hiddenParameters; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getTableLinkColumnName() */ protected String handleGetTableLinkColumnName() { String tableLink = null; final Object value = findTaggedValue(AspProfile.TAGGEDVALUE_ACTION_TABLELINK); if (value != null) { tableLink = StringUtils.trimToNull(value.toString()); if (tableLink != null) { final int columnOffset = tableLink.indexOf('.'); tableLink = (columnOffset == -1 || columnOffset == tableLink.length() - 1) ? null : tableLink.substring(columnOffset + 1); } } return tableLink; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getTableLinkName() */ protected String handleGetTableLinkName() { String tableLink = null; final Object value = findTaggedValue(AspProfile.TAGGEDVALUE_ACTION_TABLELINK); if (value != null) { tableLink = StringUtils.trimToNull(value.toString()); if (tableLink != null) { final int columnOffset = tableLink.indexOf('.'); tableLink = columnOffset == -1 ? tableLink : tableLink.substring( 0, columnOffset); } } return tableLink; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getTableLinkParameter() */ protected Object handleGetTableLinkParameter() { AspParameter tableLinkParameter = null; final String tableLinkName = this.getTableLinkName(); if (tableLinkName != null) { final AspWebForm view = (AspWebForm)this.getInput(); if (view != null) { final List tables = view.getTables(); for (int ctr = 0; ctr < tables.size() && tableLinkParameter == null; ctr++) { final Object object = tables.get(ctr); if (object instanceof AspParameter) { final AspParameter table = (AspParameter)object; if (tableLinkName.equals(table.getName())) { tableLinkParameter = table; } } } } } return tableLinkParameter; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getTriggerName() */ protected String handleGetTriggerName() { String name = null; if (this.isExitingInitialState()) { final AspUseCase useCase = (AspUseCase)this.getUseCase(); if (useCase != null) { name = useCase.getNormalizedName(); } } else { final EventFacade trigger = this.getTrigger(); final String suffix = trigger == null ? this.getTarget().getName() : trigger.getName(); name = this.getSource().getName() + ' ' + suffix; } return StringUtilsHelper.lowerCamelCaseName(name); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getFormImplementationPropertyName() */ protected String handleGetFormImplementationPropertyName() { return StringUtilsHelper.upperCamelCaseName(this.getTriggerName()) + "FormData"; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getFormImplementationInterfaceList() */ protected String handleGetFormImplementationInterfaceList() { final List deferredOperations = this.getDeferredOperations(); for (final Iterator iterator = deferredOperations.iterator(); iterator.hasNext();) { // - remove any forms that don't have arguments final AspControllerOperation operation = (AspControllerOperation)iterator.next(); if (operation.getArguments().isEmpty()) { iterator.remove(); } } final StringBuffer list = new StringBuffer(); for (final Iterator iterator = deferredOperations.iterator(); iterator.hasNext();) { final AspControllerOperation operation = (AspControllerOperation)iterator.next(); list.append("I" + operation.getFormName()); if (iterator.hasNext()) { list.append(", "); } } return list.toString(); } } 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspActivityGraphLogicImpl.java Index: AspActivityGraphLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspActivityGraph. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspActivityGraph */ public class AspActivityGraphLogicImpl extends AspActivityGraphLogic { public AspActivityGraphLogicImpl(Object metaObject, String context) { super(metaObject, context); } } 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspParameterLogicImpl.java Index: AspParameterLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; import org.andromda.cartridges.aspdotnet.CommonProperties; import org.andromda.cartridges.aspdotnet.AspProfile; import org.andromda.metafacades.uml.ClassifierFacade; import org.andromda.metafacades.uml.FrontEndView; import org.andromda.metafacades.uml.FrontEndAction; import org.andromda.metafacades.uml.FrontEndActivityGraph; import org.andromda.metafacades.uml.TransitionFacade; import org.andromda.metafacades.uml.UMLMetafacadeUtils; import org.andromda.metafacades.uml.UMLProfile; import org.andromda.metafacades.uml.UseCaseFacade; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.log4j.Logger; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspParameter. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter */ public class AspParameterLogicImpl extends AspParameterLogic { public AspParameterLogicImpl(Object metaObject, String context) { super(metaObject, context); } /** * The logger instance that can be used by all decendant classes. */ protected Logger logger = Logger.getLogger(this.getClass()); /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getViewType() */ protected java.lang.String handleGetViewType() { return handleGetWidgetType(); /* String taggedValue = new String(); if (this.findTaggedValue(CommonProperties.FIELD_TYPE) != null) { taggedValue = this.findTaggedValue(CommonProperties.FIELD_TYPE) .toString(); } if (taggedValue.equals(CommonProperties.FIELD_TYPE_SELECT)) { return "DropDownList"; } else if (taggedValue.equals(CommonProperties.FIELD_TYPE_CHECKBOX)) { return "CheckBox"; } else if (taggedValue.equals(CommonProperties.FIELD_TYPE_RADIO)) { return "RadioButton"; } else if (taggedValue.equals(CommonProperties.FIELD_TYPE_LABEL)) { return "Label"; } else if (taggedValue.equals(CommonProperties.FIELD_TYPE_HIDDEN)) { return "Hidden"; } else if (this.getType().getName().equals("Blob")) { return "Image"; } else if (this.getType().getName().equals("File")) { return "file"; } else { return "TextBox"; } */ } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getWidgetType() */ protected String handleGetWidgetType() { Object value = findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE); String fieldType = value == null ? null : value.toString(); if (fieldType != null) logger.debug("[" + this.getFullyQualifiedName() + "] TAGGEDVALUE_INPUT_TYPE = " + fieldType.toString()); else logger.debug("[" + this.getFullyQualifiedName() + "] TAGGEDVALUE_INPUT_TYPE = null"); String widgetType = null; // if (isActionParameter()) // { // logger.debug("parameter is an action parameter"); if (fieldType == null) { // no widget type has been specified final ClassifierFacade type = getType(); if (type != null) { logger.debug("fieldType = " + type.getFullyQualifiedName().toString()); //@todo Input types for files are not handled correctly in getViewType() if (type.isFileType()) fieldType = AspProfile.TAGGEDVALUE_INPUT_TYPE_FILE.toString(); else if (isValidatorBoolean()) fieldType = AspProfile.TAGGEDVALUE_INPUT_TYPE_CHECKBOX.toString(); else if (isMultiple()) fieldType = AspProfile.TAGGEDVALUE_INPUT_TYPE_SELECT.toString(); else fieldType = AspProfile.TAGGEDVALUE_INPUT_TYPE_TEXT.toString(); } } if (AspProfile.TAGGEDVALUE_INPUT_TYPE_SELECT.equalsIgnoreCase(fieldType)) { if (this.isMultiple()) widgetType = "ListBox"; else widgetType = "DropDownList"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_PASSWORD.equalsIgnoreCase(fieldType)) { widgetType = "TextBox"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_TEXTAREA.equalsIgnoreCase(fieldType)) { widgetType = "TextBox"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_HIDDEN.equalsIgnoreCase(fieldType)) { widgetType = "Hidden"; } else if (fieldType.toLowerCase().startsWith(AspProfile.TAGGEDVALUE_INPUT_TYPE_RADIO)) { widgetType = "RadioButton"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_CHECKBOX.equalsIgnoreCase(fieldType)) { widgetType = "CheckBox"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_PLAINTEXT.equalsIgnoreCase(fieldType)) { widgetType = "Label"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_TEXT.equalsIgnoreCase(fieldType)) { widgetType = "TextBox"; } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_MULTIBOX.equalsIgnoreCase(fieldType)) { //TODO add getMultiboxPropertyName() method //if (getMultiboxPropertyName() != null) //{ widgetType = "CheckBoxList"; //} } else if (AspProfile.TAGGEDVALUE_INPUT_TYPE_LINK.equalsIgnoreCase(fieldType)) { final FrontEndAction action = this.getAction(); if (action != null) { //TODO add action.isTableLink() method //if (action.isTableLink()) //{ widgetType = "HyperLink"; //} } } else { widgetType = (isMultiple()) ? "DropDownList" : "TextBox"; } // } if (widgetType == null) widgetType = "TextBox"; logger.debug("widgetType = " + widgetType.toString()); return widgetType; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isMultiple() */ protected boolean handleIsMultiple() { boolean multiple = false; ClassifierFacade type = getType(); if (type != null) { multiple = type.isCollectionType() || type.isArrayType(); } return multiple; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getBackingListName() */ protected String handleGetBackingListName() { return ObjectUtils.toString(this.getConfiguredProperty(CommonProperties.BACKING_LIST_PATTERN)).replaceAll( "\\{0\\}", this.getName()); } /** * @see org.andromda.cartridges.jsf.metafacades.JSFParameter#getBackingValueName() */ protected String handleGetBackingValueName() { return ObjectUtils.toString(this.getConfiguredProperty(CommonProperties.BACKING_VALUE_PATTERN)).replaceAll( "\\{0\\}", this.getName()); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getValueListName() */ protected String handleGetValueListName() { return ObjectUtils.toString(this.getConfiguredProperty(CommonProperties.VALUE_LIST_PATTERN)).replaceAll( "\\{0\\}", this.getName()); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getLabelListName() */ protected String handleGetLabelListName() { return ObjectUtils.toString(this.getConfiguredProperty(CommonProperties.LABEL_LIST_PATTERN)).replaceAll( "\\{0\\}", this.getName()); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getInputTableIdentifierColumns() */ protected String handleGetInputTableIdentifierColumns() { return ObjectUtils.toString(this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TABLE_IDENTIFIER_COLUMNS)).trim(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getInputValueAccessor() */ protected String handleGetInputValueAccessor() { String viewType = this.getViewType(); String valueAccessor = "UNKNOWN"; if (viewType.equalsIgnoreCase("TextBox")) valueAccessor = "Text"; else if (viewType.equalsIgnoreCase("CheckBox") || viewType.equalsIgnoreCase("RadioButton")) valueAccessor = "Checked"; else if (viewType.equalsIgnoreCase("DropDownList") || viewType.equalsIgnoreCase("CheckBoxList") || viewType.equalsIgnoreCase("RadioButtonList")) valueAccessor = "Items"; //@todo Input types for files are not handled correctly in getViewType() //else if (viewType.equalsIgnoreCase("Html)) // valueAccessor = "PostedFile"; logger.debug("[param:" + this.getName() + "] Using viewType = " + viewType + " the value accessor will be " + valueAccessor); return valueAccessor; } protected String handleGetCapitalisedName() { return StringUtils.capitalize(this.getName()); } protected boolean handleIsMandatoryField() { return !((this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_REQUIRED) == null) || this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_REQUIRED).equals("false")); } protected String handleGetRadioButtonGroup() { return this.findTaggedValue(CommonProperties.RADIO_BUTTON_GROUP) .toString(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getTableColumnActions(java.lang.String) */ protected List handleGetTableColumnActions(final String columnName) { final List columnActions = new ArrayList(); if (columnName != null) { final Set actions = new LinkedHashSet(this.getTableHyperlinkActions()); actions.addAll(this.getTableFormActions()); for (final Iterator iterator = actions.iterator(); iterator.hasNext();) { final AspAction action = (AspAction)iterator.next(); if (columnName.equals(action.getTableLinkColumnName())) { columnActions.add(action); } } } return columnActions; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getTableFormActions() */ protected List handleGetTableFormActions() { return this.getTableActions(false); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getTableHyperlinkActions() */ protected List handleGetTableHyperlinkActions() { return this.getTableActions(true); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getComparatorType() */ protected String handleGetComparatorType() { String type = this.getType().getName(); if (type.equals("int") || type.equals("Integer")) { return "Integer"; } else if (type.equals("double") || type.equals("Double")) { return "Double"; } else if (type.equals("float") || type.equals("Float")) { return "Double"; } else if (type.equals("long") || type.equals("Long")) { return "Integer"; } else if (type.equals("Date")) { return "Date"; } return "String"; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isReadOnly() */ protected boolean handleIsReadOnly() { return !((this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_READONLY) == null) || this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_READONLY).equals("false")); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isSelectable() */ protected boolean handleIsSelectable() { boolean selectable = false; if (this.isActionParameter()) { selectable = this.isInputMultibox() || this.isInputSelect() || this.isInputRadio(); final ClassifierFacade type = this.getType(); if (!selectable && type != null) { final String name = this.getName(); final String typeName = type.getFullyQualifiedName(); // - if the parameter is not selectable but on a targetting page it IS selectable we must // allow the user to set the backing list too final Collection views = this.getAction().getTargetViews(); for (final Iterator iterator = views.iterator(); iterator.hasNext() && !selectable;) { final FrontEndView view = (FrontEndView)iterator.next(); final Collection parameters = view.getAllActionParameters(); for (final Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext() && !selectable;) { final Object object = parameterIterator.next(); if (object instanceof AspParameter) { final AspParameter parameter = (AspParameter)object; final String parameterName = parameter.getName(); final ClassifierFacade parameterType = parameter.getType(); if (parameterType != null) { final String parameterTypeName = parameterType.getFullyQualifiedName(); if (name.equals(parameterName) && typeName.equals(parameterTypeName)) { selectable = parameter.isInputMultibox() || parameter.isInputSelect() || parameter.isInputRadio(); } } } } } } } else if (this.isControllerOperationArgument()) { final String name = this.getName(); final Collection actions = this.getControllerOperation().getDeferringActions(); for (final Iterator actionIterator = actions.iterator(); actionIterator.hasNext();) { final AspAction action = (AspAction)actionIterator.next(); final Collection formFields = action.getFormFields(); for (final Iterator fieldIterator = formFields.iterator(); fieldIterator.hasNext() && !selectable;) { final Object object = fieldIterator.next(); if (object instanceof AspParameter) { final AspParameter parameter = (AspParameter)object; if (!parameter.equals(this)) { if (name.equals(parameter.getName())) { selectable = parameter.isSelectable(); } } } } } } return selectable; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isPassword() */ protected boolean handleIsPassword() { return (this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE) != null) && this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE).equals(AspProfile.TAGGEDVALUE_INPUT_TYPE_PASSWORD); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isTextarea() */ protected boolean handleIsTextarea() { return (this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE) != null) && this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE).equals(AspProfile.TAGGEDVALUE_INPUT_TYPE_TEXTAREA); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isInputRadio() */ protected boolean handleIsInputRadio() { return this.isInputType(CommonProperties.FIELD_TYPE_RADIO); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isInputSelect() */ protected boolean handleIsInputSelect() { return this.isInputType(CommonProperties.FIELD_TYPE_SELECT); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isInputTable() */ protected boolean handleIsInputTable() { return this.getInputTableIdentifierColumns().length() > 0 || this.isInputType(CommonProperties.INPUT_TABLE); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isInputText() */ protected boolean handleIsInputText() { return this.isInputType(CommonProperties.FIELD_TYPE_TEXT); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isInputMultibox() */ protected boolean handleIsInputMultibox() { return this.isInputType(CommonProperties.FIELD_TYPE_MULTIBOX); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isValidator() */ protected boolean handleIsValidator() { return this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_VALIDATORS) != null; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getValidator() */ protected String handleGetValidator() { if (this.isValidator()) { return this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_VALIDATORS) .toString(); } return null; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#getColumns() */ protected Collection handleGetColumns() { Collection columns = new LinkedList(); if (this.findTaggedValue(AspProfile.TAGGEDVALUE_TABLE_COLUMNS) != null) { String[] columnArray = StringUtils.split(this.findTaggedValue( AspProfile.TAGGEDVALUE_TABLE_COLUMNS).toString(), ','); for (int i = 0; i < columnArray.length; i++) { columns.add(columnArray[i]); } } return columns; } /** * @see org.andromda.metafacades.uml.FrontEndParameter#getTableColumns() */ public Collection getTableColumns() { final Collection tableColumns = super.getTableColumns(); if (tableColumns.isEmpty()) { // try to preserve the order of the elements encountered final Map tableColumnsMap = new LinkedHashMap(); // order is important final List actions = new ArrayList(); // all table actions need the exact same parameters, just not always all of them actions.addAll(this.getTableFormActions()); // if there are any actions that are hyperlinks then their parameters get priority // the user should not have modeled it that way (constraints will warn him/her) actions.addAll(this.getTableHyperlinkActions()); for (final Iterator actionIterator = actions.iterator(); actionIterator.hasNext();) { final AspAction action = (AspAction)actionIterator.next(); final Collection actionParameters = action.getParameters(); for (final Iterator parameterIterator = actionParameters.iterator(); parameterIterator.hasNext();) { final Object object = parameterIterator.next(); if (object instanceof AspParameter) { final AspParameter parameter = (AspParameter)object; final String parameterName = parameter.getName(); if (parameterName != null) { // never overwrite column specific table links // the hyperlink table links working on a real column get priority final Object existingObject = tableColumnsMap.get(parameterName); if (existingObject instanceof AspParameter) { final AspParameter existingParameter = (AspParameter)existingObject; if (existingParameter == null || (action.isHyperlink() && parameterName.equals(action.getTableLinkColumnName()))) { tableColumnsMap.put( parameterName, parameter); } } } } } } // for any missing parameters we just add the name of the column final Collection columnNames = this.getTableColumnNames(); for (final Iterator columnNameIterator = columnNames.iterator(); columnNameIterator.hasNext();) { final String columnName = (String)columnNameIterator.next(); if (!tableColumnsMap.containsKey(columnName)) { tableColumnsMap.put( columnName, columnName); } } // return everything in the same order as it has been modeled (using the table tagged value) for (final Iterator columnNameIterator = columnNames.iterator(); columnNameIterator.hasNext();) { final Object columnObject = columnNameIterator.next(); tableColumns.add(tableColumnsMap.get(columnObject)); } } return tableColumns; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isHidden() */ protected boolean handleIsHidden() { return (this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE) != null) && this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE).equals(AspProfile.TAGGEDVALUE_INPUT_TYPE_HIDDEN); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isEqualValidator() */ protected boolean handleIsBackingValueRequired() { boolean required = false; if (this.isActionParameter()) { logger.debug("[param:" + this.getName() + "] is an action parameter."); required = this.isInputTable(); final ClassifierFacade type = this.getType(); if (!required && type != null) { logger.debug("[param:" + this.getName() + "] not a table"); final String name = this.getName(); final String typeName = type.getFullyQualifiedName(); // - if the backing value is not required for this parameter but on // a targetting page it IS selectable we must allow the user to set the backing value as well final Collection views = this.getAction().getTargetViews(); for (final Iterator iterator = views.iterator(); iterator.hasNext() && !required;) { final FrontEndView view = (FrontEndView)iterator.next(); final Collection parameters = view.getAllActionParameters(); for (final Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext() && !required;) { final Object object = parameterIterator.next(); if (object instanceof AspParameter) { final AspParameter parameter = (AspParameter)object; final String parameterName = parameter.getName(); final ClassifierFacade parameterType = parameter.getType(); if (parameterType != null) { final String parameterTypeName = parameterType.getFullyQualifiedName(); if (name.equals(parameterName) && typeName.equals(parameterTypeName)) { required = parameter.isInputTable(); } } } } } } } else if (this.isControllerOperationArgument()) { logger.debug("[param:" + this.getName() + "] is an argument on a controller op"); final String name = this.getName(); final Collection actions = this.getControllerOperation().getDeferringActions(); for (final Iterator actionIterator = actions.iterator(); actionIterator.hasNext();) { final AspAction action = (AspAction)actionIterator.next(); final Collection formFields = action.getFormFields(); for (final Iterator fieldIterator = formFields.iterator(); fieldIterator.hasNext() && !required;) { final Object object = fieldIterator.next(); if (object instanceof AspParameter) { final AspParameter parameter = (AspParameter)object; if (!parameter.equals(this)) { logger.debug("[param:" + this.getName() + "] not a table"); if (name.equals(parameter.getName())) { required = parameter.isBackingValueRequired(); } } } } } } return required; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isCalendar() */ protected boolean handleIsCalendar() { return (this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_CALENDAR) != null) && this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_CALENDAR).equals("true"); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspParameter#isComplex() */ protected boolean handleIsComplex() { boolean complex = false; final ClassifierFacade type = this.getType(); if (type != null) { complex = !type.getAttributes().isEmpty(); if (!complex) { complex = !type.getAssociationEnds().isEmpty(); } } return complex; } /** * @return <code>true</code> if the type of this field is a boolean, <code>false</code> otherwise */ private boolean isValidatorBoolean() { return UMLMetafacadeUtils.isType(this.getType(), UMLProfile.BOOLEAN_TYPE_NAME); } /** * Indicates whether or not this parameter is of the given input type. * * @param inputType the name of the input type to check for. * @return true/false */ private final boolean isInputType(final String inputType) { return inputType.equalsIgnoreCase(this.getInputType()); } /** * If this is a table this method returns all those actions that are declared to work * on this table. * * @param hyperlink denotes on which type of actions to filter */ private final List getTableActions(boolean hyperlink) { final Set actions = new LinkedHashSet(); final String name = StringUtils.trimToNull(getName()); if (name != null && isTable()) { final AspWebForm view = (AspWebForm)this.getView(); final Collection allUseCases = getModel().getAllUseCases(); for (final Iterator useCaseIterator = allUseCases.iterator(); useCaseIterator.hasNext();) { final UseCaseFacade useCase = (UseCaseFacade)useCaseIterator.next(); if (useCase instanceof AspUseCase) { final FrontEndActivityGraph graph = ((AspUseCase)useCase).getActivityGraph(); if (graph != null) { final Collection transitions = graph.getTransitions(); for (final Iterator transitionIterator = transitions.iterator(); transitionIterator.hasNext();) { final TransitionFacade transition = (TransitionFacade)transitionIterator.next(); if (transition.getSource().equals(view) && transition instanceof AspAction) { final AspAction action = (AspAction)transition; if (action.isTableLink() && name.equals(action.getTableLinkName())) { if (hyperlink == action.isHyperlink()) { actions.add(action); } } } } } } } } return new ArrayList(actions); } /** * Gets the current value of the specified input type (or an empty string * if one isn't specified). * * @return the input type name. */ private final String getInputType() { return ObjectUtils.toString(this.findTaggedValue(AspProfile.TAGGEDVALUE_INPUT_TYPE)).trim(); } } 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspControllerOperationLogicImpl.java Index: AspControllerOperationLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; import org.apache.commons.lang.StringUtils; import org.andromda.metafacades.uml.ModelElementFacade; import org.andromda.utils.StringUtilsHelper; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation */ public class AspControllerOperationLogicImpl extends AspControllerOperationLogic { public AspControllerOperationLogicImpl(Object metaObject, String context) { super(metaObject, context); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation#getFormName() */ protected java.lang.String handleGetFormName() { //final String pattern = ObjectUtils.toString(this.getConfiguredProperty(AspGlobals.FORM_PATTERN)); //@todo Add this to the namespace and profile, then read this value from there. final String pattern = "{0}Form"; return pattern.replaceFirst("\\{0\\}", StringUtils.capitalize(this.getName())); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation#getFormSignature() */ protected String handleGetFormSignature() { return this.getFormSignature(true); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation#getFullyQualifiedFormName() */ protected java.lang.String handleGetFullyQualifiedFormName() { final StringBuffer fullyQualifiedName = new StringBuffer(); final String packageName = this.getOwner().getPackageName(); if (StringUtils.isNotBlank(packageName)) { fullyQualifiedName.append(packageName + '.'); } return fullyQualifiedName.append(StringUtils.capitalize(this.getFormName())).toString(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation#getFullyQualifiedFormPath() */ protected java.lang.String handleGetFullyQualifiedFormPath() { final StringBuffer fullyQualifiedPath = new StringBuffer(); final String packageName = this.getOwner().getPackageName(); if (StringUtils.isNotBlank(packageName)) { fullyQualifiedPath.append(packageName.replace('.', '/')); } return fullyQualifiedPath.toString(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation#getFormCall() */ protected String handleGetFormCall() { final StringBuffer call = new StringBuffer(); call.append(StringUtilsHelper.upperCamelCaseName(this.getName())); call.append("("); if (!this.getFormFields().isEmpty()) { call.append("form"); } call.append(")"); return call.toString(); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspControllerOperation#getmplementationFormSignature() */ protected String handleGetImplementationFormSignature() { return this.getFormSignature(false); } /** * Constructs the signature that takes the form for this operation. * * @param isAbstract whether or not the signature is abstract. * @return the appropriate signature. */ private final String getFormSignature(boolean isAbstract) { final StringBuffer signature = new StringBuffer(); signature.append(this.getVisibility() + ' '); if (isAbstract) { signature.append("abstract "); } else { signature.append("override "); } final ModelElementFacade returnType = this.getReturnType(); signature.append(returnType != null ? returnType.getFullyQualifiedName() : null); signature.append(" " + StringUtilsHelper.upperCamelCaseName(this.getName()) + "("); if (!this.getFormFields().isEmpty()) { signature.append("I" + this.getFormName() + " form"); } signature.append(")"); return signature.toString(); } } 1.1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspWebFormLogicImpl.java Index: AspWebFormLogicImpl.java =================================================================== package org.andromda.cartridges.aspdotnet.metafacades; import org.andromda.metafacades.uml.FrontEndParameter; import org.andromda.metafacades.uml.FrontEndAction; import org.andromda.utils.StringUtilsHelper; import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspWebForm. * * @see org.andromda.cartridges.aspdotnet.metafacades.AspWebForm */ public class AspWebFormLogicImpl extends AspWebFormLogic { public AspWebFormLogicImpl(Object metaObject, String context) { super(metaObject, context); } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getActionForwards() */ protected List handleGetActionForwards() { final List actionForwards = new ArrayList(this.getForwards()); for (final Iterator iterator = actionForwards.iterator(); iterator.hasNext();) { if (!(iterator.next() instanceof AspAction)) { iterator.remove(); } } return actionForwards; } /** * @see org.andromda.cartridges.aspdotnet.metafacades.AspAction#getFormActions() */ protected List handleGetFormActions() { final List actions = new ArrayList(this.getActions()); for (final Iterator iterator = actions.iterator(); iterator.hasNext();) { final AspAction action = (AspAction)iterator.next(); if (action.getFormFields().isEmpty()) { iterator.remove(); } } return actions; } protected java.util.List handleGetForwards() { final Map forwards = new LinkedHashMap(); for (final Iterator iterator = this.getActions().iterator(); iterator.hasNext();) { final FrontEndAction action = (FrontEndAction)iterator.next(); if (action != null && !action.isUseCaseStart()) { for (final Iterator forwardIterator = action.getActionForwards().iterator(); forwardIterator.hasNext();) { final Object forward = forwardIterator.next(); if (forward instanceof AspForward) { forwards.put(((AspForward)forward).getName(), forward); } else if (forward instanceof AspAction) { forwards.put(((AspAction)forward).getName(), forward); } } } } return new ArrayList(forwards.values()); } protected String handleGetNormalizedName() { return StringUtilsHelper.upperCamelCaseName(this.getName()); } protected String handleGetFullyQualifiedPath() { return StringUtils.replaceChars(this.getPackageName(), '.', '/'); } protected Object handleGetController() { return this.getUseCase().getController(); } protected Collection handleGetTextBoxes() { /* Collection textBoxes = new LinkedList(); Collection transitions = this.getOutgoing(); for (Iterator iter = transitions.iterator(); iter.hasNext();) { AspAction transition = (AspAction) iter.next(); textBoxes.addAll(transition.getTextBoxes()); } return textBoxes; */ return null; } protected Collection handleGetDropDownLists() { /* Collection dropDownLists = new LinkedList(); Collection transitions = this.getOutgoing(); for (Iterator iter = transitions.iterator(); iter.hasNext();) { AspAction transition = (AspAction) iter.next(); dropDownLists.addAll(transition.getDropDownLists()); } return dropDownLists;*/ return null; } protected Collection handleGetCheckBoxes() { /* Collection checkBoxes = new LinkedList(); Collection transitions = this.getOutgoing(); for (Iterator iter = transitions.iterator(); iter.hasNext();) { AspAction transition = (AspAction) iter.next(); checkBoxes.addAll(transition.getCheckBoxes()); } return checkBoxes;*/ return null; } protected Collection handleGetRadioButtons() { /* Collection radioButtons = new LinkedList(); Collection transitions = this.getOutgoing(); for (Iterator iter = transitions.iterator(); iter.hasNext();) { AspAction transition = (AspAction) iter.next(); radioButtons.addAll(transition.getRadioButtons()); } return radioButtons; */ return null; } protected String handleGetLayoutPath() { StringBuffer path = new StringBuffer(); String[] arrayPath = this.getFullyQualifiedPath().split("/"); path.append("../"); for (int i = 0; i <= arrayPath.length; i++) { path.append("../"); } path.append("layout/"); return path.toString(); } protected Collection handleGetIncomingWithTable() { Collection incoming = this.getIncoming(); Collection incomingWithTable = new LinkedList(); Iterator iterator = incoming.iterator(); while (iterator.hasNext()) { Object forward = iterator.next(); if (forward != null && forward instanceof FrontEndAction) { FrontEndAction action = (FrontEndAction)forward; Iterator parameters = action.getParameters().iterator(); while (parameters.hasNext()) { FrontEndParameter param = (FrontEndParameter)parameters.next(); if (param.isTable()) incomingWithTable.add(action); } } } return incomingWithTable; } protected boolean handleIsAnHyperlinkColumns(String columnName) { /* Collection outgoings = this.getOutgoing(); Iterator iterator = outgoings.iterator(); while (iterator.hasNext()) { AspAction transition = (AspAction) iterator.next(); if (transition.isHyperlink() && (transition.findTaggedValue(CommonProperties.WEB_TABLE_LINK) != null)) { String linkName = transition.findTaggedValue(CommonProperties.WEB_TABLE_LINK) .toString(); if (columnName.equals(StringUtils.substringAfter(linkName, "."))) { return true; } } } */ return false; } protected Collection handleGetHiddenFields() { /* Collection hiddenFields = new LinkedList(); Collection transitions = this.getOutgoing(); for (Iterator iter = transitions.iterator(); iter.hasNext();) { AspAction transition = (AspAction) iter.next(); hiddenFields.addAll(transition.getHiddenFields()); } return hiddenFields; */ return null; } protected Collection handleGetAllSessionObjects() { Collection sessionObjects = new LinkedList(); Collection classes = this.getModel().getAllClasses(); Iterator iterator = classes.iterator(); while (iterator.hasNext()) { Object obj = iterator.next(); if (obj instanceof AspSessionObject) { sessionObjects.add(obj); } } return sessionObjects; } protected Collection handleGetSessionObjects() { return ((AspController) this.getUseCase().getController()) .getSessionObjects(); } /** * @see org.andromda.cartridges.as... [truncated message content] |
From: Eric C. <ecr...@us...> - 2006-09-17 17:19:54
|
User: ecrutchfield Date: 06/09/17 10:19:41 cartridges/andromda-aspdotnet/src/test - New directory |
From: Eric C. <ecr...@us...> - 2006-09-17 17:19:51
|
User: ecrutchfield Date: 06/09/17 10:19:40 cartridges/andromda-aspdotnet/src/site/axdoc - New directory |
From: Eric C. <ecr...@us...> - 2006-09-17 17:19:50
|
User: ecrutchfield Date: 06/09/17 10:19:40 cartridges/andromda-aspdotnet/src/site/resources/images/org/andromda - New directory |
From: Eric C. <ecr...@us...> - 2006-09-17 17:19:49
|
User: ecrutchfield Date: 06/09/17 10:19:39 cartridges/andromda-aspdotnet/src/main/resources/calendar - New directory |