net.datacrow.core.modules
Class ModuleJar

java.lang.Object
  extended by net.datacrow.core.modules.ModuleJar

public class ModuleJar
extends java.lang.Object

A module jar is used to physically store the module. A module jar contains a small icon, a large icon and the XML module definition.

Author:
Robert Jan van der Waals

Constructor Summary
ModuleJar(java.lang.String filename)
          Initializes the XML module.
ModuleJar(XmlModule module)
          Initializes the XML module.
 
Method Summary
 boolean delete()
          Deletes the jar file from the disk (cannot be undone).
 XmlModule getModule()
          Retrieves the XML module definition.
 void load()
          Loads the module jar's content into memory.
 void save()
          Physically stores the module jar to disk.
 void setFilename(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleJar

public ModuleJar(java.lang.String filename)
Initializes the XML module.

Parameters:
filename -

ModuleJar

public ModuleJar(XmlModule module)
Initializes the XML module.

Parameters:
module -
Method Detail

setFilename

public void setFilename(java.lang.String filename)

getModule

public XmlModule getModule()
Retrieves the XML module definition.


save

public void save()
          throws ModuleJarException
Physically stores the module jar to disk.

Throws:
ModuleJarException
See Also:
filename

delete

public boolean delete()
Deletes the jar file from the disk (cannot be undone).

Returns:

load

public void load()
          throws ModuleUpgradeException,
                 ModuleJarException,
                 InvalidModuleXmlException
Loads the module jar's content into memory. Loads the icons and the XML definition.

Throws:
ModuleUpgradeException
ModuleJarException
InvalidModuleXmlException