org.xoe.core.packages
Interface IPackageXMLHandler

All Superinterfaces:
Constants, IService
All Known Implementing Classes:
FileIteratingInstaller, InstallScriptHandler, BaseInstaller, ServiceInstaller, MimeTypeInstaller

public interface IPackageXMLHandler
extends IService

Interface that installer classes must use to generate package information and perform install/remove steps.

A handler will be called upon when dependencies and requirements are found in the PackageDescription that match the NamespaceURI of the handler and also when a package is installed or uninstalled.

N.B: A handler for "http://www.foo.com/basepath" is also the handler for "http://www.foo.com/basepath/extendedpath" but a handler for the entire namespace will take precidence.


Field Summary
static String FEATURE_NAMESPACE
           
static String FUNCTIONALITY
           
static String INTERFACE
           
 
Fields inherited from interface org.xoe.core.Constants
ACTION_ATTR, ADD, ADD_APP, AMPERSAND_KEY, AMPERSAND_SYMBOL, AMPERSAND_SYMBOL_STRING, APOSTROPHE_KEY, APOSTROPHE_SYMBOL, ASCENDING_SORT, BACK, BANNER_ATTR, BEEP, BEEP_PROPERTY, CONTEXT_ATTR, COPYRIGHT_KEY, COPYRIGHT_SYMBOL, COUNTRY_PROPERTY, DATA_DOC, DEFAULT_BOOTSTRAP, DEFAULT_NAMESPACE, DEFAULT_THEME, DEFAULT_THEMES_DIR, DEFAULT_VIEW, DELETE, DESCENDING_SORT, DISPLAY, DISPLAY_VIEW, DOCTYPE_NAME_NS_XHTML, DOUBLE_QUOTE_KEY, DOUBLE_QUOTE_SYMBOL, EDIT, EDIT_ITEM_VIEW, EXTENSION_ALL, EXTENSION_DTD, EXTENSION_HTML, EXTENSION_LNK, EXTENSION_WML, EXTENSION_XHTML, EXTENSION_XML, EXTENSION_XOE, EXTENSION_XOE_CONFIG, EXTENSION_ZIP, FEATURE_DOCTYPE_NAME_NS, FEATURE_EXTENSION, FEATURE_MIMETYPE, FILE_PROTOCOL, FORWARD, FUNCTION_CONTENT_HANDLER, GREATER_THAN_KEY, GREATER_THAN_SYMBOL, HIDE_IF_ATTR, HOMEDIR_PROPERTY, HREF_ATTR, INSERT_BEFORE_ATTR, LANGUAGE_PROPERTY, LAUNCH, LESSER_THAN_KEY, LESSER_THAN_SYMBOL, LOADTHEME, LOGGING_PROPERTY, MID_DOT_KEY, MID_DOT_SYMBOL, MIMETYPE_ALL, MIMETYPE_APPLICATION_XOE, MIMETYPE_APPLICATION_ZIP, MIMETYPE_STASHDIR, MIMETYPE_TEXT_HTML, MIMETYPE_TEXT_PLAIN, MIMETYPE_TEXT_VND_TVT_LNK, MIMETYPE_TEXT_WML, MIMETYPE_TEXT_XML, MIMETYPE_TEXT_XML_DTD, MIMETYPE_UNKNOWN, NAME_ATTR, NAMESPACE_SEPARATOR, NEW, NEW_ITEM_VIEW, NO_PATH, NON_BREAKING_SPACE_KEY, NON_BREAKING_SPACE_SYMBOL, NUM_LAST_APPS, ONCHANGE_ATTR, ONCLICK_ATTR, ONKEYPRESS_ATTR, ONLOAD_ATTR, ONMOUSEDOWN_ATTR, ONMOUSEOUT_ATTR, ONMOUSEOVER_ATTR, ONMOUSEUP_ATTR, PACKAGE_ARCHIVE_ROOT, PARENT_FRAME, PKG_ARCHIVE_ATTR, PKG_URI_ATTR, PKG_WORKSPACE_ATTR, PREVIOUS_DIR, PROPERTY_PREFIX, QUERY_DELIMITER, REFRESH, RESET, SAVE, SCREEN_COLORS_PROPERTY, SCREEN_HEIGHT_PROPERTY, SCREEN_TYPE_PROPERTY, SCREEN_WIDTH_PROPERTY, SCRIPT_PROPERTY, SCRIPT_SUPPORT, SELECT, SORT_BANNER_ATTR, SORT_ORDER_ATTR, SRC_ATTR, STASH_DIR_PROPERTY, STASH_FILE_SEPARATOR, STASH_PROTOCOL, STOP, STYLE_ATTR, TEMP_DIR, THEME_PROPERTY, THEMES_DIR_PROPERTY, TOP, TRIGGER_ATTR, UNICODE_DECIMAL_SYMBOL, UNICODE_HEX_SYMBOL, UNKNOWN_ICON, UNSET_NODE_TYPE, URL_CONTEXT_ATTR, USER_NAME, USERDIR_PROPERTY, VALUE_ATTR, WML_NAMESPACE, XHTML_NAMESPACE, XML, XML_PREFIX_NAMESPACE, XMLNS, XMLNS_NAMESPACE, XOE_CONFIG_DOCTYPE_NAME_NS, XOE_LOCALIZE, XPATH_ATTR
 
