-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f61f3e
commit 18af96a
Showing
5 changed files
with
21 additions
and
17 deletions.
There are no files selected for viewing
13 changes: 9 additions & 4 deletions
13
...igrator.package/OrbeonDatabaseMigrator.class/instance/generateFormDefinition.app.from..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
generate orbeon objects | ||
generateFormDefinition: formName app: appName from: dbArray | ||
"Create a new definition of the Form based on <dbArray>" | ||
| formDefinition | | ||
| formDefinition xmlString builder | | ||
|
||
formDefinition := self defaultSavedFormDefinitionClass newNamed: formName inAppNamed: appName. | ||
formDefinition := self defaultSavedFormDefinitionClass newNamed: formName in: (systemRoot getExistingApplicationOrCreateNewNamed: appName). | ||
|
||
formDefinition updateFrom: dbArray. | ||
|
||
formDefinition setXmlString: ((dbArray at: 8) copyReplaceAll: '\n' with: Character lf). "-\n- is inserted by Bash " | ||
|
||
xmlString := ((dbArray at: 8) copyReplaceAll: '\n' with: Character lf). "-\n- is inserted by Bash " | ||
formDefinition setXmlString: xmlString. | ||
|
||
builder := systemRoot newFormBuilderFor: xmlString. | ||
|
||
formDefinition setTitleAndDescriptionWith: builder. | ||
|
||
^formDefinition |
15 changes: 8 additions & 7 deletions
15
...package/OrbeonDatabaseMigrator.class/instance/generateFormInstanceDefinition.app.from..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
generate orbeon objects | ||
generateFormInstanceDefinition: formName app: appName from: aDBString | ||
"Create a new instance of the Form based on <dbArray>" | ||
| instance resultArray | | ||
| instance resultArray xmlString builder | | ||
|
||
resultArray := aDBString subStrings: String tab. | ||
instance := self defaultSavedFormDefinitionClass new. | ||
^instance setApplication: appName; | ||
formName: formName; | ||
xmlString := ((resultArray at: 7) copyReplaceAll: '\n' with: Character lf). "-\n- is inserted by Bash " | ||
builder := systemRoot newFormBuilderFor: xmlString. | ||
|
||
instance := self defaultSavedFormDefinitionClass newNamed: formName in: (systemRoot getExistingApplicationOrCreateNewNamed: appName). | ||
^instance | ||
updateFrom: resultArray; | ||
xmlString: ((resultArray at: 7) copyReplaceAll: '\n' with: Character lf); "-\n- is inserted by Bash " | ||
"setApplicationAndFormName;" | ||
setMetadata; | ||
xmlString: xmlString; | ||
setTitleAndDescriptionWith: builder; | ||
yourself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.