Class PreferenceBasedApplicationSettigsStore

java.lang.Object
com.e1c.g5.dt.internal.applications.PreferenceBasedApplicationSettigsStore

public final class PreferenceBasedApplicationSettigsStore extends Object
The store that saves and loads application defaults: default applications and URL accesses for projects.
  • Constructor Details

    • PreferenceBasedApplicationSettigsStore

      public PreferenceBasedApplicationSettigsStore()
  • Method Details

    • initialize

      public void initialize(com.e1c.g5.dt.internal.applications.PreferenceBasedApplicationSettigsStore.IApplicationProvider applicationProvider) throws ApplicationException
      Initializes the store.
      Parameters:
      applicationProvider - the application provider, cannot be null
      Throws:
      ApplicationException - if initialization failed with some reason
    • getDefaultApplication

      public Optional<IApplication> getDefaultApplication(org.eclipse.core.resources.IProject project) throws ApplicationException
      Returns the default registered project application.
      Parameters:
      project - the project to get default application for, cannot be null
      Returns:
      the optional default registered project application
      Throws:
      ApplicationException - if method call failed with some reason
    • getDefaultUrlAccess

      public Optional<IUrlAccess> getDefaultUrlAccess(IApplication application) throws ApplicationException
      Returns the default URL access instance for the provided application.
      Parameters:
      application - the application, cannot be null
      Returns:
      the optional default URL access instance for the provided application
      Throws:
      ApplicationException - if method call failed with some reason
    • setDefaultApplication

      public Optional<IApplication> setDefaultApplication(org.eclipse.core.resources.IProject project, IApplication application) throws ApplicationException
      Stores the default registered project application.
      Parameters:
      project - the project to get application for, cannot be null
      the - default project application to register for the project or null to reset
      Returns:
      the previous default value if present
      Throws:
      ApplicationException - if method call failed with some reason
    • setDefaultUrlAccess

      public Optional<IUrlAccess> setDefaultUrlAccess(IApplication application, IUrlAccess newUrlAccess) throws ApplicationException
      Stores the default URL access instance for the provided application.
      Parameters:
      application - the application, cannot be null
      newUrlAccess - the default URL access instance to register for the provided application or null to reset
      Returns:
      the previous default value if present
      Throws:
      ApplicationException - if method call failed with some reason