Skip to content
bruno.buzzi edited this page Aug 21, 2015 · 14 revisions

PUT Services (methods 11)

Methods to duplicate Forms (2 methods):

duplicateFormDefinitionNewId: id
"This method is called by Orbeon when a user click 'Send' in a Form Instance page"
	| orbeonInstance |
	<put>
	<produces: 'application/xml'>
	<path: '/crud/orbeon/builder/data/{1}/data.xml'>

duplicateFormInstance: formName app: app newId: id
"This method is called by Orbeon when a user click 'Send' in a Form Instance page"
	| orbeonInstance |
	<put>
	<produces: 'application/xml'>
	<path: '/crud/{2}/{1}/data/{3}/data.xml'>

Methods to Publish Forms (2 methods):

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>"
	| orbeonDefinition headerVersion currentVersion |
	<put>
	<consumes: 'application/xml'>
	<path: '/crud/{2}/{1}/form/form.xhtml?document={3}'>

unpublishFormDefinition: formName app: app
"This method is called by Orbeon when a Form Definition has been unpublished with form name <formName> in application <app>"
	<put>
	<path: '/crud/{2}/{1}/form/form.xhtml'>

Methods for Attachments Operations (4 methods):

receiveAndPublishFileFor: formName app: app documentId: documentId fileId: fileId
"This service receives a file with id <fileId> uploaded into the Form Definition with id <definitionId>"
	| gsFile |
	<put>
	<path: '/crud/{2}/{1}/form/{4}?document={3}'>

receiveAndSaveFileForDefinitionWithId: definitionId fileId: fileId valid: aBoolean
"This service receives a file with id <fileId> uploaded into the Form Definition with id <definitionId>"
	| stream gsFile |
	<put>
	<path: '/crud/orbeon/builder/data/{1}/{2}.bin?valid={3}'>

receiveAndSaveFileForDraft: formName app: app definitionId: definitionId fileId: fileId valid: aBoolean
""
	| stream gsFile |
	<put>
	<path: '/crud/{2}/{1}/draft/{3}/{4}?valid={5}'>

receiveAndSaveFileForInstance: formName app: app definitionId: definitionId fileId: fileId valid: aBoolean
""
	| stream gsFile |
	<put>
	<path: '/crud/{2}/{1}/data/{3}/{4}?valid={5}'>

Methods to Save Forms (3 methods):

saveDraftFormInstance: formName app: app withId: id valid: aBoolean
"This method is called by Orbeon when a user click 'Send' in a Form Instance page"
	| orbeonDraft |
	<put>
	<produces: 'application/xml'>
	<path: '/crud/{2}/{1}/draft/{3}/data.xml?valid={4}'>

saveFinalFormInstance: formName app: app withId: id valid: aBoolean
"This method is called by Orbeon when a user click 'Send' in a Form Instance page"
	| orbeonInstance |
	<put>
	<produces: 'application/xml'>
	<path: '/crud/{2}/{1}/data/{3}/data.xml?valid={4}'>

saveInFormBuilderDefinitionWithId: id valid: aBoolean
"This service is called by Orbeon when a user click on -Save- inside the Form Builder.
A Form Definition has been saved "
	| orbeonData |
	<put>
	<path: '/crud/orbeon/builder/data/{1}/data.xml/?valid={2}'>