Oracle® Java ME Embedded Application Management System API Guide Release 3.4 E35109-03 |
|
Previous |
Next |
This chapter introduces the Suite Storage Manager. The Suite Storage Manager and its associated classes provide the primary interface for accessing all application, library, and link suites that are stored on the system.
The SuiteStoreManager
interface is obtained from the AmsFactory
class and provides the main access to the applications, libraries, and links that have been installed on the AMS. Using the methods in this interface, the programmer can query against a suite for a specific name, vendor, or suite type. In addition, the programmer can install a listener that listens for changes in the suite storage.
The SuiteStoreManager
interface has the following methods:
SuiteInfo getSuiteInfo(java.lang.String vendor, java.lang.String name)
This method returns a SuiteInfo
descriptor of installed suite, given the name of the vendor and the suite. See "SuiteInstaller Interface" for more information on the SuiteInfo
interface.
SuiteInfo[] getSuites(int types)
This method returns list of installed suites of specified types, where the suite type is a constant in the SuiteInfo
interface (SuiteInfo.ST_APPLICATION
, SuiteInfo.ST_LIBRARY
, or SuiteInfo.ST_LINK
)
AppSuite[] getAppSuites()
This method returns a list of the currently installed app suites of type SuiteInfo.ST_APPLICATION
.
LibSuite[] getLibSuites()
This method returns a list of the currently installed library suites of type SuiteInfo.ST_LIBRARY
.
SuiteInfo[] getLinkSuites()
This method returns a list of the currently installed link suites of type SuiteInfo.ST_LINK
.
void setStatusListener(SuiteStoreListener theListener)
This method assigns a SuiteStoreListener
implementation to listen for changes to application suites. The programmer can also pass in null
to remove the current listener.
The SuiteStoreListener
is an interface that is used to monitor changes to the suite storage. There are five methods that are called by the SuiteStoreManager
to indicate that the state of a suite is changing. Each method passes in the SuiteInfo
descriptor of the app, library, or link in question.
void notifySuiteInstalled(SuiteInfo suite)
This method is called to notify a listener that a suite has been installed.
void notifySuiteRemoved(SuiteInfo suite)
This method is called to notify a listener that a suite has been removed.
SuiteInstallerProgressListener notifySuiteInstalling(SuiteInfo suite)
This method is called to notify a listener that a suite is installing. The method must return an instance of SuiteInstallerProgressListener
to be notified about installation process, or null
if no notifications are required.
void notifySuiteSettingsChanged(SuiteInfo suite)
This method is called to notify a listener that the suite settings have been changed.
void notifySuiteStateChanged(SuiteInfo suite)
This method is called to notify a listener that the state of a suite has changed.