|
Mobile Tools for Java Release 1.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IApplicationDescriptor
This in interface is a representation of a Java Application Descriptor (jad) for a MIDlet Suite.
Each JAR file MAY be accompanied by an application descriptor. The application descriptor is used in conjunction with the JAR manifest by the application management software to manage the MIDlet and is used by the MIDlet itself for configuration specific attributes. The descriptor allows the application management software on the device to verify that the MIDlet is suited to the device before loading the full JAR file of the MIDlet suite. It also allows configuration-specific attributes (parameters) to be supplied to the MIDlet(s) without modifying the JAR file.
A predefined set of attributes is specified to allow the application
management software to identify, retrieve, and install the MIDlet(s). All
attributes appearing in the descriptor file are made available to the
MIDlet(s). The developer may use attributes not beginning with
MIDlet-
or MicroEdition-
for application-specific
purposes. Attribute names are case-sensitive and MUST match
exactly. An attribute MUST NOT appear more than once within
the manifest. If an attribute is duplicated the effect is unspecified. The
MIDlet retrieves attributes by name by calling the
MIDlet.getAppProperty
method. The application descriptor
MUST contain the following attributes:
MIDlet-
or MicroEdition-
Method Summary | |
---|---|
void |
addMidletDefinition(IMidletDefinition midletDefinition)
Add a new MidletDefinition instance to list of published MIDLets. |
Version |
getConfigurationSpecificationVersion()
Return the configuration specification version associated with this JAD file. |
Properties |
getManifestProperties()
Return the overall manifest properties. |
String |
getMicroEditionConfiguration()
Return the Java ME Configuration required using the same format and value as the System property microedition.profiles (for example
"CLDC-1.0"). |
String |
getMicroEditionProfile()
Return the Java ME profiles required, using the same format and value as the System property microedition.profiles (for example
"MIDP-2.0"). |
int |
getMidletCount()
Return the current count of MidletDefinition instances within this application descriptor. |
String |
getMIDletDataSize()
Return the minimum number of bytes of persistent data required by the MIDlet. |
List<IMidletDefinition> |
getMidletDefinitions()
Return the list of MidletDefinition instances currently managed by the ApplicationDescriptor. |
String |
getMIDletDeleteConfirm()
Return the text message to be provided to the user when prompted to confirm deletion of this MIDlet suite. |
String |
getMIDletDeleteNotify()
Return the URL to which a POST request is sent to report the deletion of this MIDlet suite. |
String |
getMIDletDescription()
Return the description of the MIDlet suite. |
String |
getMIDletIcon()
Return the case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite. |
String |
getMIDletInfoURL()
Return a URL for information further describing the MIDlet suite. |
String |
getMIDletInstallNotify()
Return the URL to which a POST request is sent to report the installation status (whether a new installation or MIDlet suite update) of this MIDlet suite. |
String |
getMIDletJarSize()
Return the number of bytes in the JAR file as a string. |
String |
getMIDletJarURL()
Return the URL from which the JAR file can be loaded. |
String |
getMIDletName()
Return the name of the MIDlet suite that identifies the MIDlets to the user. |
String |
getMIDletPermissions()
Return the permissions that are critical to the function of the MIDlet suite. |
String |
getMIDletPermissionsOpt()
Return the permissions that are non-critical to the function of the MIDlet suite. |
String |
getMIDletVendor()
Return the name of the organization that provides the MIDlet suite. |
Version |
getMIDletVersion()
Return the version number of the MIDlet suite. |
void |
setMicroEditionConfiguration(String configurations)
Set the Java ME Configuration required using the same format and value as the System property microedition.profiles (for example
"CLDC-1.0"). |
void |
setMicroEditionProfile(String profiles)
Set the Java ME profiles required, using the same format and value as the System property microedition.profiles (for example
"MIDP-2.0"). |
void |
setMIDletDataSize(String datasize)
Set the minimum number of bytes of persistent data required by the MIDlet. |
void |
setMIDletDeleteConfirm(String message)
Set the text message to be provided to the user when prompted to confirm deletion of this MIDlet suite. |
void |
setMIDletDeleteNotify(String url)
Set the URL to which a POST request is sent to report the deletion of this MIDlet suite. |
void |
setMIDletDescription(String description)
Set the description of the MIDlet suite. |
void |
setMIDletIcon(String icon)
Set the case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite. |
void |
setMIDletInfoURL(String url)
Set a URL for information further describing the MIDlet suite. |
void |
setMIDletInstallNotify(String url)
Set the URL to which a POST request is sent to report the installation status (whether a new installation or MIDlet suite update) of this MIDlet suite. |
void |
setMIDletJarSize(String jarsize)
Set the number of bytes in the JAR file as a string. |
void |
setMIDletJarURL(String url)
Set the URL from which the JAR file can be loaded. |
void |
setMIDletName(String name)
Set the name of the MIDlet suite that identifies the MIDlets to the user. |
void |
setMIDletPermissions(String permissions)
Set the permissions that are critical to the function of the MIDlet suite. |
void |
setMIDletPermissionsOpt(String permissions)
Set the permissions that are non-critical to the function of the MIDlet suite. |
void |
setMIDletVendor(String vendor)
Set the name of the organization that provides the MIDlet suite. |
void |
setMIDletVersion(Version version)
Set the version number of the MIDlet suite. |
void |
store()
Store the ApplicationDescriptor instance into the same File from which it was originally read. |
void |
store(File jadFile)
Store the ApplicationDescriptor instance into the specified file. |
Method Detail |
---|
void addMidletDefinition(IMidletDefinition midletDefinition)
midletDefinition
- the MIDlet definition to be addedVersion getConfigurationSpecificationVersion() throws CoreException
CoreException
Properties getManifestProperties()
String getMicroEditionConfiguration()
microedition.profiles
(for example
"CLDC-1.0").
This value is retrieved reading the
MicroEdition-Configuration
attribute from the application
descriptor.
String getMicroEditionProfile()
microedition.profiles
(for example
"MIDP-2.0").
This value is retrieved reading the MicroEdition-Profile
attribute from the application descriptor.
int getMidletCount()
String getMIDletDataSize()
This value is retrieved reading the MIDlet-Jar-Size
attribute from the application descriptor.
null
if this attribute has not been
specified.List<IMidletDefinition> getMidletDefinitions()
String getMIDletDeleteConfirm()
This value is retrieved reading the MIDlet-Delete-Confirm
attribute from the application descriptor.
null
if this
attribute has not been specified.String getMIDletDeleteNotify()
This value is retrieved reading the MIDlet-Delete-Notify
attribute from the application descriptor.
null
if this attribute has not
been specified.String getMIDletDescription()
This value is retrieved reading the MIDlet-Description
attribute from the application descriptor.
null
if this
attribute has not been specified.String getMIDletIcon()
This value is retrieved reading the MIDlet-Icon
attribute
from the application descriptor.
null
if this
attribute has not been specified.String getMIDletInfoURL()
The syntax and meaning of this URL conform to RFC2396 and RFCs that define each scheme.
NOTE: This method does not check the validity of the value.
This value is retrieved reading the MIDlet-Info-URL
attribute from the application descriptor.
null
if this attribute has not been specified.String getMIDletInstallNotify()
This value is retrieved reading the MIDlet-Install-Notify
attribute from the application descriptor.
null
if this
attribute has not been specified.String getMIDletJarSize()
This value is retrieved reading the MIDlet-Jar-Size
attribute from the application descriptor.
null
if this attribute has not been specified.String getMIDletJarURL()
The syntax and meaning of this URL conform to RFC2396 and RFCs that define each scheme. Both absolute and relative URLs are supported. The context for a relative URL is the URL from which this application descriptor was loaded.
NOTE: This method does not check the validity of the value.
This value is retrieved reading the MIDlet-Jar-URL
attribute
from the application descriptor.
null
if this attribute has not been specified.String getMIDletName()
This value is retrieved reading the MIDlet-Name
attribute
from the application descriptor.
null
if this attribute has not been
specified.String getMIDletPermissions()
This value is retrieved reading the MIDlet-Permissions
attribute from the application descriptor.
null
if this attribute has not been specified.String getMIDletPermissionsOpt()
This value is retrieved reading the MIDlet-Permissions-Opt
attribute from the application descriptor.
null
if this attribute has not been specified.String getMIDletVendor()
This value is retrieved reading the MIDlet-Vendor
attribute
from the application descriptor.
null
if this attribute has not been specified.Version getMIDletVersion()
A missing MIDlet-Version
tag is assumed to be
0.0.0
, which means that any non-zero version number is
considered as a newer version of the MIDlet suite.
This value is retrieved reading the MIDlet-Version
attribute
from the application descriptor.
void setMicroEditionConfiguration(String configurations)
microedition.profiles
(for example
"CLDC-1.0").
This value will be written to the MicroEdition-Configuration
attribute from the application descriptor.
configurations
- a string containing a blank separated list of
required Java ME configurations.void setMicroEditionProfile(String profiles)
microedition.profiles
(for example
"MIDP-2.0").
This value will be written to the MicroEdition-Profile
attribute from the application descriptor.
profiles
- a string containing a blank separated list of required
Java ME profiles.void setMIDletDataSize(String datasize)
This will be written to the MIDlet-Jar-Size
attribute from
the application descriptor.
datasize
- the minimum number of bytes of persistent data required
by the MIDlet.void setMIDletDeleteConfirm(String message)
This value will be written to the MIDlet-Delete-Confirm
attribute from the application descriptor.
message
- text message to be provided to the user when prompted to
confirm deletion of this MIDlet suite.void setMIDletDeleteNotify(String url)
NOTE: The URL MUST be no longer than 256 UTF-8 encoded characters.
This value will be written to the MIDlet-Delete-Notify
attribute from the application descriptor.
url
- the URL to which a POST request is sent to report the deletion
of this MIDlet suite.void setMIDletDescription(String description)
This value will be written to the MIDlet-Description
attribute from the application descriptor.
description
- the description of the MIDlet suite.void setMIDletIcon(String icon)
This value will be written to the MIDlet-Icon
attribute from
the application descriptor.
icon
- the case-sensitive absolute name of a PNG file within the JAR
used to represent the MIDlet suite.void setMIDletInfoURL(String url)
The syntax and meaning of this URL MUST conform to RFC2396 and RFCs that define each scheme.
NOTE: This method does not check the validity of the value.
This value will be written to the MIDlet-Info-URL
attribute
from the application descriptor.
url
- a URL for information further describing the MIDlet suite.void setMIDletInstallNotify(String url)
NOTE: The URL MUST be no longer than 256 UTF-8 encoded characters.
This value will be written to the MIDlet-Install-Notify
attribute from the application descriptor.
url
- the URL to which a POST request is sent to report the
installation status (whether a new installation or MIDlet
suite update) of this MIDlet suite.void setMIDletJarSize(String jarsize)
This value will be written to the MIDlet-Jar-Size
attribute
from the application descriptor.
jarsize
- the number of bytes in the JAR file as a string.void setMIDletJarURL(String url)
The syntax and meaning of this URL MUST conform to RFC2396 and RFCs that define each scheme. Both absolute and relative URLs are supported. The context for a relative URL is the URL from which this application descriptor was loaded.
NOTE: This method does not check the validity of the value.
This value will be written to the MIDlet-Jar-URL
attribute
from the application descriptor.
url
- the URL from which the JAR file can be loaded.void setMIDletName(String name)
This value will be written to the MIDlet-Name
attribute from
the application descriptor.
void setMIDletPermissions(String permissions)
This value will be written to the MIDlet-Permissions
attribute from the application descriptor.
permissions
- a string containing a comma separated list of
permissions that are critical to the function of the MIDlet
suite.void setMIDletPermissionsOpt(String permissions)
This value will be written to the MIDlet-Permissions-Opt
attribute from the application descriptor.
permissions
- a string containing a comma separated list of
permissions that are non-critical to the function of the
MIDlet suite.void setMIDletVendor(String vendor)
This value will be written to the MIDlet-Vendor
attribute
from the application descriptor.
vendor
- the name of the organization that provides the MIDlet
suite.void setMIDletVersion(Version version)
This value will be written to the MIDlet-Version
attribute
from the application descriptor.
version
- the version number of the MIDlet suite.void store() throws IOException
IOException
- when an error occurs while storing the descriptorvoid store(File jadFile) throws IOException
jadFile
- the file into which the descriptor will be written
IOException
- when an error occurs while storing the descriptor
|
Mobile Tools for Java Release 1.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |