Skip to content

Commit

Permalink
refactoring related to #423
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuzzi committed Aug 22, 2021
1 parent b4ddba6 commit fa97c8a
Show file tree
Hide file tree
Showing 48 changed files with 211 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*orbeon
fullBackupOrbeonPersistenceLayerTo: lz4PathFile externalFilesTo: externalPath
fullBackupOrbeonPersistenceLayerTo: lz4PathFile externalFilesTo: externalPath systemRoot: anOrbeonSystemRoot
"The receiver perform a full backup of Orbeon Persistence Layer system.
1) Perform a backup of GemStone/S database compressed as LZ4.
2) Perform a backup of external files attached to forms"
Expand All @@ -9,7 +9,7 @@ fullBackupOrbeonPersistenceLayerTo: lz4PathFile externalFilesTo: externalPath

"answer <anOrderedCollection> where the first element is the <base attachment path> <aString> and the following elements are anArray of 3, where:
1- application name, 2- form name, 3- path"
allAttachments := self getOrbeonWebServerConfiguration getAllAttachmentsPaths.
allAttachments := anOrbeonSystemRoot getAllAttachmentsPaths.
baseAttachment := allAttachments first.

allAttachments allButFirst do: [:array | | appName formName path |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"class" : {
"fullBackupOrbeonPersistenceLayerTo:externalFilesTo:" : "brunobb 06/14/2020 11:01" },
"fullBackupOrbeonPersistenceLayerTo:externalFilesTo:systemRoot:" : "brunobb 08/16/2021 12:40" },
"instance" : {
} }
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
*orbeon
fromOrbeonString: aString
"Create an instance of the receiver from Orbeon formated string date <aString>.
The Orbeon <oxf.xforms.format.input.date> configuration in XML file properties-loca.xml MUST be equal to:
self getOrbeonWebServerConfiguration dateFormat"
Orbeon Persistence Layer use a fixed default format to store dates: ISO format: y-m-d"

^self fromOrbeonString: aString
format: self getOrbeonWebServerConfiguration dateFormat
^self fromOrbeonString: aString format: 'y-m-d'.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ printOrbeonString
The Orbeon <oxf.xforms.format.input.date> configuration in XML file properties-loca.xml MUST be equal to:
self getOrbeonWebServerConfiguration dateFormat"

