Interface FormLogicComponentVariantDefinition
-
- All Superinterfaces:
FormLogicComponentDefinition
,Identifiable
- All Known Subinterfaces:
FormHandlerVariantDefinition
,FormRouterVariantDefinition
,FormValidatorVariantDefinition
,FragmentValidatorVariantDefinition
public interface FormLogicComponentVariantDefinition extends FormLogicComponentDefinition
Represents a variant definition for a FormLogicComponent.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LanguageLabelMapping
addOrUpdateCustomLanguageLabelMapping(String errorCode, String languageLabelKey)
Creates and adds a new language label mapping or updates an existing one.void
addRole(String selectedRole)
Add selected roles.ParameterDefinition
createParameterVariantDefinition(ParameterDefinition reference)
Creates a new definition for a parameter variant with the specified identifier.List<LanguageLabelMapping>
getCustomLanguageLabelMapping()
Returns the custom mapping of error codes to language labels.LanguageLabelMapping
getCustomLanguageLabelMappingByCode(String errorCode)
Returns the language label mapping for the specified error code.List<String>
getCustomRoleIds()
Returns the Roles Id's.String
getDescription()
Returns description of this variant.FormLogicComponentDefinition
getFormLogicComponentDefinition()
Returns the reference to the form logic component definition.String
getOriginIdentifier()
Returns the origin identifier.List<ParameterDefinition>
getParameterVariantDefinitions()
Returns the parameter variant definitions.String
getSelectedRole()
int
getVariantType()
Returns type of this variant.boolean
isFavorite()
Returns whether this variant is a favorite.boolean
isVariantPermissionDefinition()
check variantvoid
setCustomLanguageLabelMapping(List<LanguageLabelMapping> mapping)
Sets the custom mapping of error codes to language labels.void
setCustomRoleIds(List<String> customRoles)
Set the custom roles Id's.void
setDescription(String description)
Sets the description of this variant.void
setFavorite(boolean favorite)
Sets whether this variant is a favorite.void
setFormLogicComponentDefinition(FormLogicComponentDefinition formLogicComponentDefinition)
Sets the reference to the form logic component definition.void
setOriginIdentifier(String originIdentifier)
Sets the origin identifier.void
setParameterVariantDefinitions(List<ParameterDefinition> parameterDefintions)
Sets the parameter variant definitions.void
setSelectedRole(String mySelectedRole)
Set the selected for this variant.void
setTitle(String title)
Sets the title of this variant.void
setVariantPermissionDefinition(boolean myVariantPermissionDefinition)
Set variant check option for this variant.void
setVariantType(int type)
Sets the type of this variant.-
Methods inherited from interface nl.gx.forms.wmpformapi.api.logicdefinition.FormLogicComponentDefinition
addOrUpdateLanguageLabelMapping, createParameterDefinition, getComponentId, getComponentVersion, getDefaultLanguageLabelMapping, getErrorCodes, getFormLogicProviderComponent, getHelpText, getHelpTextLanguageLabel, getIdentifier, getJSFunction, getLanguageLabelMappingByCode, getMessage, getParameterDefinitionByIdentifier, getParameterDefinitions, getTitle, getTitleLanguageLabel, isAllowedToRunClientSide, setAllowedToRunClientSide, setComponentId, setComponentVersion, setDefaultLanguageLabelMapping, setErrorCodes, setHelpTextLanguageLabel, setIdentifier, setJSFunction, setParameterDefinitions, setTitleLanguageLabel
-
Methods inherited from interface nl.gx.webmanager.services.entitymanager.Identifiable
getId, setId
-
-
-
-
Method Detail
-
setFormLogicComponentDefinition
void setFormLogicComponentDefinition(FormLogicComponentDefinition formLogicComponentDefinition)
Sets the reference to the form logic component definition.- Parameters:
formLogicComponentDefinition
- the formLogicComponentDefinition that is being referenced to.
-
getFormLogicComponentDefinition
FormLogicComponentDefinition getFormLogicComponentDefinition()
Returns the reference to the form logic component definition.- Returns:
- the reference to the form logic component definition.
-
setDescription
void setDescription(String description)
Sets the description of this variant.- Parameters:
description
- of this variant.
-
getDescription
String getDescription()
Returns description of this variant.- Returns:
- description of this variant
-
isFavorite
boolean isFavorite()
Returns whether this variant is a favorite.- Returns:
- true if it is a favorite variant
-
setFavorite
void setFavorite(boolean favorite)
Sets whether this variant is a favorite.- Parameters:
favorite
- Whether this variant is a favorite.
-
setTitle
void setTitle(String title)
Sets the title of this variant.- Parameters:
title
- of this variant.
-
setParameterVariantDefinitions
void setParameterVariantDefinitions(List<ParameterDefinition> parameterDefintions)
Sets the parameter variant definitions.- Parameters:
parameterDefintions
- the parameter definitions
-
getParameterVariantDefinitions
List<ParameterDefinition> getParameterVariantDefinitions()
Returns the parameter variant definitions.- Returns:
- the parameter variant definitions
-
createParameterVariantDefinition
ParameterDefinition createParameterVariantDefinition(ParameterDefinition reference)
Creates a new definition for a parameter variant with the specified identifier.- Parameters:
identifier
- the identifier of the new parameter- Returns:
- the new definition for a parameter
-
getCustomLanguageLabelMapping
List<LanguageLabelMapping> getCustomLanguageLabelMapping()
Returns the custom mapping of error codes to language labels.- Returns:
- a list of custom language label mappings
-
setCustomLanguageLabelMapping
void setCustomLanguageLabelMapping(List<LanguageLabelMapping> mapping)
Sets the custom mapping of error codes to language labels.- Parameters:
mapping
- the custom mapping of error codes to language labels
-
getCustomLanguageLabelMappingByCode
LanguageLabelMapping getCustomLanguageLabelMappingByCode(String errorCode)
Returns the language label mapping for the specified error code.- Parameters:
errorCode
- the error code for which to lookup the language label mapping- Returns:
- the language label mapping in question or null if it could not be found
-
addOrUpdateCustomLanguageLabelMapping
LanguageLabelMapping addOrUpdateCustomLanguageLabelMapping(String errorCode, String languageLabelKey)
Creates and adds a new language label mapping or updates an existing one. The mapping is from the specified error code to the specified language label key.- Parameters:
errorCode
- the errorcode for which to create or update a language label mappinglanguageLabelKey
- the key of the language label- Returns:
- the language label mapping in question
-
setOriginIdentifier
void setOriginIdentifier(String originIdentifier)
Sets the origin identifier. This is a unique identifier that can be used to reconnect links to variants during import.- Parameters:
originIdentifier
- the origin identifier.
-
getOriginIdentifier
String getOriginIdentifier()
Returns the origin identifier. This is a unique identifier that can be used to reconnect links to variants during import.- Returns:
- the origin identifier
-
setCustomRoleIds
void setCustomRoleIds(List<String> customRoles)
Set the custom roles Id's.- Parameters:
customRoles
-
-
isVariantPermissionDefinition
boolean isVariantPermissionDefinition()
check variant- Returns:
-
setVariantPermissionDefinition
void setVariantPermissionDefinition(boolean myVariantPermissionDefinition)
Set variant check option for this variant.- Parameters:
myVariantPermissionDefinition
-
-
getSelectedRole
String getSelectedRole()
- Returns:
- all selected roles.
-
setSelectedRole
void setSelectedRole(String mySelectedRole)
Set the selected for this variant.- Parameters:
mySelectedRole
-
-
addRole
void addRole(String selectedRole)
Add selected roles.- Parameters:
selectedRole
-
-
getVariantType
int getVariantType()
Returns type of this variant.- Returns:
- type of this variant
-
setVariantType
void setVariantType(int type)
Sets the type of this variant.- Parameters:
type
- of this variant.
-
-