Package com.lf.digester.core
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 Summary
Modifier and TypeFieldDescriptionstatic final String
Identifier for sharedCaptureDialog
instance.static final String
Identifier for sharedEvaluationDialog
instance.static final String
Identifier for sharedGenerateWizard
instance.static final String
Identifier for sharedHelpDialog
instance.static final String
Identifier for sharedVFSNetMonitor
instance.static final String
Identifier for sharedOptionsDialog
instance.static final String
Identifier for sharedRegisterDialog
instance.static final String
Identifier for sharedNotesDialog
instance.static final String
Identifier for sharedStatusDialog
instance.static final String
Identifier for sharedSyncWizard
instance. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canRelease
(Object id) Checks whether a factory shared object can be released or not.void
Perform optional cleanup tasks like closing database connections or disposing dialogs.static String
Provides a data portion used by theAboutTab
.static ImageIcon
Provides a data portion used by theAboutTab
.static String
Provides a data portion used by theAboutTab
.static ImageIcon
Provides a data portion used by theAboutTab
.static String
Provides a data portion used by theAboutTab
.static Properties
getApplicationProperties
(boolean english) Provides the application specific settings used by theApplicationTab
class.static DigesterFactory
Provides the shared instance of the factory implementation.Create the factory shared object, recycle if already existing.Methods inherited from class com.lf.commons.lang.ManagedFactory
getRegisteredObjects, hasSharedInstance, release, releaseByStrategy, releaseForced, set
-
Field Details
-
ID_STATUS
Identifier for sharedStatusDialog
instance. -
ID_CAPTURE
Identifier for sharedCaptureDialog
instance. -
ID_HELP
Identifier for sharedHelpDialog
instance. -
ID_GENERATE_WIZARD
Identifier for sharedGenerateWizard
instance. -
ID_RELEASE_NOTES
Identifier for sharedNotesDialog
instance. -
ID_REGISTER
Identifier for sharedRegisterDialog
instance. -
ID_OPTIONS_DIALOG
Identifier for sharedOptionsDialog
instance. -
ID_SYNC_WIZARD
Identifier for sharedSyncWizard
instance. -
ID_EVALUATION_DIALOG
Identifier for sharedEvaluationDialog
instance. -
ID_NET_MONITOR
Identifier for sharedVFSNetMonitor
instance.
-
-
Constructor Details
-
DigesterFactory
public DigesterFactory()Constructs an instance of this factory.- Since:
- 1.5
-
-
Method Details
-
request
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 classcom.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
Provides the application specific settings used by theApplicationTab
class.- Parameters:
english
- Setting descriptions in English?- Returns:
- Container with settings
- Since:
- 1.6
-
canRelease
Checks whether a factory shared object can be released or not.- Specified by:
canRelease
in classcom.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
Perform optional cleanup tasks like closing database connections or disposing dialogs.- Specified by:
cleanup
in classcom.lf.commons.lang.ManagedFactory
- Parameters:
id
- The factory-unique identifier of the shared object- Since:
- 1.5
-
getAboutTitle
Provides a data portion used by theAboutTab
.- Returns:
- The title
- Since:
- 1.6
-
getAboutBuild
Provides a data portion used by theAboutTab
.- Returns:
- The build
- Since:
- 1.6
-
getAboutIcon
Provides a data portion used by theAboutTab
.- Returns:
- The icon
- Since:
- 1.6
-
getAboutSplash
Provides a data portion used by theAboutTab
.- Returns:
- The icon
- Since:
- 1.6
-
getAboutInfo
Provides a data portion used by theAboutTab
.- Returns:
- The icon
- Since:
- 1.6