org.apache.pluto.portalImpl.aggregation
Class AbstractFragment

java.lang.Object
  extended by org.apache.pluto.portalImpl.aggregation.AbstractFragment
All Implemented Interfaces:
Fragment
Direct Known Subclasses:
AbstractFragmentContainer, AbstractFragmentSingle

public abstract class AbstractFragment
extends java.lang.Object
implements Fragment


Field Summary
static java.lang.String BASE_ROOT
           
 
Constructor Summary
AbstractFragment(java.lang.String id, javax.servlet.ServletConfig config, Fragment parent, Fragment fragDesc, Navigation navigation)
           
 
Method Summary
abstract  void addChild(Fragment child)
          Adds an child to the fragment
abstract  void createURL(PortalURL url)
          Creates an URL pointing to this fragment
abstract  java.util.Collection getChildFragments()
          Returns a collection of all child fragments
protected  Fragment getFragmentDescription()
           
 java.lang.String getId()
          Returns the identifier of this fragment.
 Parameters getInitParameters()
          Returns the initialization parameters of this fragment
 java.lang.String getInitParameterValue(java.lang.String name)
           
 Navigation getNavigation()
          Returns the navigational information linked with this fragment.
 Fragment getParent()
          Returns the parent fragment.
 javax.servlet.ServletConfig getServletConfig()
           
abstract  boolean isPartOfURL(PortalURL url)
          Returns true if the fragment is part of the URL
abstract  void postService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
abstract  void preService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Is called to render the fragment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_ROOT

public static final java.lang.String BASE_ROOT
Constructor Detail

AbstractFragment

public AbstractFragment(java.lang.String id,
                        javax.servlet.ServletConfig config,
                        Fragment parent,
                        Fragment fragDesc,
                        Navigation navigation)
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException,
                    java.io.IOException
Description copied from interface: Fragment
Is called to render the fragment. This may be a page, column or even a portlet.

Specified by:
service in interface Fragment
Parameters:
request - the servlet request
response - the servlet response
Throws:
javax.servlet.ServletException
java.io.IOException

getParent

public Fragment getParent()
Description copied from interface: Fragment
Returns the parent fragment. If this fragment is the root fragment the return value is NULL

Specified by:
getParent in interface Fragment
Returns:
the parent fragment or NULL if this is the root fragment

getId

public java.lang.String getId()
Description copied from interface: Fragment
Returns the identifier of this fragment. Mostly this is a name visible in the Portal URL.

Specified by:
getId in interface Fragment
Returns:
the identifier of this fragment

getInitParameters

public Parameters getInitParameters()
Description copied from interface: Fragment
Returns the initialization parameters of this fragment

Specified by:
getInitParameters in interface Fragment
Returns:
the init parameters

getChildFragments

public abstract java.util.Collection getChildFragments()
Description copied from interface: Fragment
Returns a collection of all child fragments

Specified by:
getChildFragments in interface Fragment
Returns:
a collection containing objects implementing the interface fragment

addChild

public abstract void addChild(Fragment child)
Description copied from interface: Fragment
Adds an child to the fragment

Specified by:
addChild in interface Fragment
Parameters:
child - the child fragment

getNavigation

public Navigation getNavigation()
Description copied from interface: Fragment
Returns the navigational information linked with this fragment. The return value may be NULL, if no navigational information is defined.

Specified by:
getNavigation in interface Fragment
Returns:
the navigational information

createURL

public abstract void createURL(PortalURL url)
Description copied from interface: Fragment
Creates an URL pointing to this fragment

Specified by:
createURL in interface Fragment
Parameters:
url - the PortalURL object used

isPartOfURL

public abstract boolean isPartOfURL(PortalURL url)
Description copied from interface: Fragment
Returns true if the fragment is part of the URL

Specified by:
isPartOfURL in interface Fragment
Parameters:
url - the PortalURL object used
Returns:
true if the fragment is part of the URL

getServletConfig

public javax.servlet.ServletConfig getServletConfig()

getInitParameterValue

public java.lang.String getInitParameterValue(java.lang.String name)

preService

public abstract void preService(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

postService

public abstract void postService(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

getFragmentDescription

protected Fragment getFragmentDescription()


Copyright © 2003-2011 . All Rights Reserved.