Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.project
Interface IMidletSuiteProject

All Known Implementing Classes:
MidletSuiteProject

public interface IMidletSuiteProject

This interface represents access to MIDlet suite project specific information. It acts as a wrapper around an IJavaProject.

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.


Field Summary
static String APPLICATION_DESCRIPTOR_NAME
          The project's application descriptor.
 
Method Summary
 void addMidletSuiteProjectListener(IMidletSuiteProjectListener listener)
           
 void createPackage(IProgressMonitor monitor, boolean obfuscate, boolean packageInactiveConfigs)
          Create a deployed JAR file package for this MIDlet suite project.
 ApplicationDescriptor getApplicationDescriptor()
          Return an ApplicationDescriptor instance wrapped around the Application Descriptor (JAD) file for this MIDlet suite.
 IFile getApplicationDescriptorFile()
           
 File[] getClasspath(IProgressMonitor monitor)
          Return the classpath for this project.
 Configurations getConfigurations()
          Return Configurations of the project.
 IDevice getDevice()
          Return the device associated with this MIDlet suite project.
 String getJadFileName()
          Return the file holding the JAD file.
 String getJarFilename()
          Return the name to use for the JAR file.
 IJavaProject getJavaProject()
          Return the underlying java project.
 IProject getProject()
          Return the underlying project instance.
 ISignatureProperties getSignatureProperties()
          Get the ISignatureProperties associated with this MIDlet suite
 String getTempKeyPassword()
           
 String getTempKeystorePassword()
           
 IFolder getVerifiedClassesOutputFolder(IProgressMonitor monitor)
          Get the IFolder into which verified classes should be written.
 IFolder getVerifiedLibrariesOutputFolder(IProgressMonitor monitor)
          Get the IFolder into which verified libraries should be written.
 IFolder getVerifiedOutputFolder(IProgressMonitor monitor)
          Get the IFolder into which verified classes should be written.
 boolean isDeployedJarUpToDate()
          Return a boolean indicating whether the project's deployed jar file exists and is up to date compared with the code contained within the jar.
 PreverificationError[] preverify(IResource[] toVerify, IFolder outputFolder, IProgressMonitor monitor)
          Preverify the specified resources.
 PreverificationError[] preverifyJarFile(File jarFile, IFolder outputFolder, IProgressMonitor monitor)
          Launch the preverification process on the specified jar file.
 void removeMidletSuiteProjectListener(IMidletSuiteProjectListener listener)
           
 void saveMetaData()
          Save the MIDlet suite metadata.
 void setDeployedJarFileUpToDate(boolean upToDate)
          Set the flag indicating whether or not the deployed jar file for this MIDlet suite project is currently up to date.
 void setDevice(IDevice device, IProgressMonitor monitor)
          Set the device being used by this project.
 void setEnabledSymbolDefinitionSet(SymbolDefinitionSet set)
          Set the symbol definition set that is enabled for this project.
 void setJadFileName(String jadFileName)
           
 void setSignatureProperties(ISignatureProperties props)
          Set the ISignatureProperties to use for this MIDlet suite
 void setTempKeyPassword(String pass)
           
 void setTempKeystorePassword(String pass)
           
 

Field Detail

APPLICATION_DESCRIPTOR_NAME

static final String APPLICATION_DESCRIPTOR_NAME
The project's application descriptor.

See Also:
Constant Field Values
Method Detail

addMidletSuiteProjectListener

void addMidletSuiteProjectListener(IMidletSuiteProjectListener listener)
Parameters:
listener -

createPackage

void createPackage(IProgressMonitor monitor,
                   boolean obfuscate,
                   boolean packageInactiveConfigs)
                   throws CoreException
Create a deployed JAR file package for this MIDlet suite project.

Parameters:
monitor - progress monitor
obfuscate - a boolean indicating whether to obfuscate the resulting packaged code.
packageInactiveConfigs - - a boolean indicating whether to package all configurations (including inactive configurations) or just package active configuration.
Throws:
CoreException

getApplicationDescriptor

ApplicationDescriptor getApplicationDescriptor()
Return an ApplicationDescriptor instance wrapped around the Application Descriptor (JAD) file for this MIDlet suite.

Returns:
the suite's application descriptor

getApplicationDescriptorFile

IFile getApplicationDescriptorFile()
Returns:

getClasspath

File[] getClasspath(IProgressMonitor monitor)
                    throws CoreException
Return the classpath for this project. This classpath does not include the entries for the J2ME libraries.

Parameters:
monitor -
Returns:
Throws:
CoreException

getConfigurations

Configurations getConfigurations()
Return Configurations of the project.

Returns:

getDevice

IDevice getDevice()
Return the device associated with this MIDlet suite project.

Returns:

getJadFileName