^self printOrbeonStringFormat: self getOrbeonWebServerConfiguration dateFormat
^self printOrbeonStringFormat: 'y-m-d'
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"class" : {
"fromOrbeonString:" : "BrunoBB 04/09/2016 13:38",
"fromOrbeonString:" : "brunobb 08/17/2021 14:07",
"fromOrbeonString:format:" : "BrunoBB 04/22/2016 11:13" },
"instance" : {
"printMySqlString" : "BrunoBB 07/02/2014 18:14",
"printOrbeonString" : "BrunoBB 04/09/2016 13:38",
"printOrbeonString" : "brunobb 08/17/2021 14:12",
"printOrbeonStringFormat:" : "BrunoBB 04/09/2016 13:36" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ fromOrbeonString: aString
The supported TimeStamp format is: Date + Time. Where Date format is defined in Date fromOrbeonString:.
Time part support p.m. or pm"

^self fromOrbeonString: aString
dateFormat: self getOrbeonWebServerConfiguration dateFormat asUppercase
^self fromOrbeonString: aString format: 'y-m-d'.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"fromOrbeonString:" : "BrunoBB 04/07/2016 10:44",
"fromOrbeonString:" : "brunobb 08/17/2021 14:08",
"fromOrbeonString:dateFormat:" : "BrunoBB 04/07/2016 11:37" },
"instance" : {
"asOrbeonDateTimeString" : "brunobb 02/19/2021 13:25",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ initialize
searchTypes := Dictionary new. "the search type of each form when a search has more than one value (#or #and)"
formsAudit := Dictionary new. "whether or not an app.form has any audit configurations #(#drafs #instances #definitions)"

databaseMigrator := OrbeonMySQLMigrator new.

baseUrlDocumentation := 'https://bpmflow.gitbook.io/project'.
databaseMigrator := OrbeonMySQLMigrator new.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
migrateAll

^databaseMigrator migrateAll
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
migrateFormDefinitionNamed: formName in: applicationName

^databaseMigrator migrateFormDefinitionNamed: formName in: applicationName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
migrateInstancesOf: form version: version from: timeStamp

^databaseMigrator migrateInstancesOf: form version: version from: timeStamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
updateFormDefinitionNamed: formName app: applicationName version: version from: timeStamp

^databaseMigrator updateFormDefinitionNamed: formName app: applicationName version: version from: timeStamp
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
{
"class" : {
"default" : "brunobb 04/15/2021 14:31",
"initializeDateFormat" : "brunobb 04/15/2021 14:31",
"initializeTimeFormat" : "brunobb 04/15/2021 14:31" },
"default" : "brunobb 08/19/2021 11:52",
"initializeDateFormat" : "brunobb 08/19/2021 11:52",
"initializeTimeFormat" : "brunobb 08/19/2021 11:52" },
"instance" : {
"baseUrlDocumentation" : "brunobb 04/15/2021 14:31",
"baseUrlDocumentation:" : "brunobb 04/15/2021 14:31",
"databaseMigrator" : "brunobb 04/15/2021 14:31",
"dateFormat" : "brunobb 04/15/2021 14:31",
"dateFormat:" : "brunobb 04/15/2021 14:31",
"disableDefinitionAuditFor:in:" : "brunobb 04/15/2021 14:31",
"disableDraftAuditFor:in:" : "brunobb 04/15/2021 14:31",
"disableInstanceAuditFor:in:" : "brunobb 04/15/2021 14:31",
"enableDefinitionAuditFor:in:" : "brunobb 04/15/2021 14:31",
"enableDraftAuditFor:in:" : "brunobb 04/15/2021 14:31",
"enableInstanceAuditFor:in:" : "brunobb 04/15/2021 14:31",
"existDirectoryStructureForAttachments" : "brunobb 04/15/2021 14:31",
"getAllAttachmentsPaths" : "brunobb 04/15/2021 14:31",
"getBasePathFor:in:" : "brunobb 04/15/2021 14:31",
"getDraftsPathFor:in:" : "brunobb 04/15/2021 14:31",
"getInstancesPathFor:in:" : "brunobb 04/15/2021 14:31",
"getPublishedDefinitionsPathFor:in:" : "brunobb 04/15/2021 14:31",
"getSavedDefinitionsPathFor:in:" : "brunobb 04/15/2021 14:31",
"getTempPath" : "brunobb 04/15/2021 14:31",
"initialize" : "brunobb 04/15/2021 14:32",
"isDeferredProcessing:in:" : "brunobb 04/15/2021 14:31",
"isDefinitionAuditEnableFor:in:" : "brunobb 04/15/2021 14:31",
"isDraftAuditEnableFor:in:" : "brunobb 04/15/2021 14:31",
"isInstanceAuditEnableFor:in:" : "brunobb 04/15/2021 14:31",
"isOnDemandProcessing:in:" : "brunobb 04/15/2021 14:31",
"orbeonIP" : "brunobb 04/15/2021 14:31",
"orbeonIP:" : "brunobb 04/15/2021 14:31",
"printBaseAttachmentPath" : "brunobb 04/15/2021 14:31",
"setAndTypeSearchFor:in:" : "brunobb 04/15/2021 14:31",
"setDatabaseReaderFromDatabaseName:" : "brunobb 04/15/2021 14:31",
"setDeferredProcessingFor:in:" : "brunobb 04/15/2021 14:31",
"setOnDemandProcessingFor:in:" : "brunobb 04/15/2021 14:31",
"setOrTypeSearchFor:in:" : "brunobb 04/15/2021 14:31",
"setPath:for:in:" : "brunobb 04/15/2021 14:31",
"timeFormat" : "brunobb 04/15/2021 14:31",
"timeFormat:" : "brunobb 04/15/2021 14:31",
"typeSearchIsAnd:in:" : "brunobb 04/15/2021 14:31",
"typeSearchIsOr:in:" : "brunobb 04/15/2021 14:31" } }
"databaseMigrator" : "brunobb 08/19/2021 11:52",
"dateFormat" : "brunobb 08/19/2021 11:52",
"dateFormat:" : "brunobb 08/19/2021 11:52",
"disableDefinitionAuditFor:in:" : "brunobb 08/19/2021 11:52",
"disableDraftAuditFor:in:" : "brunobb 08/19/2021 11:52",
"disableInstanceAuditFor:in:" : "brunobb 08/19/2021 11:52",
"enableDefinitionAuditFor:in:" : "brunobb 08/19/2021 11:52",
"enableDraftAuditFor:in:" : "brunobb 08/19/2021 11:52",
"enableInstanceAuditFor:in:" : "brunobb 08/19/2021 11:52",
"existDirectoryStructureForAttachments" : "brunobb 08/19/2021 11:52",
"getAllAttachmentsPaths" : "brunobb 08/19/2021 11:52",
"getBasePathFor:in:" : "brunobb 08/19/2021 11:52",
"getDraftsPathFor:in:" : "brunobb 08/19/2021 11:52",
"getInstancesPathFor:in:" : "brunobb 08/19/2021 11:52",
"getPublishedDefinitionsPathFor:in:" : "brunobb 08/19/2021 11:52",
"getSavedDefinitionsPathFor:in:" : "brunobb 08/19/2021 11:52",
"getTempPath" : "brunobb 08/19/2021 11:52",
"initialize" : "brunobb 08/19/2021 11:52",
"isDeferredProcessing:in:" : "brunobb 08/19/2021 11:52",
"isDefinitionAuditEnableFor:in:" : "brunobb 08/19/2021 11:52",
"isDraftAuditEnableFor:in:" : "brunobb 08/19/2021 11:52",
"isInstanceAuditEnableFor:in:" : "brunobb 08/19/2021 11:52",
"isOnDemandProcessing:in:" : "brunobb 08/19/2021 11:52",
"migrateAll" : "brunobb 08/19/2021 11:52",
"migrateFormDefinitionNamed:in:" : "brunobb 08/19/2021 11:52",
"migrateInstancesOf:version:from:" : "brunobb 08/19/2021 11:52",
"orbeonIP" : "brunobb 08/19/2021 11:52",
"orbeonIP:" : "brunobb 08/19/2021 11:52",
"printBaseAttachmentPath" : "brunobb 08/19/2021 11:52",
"setAndTypeSearchFor:in:" : "brunobb 08/19/2021 11:52",
"setDatabaseReaderFromDatabaseName:" : "brunobb 08/19/2021 11:52",
"setDeferredProcessingFor:in:" : "brunobb 08/19/2021 11:52",
"setOnDemandProcessingFor:in:" : "brunobb 08/19/2021 11:52",
"setOrTypeSearchFor:in:" : "brunobb 08/19/2021 11:52",
"setPath:for:in:" : "brunobb 08/19/2021 11:52",
"timeFormat" : "brunobb 08/19/2021 11:52",
"timeFormat:" : "brunobb 08/19/2021 11:52",
"typeSearchIsAnd:in:" : "brunobb 08/19/2021 11:52",
"typeSearchIsOr:in:" : "brunobb 08/19/2021 11:52",
"updateFormDefinitionNamed:app:version:from:" : "brunobb 08/19/2021 11:52" } }
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"baseAttachmentPath",
"searchTypes",
"formsAudit",
"databaseMigrator",
"baseUrlDocumentation" ],
"databaseMigrator" ],
"name" : "OrbeonServerConfiguration",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url generation
generateEditUrlFor: anOrbeonFormInstance

