eclipseme.core.model
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.

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


$Revision: 1.5 $
$Date: 2005/07/07 02:36:56 $

Author:
Craig Setera

Method Summary
 void createPackage(org.eclipse.core.runtime.IProgressMonitor monitor, boolean obfuscate)
          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.
 eclipseme.core.internal.utils.ColonDelimitedProperties getDefaultApplicationDescriptorProperties()
          Return the set of default application descriptor properties for this midlet suite.
 java.lang.String getJadFilename()
          Return the name to use for the JAD file.
 java.lang.String getJarFilename()
          Return the name to use for the JAR file.
 org.eclipse.jdt.core.IJavaProject getJavaProject()
          Return the underlying java project.
 IPlatformDefinition getPlatformDefinition()
          Get the IPlatformDefinition in use for this midlet suite.
 java.lang.String getPlatformDefinitionName()
          Get the name of the platform definition in use for this midlet suite.
 org.eclipse.core.resources.IProject getProject()
          Return the underlying project instance.
 ISignatureProperties getSignatureProperties()
          Get the ISignatureProperties associated with this midlet suite
 java.lang.String getTempKeyPassword()
           
 java.lang.String getTempKeystorePassword()
           
 org.eclipse.core.resources.IFolder getVerifiedClassesOutputFolder(org.eclipse.core.runtime.IProgressMonitor monitor)
          Get the IFolder into which verified classes should be written.
 org.eclipse.core.resources.IFolder getVerifiedLibrariesOutputFolder(org.eclipse.core.runtime.IProgressMonitor monitor)
          Get the IFolder into which verified libraries should be written.
 org.eclipse.core.resources.IFolder getVerifiedOutputFolder(org.eclipse.core.runtime.IProgressMonitor monitor)
          Get the IFolder into which verified classes should be written.
 IWirelessToolkit getWirelessToolkit()
          Return the wireless toolkit associated with this project.
 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.
 java.util.Map preverify(org.eclipse.core.resources.IResource[] toVerify, org.eclipse.core.resources.IFolder outputFolder, org.eclipse.core.runtime.IProgressMonitor monitor)
          Preverify the specified resources.
 java.util.Map preverifyJarFile(java.io.File jarFile, org.eclipse.core.resources.IFolder outputFolder, org.eclipse.core.runtime.IProgressMonitor monitor)
          Launch the preverification process on the specified jar file.
 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 setPlatformDefinition(IPlatformDefinition definition)
          Set the IPlatformDefinition to use for this midlet suite.
 void setSignatureProperties(ISignatureProperties props)
          Set the ISignatureProperties to use for this midlet suite
 void setTempKeyPassword(java.lang.String pass)
           
 void setTempKeystorePassword(java.lang.String pass)
           
 

Method Detail

createPackage

public void createPackage(org.eclipse.core.runtime.IProgressMonitor monitor,
                          boolean obfuscate)
                   throws org.eclipse.core.runtime.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.
Throws:
org.eclipse.core.runtime.CoreException

getApplicationDescriptor

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

Returns:
the suite's application descriptor

getDefaultApplicationDescriptorProperties

public eclipseme.core.internal.utils.ColonDelimitedProperties getDefaultApplicationDescriptorProperties()
Return the set of default application descriptor properties for this midlet suite.

Returns:
a set of default application descriptor properties

getJadFilename

public java.lang.String getJadFilename()
Return the name to use for the JAD file.

Returns:
the java application descriptor filename

getJarFilename

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

Returns:
the jar file name

getJavaProject

public org.eclipse.jdt.core.IJavaProject getJavaProject()
Return the underlying java project.

Returns:
the underlying java project

getPlatformDefinitionName

public java.lang.String getPlatformDefinitionName()
                                           throws org.eclipse.core.runtime.CoreException
Get the name of the platform definition in use for this midlet suite.

Returns:
the currently associated platform definition name
Throws:
org.eclipse.core.runtime.CoreException

getPlatformDefinition

public IPlatformDefinition getPlatformDefinition()
                                          throws org.eclipse.core.runtime.CoreException
Get the IPlatformDefinition in use for this midlet suite.

Returns:
the currently associated platform definition
Throws:
org.eclipse.core.runtime.CoreException

setPlatformDefinition

