Interface FormResource
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new form in the folderjavax.ws.rs.core.Response
dataBinariesStatus
(String formId) Check available binary downloads for the given form.com.gentics.contentnode.rest.model.response.GenericResponse
Delete a formjavax.ws.rs.core.Response
deleteData
(String formId, String dataId) Permanently delete a single data entry from Mesh, which has been submitted to the formjavax.ws.rs.core.Response
downloadDataBinaries
(String formId) Download binary data from Mesh, which has been submitted to the formjavax.ws.rs.core.Response
downloadDataBinaryField
(String formId, String dataId, String field) Download the binary data for a single field in a data entryjavax.ws.rs.core.Response
downloadFile
(String formId, String downloadUuid) Download the requested binary archive.javax.ws.rs.core.Response
exportData
(String formId, FormDataExportParameterBean exportFormat, FilterFormDataParameterBean filter) Export data from Mesh, which has been submitted to the formjavax.ws.rs.core.Response
exportStatus
(String formId, FormDataExportParameterBean exportFormat, FilterFormDataParameterBean filter) Check available export downloads for the given form.Load a formjavax.ws.rs.core.Response
Load a single data entry from Mesh, which has been submitted to the formcom.gentics.contentnode.rest.model.response.PageUsageListResponse
getPageUsageInfo
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> formId, Integer nodeId, boolean returnPages, com.gentics.contentnode.rest.resource.parameter.PageModelParameterBean pageModel) Get the pages using one of the given formscom.gentics.contentnode.rest.model.response.TemplateUsageListResponse
getTemplateUsageInfo
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> formId, Integer nodeId, boolean returnTemplates) Get the templates using one of the given formscom.gentics.contentnode.rest.model.response.TotalUsageResponse
getTotalUsage
(List<Integer> formId, Integer nodeId) Get the total usage information of the given forms.getVersion
(String formId, String version) Load a version of a formlist
(com.gentics.contentnode.rest.resource.parameter.InFolderParameterBean inFolder, com.gentics.contentnode.rest.resource.parameter.FilterParameterBean filter, com.gentics.contentnode.rest.resource.parameter.SortParameterBean sorting, com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging, com.gentics.contentnode.rest.resource.parameter.WastebinParameterBean wastebin, com.gentics.contentnode.rest.resource.parameter.PublishableParameterBean publishable) List forms.
The result can be filtered byid
name
description
and sorted byid
name
description
javax.ws.rs.core.Response
listData
(String formId, FilterFormDataParameterBean filter, com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging) List data entries from Mesh, which have been submitted to the formcom.gentics.contentnode.rest.model.response.ItemVersionListResponse
listVersions
(String formId) Get the versions of a formLock the formMove the form to the given folderRender a preview of the form in the given languageRender a preview of the form in the given languagePublish a formcom.gentics.contentnode.rest.model.response.GenericResponse
removeFromWastebin
(String formId) Remove a form from the wastebinremoveOfflineAt
(String formId) Remove the time for scheduled taking offlineremovePublishAt
(String formId) Remove the time for scheduled publishingjavax.ws.rs.core.Response
requestDataBinaries
(String formId) Request an asynchronous binary download for the given forms data.javax.ws.rs.core.Response
requestExport
(String formId, FormDataExportParameterBean exportFormat, FilterFormDataParameterBean filter) Request an asynchronous export download for the given forms data.restoreFromWastebin
(String formId) Restore a form from the wastebinrestoreVersion
(String formId, String version) Restore a version of the formtakeOffline
(String formId, int at) Take a form offlineUnlock the formUpdate a form
-
Method Details
-
list
@GET FormListResponse list(@BeanParam com.gentics.contentnode.rest.resource.parameter.InFolderParameterBean inFolder, @BeanParam com.gentics.contentnode.rest.resource.parameter.FilterParameterBean filter, @BeanParam com.gentics.contentnode.rest.resource.parameter.SortParameterBean sorting, @BeanParam com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging, @BeanParam com.gentics.contentnode.rest.resource.parameter.WastebinParameterBean wastebin, @BeanParam com.gentics.contentnode.rest.resource.parameter.PublishableParameterBean publishable) throws Exception List forms.
The result can be filtered byid
name
description
id
name
description
- Parameters:
inFolder
- parameter beanfilter
- parameter beansorting
- parameter beanpaging
- parameter beanwastebin
- parameter beanpublishable
- parameter bean- Returns:
- response containing a list of forms
- Throws:
Exception
-
create
Create a new form in the folder- Parameters:
form
- form- Returns:
- response containing the created form
- Throws:
Exception
-
get
@GET @Path("{id}") FormResponse get(@PathParam("id") String formId, @QueryParam("package") String stagingPackageName) throws Exception Load a form- Parameters:
formId
- form IDstagingPackageName
- name of a content staging package, to check the form status in the package- Returns:
- response containing the form
- Throws:
Exception
-
update
@PUT @Path("{id}") FormResponse update(@PathParam("id") String formId, FormModel form) throws Exception Update a form- Parameters:
formId
- form IDform
- form data to update- Returns:
- updated form
- Throws:
Exception
-
delete
@DELETE @Path("{id}") com.gentics.contentnode.rest.model.response.GenericResponse delete(@PathParam("id") String formId, @QueryParam("disableInstantDelete") Boolean disableInstantDelete) throws Exception Delete a form- Parameters:
formId
- form IDdisableInstantDelete
- don't delete the item from the content repo immediately- Returns:
- response
- Throws:
Exception
-
publish
@PUT @Path("{id}/online") FormResponse publish(@PathParam("id") String formId, @QueryParam("at") @DefaultValue("0") int at, @QueryParam("keepVersion") @DefaultValue("false") boolean keepVersion) throws Exception Publish a form- Parameters:
formId
- form IDat
- timestamp for scheduled publishing (0 for publishing immediately)keepVersion
- true to keep the currently scheduled version (if "at" is not 0 and a form version is currently scheduled to be published)- Returns:
- response containing the form
- Throws:
Exception
-
takeOffline
@DELETE @Path("{id}/online") FormResponse takeOffline(@PathParam("id") String formId, @QueryParam("at") @DefaultValue("0") int at) throws Exception Take a form offline- Parameters:
formId
- form IDat
- timestamp for scheduled taking offline (0 for taking offline immediately)- Returns:
- response containing the form
- Throws:
Exception
-
removePublishAt
@DELETE @Path("{id}/publish/at") FormResponse removePublishAt(@PathParam("id") String formId) throws Exception Remove the time for scheduled publishing- Parameters:
formId
- form ID- Returns:
- response containing the form
- Throws:
Exception
-
removeOfflineAt
@DELETE @Path("{id}/offline/at") FormResponse removeOfflineAt(@PathParam("id") String formId) throws Exception Remove the time for scheduled taking offline- Parameters:
formId
- form ID- Returns:
- response containing the form
- Throws:
Exception
-
lock
Lock the form- Parameters:
formId
- form ID- Returns:
- response containing the locked form
- Throws:
Exception
-
unlock
Unlock the form- Parameters:
formId
- form ID- Returns:
- response containing the unlocked form
- Throws:
Exception
-
listVersions
@GET @Path("{id}/version") com.gentics.contentnode.rest.model.response.ItemVersionListResponse listVersions(@PathParam("id") String formId) throws Exception Get the versions of a form- Parameters:
formId
- form ID- Returns:
- response containing a list of versions
- Throws:
Exception
-
getVersion
@GET @Path("{id}/version/{version}") FormResponse getVersion(@PathParam("id") String formId, @PathParam("version") String version) throws Exception Load a version of a form- Parameters:
formId
- form IDversion
- version number- Returns:
- response containing the version number
- Throws:
Exception
-
restoreVersion
@POST @Path("{id}/version/{version}/restore") FormResponse restoreVersion(@PathParam("id") String formId, @PathParam("version") String version) throws Exception Restore a version of the form- Parameters:
formId
- form IDversion
- version number- Returns:
- response containing the restored form
- Throws:
Exception
-
removeFromWastebin
@DELETE @Path("wastebin/{id}") com.gentics.contentnode.rest.model.response.GenericResponse removeFromWastebin(@PathParam("id") String formId) throws Exception Remove a form from the wastebin- Parameters:
formId
- form ID- Returns:
- response
- Throws:
Exception
-
restoreFromWastebin
@POST @Path("wastebin/{id}/restore") FormResponse restoreFromWastebin(@PathParam("id") String formId) throws Exception Restore a form from the wastebin- Parameters:
formId
- form ID- Returns:
- response containing the restored form
- Throws:
Exception
-
move
@PUT @Path("{id}/folder/{folderId}") FormResponse move(@PathParam("id") String formId, @PathParam("folderId") String folderId) throws Exception Move the form to the given folder- Parameters:
formId
- form IDfolderId
- target folder ID- Returns:
- folder response
- Throws:
Exception
-
preview
@GET @Path("{id}/preview/{language}") @Produces("text/html") String preview(@PathParam("id") String formId, @PathParam("language") String language) throws Exception Render a preview of the form in the given language- Parameters:
formId
- form IDlanguage
- language code- Returns:
- rendered preview
- Throws:
Exception
-
preview
@POST @Path("{id}/preview/{language}") @Produces("text/html") String preview(@PathParam("id") String formId, @PathParam("language") String language, FormModel formModel) throws Exception Render a preview of the form in the given language- Parameters:
formId
- form IDlanguage
- language codeformModel
- form model- Returns:
- rendered preview
- Throws:
Exception
-
listData
@GET @Path("{id}/data") javax.ws.rs.core.Response listData(@PathParam("id") String formId, @BeanParam FilterFormDataParameterBean filter, @BeanParam com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging) throws Exception List data entries from Mesh, which have been submitted to the form- Parameters:
formId
- form IDfilter
- parameter beanpaging
- parameter bean- Returns:
- response
- Throws:
Exception
-
getData
@GET @Path("{id}/data/{dataId}") javax.ws.rs.core.Response getData(@PathParam("id") String formId, @PathParam("dataId") String dataId) throws Exception Load a single data entry from Mesh, which has been submitted to the form- Parameters:
formId
- form ID- Returns:
- response
- Throws:
Exception
-
deleteData
@DELETE @Path("{id}/data/{dataId}") javax.ws.rs.core.Response deleteData(@PathParam("id") String formId, @PathParam("dataId") String dataId) throws Exception Permanently delete a single data entry from Mesh, which has been submitted to the form- Parameters:
formId
- form ID- Returns:
- response
- Throws:
Exception
-
downloadDataBinaryField
@GET @Path("{id}/data/{dataId}/binary/{field}") @Produces("*/*") javax.ws.rs.core.Response downloadDataBinaryField(@PathParam("id") String formId, @PathParam("dataId") String dataId, @PathParam("field") String field) throws Exception Download the binary data for a single field in a data entry- Parameters:
formId
- form IDdataId
- data ID (uuid of the data node in Mesh)field
- field name- Returns:
- response
- Throws:
Exception
-
exportData
@GET @Path("{id}/export") javax.ws.rs.core.Response exportData(@PathParam("id") String formId, @BeanParam FormDataExportParameterBean exportFormat, @BeanParam FilterFormDataParameterBean filter) throws Exception Export data from Mesh, which has been submitted to the formNote that this endpoint will download the export immediately, and block for as long as it takes the Mesh plugin to create it. Use
requestExport(String, FormDataExportParameterBean, FilterFormDataParameterBean)
anddownloadFile(String, String)
for asynchronous downloads.- Parameters:
formId
- form IDexportFormat
- parameter beanfilter
- filter bean- Returns:
- response
- Throws:
Exception
-
exportStatus
@GET @Path("{id}/export/status") javax.ws.rs.core.Response exportStatus(@PathParam("id") String formId, @BeanParam FormDataExportParameterBean exportFormat, @BeanParam FilterFormDataParameterBean filter) throws Exception Check available export downloads for the given form.The response will contain whether there are export downloads ready which match the given
exportFormat
andfilter
(field"downloadReady"
), and if so the downloads UUID and creation timestamp (fields"downloadUuid"
and"downloadTimestamp"
).When a download is currently being prepared, the field
"downloadPending"
will betrue
.Any errors will be in the field
errors
.- Parameters:
formId
- The forms ID.- Returns:
- The response from the Mesh forms plugin.
- Throws:
Exception
-
requestExport
@POST @Path("{id}/export") javax.ws.rs.core.Response requestExport(@PathParam("id") String formId, @BeanParam FormDataExportParameterBean exportFormat, @BeanParam FilterFormDataParameterBean filter) throws Exception Request an asynchronous export download for the given forms data.The response will contain the UUID of the generated download node. Whether the download is ready has to be checked via requests to
exportStatus(String, FormDataExportParameterBean, FilterFormDataParameterBean)
.- Parameters:
formId
- The forms ID.- Returns:
- The response from the Mesh forms plugin.
- Throws:
Exception
-
downloadDataBinaries
@GET @Path("{id}/binaries") @Produces("application/zip") javax.ws.rs.core.Response downloadDataBinaries(@PathParam("id") String formId) throws Exception Download binary data from Mesh, which has been submitted to the formNote that this endpoint will download the binaries immediately, and block for as long as it takes the Mesh plugin to create it. Use
requestDataBinaries(String)
anddownloadFile(String, String)
for asynchronous downloads.- Parameters:
formId
- form ID- Returns:
- response
- Throws:
Exception
-
dataBinariesStatus
@GET @Path("{id}/binaries/status") javax.ws.rs.core.Response dataBinariesStatus(@PathParam("id") String formId) throws Exception Check available binary downloads for the given form.The response will contain whether there are binary downloads ready (field
"downloadReady"
), and if so the downloads UUID and creation timestamp (fields"downloadUuid"
and"downloadTimestamp"
).When a download is currently being prepared, the field
"downloadPending"
will betrue
.Any errors will be in the field
errors
.- Parameters:
formId
- The forms ID.- Returns:
- The response from the Mesh forms plugin.
- Throws:
Exception
-
requestDataBinaries
@POST @Path("{id}/binaries") javax.ws.rs.core.Response requestDataBinaries(@PathParam("id") String formId) throws Exception Request an asynchronous binary download for the given forms data.The response will contain the UUID of the generated download node. Whether the download is ready has to be checked via requests to
dataBinariesStatus(String)
.- Parameters:
formId
- The forms ID.- Returns:
- The response from the Mesh forms plugin.
- Throws:
Exception
-
downloadFile
@GET @Path("{id}/download/{downloadUuid}") javax.ws.rs.core.Response downloadFile(@PathParam("id") String formId, @PathParam("downloadUuid") String downloadUuid) throws Exception Download the requested binary archive.The
downloadUuid
must be a valid UUID returned the therequestDataBinaries(String)
method.- Parameters:
formId
- The forms ID.downloadUuid
- The UUID of the download node.- Returns:
- The response from the Mesh forms plugin.
- Throws:
Exception
-
getTotalUsage
@GET @Path("/usage/total") com.gentics.contentnode.rest.model.response.TotalUsageResponse getTotalUsage(@QueryParam("id") List<Integer> formId, @QueryParam("nodeId") Integer nodeId) throws Exception Get the total usage information of the given forms.- Parameters:
formId
- list of form IDsnodeId
- ID of the node- Returns:
- Total usage response
- Throws:
Exception
-
getPageUsageInfo
@GET @Path("/usage/page") com.gentics.contentnode.rest.model.response.PageUsageListResponse getPageUsageInfo(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> formId, @QueryParam("nodeId") Integer nodeId, @QueryParam("pages") @DefaultValue("true") boolean returnPages, @BeanParam com.gentics.contentnode.rest.resource.parameter.PageModelParameterBean pageModel) throws Exception Get the pages using one of the given forms- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".formId
- list of form IDs, for which the usage shall be fetchednodeId
- ID of the nodereturnPages
- true (default) if the pages shall be returned, false for only returning the countspageModel
- page model parameters- Returns:
- list of pages using the given forms
- Throws:
Exception
-
getTemplateUsageInfo
@GET @Path("/usage/template") com.gentics.contentnode.rest.model.response.TemplateUsageListResponse getTemplateUsageInfo(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> formId, @QueryParam("nodeId") Integer nodeId, @QueryParam("templates") @DefaultValue("true") boolean returnTemplates) throws Exception Get the templates using one of the given forms- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".formId
- list of form ids, for which the usage shall be fetchednodeId
- id of the nodereturnTemplates
- true (default) if the templates shall be returned, false for only returning the counts- Returns:
- response
- Throws:
Exception
-