public class Suite
extends java.lang.Object
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 |
isSuiteState(SuiteStateFlag state)
Checks whether the specified flag is set.
|
boolean |
isTrusted()
Checks if this Suite is trusted or not.
|
void |
setSuiteState(SuiteStateFlag state,
boolean value)
Sets the specified flag to the specified value.
|
public static final Suite SYSTEM_SUITE
Suite
.public java.lang.String getName() throws SuiteNotFoundException
SYSTEM_SUITE
SuiteNotFoundException
- is thrown if the suite was removedpublic java.lang.String getVendor() throws SuiteNotFoundException
SYSTEM_SUITE
SuiteNotFoundException
- is thrown if the suite was removedpublic java.lang.String getVersion() throws SuiteNotFoundException
SYSTEM_SUITE
SuiteNotFoundException
- is thrown if the suite was removedpublic java.lang.String getDownloadUrl() throws SuiteNotFoundException
null
.SYSTEM_SUITE
or if a call to
isSuiteState
(SuiteStateFlag.PREINSTALLED
) returns
true
SuiteNotFoundException
- is thrown if the suite was removedpublic java.util.Iterator<java.lang.String> getAttributes() throws SuiteNotFoundException
SYSTEM_SUITE
SuiteNotFoundException
- is thrown if the suite was removedpublic java.lang.String getAttributeValue(java.lang.String name) throws SuiteNotFoundException
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
)SuiteNotFoundException
- is thrown if the suite was removedpublic SuiteType getSuiteType() throws SuiteNotFoundException
SuiteNotFoundException
- is thrown if the suite was removedpublic boolean isSuiteState(SuiteStateFlag state) throws SuiteNotFoundException
SYSTEM_SUITE
, the return value false
for
SuiteStateFlag.HIDDEN
, for all other arguments true
.state
- state flag to be check fortrue
if state flag is set, false
otherwiseSuiteNotFoundException
- is thrown if the suite was removedpublic void setSuiteState(SuiteStateFlag state, boolean value) throws SuiteNotFoundException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
javax.microedition.swm.SWMPermission("manageSuite")
permission.state
- state flag to be set, must be one of
SuiteStateFlag.ENABLED
,
SuiteStateFlag.HIDDEN
,
SuiteStateFlag.AVAILABLE
,
SuiteStateFlag.REMOVE_DENIED
, or
SuiteStateFlag.UPDATE_DENIED
.value
- the value the flag should be set to: true
or
false
SuiteNotFoundException
- is thrown 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
public java.util.Iterator<java.lang.String> getMIDlets() throws SuiteNotFoundException
The first application in the enumeration is the default application
as specified in the MIDlet-1
field.
SYSTEM_SUITE
SuiteNotFoundException
- in case the suite cannot get foundpublic java.util.Iterator<Suite> getDependencies() throws SuiteNotFoundException
SYSTEM_SUITE
)SuiteNotFoundException
- in case the suite cannot get foundpublic boolean isTrusted() throws SuiteNotFoundException
true
for SYSTEM_SUITE
.true
if Suite is trusted false
otherwise.SuiteNotFoundException
- in case the suite cannot get foundpublic 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) 2013, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.