public void setPlatformDefinition(IPlatformDefinition definition)
                           throws org.eclipse.core.runtime.CoreException
Set the IPlatformDefinition to use for this midlet suite.

Parameters:
definition - the platform definition to be associated with this midlet suite
Throws:
org.eclipse.core.runtime.CoreException

getSignatureProperties

public ISignatureProperties getSignatureProperties()
                                            throws org.eclipse.core.runtime.CoreException
Get the ISignatureProperties associated with this midlet suite

Returns:
the currently associated ISignatureProperties
Throws:
org.eclipse.core.runtime.CoreException

setSignatureProperties

public void setSignatureProperties(ISignatureProperties props)
                            throws org.eclipse.core.runtime.CoreException
Set the ISignatureProperties to use for this midlet suite

Parameters:
props -
Throws:
org.eclipse.core.runtime.CoreException

saveMetaData

public void saveMetaData()
                  throws org.eclipse.core.runtime.CoreException
Save the midlet suite metadata. Should be called after setPlatformDefinition or setSignatureProperties are called to persist the information set.

Throws:
org.eclipse.core.runtime.CoreException

getTempKeystorePassword

public java.lang.String getTempKeystorePassword()

setTempKeystorePassword

public void setTempKeystorePassword(java.lang.String pass)

getTempKeyPassword

public java.lang.String getTempKeyPassword()

setTempKeyPassword

public void setTempKeyPassword(java.lang.String pass)

getProject

public org.eclipse.core.resources.IProject getProject()
Return the underlying project instance.

Returns:
the underlying project

getVerifiedClassesOutputFolder

public org.eclipse.core.resources.IFolder getVerifiedClassesOutputFolder(org.eclipse.core.runtime.IProgressMonitor monitor)
                                                                  throws org.eclipse.core.runtime.CoreException
Get the IFolder into which verified classes should be written.

Parameters:
monitor - progress monitor
Returns:
the verified classes output folder
Throws:
org.eclipse.core.runtime.CoreException

getVerifiedLibrariesOutputFolder

public org.eclipse.core.resources.IFolder getVerifiedLibrariesOutputFolder(org.eclipse.core.runtime.IProgressMonitor monitor)
                                                                    throws org.eclipse.core.runtime.CoreException
Get the IFolder into which verified libraries should be written.

Parameters:
monitor - progress monitor
Returns:
the verified libraries output folder
Throws:
org.eclipse.core.runtime.CoreException

getVerifiedOutputFolder

public org.eclipse.core.resources.IFolder getVerifiedOutputFolder(org.eclipse.core.runtime.IProgressMonitor monitor)
                                                           throws org.eclipse.core.runtime.CoreException
Get the IFolder into which verified classes should be written.

Parameters:
monitor - progress monitor
Returns:
the verified root output folder
Throws:
org.eclipse.core.runtime.CoreException

getWirelessToolkit

public IWirelessToolkit getWirelessToolkit()
                                    throws org.eclipse.core.runtime.CoreException
Return the wireless toolkit associated with this project.

Returns:
the wireless toolkit currently associated wireless toolkit
Throws:
org.eclipse.core.runtime.CoreException

isDeployedJarUpToDate

public boolean isDeployedJarUpToDate()
                              throws org.eclipse.core.runtime.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:
org.eclipse.core.runtime.CoreException - if there is a problem retrieving the information.

preverify

public java.util.Map preverify(org.eclipse.core.resources.IResource[] toVerify,
                               org.eclipse.core.resources.IFolder outputFolder,
                               org.eclipse.core.runtime.IProgressMonitor monitor)
                        throws org.eclipse.core.runtime.CoreException,
                               java.io.IOException
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:
A map of class names mapped to error information. If the map is empty there were no errors registered during the preverification.
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException

preverifyJarFile

public java.util.Map preverifyJarFile(java.io.File jarFile,
                                      org.eclipse.core.resources.IFolder outputFolder,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)
                               throws org.eclipse.core.runtime.CoreException,
                                      java.io.IOException
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:
A map of class names mapped to error information. If the map is empty there were no errors registered during the preverification.
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException

setDeployedJarFileUpToDate

public void setDeployedJarFileUpToDate(boolean upToDate)
                                throws org.eclipse.core.runtime.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:
org.eclipse.core.runtime.CoreException - if there is a problem setting the information.