eclipseme.core.model
Class ApplicationDescriptor

java.lang.Object
  extended byeclipseme.core.model.ApplicationDescriptor

public class ApplicationDescriptor
extends java.lang.Object

This class is a representation of a Java Application Descriptor (jad) for a Midlet Suite.

Note: This class/interface is part of an interim API that is still under development and expected to change before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken as the API evolves.

Copyright (c) 2004 Craig Setera
All Rights Reserved.
Licensed under the Eclipse Public License - v 1.0


$Revision: 1.4 $
$Date: 2005/04/02 22:10:37 $

Author:
Craig Setera

Nested Class Summary
static class ApplicationDescriptor.MidletDefinition
          The definition of a Midlet within the application descriptor.
 
Field Summary
static java.lang.String MIDLET_PREFIX
          The prefix of all midlet definition properties
 
Constructor Summary
ApplicationDescriptor(java.io.File jadFile)
          Construct a new ApplicationDescriptor instance based on the data in the specified file.
 
Method Summary
 void addMidletDefinition(ApplicationDescriptor.MidletDefinition midletDefinition)
          Add a new MidletDefinition instance.
 eclipseme.core.internal.utils.ColonDelimitedProperties getManifestProperties()
          Return the overall manifest properties.
 int getMidletCount()
          Return the current count of MidletDefinition instances within this application descriptor.
 java.util.List getMidletDefinitions()
          Return the list of MidletDefinition instances currently managed by the ApplicationDescriptor.
 void store()
          Store the ApplicationDescriptor instance into the same File from which it was originally read.
 void store(java.io.File jadFile)
          Store the ApplicationDescriptor instance into the specified file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIDLET_PREFIX

public static final java.lang.String MIDLET_PREFIX
The prefix of all midlet definition properties

See Also:
Constant Field Values
Constructor Detail

ApplicationDescriptor

public ApplicationDescriptor(java.io.File jadFile)
                      throws java.io.IOException
Construct a new ApplicationDescriptor instance based on the data in the specified file.

Parameters:
jadFile - The file in which the descriptor is being held.
Throws:
java.io.IOException - when an error occurs reading the file
Method Detail

addMidletDefinition

public void addMidletDefinition(ApplicationDescriptor.MidletDefinition midletDefinition)
Add a new MidletDefinition instance.

Parameters:
midletDefinition - the midlet definition to be added

getMidletDefinitions

public java.util.List getMidletDefinitions()
Return the list of MidletDefinition instances currently managed by the ApplicationDescriptor.

Returns:
a list of MidletDefinition instances

getManifestProperties

public eclipseme.core.internal.utils.ColonDelimitedProperties getManifestProperties()
Return the overall manifest properties.

Returns:
the manifest properties.

getMidletCount

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

Returns:
the number of MidletDefinition instances

store

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

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

store

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

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