public class Suite
extends java.lang.Object
SuiteStateFlags
AVAILABLE
and SuiteStateFlag.ENABLED
.
Flags can be changed then using the setSuiteStateFlag
method.Modifier and Type | Field and Description |
---|---|
static Suite |
SYSTEM_SUITE
Special object symbolizing the system as
Suite . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object suite2)
Compares the current suite with another
Suite instance. |
java.util.Iterator<java.lang.String> |
getAttributes()
Retrieves a list of available JAD / manifest attributes.
|
java.lang.String |
getAttributeValue(java.lang.String name)
Requests JAD /manifest attribute value for given attribute name.
|
java.util.Iterator<Suite> |
getDependencies()
Retrieves a list of the shared libraries this
Suite depends on
|
java.lang.String |
getDownloadUrl()
Gets the URL that the suite descriptor was downloaded from.
|
java.util.Iterator<java.lang.String> |
getMIDlets()
Retrieve a list of the applications (application class names) of this suite.
|
java.lang.String |
getName()
Get name for given suite.
|
SuiteType |
getSuiteType()
Get suite type.
|
java.lang.String |
getVendor()
Get vendor name for given suite
|
java.lang.String |
getVersion()
Get the version of the given suite.
|
int |
hashCode()
Overrides hashCode() method.
|
boolean |
isInstalled()
Checks if this Suite is still installed or has been removed.
|
boolean |
isSuiteState(SuiteStateFlag state)
Checks whether the specified flag is set.
|
boolean |
isTrusted()
Checks if this Suite is trusted or not.
|
void |
setSuiteStateFlag(SuiteStateFlag state,
boolean value)
Sets the specified flag to the specified value.
|
public static final Suite SYSTEM_SUITE
Suite
.public java.lang.String getName()
SYSTEM_SUITE
public java.lang.String getVendor()
SYSTEM_SUITE
public java.lang.String getVersion()
SYSTEM_SUITE
public java.lang.String getDownloadUrl()
null
.SYSTEM_SUITE
or if a call to
isSuiteState
(SuiteStateFlag.PREINSTALLED
) returns
true
public java.util.Iterator<java.lang.String> getAttributes()
SYSTEM_SUITE
public java.lang.String getAttributeValue(java.lang.String name)
name
- the name of the JAD / manifest attributenull
if JAD attribute with
given name was not found (this is always the case for
SYSTEM_SUITE
)public SuiteType getSuiteType()
public boolean isSuiteState(SuiteStateFlag state)
state
- state flag to be check fortrue
if state flag is set, false
otherwisepublic void setSuiteStateFlag(SuiteStateFlag state, boolean value) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException
If a Suite
has been created, SuiteStateFlag.ENABLED
and SuiteStateFlag.AVAILABLE
are always set to true
,
while SuiteStateFlag.REMOVE_DENIED
and
SuiteStateFlag.UPDATE_DENIED
are set to false
.
This can be changes by calling this method. (the flags
SuiteStateFlag.SYSTEM
and SuiteStateFlag.PREINSTALLED
are only set for system suites or pre-installed suites, respectively,
and cannot be unset or set by this method.)
To be able to set suite flags, caller application should
request javax.microedition.swm.SWMPermission("client",
"manageSuite")
or javax.microedition.swm.SWMPermission
("crossClient", "manageSuite")
permission (see
for details).SWMPermission
state
- state flag to be set, must be one of
SuiteStateFlag.ENABLED
,
SuiteStateFlag.AVAILABLE
,
SuiteStateFlag.REMOVE_DENIED
, or
SuiteStateFlag.UPDATE_DENIED
.value
- the value the flag should be set to: true
or
false
java.lang.IllegalStateException
- if the suite was removedjava.lang.IllegalArgumentException
- if the state
argument is
SuiteStateFlag.SYSTEM
or SuiteStateFlag.PREINSTALLED
java.lang.IllegalStateException
- if the current suite is SYSTEM_SUITE
java.lang.SecurityException
- if the caller application does not have the required
SWMPermission
permissionpublic java.util.Iterator<java.lang.String> getMIDlets()
The first application in the enumeration is the default application
as specified in the MIDlet-1
field.
SYSTEM_SUITE
public java.util.Iterator<Suite> getDependencies()
SYSTEM_SUITE
)public boolean isTrusted()
true
for SYSTEM_SUITE
.true
if Suite is trusted, false
otherwise.public boolean isInstalled()
true
if Suite is still installed, false
if it has been removed.public boolean equals(java.lang.Object suite2)
Suite
instance.
The suite objects are equal if their names as retrieved by getName()
are equal and their vendors as retrieved by getVendor()
are equal.equals
in class java.lang.Object
suite2
- the other Suite
object the current one should
be compared withtrue
if the Suite
objects are equal,
false
otherwisepublic int hashCode()
getName()
and the vendor as retrieved by
getVendor()
.hashCode
in class java.lang.Object
Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.