^serverConfiguration orbeonIP, '/orbeon/fr/', anOrbeonFormInstance getApplicationName, '/', anOrbeonFormInstance getFormName, '/edit/', anOrbeonFormInstance id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url generation
generateEditUrlForDefinition: anOrbeonPublishedFormDefinition

^serverConfiguration orbeonIP, '/orbeon/fr/orbeon/builder/edit/', anOrbeonPublishedFormDefinition id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url generation
generateNewUrlForDefinition: anOrbeonPublishedFormDefinition

^serverConfiguration orbeonIP, '/orbeon/fr/orbeon/builder/new'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url generation
generateViewPdfUrlFor: anOrbeonFormInstance

^serverConfiguration orbeonIP, '/orbeon/fr/', anOrbeonFormInstance getApplicationName, '/', anOrbeonFormInstance getFormName, '/pdf/', anOrbeonFormInstance id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url generation
generateViewUrlFor: anOrbeonFormInstance

^serverConfiguration orbeonIP, '/orbeon/fr/', anOrbeonFormInstance getApplicationName, '/', anOrbeonFormInstance getFormName, '/view/', anOrbeonFormInstance id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
getAllAttachmentsPaths

^serverConfiguration getAllAttachmentsPaths
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
database reader
getDatabaseReaderName

^serverConfiguration getDatabaseReaderName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
getDraftsPathFor: formName in: appName

^serverConfiguration getDraftsPathFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
getInstancesPathFor: formName in: appName

^serverConfiguration getInstancesPathFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
getPublishedDefinitionsPathFor: formName in: appName

^serverConfiguration getPublishedDefinitionsPathFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
getSavedDefinitionsPathFor: formName in: appName

^serverConfiguration getSavedDefinitionsPathFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
getTempPath

^serverConfiguration getTempPath
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
audit
isDeferredProcessing: formName in: appName

^serverConfiguration isDeferredProcessing: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
audit
isDefinitionAuditEnableFor: formName in: appName

^serverConfiguration isDefinitionAuditEnableFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
audit
isDraftAuditEnableFor: formName in: appName

^serverConfiguration isDraftAuditEnableFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
audit
isInstanceAuditEnableFor: formName in: appName

^serverConfiguration isInstanceAuditEnableFor: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
migrateAll

^serverConfiguration migrateAll
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
migrateFormDefinitionNamed: formName in: applicationName

^serverConfiguration migrateFormDefinitionNamed: formName in: applicationName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
migrateInstancesOf: form version: version from: timeStamp

^serverConfiguration migrateInstancesOf: form version: version from: timeStamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
audit
orbeonDateFormat

^serverConfiguration dateFormat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
configuration
orbeonIP: stringIP

^serverConfiguration orbeonIP: stringIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
configuration
orbeonIP

^serverConfiguration orbeonIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
orbeonServerConfigurationPerform: pathSelector with: form with: app

^serverConfiguration perform: pathSelector with: form with: app.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external path
printBaseAttachmentPath

^serverConfiguration printBaseAttachmentPath
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
database reader
setDatabaseReaderFromDatabaseName: databaseNameName

^serverConfiguration setDatabaseReaderFromDatabaseName: databaseNameName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
search options
typeSearchIsOr: formName in: appName

^serverConfiguration typeSearchIsOr: formName in: appName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migration
updateFormDefinitionNamed: formName app: applicationName version: version from: timeStamp

^serverConfiguration updateFormDefinitionNamed: formName app: applicationName version: version from: timeStamp
Loading

0 comments on commit fa97c8a

Please sign in to comment.