Method Summary
 Dependency buildDependency(org.w3c.dom.Element depEl)
          Build a dependency from an element found in a package description document (Conflicts and dependencies have the same structure).
 Vector generateConflicts()
          This function is used at build time.
 Vector generateProvides()
          This function is used at build time.
 Vector generateRequires()
          This function is used at build time.
 String[] getHandlerPredependencies()
          Return the namespaces of handlers that must be called before this one at package install time.
 String getNamespaceURI()
          Returns the namespace URI associated with this installer.
 void install(XoePackage xoePackage, Proviso[] provisos)
          Perform any install time operations
 void setPackage(XoePackage p)
          This function is used at build time.
 void uninstall(XoePackage xoePackage, Proviso[] provisos)
          Perform any uninstall time operations
 void verify(XoePackage xoePackage, Proviso[] provisos)
          Pre-install check to make sure the package makes sense
 
Methods inherited from interface org.xoe.core.services.IService
getFeatures, getFunctionalities, getInformation, getInterfaces, init
 

Field Detail

INTERFACE

public static final String INTERFACE

FUNCTIONALITY

public static final String FUNCTIONALITY

FEATURE_NAMESPACE

public static final String FEATURE_NAMESPACE
Method Detail

buildDependency

public Dependency buildDependency(org.w3c.dom.Element depEl)
                           throws PackageDescriptionException
Build a dependency from an element found in a package description document (Conflicts and dependencies have the same structure). The Dependency returned must have an xpath defined.

getNamespaceURI

public String getNamespaceURI()
Returns the namespace URI associated with this installer. This URI is used to identify the handler responsible for expanding dependencies and to refer to other installers in getHandlerPredependencies .

getHandlerPredependencies

public String[] getHandlerPredependencies()
Return the namespaces of handlers that must be called before this one at package install time. During uninstallation, the order is reversed.
Returns:
an array of Strings corresponding to the namespace URIs of predependee handlers.

verify

public void verify(XoePackage xoePackage,
                   Proviso[] provisos)
            throws PackageException
Pre-install check to make sure the package makes sense

Use this function to prevent package installation from starting if there are any fatal flaws identified.

Parameters:
xoePackage - the package to be verified
provisos - any provisos in the package that match this installer's namespace
Throws:
PackageException - if fatal flaws are identified in the package

install

public void install(XoePackage xoePackage,
                    Proviso[] provisos)
             throws InstallException
Perform any install time operations

Any installers identified by getHandlerPredependencies will already have been called.

Parameters:
xoePackage - the package being installed
provisos - any provisos in the package that match this installer's namespace
Throws:
InstallException - if installation fails

uninstall

public void uninstall(XoePackage xoePackage,
                      Proviso[] provisos)
Perform any uninstall time operations

Any installers identified by getHandlerPredependencies will not have been called yet.

Parameters:
xoePackage - the package being uninstalled
provisos - any provisos in the package that match this installer's namespace

setPackage

public void setPackage(XoePackage p)
                throws PackageException
This function is used at build time. It may not be supported in future releases and its use is not advised. Implementations should define it as an empty function.

generateRequires

public Vector generateRequires()
                        throws PackageException
This function is used at build time. It may not be supported in future releases and its use is not advised. Implementations should define it to return null.

generateConflicts

public Vector generateConflicts()
                         throws PackageException
This function is used at build time. It may not be supported in future releases and its use is not advised. Implementations should define it to return null.

generateProvides

public Vector generateProvides()
                        throws PackageException
This function is used at build time. It may not be supported in future releases and its use is not advised. Implementations should define it to return null.