Class DigesterFactory

java.lang.Object
com.lf.commons.lang.ManagedFactory
com.lf.digester.core.DigesterFactory

public class DigesterFactory extends com.lf.commons.lang.ManagedFactory
Factory class for vending various objects of the digester package.

Whenever possible, this factory will hand out references to shared instances. Use this if you need many, many objects of one single type while running your application and it is acceptable for you to continously use a certain amount of memory for the cached object. If you only use instances once then you should either install an object as usual (by calling new), or let this factory create a shared instance and flush the factory after you're finished with the object. The garbage collector will then release memory on-the-fly as the objects are no longer referenced so the overall memory footprint can be very small. You should keep the shared instances created by this class if you make heavy use of the supported classes (currently DigesterSettings).

Since:
1.5
Author:
Axel Schwolow
  • Field Details

    • ID_STATUS

      public static final String ID_STATUS
      Identifier for shared StatusDialog instance.
    • ID_CAPTURE

      public static final String ID_CAPTURE
      Identifier for shared CaptureDialog instance.
    • ID_HELP

      public static final String ID_HELP
      Identifier for shared HelpDialog instance.
    • ID_GENERATE_WIZARD

      public static final String ID_GENERATE_WIZARD
      Identifier for shared GenerateWizard instance.
    • ID_RELEASE_NOTES

      public static final String ID_RELEASE_NOTES
      Identifier for shared NotesDialog instance.
    • ID_REGISTER

      public static final String ID_REGISTER
      Identifier for shared RegisterDialog instance.
    • ID_OPTIONS_DIALOG

      public static final String ID_OPTIONS_DIALOG
      Identifier for shared OptionsDialog instance.
    • ID_SYNC_WIZARD

      public static final String ID_SYNC_WIZARD
      Identifier for shared SyncWizard instance.
    • ID_EVALUATION_DIALOG

      public static final String ID_EVALUATION_DIALOG
      Identifier for shared EvaluationDialog instance.
    • ID_NET_MONITOR

      public static final String ID_NET_MONITOR
      Identifier for shared VFSNetMonitor instance.
  • Constructor Details

    • DigesterFactory

      public DigesterFactory()
      Constructs an instance of this factory.

      Since:
      1.5
  • Method Details

    • getSharedInstance

      public static DigesterFactory getSharedInstance()
      Provides the shared instance of the factory implementation.

      Returns:
      Shared instance of the factory
      Since:
      1.5
    • request

      public Object request(Object id)
      Create the factory shared object, recycle if already existing.

      This method can only be done by the sub classes since every shared object can have its own specialities needed for creation.

      Specified by:
      request in class com.lf.commons.lang.ManagedFactory
      Parameters:
      id - The factory-unique identifier of the shared object
      Returns:
      The shared object, null if none could be created
      Since:
      1.5
    • getApplicationProperties

      public static Properties getApplicationProperties(boolean english)
      Provides the application specific settings used by the ApplicationTab class.

      Parameters:
      english - Setting descriptions in English?
      Returns:
      Container with settings
      Since:
      1.6
    • canRelease

      public boolean canRelease(Object id)
      Checks whether a factory shared object can be released or not.

      Specified by:
      canRelease in class com.lf.commons.lang.ManagedFactory
      Parameters:
      id - The factory-unique identifier of the shared object
      Returns:
      Can the object be released according to the factories needs?
      Since:
      1.5
    • cleanup

      public void cleanup(Object id)
      Perform optional cleanup tasks like closing database connections or disposing dialogs.

      Specified by:
      cleanup in class com.lf.commons.lang.ManagedFactory
      Parameters:
      id - The factory-unique identifier of the shared object
      Since:
      1.5
    • getAboutTitle

      public static String getAboutTitle()
      Provides a data portion used by the AboutTab.

      Returns:
      The title
      Since:
      1.6
    • getAboutBuild

      public static String getAboutBuild()
      Provides a data portion used by the AboutTab.

      Returns:
      The build
      Since:
      1.6
    • getAboutIcon

      public static ImageIcon getAboutIcon()
      Provides a data portion used by the AboutTab.

      Returns:
      The icon
      Since:
      1.6
    • getAboutSplash

      public static ImageIcon getAboutSplash()
      Provides a data portion used by the AboutTab.

      Returns:
      The icon
      Since:
      1.6
    • getAboutInfo

      public static String getAboutInfo()
      Provides a data portion used by the AboutTab.

      Returns:
      The icon
      Since:
      1.6