Interface FormResource
-
Method Summary
Modifier and TypeMethodDescriptioncom.gentics.contentnode.rest.model.response.GenericResponseaddFormTypeConfigurationsToNode(String nodeId, String type) Add the form tyoe configuration to the node.Create a new form in the folderjakarta.ws.rs.core.ResponsedataBinariesStatus(String formId) Check available binary downloads for the given form.com.gentics.contentnode.rest.model.response.GenericResponseDelete a formjakarta.ws.rs.core.ResponsedeleteData(String formId, String dataId) Permanently delete a single data entry from Mesh, which has been submitted to the formjakarta.ws.rs.core.ResponsedownloadDataBinaries(String formId) Download binary data from Mesh, which has been submitted to the formjakarta.ws.rs.core.ResponsedownloadDataBinaryField(String formId, String dataId, String field) Download the binary data for a single field in a data entryjakarta.ws.rs.core.ResponsedownloadDataMultivalueBinaryField(String formId, String dataId, String field, int index) Download a single binary data for a single multivalue field in a data entryjakarta.ws.rs.core.ResponsedownloadFile(String formId, String downloadUuid) Download the requested binary archive.jakarta.ws.rs.core.ResponseexportData(String formId, FormDataExportParameterBean exportFormat, FilterFormDataParameterBean filter) Export data from Mesh, which has been submitted to the formjakarta.ws.rs.core.ResponseexportStatus(String formId, FormDataExportParameterBean exportFormat, FilterFormDataParameterBean filter) Check available export downloads for the given form.Load a formjakarta.ws.rs.core.ResponseLoad a single data entry from Mesh, which has been submitted to the formGet the form type configuration for the given typeGet the form type translations for the given typegetFormTypeTranslationsForLanguage(String type, String code) Get the translations for a form type and a language (identified by its language code).Get the global translationscom.gentics.contentnode.rest.model.response.PageUsageListResponsegetPageUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> formId, String 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.TemplateUsageListResponsegetTemplateUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> formId, String nodeId, boolean returnTemplates) Get the templates using one of the given formscom.gentics.contentnode.rest.model.response.TotalUsageResponsegetTotalUsage(List<Integer> formId, String nodeId) Get the total usage information of the given forms.com.gentics.contentnode.rest.model.response.LanguageListgetTranslationLanguages(com.gentics.contentnode.rest.resource.parameter.FilterParameterBean filter, com.gentics.contentnode.rest.resource.parameter.SortParameterBean sorting, com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging) Get the languages for creating form type translationsgetVersion(String formId, String nodeId, String version) Load a version of a formlist(com.gentics.contentnode.rest.resource.parameter.InFolderParameterBean inFolder, FilterFormParameterBean 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 byidnamedescriptionand sorted byidnamedescriptionformTypejakarta.ws.rs.core.ResponselistData(String formId, FilterFormDataParameterBean filter, com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging) List data entries from Mesh, which have been submitted to the formlistFormTypeConfigurations(FilterFormTypeConfigurationsParameterBean filter, com.gentics.contentnode.rest.resource.parameter.SortParameterBean sorting, com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging) List the form type configurationscom.gentics.contentnode.rest.model.response.ItemVersionListResponselistVersions(String formId, String nodeId) Get the versions of a formLock the formMove the form to the given folderPublish a formcom.gentics.contentnode.rest.model.response.GenericResponseremoveFormTypeConfigurationsFromNode(String nodeId, String type) Remove the form type configuration from the node.com.gentics.contentnode.rest.model.response.GenericResponseremoveFromWastebin(String formId, String nodeId) Remove a form from the wastebinremoveOfflineAt(String formId, String nodeId) Remove the time for scheduled taking offlineremovePublishAt(String formId, String nodeId) Remove the time for scheduled publishingjakarta.ws.rs.core.ResponserequestDataBinaries(String formId) Request an asynchronous binary download for the given forms data.jakarta.ws.rs.core.ResponserequestExport(String formId, FormDataExportParameterBean exportFormat, FilterFormDataParameterBean filter) Request an asynchronous export download for the given forms data.restoreFromWastebin(String formId, String nodeId) Restore a form from the wastebinrestoreVersion(String formId, String nodeId, String version) Restore a version of the formsaveFormTypeTranslations(String type, FormGenTranslations translations) Save modifications to the form type translationssaveGlobalTranslations(FormGenTranslations translations) Save modifications to the global translationstakeOffline(String formId, String nodeId, 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 FilterFormParameterBean 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 byidnamedescription
idnamedescriptionformType
- 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- formnodeId- optional node ID to create the form in the default folder of a node- Returns:
- response containing the created form
- Throws:
Exception
-
get
@GET @Path("{id}") FormResponse get(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId, @QueryParam("package") String stagingPackageName) throws Exception Load a form- Parameters:
formId- form IDnodeId- optional node ID to identify external formsstagingPackageName- 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, @QueryParam("nodeId") String nodeId, FormModel form) throws Exception Update a form- Parameters:
formId- form IDnodeId- optional node ID to identify external formsform- 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("nodeId") String nodeId, @QueryParam("disableInstantDelete") Boolean disableInstantDelete) throws Exception Delete a form- Parameters:
formId- form IDnodeId- optional node ID to identify external formsdisableInstantDelete- 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("nodeId") String nodeId, @QueryParam("at") @DefaultValue("0") int at, @QueryParam("keepVersion") @DefaultValue("false") boolean keepVersion) throws Exception Publish a form- Parameters:
formId- form IDnodeId- optional node ID to identify external formsat- 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("nodeId") String nodeId, @QueryParam("at") @DefaultValue("0") int at) throws Exception Take a form offline- Parameters:
formId- form IDnodeId- optional node ID to identify external formsat- 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, @QueryParam("nodeId") String nodeId) throws Exception Remove the time for scheduled publishing- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- Returns:
- response containing the form
- Throws:
Exception
-
removeOfflineAt
@DELETE @Path("{id}/offline/at") FormResponse removeOfflineAt(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId) throws Exception Remove the time for scheduled taking offline- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- Returns:
- response containing the form
- Throws:
Exception
-
lock
@PUT @Path("{id}/lock") FormResponse lock(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId) throws Exception Lock the form- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- Returns:
- response containing the locked form
- Throws:
Exception
-
unlock
@DELETE @Path("{id}/lock") FormResponse unlock(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId) throws Exception Unlock the form- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- 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, @QueryParam("nodeId") String nodeId) throws Exception Get the versions of a form- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- Returns:
- response containing a list of versions
- Throws:
Exception
-
getVersion
@GET @Path("{id}/version/{version}") FormResponse getVersion(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId, @PathParam("version") String version) throws Exception Load a version of a form- Parameters:
formId- form IDnodeId- optional node ID to identify external formsversion- version number- Returns:
- response containing the version number
- Throws:
Exception
-
restoreVersion
@POST @Path("{id}/version/{version}/restore") FormResponse restoreVersion(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId, @PathParam("version") String version) throws Exception Restore a version of the form- Parameters:
formId- form IDnodeId- optional node ID to identify external formsversion- 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, @QueryParam("nodeId") String nodeId) throws Exception Remove a form from the wastebin- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- Returns:
- response
- Throws:
Exception
-
restoreFromWastebin
@POST @Path("wastebin/{id}/restore") FormResponse restoreFromWastebin(@PathParam("id") String formId, @QueryParam("nodeId") String nodeId) throws Exception Restore a form from the wastebin- Parameters:
formId- form IDnodeId- optional node ID to identify external forms- Returns:
- response containing the restored form
- Throws:
Exception
-
move
@PUT @Path("{id}/folder/{folderId}") FormResponse move(@PathParam("id") String formId, @PathParam("folderId") String folderId, @QueryParam("nodeId") String nodeId) throws Exception Move the form to the given folder- Parameters:
formId- form IDfolderId- target folder IDnodeId- optional node ID to identify external forms- Returns:
- folder response
- Throws:
Exception
-
listData
@GET @Path("{id}/data") jakarta.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}") jakarta.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}") jakarta.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("*/*") jakarta.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
-
downloadDataMultivalueBinaryField
@GET @Path("{id}/data/{dataId}/binary/{field}/{index}") @Produces("*/*") jakarta.ws.rs.core.Response downloadDataMultivalueBinaryField(@PathParam("id") String formId, @PathParam("dataId") String dataId, @PathParam("field") String field, @PathParam("index") int index) throws Exception Download a single binary data for a single multivalue 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") jakarta.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") jakarta.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
exportFormatandfilter(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") jakarta.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") jakarta.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") jakarta.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") jakarta.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}") jakarta.ws.rs.core.Response downloadFile(@PathParam("id") String formId, @PathParam("downloadUuid") String downloadUuid) throws Exception Download the requested binary archive.The
downloadUuidmust 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") String 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") String 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") String 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
-
listFormTypeConfigurations
@GET @Path("/types") FormTypeConfigurationListResponse listFormTypeConfigurations(@BeanParam FilterFormTypeConfigurationsParameterBean filter, @BeanParam com.gentics.contentnode.rest.resource.parameter.SortParameterBean sorting, @BeanParam com.gentics.contentnode.rest.resource.parameter.PagingParameterBean paging) throws Exception List the form type configurations- Parameters:
filter- filter parameterssorting- sorting parameterspaging- paging parameters- Returns:
- response containing a list of form type configurations
- Throws:
Exception
-
getFormTypeconfiguration
@GET @Path("/types/{type}") FormTypeConfigurationResponse getFormTypeconfiguration(@PathParam("type") String type) throws Exception Get the form type configuration for the given type- Parameters:
type- type- Returns:
- form type configuration
- Throws:
Exception
-
getGlobalTranslations
Get the global translations- Returns:
- global translations
- Throws:
Exception
-
saveGlobalTranslations
@POST @Path("/translations") FormGenTranslationsResponse saveGlobalTranslations(FormGenTranslations translations) throws Exception Save modifications to the global translations- Parameters:
translations- translations to save- Returns:
- the modified global translations
- Throws:
Exception
-
getFormTypeTranslations
@GET @Path("/types/{type}/translations") FormGenTranslationsResponse getFormTypeTranslations(@PathParam("type") String type) throws Exception Get the form type translations for the given type- Parameters:
type- form type- Returns:
- translations
- Throws:
Exception
-
saveFormTypeTranslations
@POST @Path("/types/{type}/translations") FormGenTranslationsResponse saveFormTypeTranslations(@PathParam("type") String type, FormGenTranslations translations) throws Exception Save modifications to the form type translations- Parameters:
type- form typetranslations- translations to save- Returns:
- modified translations
- Throws:
Exception
-
getFormTypeTranslationsForLanguage
@GET @Path("/types/{type}/translations/{code}") FormGenTranslationsForLanguage getFormTypeTranslationsForLanguage(@PathParam("type") String type, @PathParam("code") String code) throws Exception Get the translations for a form type and a language (identified by its language code). The response will not contain the usual envelope, but will just contain the translations- Parameters:
type- form typecode- language code- Returns:
- translations
- Throws:
Exception
-
getTranslationLanguages
@GET @Path("/translations/languages") com.gentics.contentnode.rest.model.response.LanguageList getTranslationLanguages(@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) throws Exception Get the languages for creating form type translations- Parameters:
filter- filter parameterssorting- sorting parameterspaging- paging parameters- Returns:
- list of languages
- Throws:
Exception
-
removeFormTypeConfigurationsFromNode
@DELETE @Path("/nodes/{nodeId}/types/{type}") com.gentics.contentnode.rest.model.response.GenericResponse removeFormTypeConfigurationsFromNode(@PathParam("nodeId") String nodeId, @PathParam("type") String type) throws Exception Remove the form type configuration from the node.- Parameters:
nodeId- node ID (either global or local)type- form type key- Returns:
- generic response
- Throws:
Exception
-
addFormTypeConfigurationsToNode
@PUT @Path("/nodes/{nodeId}/types/{type}") com.gentics.contentnode.rest.model.response.GenericResponse addFormTypeConfigurationsToNode(@PathParam("nodeId") String nodeId, @PathParam("type") String type) throws Exception Add the form tyoe configuration to the node.- Parameters:
nodeId- node ID (either global or local)type- form type key- Returns:
- generic response
- Throws:
Exception
-