Skip to content

Commit

Permalink
update 10 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 d92dee5 commit 1c1d67f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publishFormDefinition: formName app: app
<path: '/crud/{2}/{1}/form/form.xhtml'>

request := self requestContext request.
apiOperation := OrbeonFormBuilderPublishUpdateApi newWithXml: (request bodyDecodeUsing: 'utf-8').
apiOperation := OrbeonFormBuilderPublishUpdateApi newOn: self systemRoot withXml: (request bodyDecodeUsing: 'utf-8').
apiOperation
appName: app;
formName: formName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
service-put
publishFormDefinition: formName app: app withId: documentId
publishFormDefinition: formName app: app withId: documentId
"This method is called by Orbeon when a Form Definition has been published with form name <formName> in application <app> with form id <documentId>"
| apiOperation |

<put>
<consumes: 'application/xml'>
<path: '/crud/{2}/{1}/form/form.xhtml?document={3}'>

apiOperation := OrbeonFormBuilderPublishApi newWithXml: (self requestContext request bodyDecodeUsing: 'utf-8') id: documentId.
| apiOperation |
apiOperation := OrbeonFormBuilderPublishApi
newOn: self systemRoot
withXml: (self requestContext request bodyDecodeUsing: 'utf-8')
id: documentId.
apiOperation
appName: app;
formName: formName;
headerVersion: (self requestContext request headerAt: 'orbeon-form-definition-version');
headerVersion: (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 doItIfNotFound: [OrbeonPersistenceApiException signal: 'Error performing the publishing'].
setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^apiOperation doItIfNotFound:
[OrbeonPersistenceApiException signal: 'Error performing the publishing']
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ saveInFormBuilderDefinitionWithId: id dataFormat: dataFormatVersion valid: strin
<path: '/crud/orbeon/builder/data/{1}/data.xml?data-format-version={2}&valid={3}'>

(Boolean fromString: stringBool)
ifTrue: [ apiOperation := OrbeonFormBuilderSaveApi newWithXml: (self requestContext request bodyDecodeUsing: 'utf-8') id: id.
ifTrue: [ apiOperation := OrbeonFormBuilderSaveApi newOn: self systemRoot withXml: (self requestContext request bodyDecodeUsing: 'utf-8') id: id.
apiOperation
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ service-post
searchInFormBuilderSummary
"This service is called by Orbeon when rendering an Orbeon Form Builder Summary page and
answer a well formatted XML with the result of the query received in the request.
This XML is going to be displayed in the Orbeon Form Builder Summary page"
| searchApi |
This XML is going to be displayed in the Orbeon Form Builder Summary page"

<post>
<produces: 'application/xml'>
<path: '/search/orbeon/builder'>

searchApi := OrbeonDefinitionSearchApi newWithXml: (self requestContext request bodyDecodeUsing: 'utf-8').
searchApi setPageSize;
setPageNumber;
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request headerAt: 'orbeon-credentials').

| searchApi |
searchApi := OrbeonDefinitionSearchApi newOn: self systemRoot
withXml: (self requestContext request bodyDecodeUsing: 'utf-8').
searchApi
setPageSize;
setPageNumber;
group: (self requestContext request headerAt: 'orbeon-group');
user: (self requestContext request headerAt: 'orbeon-username');
setUserCredentialsFrom: (self requestContext request
headerAt: 'orbeon-credentials').
^searchApi doIt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ searchInFormSummary: formName app: app

definition isDeleted ifTrue: [^self noRouteFound: self requestContext].

searchApi := OrbeonInstanceSearchApi newWithXml: (request bodyDecodeUsing: 'utf-8') application: application form: definition.
searchApi := OrbeonInstanceSearchApi newOn: self systemRoot withXml: (request bodyDecodeUsing: 'utf-8') application: application form: definition.

searchApi setPageSize;
setPageNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"handle:" : "brunobb 03/24/2021 13:10",
"leaseFormInstance:app:withId:" : "brunobb 06/15/2021 10:21",
"noRouteFound:" : "brunobb 03/30/2021 09:11",
"publishFormDefinition:app:" : "brunobb 03/24/2021 14:04",
"publishFormDefinition:app:withId:" : "brunobb 03/24/2021 11:38",
"publishFormDefinition:app:" : "brunobb 06/15/2021 11:08",
"publishFormDefinition:app:withId:" : "brunobb 06/15/2021 11:07",
"receiveAndPublishFileFor:app:documentId:fileId:" : "brunobb 06/15/2021 11:03",
"receiveAndSaveFileForDefinitionWithId:fileId:dataFormat:valid:" : "brunobb 06/15/2021 11:03",
"receiveAndSaveFileForDefinitionWithId:fileId:valid:" : "brunobb 06/15/2021 11:03",
Expand All @@ -44,9 +44,9 @@
"saveDraftFormInstance:app:withId:dataFormat:valid:" : "brunobb 06/15/2021 10:21",
"saveDraftFormInstance:app:withId:valid:" : "brunobb 06/15/2021 10:21",
"saveFinalFormInstance:app:withId:dataFormat:valid:" : "brunobb 06/15/2021 10:20",
"saveInFormBuilderDefinitionWithId:dataFormat:valid:" : "brunobb 02/12/2021 12:16",
"searchInFormBuilderSummary" : "brunobb 01/25/2021 11:23",
"searchInFormSummary:app:" : "brunobb 03/25/2021 12:16",
"saveInFormBuilderDefinitionWithId:dataFormat:valid:" : "brunobb 06/15/2021 11:08",
"searchInFormBuilderSummary" : "brunobb 06/15/2021 11:09",
"searchInFormSummary:app:" : "brunobb 06/15/2021 11:10",
"sendFileForCustomPDF:app:fileId:" : "brunobb 06/15/2021 10:50",
"sendFileForDefinitionWithId:fileId:" : "brunobb 06/15/2021 11:03",
"sendFileForDraft:app:draftId:fileId:" : "brunobb 06/15/2021 11:03",
Expand Down

Large diffs are not rendered by default.

0 comments on commit 1c1d67f

Please sign in to comment.