String getJadFileName()
Return the file holding the JAD file. There is a chance that this file may not actually exist if the user moved the file without using the refactoring functionality.

Returns:
the java application descriptor file

getJarFilename

String getJarFilename()
Return the name to use for the JAR file.

Returns:
the jar file name

getJavaProject

IJavaProject getJavaProject()
Return the underlying java project.

Returns:
the underlying java project

getProject

IProject getProject()
Return the underlying project instance.

Returns:
the underlying project

getSignatureProperties

ISignatureProperties getSignatureProperties()
                                            throws CoreException
Get the ISignatureProperties associated with this MIDlet suite

Returns:
the currently associated ISignatureProperties
Throws:
CoreException

getTempKeyPassword

String getTempKeyPassword()

getTempKeystorePassword

String getTempKeystorePassword()

getVerifiedClassesOutputFolder

IFolder getVerifiedClassesOutputFolder(IProgressMonitor monitor)
                                       throws CoreException
Get the IFolder into which verified classes should be written.

Parameters:
monitor - progress monitor
Returns:
the verified classes output folder
Throws:
CoreException

getVerifiedLibrariesOutputFolder

IFolder getVerifiedLibrariesOutputFolder(IProgressMonitor monitor)
                                         throws CoreException
Get the IFolder into which verified libraries should be written.

Parameters:
monitor - progress monitor
Returns:
the verified libraries output folder
Throws:
CoreException

getVerifiedOutputFolder

IFolder getVerifiedOutputFolder(IProgressMonitor monitor)
                                throws CoreException
Get the IFolder into which verified classes should be written.

Parameters:
monitor - progress monitor
Returns:
the verified root output folder
Throws:
CoreException

isDeployedJarUpToDate

boolean isDeployedJarUpToDate()
                              throws CoreException
Return a boolean indicating whether the project's deployed jar file exists and is up to date compared with the code contained within the jar.

Returns:
whether the deployed jar file is currently up to date.
Throws:
CoreException - if there is a problem retrieving the information.

preverify

PreverificationError[] preverify(IResource[] toVerify,
                                 IFolder outputFolder,
                                 IProgressMonitor monitor)
                                 throws CoreException,
                                        IOException,
                                        PreverifierNotFoundException
Preverify the specified resources. Return the map of class names with preverification errors mapped to the error that was caused.

Parameters:
toVerify - the resources to be preverified
outputFolder - the folder into which the output will be written
monitor - progress monitor
Returns:
An array of errors found during preverification.
Throws:
CoreException
IOException
PreverifierNotFoundException

preverifyJarFile

PreverificationError[] preverifyJarFile(File jarFile,
                                        IFolder outputFolder,
                                        IProgressMonitor monitor)
                                        throws CoreException,
                                               IOException,
                                               PreverifierNotFoundException
Launch the preverification process on the specified jar file.

Parameters:
jarFile - The jar file to be preverified.
outputFolder - The folder into which the output is to be placed.
monitor - Progress monitor
Returns:
An array of errors found during preverification.
Throws:
CoreException
IOException
PreverifierNotFoundException

removeMidletSuiteProjectListener

void removeMidletSuiteProjectListener(IMidletSuiteProjectListener listener)
Parameters:
listener -

saveMetaData

void saveMetaData()
                  throws CoreException
Save the MIDlet suite metadata. Should be called after setPlatformDefinition or setSignatureProperties are called to persist the information set.

Throws:
CoreException

setDeployedJarFileUpToDate

void setDeployedJarFileUpToDate(boolean upToDate)
                                throws CoreException
Set the flag indicating whether or not the deployed jar file for this MIDlet suite project is currently up to date.

Parameters:
upToDate - whether the deployed jar file is up to date.
Throws:
CoreException - if there is a problem setting the information.

setDevice

void setDevice(IDevice device,
               IProgressMonitor monitor)
               throws CoreException
Set the device being used by this project.

Parameters:
device -
monitor -
Throws:
CoreException

setEnabledSymbolDefinitionSet

void setEnabledSymbolDefinitionSet(SymbolDefinitionSet set)
                                   throws CoreException,
                                          PersistenceException
Set the symbol definition set that is enabled for this project.

Parameters:
set - the set to be enabled
Throws:
CoreException
{@link - PersistenceException}
PersistenceException

setJadFileName

void setJadFileName(String jadFileName)

setSignatureProperties

void setSignatureProperties(ISignatureProperties props)
                            throws CoreException
Set the ISignatureProperties to use for this MIDlet suite

Parameters:
props -
Throws:
CoreException

setTempKeyPassword

void setTempKeyPassword(String pass)

setTempKeystorePassword

void setTempKeystorePassword(String pass)

Mobile Tools for Java
Release 1.0