Oracle Java Wireless Client

com.sun.ams
Interface SuiteInfo

All Known Subinterfaces:
AppSuite, LibSuite

public interface SuiteInfo

Suite descriptor


Field Summary
static int ST_APPLICATION
           
static int ST_INVALID
          types of Suite Info
static int ST_LIBRARY
           
static int ST_LINK
           
static int STATE_AVAILABLE
          available suite state flag.
static int STATE_ENABLED
          enabled suite state flag When suite is disabled any attempt to run application or use library from this suite should fail.
static int STATE_HIDDEN
          hidden suite state flag
static int STATE_REMOVE_DENIED
          Flag indicating wheather suite can be removed.
static int STATE_UPDATE_DENIED
          Flag indicating wheather suite can be updated.
 
Method Summary
 java.lang.String[] getAvailableProperties()
          Enumerate names of available properies
 java.lang.String getDownloadUrl()
          Gets the URL that the suite descriptor was downloaded from.
 byte[] getIcon()
          Gets component icon
 java.lang.String getName()
          Get name for given suite
 java.lang.String getProperty(java.lang.String name)
          Requests property with given name
 SuiteSettings getSettings()
          Gets settings
 int getState()
          Returns suite state as a combination of flags STATE_DISABLED, STATE_HIDDEN and STATE_AVAILABLE
 int getSuiteType()
          Get suite type as one of the predefined constants
 java.lang.String getVendor()
          Get vendor name for given suite
 void remove()
          Removes a software package.
 void remove(boolean ignoreRemoveLock)
          Removes a software package.
 int setState(int state, boolean value)
          Modifies suites state
 

Field Detail

ST_INVALID

static final int ST_INVALID
types of Suite Info

See Also:
Constant Field Values

ST_APPLICATION

static final int ST_APPLICATION
See Also:
Constant Field Values

ST_LIBRARY

static final int ST_LIBRARY
See Also:
Constant Field Values

ST_LINK

static final int ST_LINK
See Also:
Constant Field Values

STATE_ENABLED

static final int STATE_ENABLED
enabled suite state flag When suite is disabled any attempt to run application or use library from this suite should fail.

See Also:
Constant Field Values

STATE_HIDDEN

static final int STATE_HIDDEN
hidden suite state flag

See Also:
Constant Field Values

STATE_AVAILABLE

static final int STATE_AVAILABLE
available suite state flag. Suite is not available if it was installed to external storage and storage with suites' data was unmounted. When external storage is mounted back, suite becomes available.

See Also:
Constant Field Values

STATE_REMOVE_DENIED

static final int STATE_REMOVE_DENIED
Flag indicating wheather suite can be removed.

See Also:
Constant Field Values

STATE_UPDATE_DENIED

static final int STATE_UPDATE_DENIED
Flag indicating wheather suite can be updated.

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Get name for given suite

Returns:
the suite name

getVendor

java.lang.String getVendor()
Get vendor name for given suite

Returns:
the vendor name

getIcon

byte[] getIcon()
Gets component icon

Returns:
icon data as byte array. It can be used in Image.createImage to create Image instance.

getDownloadUrl

java.lang.String getDownloadUrl()
                                throws SuiteNotFoundException
Gets the URL that the suite descriptor was downloaded from.

Returns:
URL of the JAD, or JAR for a JAR only suite
Throws:
SuiteNotFoundException

getAvailableProperties

java.lang.String[] getAvailableProperties()
                                          throws SuiteNotFoundException
Enumerate names of available properies

Returns:
an array of propery names
Throws:
SuiteNotFoundException - is thrown if the component was removed by AMS

getProperty

java.lang.String getProperty(java.lang.String name)
                             throws SuiteNotFoundException
Requests property with given name

Parameters:
name - the name of the property
Returns:
the property value or null if property with given name was not found
Throws:
SuiteNotFoundException - is thrown if the suite was removed by AMS

getSuiteType

int getSuiteType()
                 throws SuiteNotFoundException
Get suite type as one of the predefined constants

Returns:
the suite type
Throws:
SuiteNotFoundException - is thrown if the suite was removed by AMS

remove

void remove()
            throws SuiteLockedException,
                   SuiteNotFoundException,
                   java.lang.SecurityException
Removes a software package.

If the component is in use it must continue to be available to the other components that are using it. The resources it consumes must not be released until it is not in use. To be able to remove MIDlet using this API caller MIDlet should request "com.sun.ams.SuiteInfo.remove" permission.

Throws:
SuiteLockedException - is thrown, if the Suite is locked
SuiteNotFoundException - is thrown if the suite was removed by AMS
java.lang.SecurityException - is thrown if removing of the MIDlet is prohibited.

remove

void remove(boolean ignoreRemoveLock)
            throws SuiteLockedException,
                   SuiteNotFoundException,
                   java.lang.SecurityException
Removes a software package.

If the component is in use it must continue to be available to the other components that are using it. The resources it consumes must not be released until it is not in use. To be able to remove MIDlet using this API caller MIDlet should request "com.sun.ams.SuiteInfo.remove" permission.

Parameters:
ignoreRemoveLock - if true suite is removed even if it has state STATE_REMOVE_DENIED
Throws:
SuiteLockedException - is thrown, if the Suite is locked
SuiteNotFoundException - is thrown if the suite was removed by AMS
java.lang.SecurityException - is thrown if removing of the MIDlet is prohibited.

getState

int getState()
             throws SuiteNotFoundException
Returns suite state as a combination of flags STATE_DISABLED, STATE_HIDDEN and STATE_AVAILABLE

Returns:
state of the suite
Throws:
SuiteNotFoundException - is thrown if the suite was removed

setState

int setState(int state,
             boolean value)
             throws SuiteLockedException,
                    SuiteNotFoundException,
                    ConcurrentModificationException
Modifies suites state

Parameters:
state - state to change. Combination of the state flags to modify.
value - new value
Returns:
old state value
Throws:
SuiteLockedException - is thrown, if the Suite is locked
SuiteNotFoundException - is thrown if the suite was removed
ConcurrentModificationException - is thrown if suite data has been concurrently modified

getSettings

SuiteSettings getSettings()
                          throws SuiteNotFoundException
Gets settings

Returns:
SuiteSettings representing suite settings
Throws:
SuiteNotFoundException - is thrown if the suite was removed by AMS

Oracle Java Wireless Client

Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.