Skip to content

Commit

Permalink
update 15 to fix issue #423
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuzzi committed Jul 22, 2021
1 parent 55b3ea9 commit aa65651
Show file tree
Hide file tree
Showing 26 changed files with 233 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
applications
applicationNamed: applicationName

^self applicationNamed: applicationName ifNone: ['No Applicaiton named [', applicationName, ']']
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
applications
applicationNamed: applicationName ifNone: aBlock

^applications at: applicationName ifAbsent: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
applications
doInCache: aBlock

^applications do: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
applications
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>"
| app |

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

^app definitionNamed: aString
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
charts
getAllFormDefinitions
| definitions |

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

^definitions
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
charts
getChartsFor: anOrbeonUser
"The receiver answer a collection of <BIChartDefinition> for the user <anOrbeonUser>"

^usersChartsAndDashboardRepository getChartsFor: anOrbeonUser
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
charts
getInstancesCreationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := Dictionary new.
applications do: [:each | | definitionDistribution |
definitionDistribution := each getInstancesCreationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.
definitionDistribution keysAndValuesDo: [:key : value |
(distribution includesKey: key)
ifTrue: [distribution at: key put: (distribution at: key) + value]
ifFalse: [distribution at: key put: value]
]
].

^distribution
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
charts
getInstancesCreationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := OrderPreservingDictionary new.
applications do: [:each | | definitionDistribution |
definitionDistribution := each getInstancesCreationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.
definitionDistribution keysAndValuesDo: [:key : value |
(distribution includesKey: key)
ifTrue: [distribution at: key put: (distribution at: key) + value]
ifFalse: [distribution at: key put: value]
]
].

^distribution
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
charts
getInstancesModificationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := Dictionary new.
applications do: [:each | | definitionDistribution |
definitionDistribution := each getInstancesModificationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.
definitionDistribution keysAndValuesDo: [:key : value |
(distribution includesKey: key)
ifTrue: [distribution at: key put: (distribution at: key) + value]
ifFalse: [distribution at: key put: value]
]
].

^distribution
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
charts
getInstancesModificationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := OrderPreservingDictionary new.
applications do: [:each | | definitionDistribution |
definitionDistribution := each getInstancesModificationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.
definitionDistribution keysAndValuesDo: [:key : value |
(distribution includesKey: key)
ifTrue: [distribution at: key put: (distribution at: key) + value]
ifFalse: [distribution at: key put: value]
]
].

^distribution
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
charts
getInstancesQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := Dictionary new.
applications do: [:each |
distribution at: each applicationName put: (each getInstancesQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler).
].

^distribution
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
applications
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 |

app := self applicationNamed: appName ifNone: [^aBlock value].

(app hasDefinitionNamed: defName) ifFalse: [^aBlock value].

^(app getAllDefinitionsNamed: defName) detect: [:each | each version = version] ifNone: [aBlock value]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
applications
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"
| application |

application := self applicationNamed: app ifNone: [^aBlock value].

^application getLatestSavedDefinition: formName ifNone: [^aBlock value]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
applications
hasApplicationNamed: applicationName

^applicationName includesKey: applicationName
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ initialize

serverConfiguration := OrbeonServerConfiguration new.
databaseConfiguration := OrbeonDatabaseConfiguration new.
applications := Dictionary new.
applications := Dictionary new.
usersChartsAndDashboardRepository := BIChartsDashboardsRepository newOn: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
charts
removeChart: aBIChartDefinition

^usersChartsAndDashboardRepository removeChart: aBIChartDefinition
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
charts
reportCreationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := self getInstancesCreationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.

^(OrbeonGlobalDistributionReport distribution: distribution)
name: 'Global Creation Day Distribution';
description: 'Display the number of created forms in each day of all Orbeon Application';
startDate: startDate;
endDate: endDate;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
charts
reportCreationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := self getInstancesCreationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.

^(OrbeonGlobalDistributionReport distribution: distribution)
name: 'Global Quantity Creation Distribution by Month';
description: 'Display by month the quantity of created forms in of all Orbeon Application';
startDate: startDate;
endDate: endDate;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
charts
reportModificationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := self getInstancesModificationDayDistributionQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.

^(OrbeonGlobalDistributionReport distribution: distribution)
name: 'Global Modification Day Distribution';
description: 'Display the number of updated forms in each day of all Orbeon Application';
startDate: startDate;
endDate: endDate;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
charts
reportModificationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| distribution |

distribution := self getInstancesModificationDistributionByMonthFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler.

^(OrbeonGlobalDistributionReport distribution: distribution)
startDate: startDate;
endDate: endDate;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
charts
reportQuantityDistributionFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler
| secondsToRun distribution |

secondsToRun := Time secondsElapsedTime: [distribution := self getInstancesQuantityFrom: startDate to: endDate satisfying: formConditionBlock onError: errorHandler].

^(OrbeonGlobalDistributionReport distribution: distribution)
name: 'Global Quantity Distribution by Application';
description: 'Display the quantity of forms in each Orbeon Application';
xTitle: 'Orbeon Application';
yTitle: 'Form Instances';
startDate: startDate;
endDate: endDate;
sumSecondsToConstruct: secondsToRun;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
applications
selectInCache: aBlock

^applications select: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
charts
storeChart: aBIChartDefinition

^usersChartsAndDashboardRepository storeChart: aBIChartDefinition
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,31 @@
"class" : {
},
"instance" : {
"createSystemDefaultObjects" : "brunobb 06/30/2021 14:38",
"getExistingOrbeonApplicationOrCreateNewNamed:" : "brunobb 07/06/2021 13:58",
"initialize" : "brunobb 06/30/2021 14:38",
"initializeCurrentSystem" : "brunobb 06/30/2021 14:38",
"registerApplication:" : "brunobb 06/30/2021 14:38",
"unregisterApplication:ifAbsent:" : "brunobb 06/30/2021 14:38" } }
"applicationNamed:" : "brunobb 07/22/2021 14:12",
"applicationNamed:ifNone:" : "brunobb 07/22/2021 14:11",
"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",
"getChartsFor:" : "brunobb 07/22/2021 13:41",
"getExistingOrbeonApplicationOrCreateNewNamed:" : "brunobb 07/22/2021 13:39",
"getInstancesCreationDayDistributionQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:25",
"getInstancesCreationDistributionByMonthFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:20",
"getInstancesModificationDayDistributionQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:22",
"getInstancesModificationDistributionByMonthFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:26",
"getInstancesQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:23",
"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",
"initialize" : "brunobb 07/22/2021 13:40",
"initializeCurrentSystem" : "brunobb 07/22/2021 13:39",
"registerApplication:" : "brunobb 07/22/2021 13:39",
"removeChart:" : "brunobb 07/22/2021 13:43",
"reportCreationDayDistributionQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:25",
"reportCreationDistributionByMonthFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:19",
"reportModificationDayDistributionQuantityFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:21",
"reportModificationDistributionByMonthFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:26",
"reportQuantityDistributionFrom:to:satisfying:onError:" : "brunobb 07/22/2021 14:23",
"selectInCache:" : "brunobb 07/22/2021 13:39",
"storeChart:" : "brunobb 07/22/2021 13:47",
"unregisterApplication:ifAbsent:" : "brunobb 07/22/2021 13:39" } }
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"commentStamp" : "",
"instvars" : [
"applications",
"databaseConfiguration" ],
"databaseConfiguration",
"usersChartsAndDashboardRepository" ],
"name" : "OrbeonSystemRoot",
"pools" : [
],
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 aa65651

Please sign in to comment.