Skip to content

Commit

Permalink
update 22 to fix issue #423
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuzzi committed Jul 24, 2021
1 parent cfcc3fa commit 5cd3c91
Show file tree
Hide file tree
Showing 28 changed files with 87 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ move: currentSavedFormDefinition toApplication: newAppName andForm: newFormName
"The receiver relocate the current <currentSavedFormDefinition> to new application named <newApplication> as new form named <newFormName>"
| currentApplication newApplication |

currentApplication := self getOrbeonApplicationClass getExistingApplicationOrCreateNewNamed: currentSavedFormDefinition getApplicationName. "current application"
newApplication := self getOrbeonApplicationClass getExistingApplicationOrCreateNewNamed: newAppName. "get the new application"
currentApplication := self systemRoot getExistingApplicationOrCreateNewNamed: currentSavedFormDefinition getApplicationName. "current application"
newApplication := self systemRoot getExistingApplicationOrCreateNewNamed: newAppName. "get the new application"

currentApplication unregisterDefinitionNamed: currentSavedFormDefinition formName. "detach the current form name "
newApplication setRegistryFormNamed: newFormName with: self. "attach the receiver new form name"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
system root
systemRoot

^orbeonApplication systemRoot
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"instancesVersionSetDo:" : "brunobb 07/05/2020 14:03",
"isCurrentVersion:" : "brunobb 07/05/2020 14:03",
"isIdEqualTo:" : "brunobb 07/07/2020 10:28",
"move:toApplication:andForm:" : "brunobb 07/05/2020 14:03",
"move:toApplication:andForm:" : "brunobb 07/24/2021 12:48",
"numberOfInstances" : "brunobb 07/05/2020 14:03",
"oldVersionsDo:" : "brunobb 07/05/2020 14:03",
"orbeonApplication" : "brunobb 07/05/2020 14:03",
Expand All @@ -91,4 +91,5 @@
"reportQuantityDistributionFrom:to:satisfying:onError:" : "brunobb 07/05/2020 14:03",
"savedDefinitionsDo:" : "brunobb 07/05/2020 14:03",
"savedDefinitionsSize" : "brunobb 08/21/2020 09:38",
"setApplication:id:" : "bruno 07/17/2020 13:09" } }
"setApplication:id:" : "bruno 07/17/2020 13:09",
"systemRoot" : "brunobb 07/24/2021 12:48" } }
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ isCreationRejectedByBpmFor: fNamed withId: fId in: appName in: aBpmSystemRoot
ifTrue: [^true "creation rejected"].
].

^(self getOrbeonApplicationClass includesDefinitionNamed: fNamed in: appName)
^(self systemRoot includesDefinitionNamed: fNamed in: appName)
and:[(self applicationName = appName)
and:[(self formName = fNamed)
and: [self id ~= fId]]]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ isCreationRejectedFor: fNamed withId: fId in: appName
"The creation is rejected for the receiver when already exist a form definition named <fNamed> in application named <appName> but the <ids> are different.
This case happend when a pair <appName,formName> is saved with different id. [IN THIS PERSISTENCE LAYER THIS IS FORBIDDEN BY CODE]"

^(self getOrbeonApplicationClass includesDefinitionNamed: fNamed in: appName)
^(self systemRoot includesDefinitionNamed: fNamed in: appName)
and:[(self applicationName = appName)
and:[(self formName = fNamed)
and: [self id ~= fId]]]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ form building
newFormBuilder
"Answer <anOrbeonFormReader> to get values from the XML document of the receiver"

^self defaultOrbeonFormBuilderClass for: xmlString
^self systemRoot newFormBuilderFor: xmlString
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ setApplication: appName
"The receiver set it's application with anOrbeonApplication named <appName>.
Get the application from the cache or create a new one"

application := self getOrbeonApplicationClass getExistingApplicationOrCreateNewNamed: appName.
application := self systemRoot getExistingApplicationOrCreateNewNamed: appName.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ setBpmApplication: appName
"The receiver set it's application with anOrbeonApplication named <appName>.
Get the application from the cache or create a new one"

application := self getOrbeonApplicationClass getExistingBpmApplicationOrCreateNewNamed: appName.
application := self systemRoot getExistingBpmApplicationOrCreateNewNamed: appName.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ setMetadataWith: anOrbeonFormReader

formName := anOrbeonFormReader getFormName.

