com.microfocus.awm.core.internal.util

## Class TaurusApplicationUpdater

- java.lang.Object
- - java.util.Observable
  - - com.microfocus.awm.core.internal.util.TaurusApplicationUpdater

-     public class TaurusApplicationUpdater
      extends java.util.Observable

  Helper class to check for- and execute AWM application updates.

  This is an internal class which should not used by clients.

  Author:
    Ralf Pakosch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaurusApplicationUpdater()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TaurusApplicationUpdater` | `getInstance()` Gets the `TaurusApplicationUpdater`'s singleton instance.
    `ITaurusApplication.EModelUpdateStatus` | `getUpdateStatus(ITaurusApplication pAppl)` Gets the model update status for the given application.
    `void` | `setUpdateStatus(ITaurusApplication pAppl, ITaurusApplication.EModelUpdateStatus pNewStatus)` Sets the update status for the given application.
    `void` | `updateApplications(java.util.List<ITaurusApplication> pOriginalAppls, java.util.List<ITaurusApplication> pNewAppls)` Helper method to update a list of existing applications with a list of new ones.
    `boolean` | `updateCheck(TAURUSConfiguration pTauConf, org.eclipse.core.runtime.IProgressMonitor pMon)` Checks whether the currently loaded TAURUS Application needs to be updated.
    `void` | `updateModel(ITaurusApplication pAppl, org.eclipse.core.runtime.IProgressMonitor pMon)` Updates the given application.

    - ### Methods inherited from class java.util.Observable

      `addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaurusApplicationUpdater

          public TaurusApplicationUpdater()

  - ### Method Detail

    - #### getInstance

          public static TaurusApplicationUpdater getInstance()

      Gets the `TaurusApplicationUpdater`'s singleton instance.
      Returns:
        the instance

    - #### updateModel

          public void updateModel(ITaurusApplication pAppl,
                                  org.eclipse.core.runtime.IProgressMonitor pMon)
                           throws TaurusCoreException

      Updates the given application. Opens an informational dialog.
      Parameters:
        `pAppl` - the applications that should be updated
        `pMon` - a progress monitor
      Throws:
        `TaurusCoreException` - if the update failed
      See Also:
        `updateCheck(TAURUSConfiguration, IProgressMonitor)`

    - #### updateCheck

          public boolean updateCheck(TAURUSConfiguration pTauConf,
                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                              throws TaurusCoreException

      Checks whether the currently loaded TAURUS Application needs to be updated.
      Returns `false` if:
    - No TAURUS Application loaded
    - The given `TAURUSConfiguration` does not belong to the currently loaded Application
    - The update flag of the loaded Application is set to `ITaurusApplication.EModelUpdateStatus.UPDATE_SUSPENDED`
    - The version numbers from the given `TAURUSConfiguration` and the corresponding entry in the Master Configuration are equal

Parameters:
  `pTauConf` - a `TAURUSConfiguration`
  `pMon` - a progress monitor
Returns:
  `true` if the currently loaded TAURUS Application needs to be updated and `false` otherwise.
Throws:
  `TaurusCoreException` - when the Application attributes can not be refreshed

- #### setUpdateStatus

      public void setUpdateStatus(ITaurusApplication pAppl,
                                  ITaurusApplication.EModelUpdateStatus pNewStatus)

  Sets the update status for the given application.
  Parameters:
    `pAppl` - the application to set the status for
    `pNewStatus` - the new status

- #### getUpdateStatus

      public ITaurusApplication.EModelUpdateStatus getUpdateStatus(ITaurusApplication pAppl)

  Gets the model update status for the given application.
  Parameters:
    `pAppl` - the application to get the status from
  Returns:
    the `ITaurusApplication.EModelUpdateStatus`

- #### updateApplications

      public void updateApplications(java.util.List<ITaurusApplication> pOriginalAppls,
                                     java.util.List<ITaurusApplication> pNewAppls)

  Helper method to update a list of existing applications with a list of new ones. This is to keep old object instances while updating their attributes. The result will be an updated list of original applications with the same size as the list of new applications.
  Parameters:
    `pOriginalAppls` - the original (old) applications. This list can be modified by the method.
    `pNewAppls` - the new applications (result of the last master configuration parsing)

Copyright © 2015 Micro Focus GmbH. All rights reserved.