public interface IWithTargetProperties
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(IWithTargetProperties from,
IWithTargetProperties to)
Copy all
IWithTargetProperties Unless destination already has the
property. Target LocaleId not found in the destination are added
then properties are copied. |
default Property |
createTargetProperty(LocaleId locId,
String name,
boolean overwriteExisting,
int creationOptions)
Create target
Property without access to the source property |
default Property |
createTargetProperty(LocaleId locId,
String name,
Property sourceProperty,
boolean overwriteExisting,
int creationOptions)
Creates or get a target property based on the corresponding source.
|
Annotations |
getAnnotations() |
default Set<LocaleId> |
getTargetLocales()
Gets all the target locales for this resource.
|
default Map<String,Property> |
getTargetProperties(LocaleId locale) |
default Property |
getTargetProperty(LocaleId locId,
String name)
Gets the target property for a given name and target locale.
|
default Set<String> |
getTargetPropertyNames(LocaleId locId)
Gets the names of all the properties for a given target locale in this resource.
|
default boolean |
hasTargetProperty(LocaleId locId,
String name)
Indicates if a property exists for a given name and target locale.
|
default void |
removeTargetProperty(LocaleId locId,
String name)
Removes a target property of a given name.
|
default Property |
setTargetProperty(LocaleId locId,
Property property)
Sets a target property.
|
static void copy(IWithTargetProperties from, IWithTargetProperties to)
IWithTargetProperties Unless destination already has the
property. Target LocaleId not found in the destination are added
then properties are copied. Properties are cloned before copying.from - source of IWithTargetPropertiesto - destination of IWithTargetPropertiesdefault Map<String,Property> getTargetProperties(LocaleId locale)
Map of target properties for the implementer of interfacedefault Property createTargetProperty(LocaleId locId, String name, boolean overwriteExisting, int creationOptions)
Property without access to the source propertylocId - name - overwriteExisting - creationOptions - default Property createTargetProperty(LocaleId locId, String name, Property sourceProperty, boolean overwriteExisting, int creationOptions)
locId - The target locale to use.name - The name of the property to create (or retrieve)sourceProperty - The source property of the same nameoverwriteExisting - True to overwrite any existing property.
False to not create a new property if one exists already.creationOptions - Creation options:
Annotations getAnnotations()
Annotations for the implementer of interfacedefault Set<LocaleId> getTargetLocales()
default Property getTargetProperty(LocaleId locId, String name)
locId - the locale of the property to retrieve.name - The name of the property to retrieve. This name is case-sensitive.default Set<String> getTargetPropertyNames(LocaleId locId)
locId - the target locale to query.default boolean hasTargetProperty(LocaleId locId, String name)
locId - the target locale to query.name - the name of the property to query.default void removeTargetProperty(LocaleId locId, String name)
locId - The target locale for which this property should be set.name - The name of the property to remove.default Property setTargetProperty(LocaleId locId, Property property)
locId - The target locale for which this property should be set.property - The new property to set. This name is case-sensitive.Copyright © 2021. All rights reserved.