application := self getOrbeonApplicationClass getExistingApplicationOrCreateNewNamed: anOrbeonFormReader getApplicationName.
application := self systemRoot getExistingApplicationOrCreateNewNamed: anOrbeonFormReader getApplicationName.

self setTitleAndDescriptionWith: anOrbeonFormReader.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
system root
systemRoot

^application systemRoot
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@
"hasBpmEnvironment" : "brunobb 03/26/2021 11:59",
"isAvailable" : "brunobb 07/16/2020 11:36",
"isAvailable:" : "brunobb 07/16/2020 11:36",
"isCreationRejectedByBpmFor:withId:in:in:" : "brunobb 07/20/2021 14:17",
"isCreationRejectedFor:withId:in:" : "brunobb 07/16/2020 11:36",
"isCreationRejectedByBpmFor:withId:in:in:" : "brunobb 07/24/2021 12:44",
"isCreationRejectedFor:withId:in:" : "brunobb 07/24/2021 12:46",
"libraryVersion" : "brunobb 02/18/2021 11:28",
"newFormBuilder" : "brunobb 04/16/2021 08:00",
"newFormBuilder" : "brunobb 07/24/2021 12:58",
"oldVersionsDo:" : "brunobb 07/16/2020 13:11",
"printOn:" : "brunobb 02/02/2021 13:21",
"savedDefinitionsDo:" : "brunobb 07/16/2020 13:11",
"setApplication:" : "brunobb 03/25/2021 14:34",
"setApplication:" : "brunobb 07/24/2021 12:45",
"setAvailableNodeWith:" : "brunobb 04/15/2021 14:48",
"setBpmApplication:" : "brunobb 03/25/2021 14:34",
"setBpmApplication:" : "brunobb 07/24/2021 12:44",
"setMetadata" : "brunobb 04/15/2021 14:48",
"setMetadataWith:" : "brunobb 07/16/2020 11:36",
"setMetadataWith:" : "brunobb 07/24/2021 12:44",
"setRegistry:" : "brunobb 07/16/2020 12:17",
"setTitleAndDescription" : "brunobb 04/15/2021 14:48",
"setTitleAndDescriptionWith:" : "brunobb 07/16/2020 11:36",
"storeInApplication" : "bruno 07/19/2020 14:33" } }
"storeInApplication" : "bruno 07/19/2020 14:33",
"systemRoot" : "brunobb 07/24/2021 12:43" } }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ other
newFormBuilder
"Answer <anOrbeonFormReader> to get values from the XML document of the receiver"

^(self defaultOrbeonFormBuilderClass for: definition xmlString with: xmlString)
^(self systemRoot newFormBuilderFor: definition xmlString with: xmlString)
orbeonFormInstance: self; "see issue #208"
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
system root
systemRoot

^definition systemRoot
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"leaseUsername" : "brunobb 06/15/2020 10:30",
"minutesToExpire" : "brunobb 06/15/2020 10:30",
"multipleFieldValuesAt:" : "brunobb 06/15/2020 10:30",
"newFormBuilder" : "brunobb 04/16/2021 08:00",
"newFormBuilder" : "brunobb 07/24/2021 13:00",
"printAllFieldValuesAsPairs" : "brunobb 06/15/2020 10:30",
"printAllFieldValuesAsPairsOn:" : "brunobb 06/15/2020 10:30",
"printDraft" : "brunobb 06/15/2020 10:30",
Expand All @@ -88,6 +88,7 @@
"sectionsDetect:ifNone:" : "brunobb 06/15/2020 10:30",
"sectionsDo:" : "brunobb 06/15/2020 10:30",
"sectionsSelect:" : "brunobb 06/15/2020 10:30",
"systemRoot" : "brunobb 07/24/2021 12:44",
"transverseFieldValues" : "brunobb 06/15/2020 10:30",
"typeOf:" : "brunobb 06/15/2020 10:30",
"updateFrom:" : "brunobb 06/15/2020 10:30",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ isInRegistry
"Answer whether or not the receiver is in the global cache (has not been removed)"
| app |

app := self getOrbeonApplicationClass applicationNamed: self applicationName ifNone: [^false].
app := self systemRoot applicationNamed: self applicationName ifNone: [^false].

