com.arsdigita.cms.installer
Class Installer

java.lang.Object
  extended bycom.arsdigita.cms.installer.Installer
All Implemented Interfaces:
com.arsdigita.kernel.PackageEventListener

public class Installer
extends Object
implements com.arsdigita.kernel.PackageEventListener

Provides methods to install the Content Management System.

This class includes methods to:

Version:
$Revision: #20 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Michael Pih (pihman@arsdigita.com), Jack Chung (flattop@arsdigita.com)

Field Summary
static String DISPATCHER_CLASS
           
static String LISTENER_CLASS
           
static String PACKAGE_KEY
           
static String STYLESHEET
           
static String versionId
           
 
Constructor Summary
Installer()
           
 
Method Summary
protected static void createDefaultResources(ContentSection section)
          Creates and maps default resources to the content section.
protected static com.arsdigita.kernel.PackageInstance createPackageInstance(String name)
          Creates the CMS package type.
protected static com.arsdigita.kernel.PackageType createPackageType()
          Creates the CMS package type.
protected static com.arsdigita.categorization.Category createRootCategory(String name)
          Creates the root category for a content section.
protected static Folder createRootFolder(String name)
          Creates the root folder for a content section.
protected static com.arsdigita.kernel.SiteNode mountPackageInstance(com.arsdigita.kernel.PackageInstance instance, String location)
          Mounts a CMS package instance.
 void onCreate(com.arsdigita.kernel.PackageInstance pkg)
          This method is called when a new package instance is created.
 void onDelete(com.arsdigita.kernel.PackageInstance pkg)
          This method is called when a package instance is deleted.
 void onMount(com.arsdigita.kernel.SiteNode siteNode, com.arsdigita.kernel.PackageInstance pkg)
          This method is called when a package instance is mounted on a siteNode.
 void onUnmount(com.arsdigita.kernel.SiteNode siteNode, com.arsdigita.kernel.PackageInstance pkg)
          This method is called when a package instance is unmounted from a siteNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

PACKAGE_KEY

public static final String PACKAGE_KEY
See Also:
Constant Field Values

DISPATCHER_CLASS

public static final String DISPATCHER_CLASS
See Also:
Constant Field Values

LISTENER_CLASS

public static final String LISTENER_CLASS
See Also:
Constant Field Values

STYLESHEET

public static final String STYLESHEET
See Also:
Constant Field Values
Constructor Detail

Installer

public Installer()
Method Detail

createPackageType

protected static com.arsdigita.kernel.PackageType createPackageType()
                                                             throws com.arsdigita.domain.DataObjectNotFoundException

Creates the CMS package type.

This includes creating and registering XSL stylesheets to the CMS . package type and registering privileges for use by CMS.

Returns:
The CMS package type
Throws:
com.arsdigita.domain.DataObjectNotFoundException

createPackageInstance

protected static com.arsdigita.kernel.PackageInstance createPackageInstance(String name)
                                                                     throws com.arsdigita.domain.DataObjectNotFoundException

Creates the CMS package type.

This includes creating and registering XSL stylesheets to the CMS . package type and registering privileges for use by CMS.

Parameters:
name - The name of the package instance
Returns:
A new CMS package instance
Throws:
com.arsdigita.domain.DataObjectNotFoundException

mountPackageInstance

protected static com.arsdigita.kernel.SiteNode mountPackageInstance(com.arsdigita.kernel.PackageInstance instance,
                                                                    String location)

Mounts a CMS package instance.

This includes creating and registering XSL stylesheets to the CMS . package type and registering privileges for use by CMS.

Parameters:
instance - The package instance
location - The location of the package instance (and content section)
Returns:
The SiteNode where the content section is mounted at

createDefaultResources

protected static void createDefaultResources(ContentSection section)
Creates and maps default resources to the content section.

Parameters:
section - The content section MP: create resource types. MP: use the resources API. MP: only create resources once.

createRootFolder

protected static Folder createRootFolder(String name)
Creates the root folder for a content section.

Parameters:
name - The name of the content section
Returns:
The root folder

createRootCategory

protected static com.arsdigita.categorization.Category createRootCategory(String name)
Creates the root category for a content section.

Parameters:
name - The name of the content section
Returns:
The root category

onMount

public void onMount(com.arsdigita.kernel.SiteNode siteNode,
                    com.arsdigita.kernel.PackageInstance pkg)
This method is called when a package instance is mounted on a siteNode. It does nothing.

Specified by:
onMount in interface com.arsdigita.kernel.PackageEventListener
Parameters:
siteNode - The SiteNode where the instance is mounted.
pkg - The instance being mounted.

onUnmount

public void onUnmount(com.arsdigita.kernel.SiteNode siteNode,
                      com.arsdigita.kernel.PackageInstance pkg)
This method is called when a package instance is unmounted from a siteNode. It does nothing.

Specified by:
onUnmount in interface com.arsdigita.kernel.PackageEventListener
Parameters:
siteNode - The SiteNode where the instance is mounted.
pkg - The instance being unmounted.

onCreate

public void onCreate(com.arsdigita.kernel.PackageInstance pkg)
This method is called when a new package instance is created. This method creates a content section and a new instance of the CMS package.

Specified by:
onCreate in interface com.arsdigita.kernel.PackageEventListener
Parameters:
pkg - a PackageInstance value

onDelete

public void onDelete(com.arsdigita.kernel.PackageInstance pkg)
This method is called when a package instance is deleted. It does nothing.

Specified by:
onDelete in interface com.arsdigita.kernel.PackageEventListener
Parameters:
pkg - a PackageInstance value


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC