org.apache.pluto.portlet.admin.util
Class PlutoAdminContext

java.lang.Object
  extended byorg.apache.pluto.portlet.admin.util.PlutoAdminContext

public class PlutoAdminContext
extends java.lang.Object

A singleton factory that holds methods to get various data on the Pluto install such as the path to the Pluto home directory held within properties files. A HashMap cache is used to store the properties (as a Properties object) when they are first loaded.

Author:
Craig Doremus

Method Summary
static java.lang.String getContainerHome()
          Finds home directory of the container that holds Pluto (usually Tomcat)
static java.lang.String getDeploymentPath()
          Accessor for the path to the portlet deployment directory (webapps in Tomcat container)
static PlutoAdminContext getInstance()
           
 java.lang.String getPageRegistryPath()
          Accessor for the full path to the pageregistry.xml file using the getPlutoHome() method.
 java.lang.String getPlutoHome()
          Uses properties in pluto-admin.properties to get the full path to the installed Pluto home directory, which in Tomcat is Pluto's webapps directory (usually 'pluto').
static java.lang.String getPlutoWebContext()
          Accessor for the web context for Pluto (default=pluto)
 java.lang.String getPortletContextsPath()
          Accessor for the full path to the portletcontexts.txt file
 java.lang.String getPortletEntityRegistryPath()
          Accessor for the full path to the portletentityregistry.xml file using the getPlutoHome() method.
static java.util.Properties getProperties()
           
static java.util.Properties getProperties(java.lang.String propFileName)
          Returns the Properties object from a properties file that is in the classpath.
static void parseDeploymentPaths(java.lang.String plutoHome)
          Parses out paths from the Pluto Home directory sent in from PortletContext.getRealPath("") call in ControllerPortlet.init()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PlutoAdminContext getInstance()

getPageRegistryPath

public java.lang.String getPageRegistryPath()
Accessor for the full path to the pageregistry.xml file using the getPlutoHome() method.

Returns:
The absolute path to pageregistry.xml
See Also:
getPlutoHome()

getPortletEntityRegistryPath

public java.lang.String getPortletEntityRegistryPath()
Accessor for the full path to the portletentityregistry.xml file using the getPlutoHome() method.

Returns:
The absolute path to portletentityregistry.xml
See Also:
getPlutoHome()

getPlutoHome

public java.lang.String getPlutoHome()
Uses properties in pluto-admin.properties to get the full path to the installed Pluto home directory, which in Tomcat is Pluto's webapps directory (usually 'pluto').

Returns:
The absolute path to the directory where the Pluto container is installed.

getProperties

public static java.util.Properties getProperties(java.lang.String propFileName)
Returns the Properties object from a properties file that is in the classpath. After it's first access, the properties are stored in a cache.

Parameters:
propFileName - Name of the properties file.
Returns:
Properties The filled properties object
Throws:
java.lang.NullPointerException - If the InputStream accessing the properties file is null.

getProperties

public static java.util.Properties getProperties()

getPortletContextsPath

public java.lang.String getPortletContextsPath()
Accessor for the full path to the portletcontexts.txt file


getContainerHome

public static java.lang.String getContainerHome()
Finds home directory of the container that holds Pluto (usually Tomcat)


parseDeploymentPaths

public static void parseDeploymentPaths(java.lang.String plutoHome)
Parses out paths from the Pluto Home directory sent in from PortletContext.getRealPath("") call in ControllerPortlet.init()

Parameters:
plutoHome - The _plutoHome to set.

getDeploymentPath

public static java.lang.String getDeploymentPath()
Accessor for the path to the portlet deployment directory (webapps in Tomcat container)


getPlutoWebContext

public static java.lang.String getPlutoWebContext()
Accessor for the web context for Pluto (default=pluto)



Copyright © 2003-2006 . All Rights Reserved.