"in this case the <application> was removed and another application <app> with the same name was created after that"
(app == application) ifFalse: [^false].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"instancesSetSize" : "brunobb 07/16/2020 14:03",
"instancesSize" : "brunobb 06/11/2020 14:44",
"isCurrentVersion" : "brunobb 07/16/2020 12:29",
"isInRegistry" : "brunobb 07/15/2020 11:37",
"isInRegistry" : "brunobb 07/24/2021 12:45",
"isSearchField:" : "BrunoBB 01/04/2017 06:01",
"isSingleton" : "BrunoBB 01/04/2017 06:01",
"isSingleton:" : "BrunoBB 01/04/2017 06:01",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
applications
forms - published
formDefinitionNamed: aString in: appName
"The receiver answer an <OrbeonFormDefinition> named <aString> in OrbeonApplication named <appName>.
If the form definition does not exist then answer <nil>"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
forms - published
formDefinitionNamed: aString version: versionNumber in: appName ifNone: aBlock
| app |

app := self applicationNamed: appName ifNone: [^nil].

^app definitionNamed: aString version: versionNumber ifNone: aBlock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
charts
forms - published
getAllFormDefinitions
| definitions |

definitions := OrderedCollection new.
applications do: [:application | definitions addAll: application getAllDefinitions].
self doInCache: [:each | definitions addAll: each getAllDefinitions].

^definitions
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
forms - instances
getAllInstances
| instances |

instances := OrderedCollection new.
self doInCache: [:each | instances addAll: each getAllInstances].

^instances
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
forms - saved
getAllSavedDefinitions
| all |

all := OrderedCollection new.
self doInCache: [:each | all addAll: each getAllSavedDefinitions].

^all
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
applications
forms - published
getLastPublishedDefinitionNamed: defName fromApplicationNamed: appName withVersion: version ifNone: aBlock
"Answer the OrbeonFormDefinition named <defName> and version equal to <version> from the OrbeonApplication named <appName> if none evaluate <aBlock>"
| app |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
applications
forms - saved
getLatestSavedDefinition: formName app: app ifNone: aBlock
"Answer the lastest saved definition named <formName> in orbeon application named <app>.
If any search fail then rise an exception"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
forms - published
includesDefinitionNamed: aString in: appName
| app |

app := self applicationNamed: appName ifNone: [^false].

^(app definitionNamed: aString) ifNil: [false] ifNotNil: [true]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
forms - builder
newFormBuilderFor: xmlOrbeonFormDefinition

^OrbeonFormBuilder newOn: self for: xmlOrbeonFormDefinition
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
forms - builder
newFormBuilderFor: xmlOrbeonFormDefinition with: xmlOrbeonInstance

^OrbeonFormBuilder newOn: self for: xmlOrbeonFormDefinition with: xmlOrbeonInstance
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"createSystemDefaultObjects" : "brunobb 07/22/2021 13:39",
"doInCache:" : "brunobb 07/22/2021 14:03",
"formDefinitionNamed:in:" : "brunobb 07/22/2021 14:15",
"getAllFormDefinitions" : "brunobb 07/22/2021 13:45",
"formDefinitionNamed:version:in:ifNone:" : "brunobb 07/24/2021 13:06",
"getAllFormDefinitions" : "brunobb 07/22/2021 14:55",
"getAllInstances" : "brunobb 07/22/2021 14:52",
"getAllSavedDefinitions" : "brunobb 07/22/2021 14:56",
"getChartsFor:" : "brunobb 07/22/2021 13:41",
"getExistingOrbeonApplicationOrCreateNewNamed:" : "brunobb 07/22/2021 13:39",
"getInstancesCreationDayDistributionQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:25",
Expand All @@ -18,8 +21,11 @@
"getLastPublishedDefinitionNamed:fromApplicationNamed:withVersion:ifNone:" : "brunobb 07/22/2021 14:31",
"getLatestSavedDefinition:app:ifNone:" : "brunobb 07/22/2021 14:11",
"hasApplicationNamed:" : "brunobb 07/22/2021 14:30",
"includesDefinitionNamed:in:" : "brunobb 07/24/2021 12:46",
"initialize" : "brunobb 07/22/2021 13:40",
"initializeCurrentSystem" : "brunobb 07/22/2021 13:39",
"newFormBuilderFor:" : "brunobb 07/24/2021 12:58",
"newFormBuilderFor:with:" : "brunobb 07/24/2021 12:58",
"registerApplication:" : "brunobb 07/22/2021 13:39",
"removeChart:" : "brunobb 07/22/2021 13:43",
"reportCreationDayDistributionQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:25",
Expand Down
2 changes: 1 addition & 1 deletion repository/Orbeon.package/monticello.meta/version

Large diffs are not rendered by default.

0 comments on commit 5cd3c91

Please sign in to comment.