|
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 IMTJProject
This interface provides the basic methods that must be available in all projects provided by MTJ.
Features of MTJ projects include:
EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the MTJ team.
Method Summary | |
---|---|
void |
addMTJProjectListener(IMTJProjectListener projectListener)
Adds the listener to the collection of listeners who will be notified when the project state changes. |
void |
createPackage(boolean obfuscate,
boolean packageInactiveConfigs,
IProgressMonitor monitor)
Create a deployable JAR file package based on the contents available in the project. |
IJavaProject |
getJavaProject()
Returns the IJavaProject on which this
IMTJProject was created. |
IProject |
getProject()
Returns the IProject on which this IMTJProject
was created. |
MTJRuntimeList |
getRuntimeList()
Return the list of runtimes that are associated to the project. |
ISignatureProperties |
getSignatureProperties()
Get the ISignatureProperties associated with this project. |
void |
refreshClasspath(IProgressMonitor monitor)
Refresh the classpath for this project. |
void |
removeMTJProjectListener(IMTJProjectListener projectListener)
Removes the listener from the collection of listeners who will be notified when the project state changes. |
void |
saveMetaData()
Save the project's metadata. |
void |
setSignatureProperties(ISignatureProperties props)
Set the signature properties for using when signing deployable packages generated for this MTJ project. |
Method Detail |
---|
void addMTJProjectListener(IMTJProjectListener projectListener)
IMTJProjectListener
interface.
projectListener
- the listener that should be notified when the
project state changes.void createPackage(boolean obfuscate, boolean packageInactiveConfigs, IProgressMonitor monitor) throws CoreException
The process of creating a deployable is described bellow:
This method notifies all listeners after the package creation through the
invocation of IMTJProjectListener.packageCreated()
. Listeners
wont be notified in case the package creation fails.
obfuscate
- a boolean indicating whether to obfuscate the resulting
packaged code.packageInactiveConfigs
- a boolean indicating whether to create
packages for all configurations (including inactive
configurations) or just for the active one.monitor
- a progress monitor, or null
if progress
reporting is not desired.
CoreException
IJavaProject getJavaProject()
IJavaProject
on which this
IMTJProject
was created.
null
the IJavaProject
on which
this IMTJProject
was created.IProject getProject()
IProject
on which this IMTJProject
was created.
null
the IProject
on which this
IMTJProject
was created.MTJRuntimeList getRuntimeList()
ISignatureProperties getSignatureProperties() throws CoreException
If the project has no specific signing settings, the signature properties available in the workspace secure preferences will be used as default.
In case the project specific signing settings were not set correctly
(reading these settings from the project metadata is returning
null
) this method will return null
.
null
in case of invalid properties.
CoreException
- an error occur while decrypting the information
available in the signature properties.void refreshClasspath(IProgressMonitor monitor) throws CoreException, OperationCanceledException
This method removes all MTJ classpath specific markers previously set on the project, refreshes the classpath based on the active configuration and forces a full rebuild.
This method notifies all listeners after the package creation through the
invocation of IMTJProjectListener.classpathRefreshed()
. Listeners
wont be notified in case the classpath couldn't be refreshed.
monitor
- a progress monitor, or null
if progress
reporting is not desired.
CoreException
- if the classpath could not be set. Reasons include:
JavaConventions#validateClasspath(IJavaProject, IClasspathEntry[], IPath)
(JavaModelException).OperationCanceledException
- if the rebuild was canceled during
execution.void removeMTJProjectListener(IMTJProjectListener projectListener)
projectListener
- the listener that should no longer be notified
when the project state changes.void saveMetaData() throws CoreException
Should be called after
setSignatureProperties(ISignatureProperties)
to persist the
information set.
This method notifies all listeners after saving the metadata through the
invocation of IMTJProjectListener.metaDataSaved()
. Listeners wont
be notified in case the metadata could not be saved.
CoreException
- if fails to save the metadata.void setSignatureProperties(ISignatureProperties props)
This method notifies all listeners after setting the signature properties
through the invocation of
IMTJProjectListener.signaturePropertiesChanged()
. Listeners wont
be notified in case the signature properties could not be set.
props
- the signature properties for use on signing the deployable
packages.
|
Mobile Tools for Java Release 1.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |