Interface IWithTargetProperties

    • Method Detail

      • getTargetProperties

        default Map<String,​Property> getTargetProperties​(LocaleId locale)
        Returns:
        Map of target properties for the implementer of interface
      • createTargetProperty

        default Property createTargetProperty​(LocaleId locId,
                                              String name,
                                              boolean overwriteExisting,
                                              int creationOptions)
        Create target Property without access to the source property
        Parameters:
        locId -
        name -
        overwriteExisting -
        creationOptions -
        Returns:
      • createTargetProperty

        default Property createTargetProperty​(LocaleId locId,
                                              String name,
                                              Property sourceProperty,
                                              boolean overwriteExisting,
                                              int creationOptions)
        Creates or get a target property based on the corresponding source.
        Parameters:
        locId - The target locale to use.
        name - The name of the property to create (or retrieve)
        sourceProperty - The source property of the same name
        overwriteExisting - True to overwrite any existing property. False to not create a new property if one exists already.
        creationOptions - Creation options:
        • CREATE_EMPTY: Creates an empty property, only the read-only flag of the source is copied.
        • COPY_CONTENT: Creates a new property with all its data copied from the source.
        Returns:
        The property that was created, or retrieved.
      • getTargetLocales

        default Set<LocaleId> getTargetLocales()
        Gets all the target locales for this resource.
        Returns:
        all the target locales for this resource.
      • getTargetProperty

        default Property getTargetProperty​(LocaleId locId,
                                           String name)
        Gets the target property for a given name and target locale.
        Parameters:
        locId - the locale of the property to retrieve.
        name - The name of the property to retrieve. This name is case-sensitive.
        Returns:
        The property or null if it does not exist.
      • getTargetPropertyNames

        default Set<String> getTargetPropertyNames​(LocaleId locId)
        Gets the names of all the properties for a given target locale in this resource.
        Parameters:
        locId - the target locale to query.
        Returns:
        all the names of the target properties for the given locale in this resource.
      • hasTargetProperty

        default boolean hasTargetProperty​(LocaleId locId,
                                          String name)
        Indicates if a property exists for a given name and target locale.
        Parameters:
        locId - the target locale to query.
        name - the name of the property to query.
        Returns:
        true if a property exists, false otherwise.
      • removeTargetProperty

        default void removeTargetProperty​(LocaleId locId,
                                          String name)
        Removes a target property of a given name. If the property does not exists nothing happens.
        Parameters:
        locId - The target locale for which this property should be set.
        name - The name of the property to remove.
      • setTargetProperty

        default Property setTargetProperty​(LocaleId locId,
                                           Property property)
        Sets a target property. If a property already exists it is overwritten.
        Parameters:
        locId - The target locale for which this property should be set.
        property - The new property to set. This name is case-sensitive.
        Returns:
        The property that has been set.