Package nl.gx.forms.wmpformapi.api.form
Interface FormVersion
-
- All Superinterfaces:
BasicFormVersion
,BasicVersion
,Presentable
,PublicationStatusEnabled
,WorkflowEnabled
,Wrapper
@Indexable public interface FormVersion extends Presentable, BasicFormVersion
A version of a Form.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description FormStep
createStep()
Creates a new FormStep for this FormVersion.void
deleteStep(FormStep step)
Deletes the specified FormStep from this FormVersion.List<FormFragment>
getAllFormFragments()
Returns a list of all form fragment used by FormVersion.List<Language>
getAvailableInLanguages()
Returns a list of all languages in which this form version is available.BasicForm
getForm()
Returns the form to which this FormVersion belongs.List<FormLanguageLabelContainer>
getLanguageContainers()
Returns the language containers that hold translations for specific locales for properties of this Form Version.Calendar
getLastModified()
Returns the date time for the last update of the form version.String
getLastModifiedUserName()
Returns the username who did the last update.FormLanguageLabelContainer
getOrCreateLanguageContainer(String locale)
Retrieves or creates the language containers that hold translations for specific locales for properties of this Form Version.String
getOriginFormIdentifier()
Returns the original identifier of the Form for which this version was originally created.FormStep
getStepByIdentifier(String identifier)
Returns a FormStep by its identifier.String
getTitle()
Returns the title of this form version.WmId
getWmId()
Returns the WebManager ID (UUID) for this form step.boolean
hasVersionInLocale(String locale)
Returns true if this form version contains language labels in the specified locale.boolean
isCurrentlyActive()
Deprecated.UseWorkflowEnabled.isPublic()
insteadvoid
setLanguageContainers(List<FormLanguageLabelContainer> containers)
Sets the language containers that hold translations for specific locales for properties of this Form Version.void
setOriginFormIdentifier(String originFormIdentifer)
Sets the original identifier of the Form for which this version was originally created.void
setSteps(List<BasicFormStep> steps)
Sets or updates the list of form steps for this form version.void
setTitle(String title)
Sets the title of this form version.-
Methods inherited from interface nl.gx.forms.wmpformapi.api.BasicFormVersion
getFormStepByIdentifier, getIdentifier, getSteps
-
Methods inherited from interface nl.gx.forms.wmpformapi.api.BasicVersion
getCreationDate, getCreationDateCalendar, getCreatorDisplayName, getCreatorUserName, getExportDate, getExportId, getImportedDate, getImportId, getState, setCreationDate, setCreationDateCalendar, setCreatorUserName, setExportDate, setExportId, setImportedDate, setImportId, setLastModified, setLastModifiedUserName, setState, setWorkflowModelInstance
-
Methods inherited from interface nl.gx.webmanager.cms.core.Presentable
getPresentation, getPresentationVariant, render, render, setPresentation, setPresentationVariant
-
Methods inherited from interface nl.gx.webmanager.cms.core.PublicationStatusEnabled
getExpirationDate, getPublicationDate, getPublicationStatus, getPublicationStatus, setExpirationDate, setPublicationDate
-
Methods inherited from interface nl.gx.webmanager.cms.workflow.WorkflowEnabled
getWorkflowModel, getWorkflowModelInstance, isPublic
-
-
-
-
Method Detail
-
isCurrentlyActive
@Deprecated boolean isCurrentlyActive()
Deprecated.UseWorkflowEnabled.isPublic()
insteadReturns whether this version of the form is currently active. The actual value this method returns is determined by the active version of the form to which this version belongs.- Returns:
- true if this version is currently active, false otherwise
-
getTitle
@ReferField(stored=false, facet=true) String getTitle()
Returns the title of this form version.- Returns:
- the title of this form version
-
setTitle
void setTitle(String title)
Sets the title of this form version.- Parameters:
title
-
-
setSteps
void setSteps(List<BasicFormStep> steps)
Sets or updates the list of form steps for this form version.- Parameters:
steps
- the new list of steps for this form version
-
createStep
FormStep createStep()
Creates a new FormStep for this FormVersion.- Returns:
- the newly created FormStep
-
deleteStep
void deleteStep(FormStep step)
Deletes the specified FormStep from this FormVersion.- Parameters:
step
- the FormStep to be deleted
-
getAllFormFragments
List<FormFragment> getAllFormFragments()
Returns a list of all form fragment used by FormVersion.- Returns:
- List of all form fragments used by this FormVersion.
-
getWmId
WmId getWmId()
Returns the WebManager ID (UUID) for this form step.- Returns:
- the WebManager ID (UUID) for this form step
-
getForm
BasicForm getForm()
Returns the form to which this FormVersion belongs.- Returns:
- the form to which this FormVersion belongs
-
getLastModified
Calendar getLastModified()
Returns the date time for the last update of the form version.- Returns:
- the date time for the last update of the form version
-
getLastModifiedUserName
String getLastModifiedUserName()
Returns the username who did the last update.- Returns:
- the username who did the last update
-
getOriginFormIdentifier
String getOriginFormIdentifier()
Returns the original identifier of the Form for which this version was originally created. This value can be used to match FormVersions across different installations.- Returns:
- the original identifier of the Form for which this version was originally created
-
setOriginFormIdentifier
void setOriginFormIdentifier(String originFormIdentifer)
Sets the original identifier of the Form for which this version was originally created. This value can be used to match FormVersions across different installations.- Parameters:
originFormIdentifer
- the original identifier of the Form for which this version was originally created
-
getLanguageContainers
List<FormLanguageLabelContainer> getLanguageContainers()
Returns the language containers that hold translations for specific locales for properties of this Form Version.- Returns:
- the language containers that hold translations
-
setLanguageContainers
void setLanguageContainers(List<FormLanguageLabelContainer> containers)
Sets the language containers that hold translations for specific locales for properties of this Form Version.- Parameters:
containers
- the language containers that hold translations for specific locales for properties of this Form Version.
-
getOrCreateLanguageContainer
FormLanguageLabelContainer getOrCreateLanguageContainer(String locale)
Retrieves or creates the language containers that hold translations for specific locales for properties of this Form Version.- Parameters:
locale
- the locale for which to create or retrieve a language label container- Returns:
- the language label container for a specific locale
-
getStepByIdentifier
FormStep getStepByIdentifier(String identifier)
Returns a FormStep by its identifier.- Parameters:
identifier
- the identifier of the FormStep to return- Returns:
- the FormStep with the specified identifier or null if it does not exist
-
hasVersionInLocale
boolean hasVersionInLocale(String locale)
Returns true if this form version contains language labels in the specified locale.- Parameters:
locale
- the locale to search the language labels in- Returns:
- true if this form version contains language labels in the specified locale, false otherwise
- Since:
- 10.33.0
-
-