Skip to content

Commit

Permalink
update 07 to fix issue #423
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuzzi committed Jun 15, 2021
1 parent 222cce5 commit c6def93
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
instance creation
newOn: anOrbeonSystemManager

^self new
setWorldManager: anOrbeonSystemManager;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
private
setWorldManager: anOrbeonSystemManager

systemRoot := anOrbeonSystemManager.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"class" : {
"new" : "brunobb 06/26/2020 15:15",
"newOn:" : "brunobb 06/15/2021 10:45",
"newOn:withId:" : "brunobb 06/15/2021 10:44",
"newOn:withXml:" : "brunobb 06/04/2021 14:00",
"newOn:withXml:id:" : "brunobb 06/04/2021 14:03",
Expand Down Expand Up @@ -31,6 +32,7 @@
"setApplicationAndFormNameFromXmlString" : "brunobb 04/16/2021 08:01",
"setId:" : "brunobb 06/26/2020 15:14",
"setUserCredentialsFrom:" : "brunobb 08/27/2020 12:07",
"setWorldManager:" : "brunobb 06/15/2021 10:46",
"setWorldManager:id:" : "brunobb 06/04/2021 13:58",
"setWorldManager:xmlString:" : "brunobb 06/04/2021 14:01",
"setWorldManager:xmlString:id:" : "brunobb 06/04/2021 14:03",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
service-get
getAllFormDefinitionVesionsFor: formName app: app allversions: allversionBoolean
getAllFormDefinitionVesionsFor: formName app: app allversions: allversionBoolean
"Implemented as stated in:
https://doc.orbeon.com/form-runner/api/persistence/forms-metadata.html#returning-all-form-definition-versions"
| apiOperation |

<get>
<produces: 'application/xml'>
<path: '/form/{2}/{1}?all-versions={3}'>

apiOperation := OrbeonAllFormDefinitionVersionsApi new.
apiOperation appName: app;
| apiOperation |
apiOperation := OrbeonAllFormDefinitionVersionsApi newOn: self systemRoot.
apiOperation
appName: app;
formName: formName;
allversions: allversionBoolean;
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doIt
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
service-get
getAllFormDefinitionVesionsFor: formName app: app allversions: allversionBoolean allforms: allformsBoolean
getAllFormDefinitionVesionsFor: formName app: app allversions: allversionBoolean allforms: allformsBoolean
"Implemented as stated in:
https://doc.orbeon.com/form-runner/api/persistence/forms-metadata.html#returning-all-form-definition-versions"
| apiOperation |

<get>
<produces: 'application/xml'>
<path: '/form/{2}/{1}?all-versions={3}&all-forms={4}'>

apiOperation := OrbeonAllFormDefinitionVersionsApi new.
apiOperation appName: app;
| apiOperation |
apiOperation := OrbeonAllFormDefinitionVersionsApi newOn: self systemRoot.
apiOperation
appName: app;
formName: formName;
allversions: allversionBoolean;
allforms: allformsBoolean;
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doIt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@ getFormVersion: formName app: app
This method answer the latest version of the form definition <formName> in application <app>.
Using the header <orbeon-form-definition-version> to set the version number.
It also called when a new Form Instance page is about to be displayed (app/form/new)"
| apiOperation |

<get>
<produces: 'application/xml'>
<path: '/crud/{2}/{1}/form/form.xhtml'>

apiOperation := OrbeonPublishedFormDefinitionSourceApi new.
apiOperation appName: app;
| apiOperation |
apiOperation := OrbeonPublishedFormDefinitionSourceApi
newOn: self systemRoot.
apiOperation
appName: app;
formName: formName;
headerVersionValue: (self requestContext request headerAt: 'orbeon-form-definition-version');
headerVersionValue: (self requestContext request
headerAt: 'orbeon-form-definition-version');
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

^apiOperation
doItAndSetVersion: [:versionString | self requestContext response headerAt: 'orbeon-form-definition-version' put: versionString]
setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doItAndSetVersion:
[:versionString |
self requestContext response headerAt: 'orbeon-form-definition-version'
put: versionString]
ifNotFound: [self noRouteFound: self requestContext]
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
service-get
getToolboxForApplication: appName
getToolboxForApplication: appName
"This method is called by Orbeon when the Form Builder is about to be Opened.
It show the available -Library- forms for the application named <appName> "
| apiOperation |

<get>
<produces: 'application/xml'>
<path: '/custom/{1}/builder/toolbox'>

apiOperation := OrbeonGetToolboxApi new.
apiOperation appName: appName;
headerValue: (self requestContext request headerAt: 'orbeon-form-definition-version');
| apiOperation |
apiOperation := OrbeonGetToolboxApi newOn: self systemRoot.
apiOperation
appName: appName;
headerValue: (self requestContext request
headerAt: 'orbeon-form-definition-version');
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doItIfNotFound: [self noRouteFound: self requestContext]
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
service-get
getToolboxForApplication: appName form: formName
getToolboxForApplication: appName form: formName
"This method is called by Orbeon when the Form Builder is about to be Opened.
It show the available -Library- forms for the application named <appName> "
| apiOperation |

<get>
<produces: 'application/xml'>
<path: '/custom/{1}/builder/toolbox?application={1}&form={2}'>

apiOperation := OrbeonGetToolboxApi new.
apiOperation appName: appName;
headerValue: (self requestContext request headerAt: 'orbeon-form-definition-version');
| apiOperation |
apiOperation := OrbeonGetToolboxApi newOn: self systemRoot.
apiOperation
appName: appName;
headerValue: (self requestContext request
headerAt: 'orbeon-form-definition-version');
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doItIfNotFound: [self noRouteFound: self requestContext]
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
service-get
reindexOrbeonForms
"This service is called when a user click on ReIndex Database"
| apiOperation |

<get>
<path: '/reindex'>

apiOperation := OrbeonReIndexDatabaseApi new.
apiOperation
| apiOperation |
apiOperation := OrbeonReIndexDatabaseApi newOn: self systemRoot.
apiOperation
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doIt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
service-get
sendFileForCustomPDF: formName app: app fileId: fileId
sendFileForCustomPDF: formName app: app fileId: fileId
"This service is called when Orbeon requires a Custom PDF of a form or the Form Instance has any attachments and the user has clicked -Send-"
| apiOperation |

<get>
<produces: 'application/octet-stream'>
<path: '/crud/{2}/{1}/form/{3}'>

apiOperation := OrbeonSendCustomPdfFileApi new.
apiOperation
| apiOperation |
apiOperation := OrbeonSendCustomPdfFileApi newOn: self systemRoot.
apiOperation
fileId: fileId;
appName: app;
formName: formName;
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

self requestContext response contentType: WAMimeType applicationOctetStream.

setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
self requestContext response
contentType: WAMimeType applicationOctetStream.
^apiOperation doIt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"duplicateFormDefinitionNewId:dataFormat:" : "brunobb 06/15/2021 10:21",
"duplicateFormInstance:app:newId:" : "brunobb 06/15/2021 10:21",
"duplicateFormInstance:app:newId:dataFormat:" : "brunobb 06/15/2021 10:21",
"getAllFormDefinitionVesionsFor:app:allversions:" : "brunobb 08/27/2020 12:14",
"getAllFormDefinitionVesionsFor:app:allversions:allforms:" : "brunobb 02/12/2021 11:50",
"getAllFormDefinitionVesionsFor:app:allversions:" : "brunobb 06/15/2021 10:50",
"getAllFormDefinitionVesionsFor:app:allversions:allforms:" : "brunobb 06/15/2021 10:50",
"getDefinitionForFormInstanceWithId:form:app:" : "brunobb 11/20/2020 11:48",
"getFormDefinitionWithId:dataFormat:" : "brunobb 02/11/2021 13:12",
"getFormVersion:app:" : "brunobb 03/24/2021 13:07",
"getFormVersion:app:" : "brunobb 06/15/2021 10:50",
"getOrbeonFr" : "brunobb 01/25/2021 11:40",
"getOrbeonFr:" : "brunobb 03/24/2021 13:25",
"getToolboxForApplication:" : "brunobb 03/24/2021 11:22",
"getToolboxForApplication:form:" : "brunobb 03/30/2021 09:15",
"getToolboxForApplication:" : "brunobb 06/15/2021 10:50",
"getToolboxForApplication:form:" : "brunobb 06/15/2021 10:50",
"getXmlOfFormDraftWithId:form:app:" : "brunobb 10/02/2020 15:23",
"getXmlOfFormDraftWithId:form:app:dataFormat:" : "brunobb 10/02/2020 15:23",
"getXmlOfFormInstanceWithId:form:app:" : "brunobb 10/02/2020 15:23",
Expand All @@ -37,7 +37,7 @@
"receiveAndSaveFileForDraft:app:draftId:fileId:valid:" : "brunobb 08/27/2020 12:25",
"receiveAndSaveFileForInstance:app:instanceId:fileId:dataFormat:valid:" : "brunobb 08/27/2020 12:25",
"receiveAndSaveFileForInstance:app:instanceId:fileId:valid:" : "brunobb 08/27/2020 12:25",
"reindexOrbeonForms" : "brunobb 08/27/2020 12:20",
"reindexOrbeonForms" : "brunobb 06/15/2021 10:50",
"rejectLeaseFor:withXml:" : "brunobb 04/11/2019 04:49",
"rejectRelinquishLeaseFor:withXml:" : "brunobb 04/11/2019 04:49",
"relinquishLeaseFormInstance:app:withId:" : "brunobb 06/15/2021 10:21",
Expand All @@ -47,7 +47,7 @@
"saveInFormBuilderDefinitionWithId:dataFormat:valid:" : "brunobb 02/12/2021 12:16",
"searchInFormBuilderSummary" : "brunobb 01/25/2021 11:23",
"searchInFormSummary:app:" : "brunobb 03/25/2021 12:16",
"sendFileForCustomPDF:app:fileId:" : "brunobb 08/27/2020 12:20",
"sendFileForCustomPDF:app:fileId:" : "brunobb 06/15/2021 10:50",
"sendFileForDefinitionWithId:fileId:" : "brunobb 08/27/2020 12:20",
"sendFileForDraft:app:draftId:fileId:" : "brunobb 08/27/2020 12:21",
"sendFileForInstance:app:instanceId:fileId:" : "brunobb 08/27/2020 12:21",
Expand Down

Large diffs are not rendered by default.

0 comments on commit c6def93

Please sign in to comment.