Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.project.midp
Interface IApplicationDescriptor


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-Name
  • MIDlet-Version
  • MIDlet-Vendor
  • MIDlet-Jar-URL
  • MIDlet-Jar-Size
The application descriptor MAY contain:
  • MIDlet-<n> for each MIDlet
  • MicroEdition-Profile
  • MicroEdition-Configuration
  • MIDlet-Description
  • MIDlet-Icon
  • MIDlet-Info-URL
  • MIDlet-Data-Size
  • MIDlet-Permissions
  • MIDlet-Permissions-Opt
  • MIDlet-Push-<n>
  • MIDlet-Install-Notify
  • MIDlet-Delete-Notify
  • MIDlet-Delete-Confirm
  • Any application-specific attributes that do not begin with MIDlet- or MicroEdition-
The mandatory attributes MIDlet-Name, MIDlet-Version, and MIDlet-Vendor MUST be duplicated in the descriptor and manifest files since they uniquely identify the application. If they are not identical (not from the same application), then the JAR MUST NOT be installed.

Since:
1.0
Restriction:
This interface is not intended to be implemented by clients.

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

addMidletDefinition

void addMidletDefinition(
IMidletDefinition midletDefinition)
Add a new MidletDefinition instance to list of published MIDLets.

Parameters:
midletDefinition - the MIDlet definition to be added

getConfigurationSpecificationVersion

Version getConfigurationSpecificationVersion()
                                             throws CoreException
Return the configuration specification version associated with this JAD file.

Returns:
Throws:
CoreException

getManifestProperties


Properties getManifestProperties()
Return the overall manifest properties.

Returns:
the manifest properties.

getMicroEditionConfiguration


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").

This value is retrieved reading the MicroEdition-Configuration attribute from the application descriptor.

Returns:
a string containing a blank separated list of required Java ME configurations.

getMicroEditionProfile


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").

This value is retrieved reading the MicroEdition-Profile attribute from the application descriptor.

Returns:
a string containing a blank separated list of required Java ME profiles.

getMidletCount

int getMidletCount()
Return the current count of MidletDefinition instances within this application descriptor.

Returns:
the number of MidletDefinition instances

getMIDletDataSize


String getMIDletDataSize()
Return the minimum number of bytes of persistent data required by the MIDlet.

This value is retrieved reading the MIDlet-Jar-Size attribute from the application descriptor.

Returns:
the minimum number of bytes of persistent data required by the MIDlet or null if this attribute has not been specified.

getMidletDefinitions


List<
IMidletDefinition> getMidletDefinitions()
Return the list of MidletDefinition instances currently managed by the ApplicationDescriptor.

Returns:
a list of MidletDefinition instances

getMIDletDeleteConfirm


String getMIDletDeleteConfirm()
Return the text message to be provided to the user when prompted to confirm deletion of this MIDlet suite.

This value is retrieved reading the MIDlet-Delete-Confirm attribute from the application descriptor.

Returns:
text message to be provided to the user when prompted to confirm deletion of this MIDlet suite or null if this attribute has not been specified.

getMIDletDeleteNotify


String getMIDletDeleteNotify()
Return the URL to which a POST request is sent to report the deletion of this MIDlet suite.

This value is retrieved reading the MIDlet-Delete-Notify attribute from the application descriptor.

Returns:
the URL to which a POST request is sent to report the deletion of this MIDlet suite or null if this attribute has not been specified.

getMIDletDescription


String getMIDletDescription()
Return the description of the MIDlet suite.

This value is retrieved reading the MIDlet-Description attribute from the application descriptor.

Returns:
the description of the MIDlet suite or null if this attribute has not been specified.

getMIDletIcon


String getMIDletIcon()
Return the case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite. It SHOULD be used when the Application Management Software displays an icon to identify the suite.

This value is retrieved reading the MIDlet-Icon attribute from the application descriptor.

Returns:
the case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite or null if this attribute has not been specified.

getMIDletInfoURL


String getMIDletInfoURL()
Return a URL for information further describing the MIDlet suite.

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.

Returns:
a URL for information further describing the MIDlet suite or null if this attribute has not been specified.

getMIDletInstallNotify


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.

This value is retrieved reading the MIDlet-Install-Notify attribute from the application descriptor.

Returns:
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 or null if this attribute has not been specified.

getMIDletJarSize


String getMIDletJarSize()
Return the number of bytes in the JAR file as a string.

This value is retrieved reading the MIDlet-Jar-Size attribute from the application descriptor.

Returns:
the number of bytes in the JAR file as a string or null if this attribute has not been specified.

getMIDletJarURL


String getMIDletJarURL()
Return the URL from which the JAR file can be loaded.

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.

Returns:
the URL from which the JAR file can be loaded or null if this attribute has not been specified.

getMIDletName


String getMIDletName()
Return the name of the MIDlet suite that identifies the MIDlets to the user.

This value is retrieved reading the MIDlet-Name attribute from the application descriptor.

Returns:
the name of the MIDlet suite that identifies the MIDlets to the user or null if this attribute has not been specified.

getMIDletPermissions


String getMIDletPermissions()
Return the permissions that are critical to the function of the MIDlet suite.

This value is retrieved reading the MIDlet-Permissions attribute from the application descriptor.

