public interface SuiteManager
ManagerFactory
.Modifier and Type | Method and Description |
---|---|
void |
addSuiteListener(SuiteListener theListener)
Adds a
SuiteListener . |
Suite |
getSuite(java.lang.String vendor,
java.lang.String name)
Returns the instance of the installed
Suite . |
SuiteInstaller |
getSuiteInstaller(byte[] instData,
int offset,
int length,
boolean ignoreUpdateLock,
SuiteStateFlag suiteInitialState)
Returns
SuiteInstaller . |
SuiteInstaller |
getSuiteInstaller(java.lang.String locationUrl,
boolean ignoreUpdateLock,
SuiteStateFlag suiteInitialState)
Returns
SuiteInstaller . |
java.util.List<Suite> |
getSuites(SuiteType type)
Request a list of installed suites of specified type.
|
void |
removeSuite(Suite suite,
boolean ignoreRemoveLock)
Removes a
Suite . |
void |
removeSuiteListener(SuiteListener theListener)
Removes a
SuiteListener . |
SuiteInstaller getSuiteInstaller(java.lang.String locationUrl, boolean ignoreUpdateLock, SuiteStateFlag suiteInitialState) throws java.lang.SecurityException, java.lang.IllegalArgumentException
SuiteInstaller
.
To be able to retreive the application installer, caller application should
request javax.microedition.swm.SWMPermission("installation")
permission.
The function can result in network access for the application descriptor acquiring.
The resulting SuiteInstaller
can be used for both, the
installation of an application suite being new to the device (in this case
the parameter ignoreUpdateLock
, see below, is without meaning),
or the update of an application suite that had already been installed
on the device before.
locationUrl
- URL indicating the network location where
the jad/jar files can be retrieved fromignoreUpdateLock
- if true
the application suite
components will be updated even if lock for update is set.
This option should be used with caution and programmers should always
set this parameter to false
.suiteInitialState
- the initial state of the suite to installSuiteInstaller
java.lang.SecurityException
- if the caller application does not have the required
javax.microedition.swm.SWMPermission("installation")
permissionjava.lang.IllegalArgumentException
- if the locationUrl is not a valid URL,
the server is not reachable, or the suiteInitialState has an invalid valueSuiteInstaller getSuiteInstaller(byte[] instData, int offset, int length, boolean ignoreUpdateLock, SuiteStateFlag suiteInitialState) throws java.lang.SecurityException, java.lang.IllegalArgumentException
SuiteInstaller
.
To be able to retreive the application installer, caller application should
request javax.microedition.swm.SWMPermission("installation")
permission.
A SuiteInstaller can be used to install the application from an in-memory buffer, where the raw jar file bytes have been brought to before.
The resulting SuiteInstaller
can be used for both, the
installation of an application suite being new to the device (in this case
the parameter ignoreUpdateLock
, see below, is without meaning),
or the update of an application suite that had already been installed
on the device before.
instData
- in-memory buffer where the installation data (raw jar
bytes) can be retrieved fromoffset
- offset within the in-memory buffer the installation
data will be retrieved fromlength
- length of the installation data to be retrieved from
the in-memory bufferignoreUpdateLock
- if true
the application suite
components will be updated even if lock for update is set.
This option should be used with caution and programmers should always
set this parameter to false
.suiteInitialState
- the initial state of the suite to installSuiteInstaller
java.lang.SecurityException
- if the caller application does not have the required
javax.microedition.swm.SWMPermission("installation")
permissionjava.lang.IllegalArgumentException
- if the byte array is empty, the offset
or offset+length
exceeds the boundaries of the
byte array, or the suiteInitialState has an invalid valueSuite getSuite(java.lang.String vendor, java.lang.String name)
Suite
.vendor
- vendor name of the requested suitename
- the name of the suiteSuite
instance of the application
or null
if no application was foundjava.util.List<Suite> getSuites(SuiteType type)
type
- must be one of:
SuiteType.APPLICATION
, SuiteType.LIBRARY
, or
SuiteType.LINK
Suite
instancesvoid addSuiteListener(SuiteListener theListener)
SuiteListener
. Several listeners can be added, all get
notified about state changes of suites.theListener
- SuiteListener
to be addedvoid removeSuiteListener(SuiteListener theListener)
SuiteListener
.theListener
- SuiteListener
to be removedvoid removeSuite(Suite suite, boolean ignoreRemoveLock) throws SuiteLockedException, SuiteNotFoundException
Suite
. This is a synchronous method.
If it is processed normally (without throwing an exception), it
MUST be guaranteed that the specified Suite
is removed
afterwards.
Every call to this method creates a new instance of
SuiteManagementTracker
that is assigned to the Suite
instance of the suite to be removed.
If the suite uses resources being used by other components, those MUST be guaranteed to remain available. Resources MUST NOT be released until they are not in use anymore.
suite
- the suite to be removedignoreRemoveLock
- if true
suite
is removed
even if it has state flag SuiteStateFlag.REMOVE_DENIED
SuiteLockedException
- is thrown, if suite
is locked
and the ignoreRemoveLock
parameter is set to
false
.
In some implementation specific cases this exception MAY be also
thrown if the ignoreRemoveLock
parameter is set to
true
.
For details about when suite
is called locked
, see SuiteLockedException
.SuiteNotFoundException
- is thrown if the suite has already been
removedCopyright (c) 2013, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.