Package de.xima.fc.interfaces.workflow
Interface Label.Custom
-
- All Superinterfaces:
Label
,javax.validation.Payload
- All Known Subinterfaces:
IUploadConsuming.uploadElements
,MultiFile.resources
,MultiFile.searchFilename
,MultiFile.urls
,SingleFile.resource
,SingleFile.searchFilename
,SingleFile.url
- Enclosing interface:
- Label
public static interface Label.Custom extends Label
Use a custom label. Takes the nested path of the class extending this, and uses it as a lookup key in the resources bundle. Plugins should create a custom class that extends from this interface and specify the resource bundle. For example:abstract class BaseModel { @NotEmpty(payload = BaseModel.username) private String username; private static class username extends Label.Custom { public ResourceBundle getBundle() { // Get bundle from somewhere return I18nHelper.getResourceBundle(); } } }
You should then add the keyBaseModel.username
to your resource bundle.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.xima.fc.interfaces.workflow.Label
Label.Custom, Label.Include, Label.Omit
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ResourceBundle
getBundle()
Gets the resource bundle to use for looking up the label.
-
-
-
Method Detail
-
getBundle
default ResourceBundle getBundle()
Gets the resource bundle to use for looking up the label. When this returnsnull
, the default resource bundle from the formcycle application is used. This method should be overridden by plugins.- Returns:
- The resource bundle to use for looking up the label.
-
-