org.apache.pluto.portalImpl.services.pageregistry
Class PageRegistryServiceFileImpl

java.lang.Object
  extended by org.apache.pluto.portalImpl.services.Service
      extended by org.apache.pluto.portalImpl.services.pageregistry.PageRegistryService
          extended by org.apache.pluto.portalImpl.services.pageregistry.PageRegistryServiceFileImpl

public class PageRegistryServiceFileImpl
extends PageRegistryService

A simple XML Castor file based implementation of the PageRegistryService.

This store persit the PageRegistry informations.


Field Summary
static java.lang.String CONFIG_FILE
           
private static java.lang.String CONFIG_MAPPING
           
static java.lang.String DEFAULT_MAPPING
           
private static java.util.HashMap fragments
           
private  Logger log
           
private  Mapping mapping
           
private  PortalImpl registry
           
private  RootFragment root
           
private  ServletContext servletContext
           
 
Constructor Summary
PageRegistryServiceFileImpl()
           
 
Method Summary
 void addFragment(Fragment fragment)
          Add a fragment to the page registry.
 Fragment getFragment(java.lang.String id)
          Returns the fragment with the given id.
 RootFragment getRootFragment()
          Returns the description of the complete portal site.
 void init(ServletConfig config, Properties properties)
          Initializes the service using the servlet context and the service properties.
private  void load()
           
 void postInit(ServletConfig config)
          This methods can be used to setup things after the services has been initialized via init.
 
Methods inherited from class org.apache.pluto.portalImpl.services.Service
destroy, destroy, init, postInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILE

public static final java.lang.String CONFIG_FILE
See Also:
Constant Field Values

DEFAULT_MAPPING

public static final java.lang.String DEFAULT_MAPPING
See Also:
Constant Field Values

CONFIG_MAPPING

private static final java.lang.String CONFIG_MAPPING
See Also:
Constant Field Values

mapping

private Mapping mapping

servletContext

private ServletContext servletContext

registry

private PortalImpl registry

root

private RootFragment root

log

private Logger log

fragments

private static java.util.HashMap fragments
Constructor Detail

PageRegistryServiceFileImpl

public PageRegistryServiceFileImpl()
Method Detail

init

public void init(ServletConfig config,
                 Properties properties)
          throws java.lang.Exception
Description copied from class: Service
Initializes the service using the servlet context and the service properties.

Overrides:
init in class Service
Parameters:
config - the servlet context
properties - the service properties
Throws:
java.lang.Exception - if the initialization fails

postInit

public void postInit(ServletConfig config)
              throws java.lang.Exception
Description copied from class: Service
This methods can be used to setup things after the services has been initialized via init.

Overrides:
postInit in class Service
Throws:
java.lang.Exception - if the postInit fails for any reason

getRootFragment

public RootFragment getRootFragment()
Description copied from class: PageRegistryService
Returns the description of the complete portal site.

Specified by:
getRootFragment in class PageRegistryService
Returns:
the object model description

getFragment

public Fragment getFragment(java.lang.String id)
Description copied from class: PageRegistryService
Returns the fragment with the given id. return the fragment object with this id

Specified by:
getFragment in class PageRegistryService

addFragment

public void addFragment(Fragment fragment)
                 throws java.lang.Exception
Description copied from class: PageRegistryService
Add a fragment to the page registry.

Specified by:
addFragment in class PageRegistryService
Parameters:
fragment - the fragment to add
Throws:
java.lang.Exception

load

private void load()
           throws java.lang.Exception
Throws:
java.lang.Exception