Class ApplicationAttributeRepository

java.lang.Object
com.e1c.g5.dt.internal.applications.ApplicationAttributeRepository
All Implemented Interfaces:
IApplicationAttributeRepository

public class ApplicationAttributeRepository extends Object implements IApplicationAttributeRepository
The default implementation of IApplicationAttributeRepository that combines repositories registered for extension point com.e1c.g5.dt.applications.applicationContributions/attributeManager. If there are no registered repository it uses the PreferenceBasedAttributeRepository by default.
  • Constructor Details

    • ApplicationAttributeRepository

      public ApplicationAttributeRepository()
  • Method Details

    • setAttribute

      public void setAttribute(IApplication application, String key, String value)
      Description copied from interface: IApplicationAttributeRepository
      Sets the specified attribute for the given application.
      Specified by:
      setAttribute in interface IApplicationAttributeRepository
      Parameters:
      application - the application to set the attribute, cannot be null.
      key - the string field that represents the key of the attribute, cannot be null.
      value - the string field that represents the value of the attribute, can be null.
    • getAttribute

      public Optional<String> getAttribute(IApplication application, String key)
      Description copied from interface: IApplicationAttributeRepository
      Returns the attribute value by the key for the specified application.
      Specified by:
      getAttribute in interface IApplicationAttributeRepository
      Parameters:
      application - the application to obtain the attribute, cannot be null.
      key - the string field that represents the key of the attribute, cannot be null.
      Returns:
      the string field that represents the value of the attribute, never null.