Returns:
a string containing a comma separated list of permissions that are critical to the function of the MIDlet suite or null if this attribute has not been specified.

getMIDletPermissionsOpt


String getMIDletPermissionsOpt()
Return the permissions that are non-critical to the function of the MIDlet suite.

This value is retrieved reading the MIDlet-Permissions-Opt attribute from the application descriptor.

Returns:
a string containing a comma separated list of permissions that are non-critical to the function of the MIDlet suite or null if this attribute has not been specified.

getMIDletVendor


String getMIDletVendor()
Return the name of the organization that provides the MIDlet suite.

This value is retrieved reading the MIDlet-Vendor attribute from the application descriptor.

Returns:
the name of the organization that provides the MIDlet suite or null if this attribute has not been specified.

getMIDletVersion

Version getMIDletVersion()
Return the version number of the MIDlet suite. Version numbers are formatted so they can be used by the application management software for install and upgrade uses, as well as communication with the user.

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.

Returns:
the version number of the MIDlet suite.

setMicroEditionConfiguration

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").

This value will be written to the MicroEdition-Configuration attribute from the application descriptor.

Parameters:
configurations - a string containing a blank separated list of required Java ME configurations.

setMicroEditionProfile

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").

This value will be written to the MicroEdition-Profile attribute from the application descriptor.

Parameters:
profiles - a string containing a blank separated list of required Java ME profiles.

setMIDletDataSize

void setMIDletDataSize(
String datasize)
Set the minimum number of bytes of persistent data required by the MIDlet.

This will be written to the MIDlet-Jar-Size attribute from the application descriptor.

Parameters:
datasize - the minimum number of bytes of persistent data required by the MIDlet.

setMIDletDeleteConfirm

void setMIDletDeleteConfirm(
String message)
Set the text message to be provided to the user when prompted to confirm deletion of this MIDlet suite.

This value will be written to the MIDlet-Delete-Confirm attribute from the application descriptor.

Parameters:
message - text message to be provided to the user when prompted to confirm deletion of this MIDlet suite.

setMIDletDeleteNotify

void setMIDletDeleteNotify(
String url)
Set the URL to which a POST request is sent to report the deletion of this MIDlet suite.

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.

Parameters:
url - the URL to which a POST request is sent to report the deletion of this MIDlet suite.

setMIDletDescription

void setMIDletDescription(
String description)
Set the description of the MIDlet suite.

This value will be written to the MIDlet-Description attribute from the application descriptor.

Parameters:
description - the description of the MIDlet suite.

setMIDletIcon

void setMIDletIcon(
String icon)
Set the case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite. It SHOULD be used when the Application Management Software displays an icon to identify the suite.

This value will be written to the MIDlet-Icon attribute from the application descriptor.

Parameters:
icon - the case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite.

setMIDletInfoURL

void setMIDletInfoURL(
String url)
Set a URL for information further describing the MIDlet suite.

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.

Parameters:
url - a URL for information further describing the MIDlet suite.

setMIDletInstallNotify

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.

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.

Parameters:
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.

setMIDletJarSize

void setMIDletJarSize(
String jarsize)
Set the number of bytes in the JAR file as a string.

This value will be written to the MIDlet-Jar-Size attribute from the application descriptor.

Parameters:
jarsize - the number of bytes in the JAR file as a string.

setMIDletJarURL

void setMIDletJarURL(
String url)
Set the URL from which the JAR file can be loaded.

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.

Parameters:
url - the URL from which the JAR file can be loaded.

setMIDletName

void setMIDletName(
String name)
Set the name of the MIDlet suite that identifies the MIDlets to the user.

This value will be written to the MIDlet-Name attribute from the application descriptor.


setMIDletPermissions

void setMIDletPermissions(
String permissions)
Set the permissions that are critical to the function of the MIDlet suite.

This value will be written to the MIDlet-Permissions attribute from the application descriptor.

Parameters:
permissions - a string containing a comma separated list of permissions that are critical to the function of the MIDlet suite.

setMIDletPermissionsOpt

void setMIDletPermissionsOpt(
String permissions)
Set the permissions that are non-critical to the function of the MIDlet suite.

This value will be written to the MIDlet-Permissions-Opt attribute from the application descriptor.

Parameters:
permissions - a string containing a comma separated list of permissions that are non-critical to the function of the MIDlet suite.

setMIDletVendor

void setMIDletVendor(
String vendor)
Set the name of the organization that provides the MIDlet suite.

This value will be written to the MIDlet-Vendor attribute from the application descriptor.

Parameters:
vendor - the name of the organization that provides the MIDlet suite.

setMIDletVersion

void setMIDletVersion(Version version)
Set the version number of the MIDlet suite. Version numbers are formatted so they can be used by the application management software for install and upgrade uses, as well as communication with the user.

This value will be written to the MIDlet-Version attribute from the application descriptor.

Parameters:
version - the version number of the MIDlet suite.

store

void store()
           throws 
IOException
Store the ApplicationDescriptor instance into the same File from which it was originally read.

Throws:
IOException - when an error occurs while storing the descriptor

store

void store(
File jadFile)
           throws 
IOException
Store the ApplicationDescriptor instance into the specified file.

Parameters:
jadFile - the file into which the descriptor will be written
Throws:
IOException - when an error occurs while storing the descriptor

Mobile Tools for Java
Release 1.0


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire