org.apache.pluto.descriptors.services.impl
Class AbstractPortletAppDescriptorService

java.lang.Object
  extended byorg.apache.pluto.descriptors.services.impl.AbstractCastorDescriptorService
      extended byorg.apache.pluto.descriptors.services.impl.AbstractPortletAppDescriptorService
All Implemented Interfaces:
PortletAppDescriptorService
Direct Known Subclasses:
ContextPortletAppDescriptorServiceImpl, FilePortletAppDescriptorServiceImpl, StreamPortletAppDescriptorServiceImpl

public abstract class AbstractPortletAppDescriptorService
extends org.apache.pluto.descriptors.services.impl.AbstractCastorDescriptorService
implements PortletAppDescriptorService

Abstract Implementation of the Web Application Deployment Descriptor service. Provides default implementation of the service; requiring only that subclasses provide the input streams to/from the actual descriptor.

Since:
Mar 5, 2005
Version:
$Id: AbstractPortletAppDescriptorService.java 156743 2005-03-10 05:50:30Z ddewolf $
Author:
David H. DeWolf

Field Summary
static java.lang.String PORTLET_XML_MAPPING
           
 
Constructor Summary
protected AbstractPortletAppDescriptorService(java.lang.String contextPath)
          Default Constructor.
protected AbstractPortletAppDescriptorService(java.lang.String contextPath, boolean create)
          Secondary Constructor.
 
Method Summary
protected  org.exolab.castor.mapping.Mapping getCastorMapping()
          Read and Retrieve the Web Application's Castor Mapping resource.
 java.lang.String getContextPath()
          Retrieve the name of the context path within which PortletApps retrieved from this service reside.
protected  java.lang.String getDTDUri()
          Retrieve the Web Application Deployment descriptor's DTD uri.
protected  boolean getIgnoreExtraElements()
           
protected abstract  java.io.InputStream getInputStream()
           
protected abstract  java.io.OutputStream getOutputStream()
           
protected  java.lang.String getPublicId()
          Retrieve the Web Application Deployment descriptor's public Id.
 PortletAppDD read()
          Read the Web Application Deployment Descriptor.
protected  java.lang.Object readInternal()
          Read the and convert the descriptor into it's Object graph.
 void write(PortletAppDD portlet)
          Write the deployment descriptor.
protected  void writeInternal(java.lang.Object object)
          Write the object graph to it's descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.pluto.descriptors.services.PortletAppDescriptorService
getContextPath
 

Field Detail

PORTLET_XML_MAPPING

public static final java.lang.String PORTLET_XML_MAPPING
See Also:
Constant Field Values
Constructor Detail

AbstractPortletAppDescriptorService

protected AbstractPortletAppDescriptorService(java.lang.String contextPath)
Default Constructor.


AbstractPortletAppDescriptorService

protected AbstractPortletAppDescriptorService(java.lang.String contextPath,
                                              boolean create)
Secondary Constructor. Create an instance and specify whether or not a default/empty instance should be returned if no descriptor is available.

Parameters:
create -
Method Detail

read

public PortletAppDD read()
                  throws java.io.IOException
Read the Web Application Deployment Descriptor.

Specified by:
read in interface PortletAppDescriptorService
Returns:
WebAppDD instance representing the descriptor.
Throws:
java.io.IOException

write

public void write(PortletAppDD portlet)
           throws java.io.IOException
Write the deployment descriptor.

Specified by:
write in interface PortletAppDescriptorService
Parameters:
portlet -
Throws:
java.io.IOException

getPublicId

protected java.lang.String getPublicId()
Retrieve the Web Application Deployment descriptor's public Id.

Returns:

getDTDUri

protected java.lang.String getDTDUri()
Retrieve the Web Application Deployment descriptor's DTD uri.

Returns:

getCastorMapping

protected org.exolab.castor.mapping.Mapping getCastorMapping()
                                                      throws java.io.IOException,
                                                             org.exolab.castor.mapping.MappingException
Read and Retrieve the Web Application's Castor Mapping resource.

Returns:
Throws:
java.io.IOException
org.exolab.castor.mapping.MappingException

getIgnoreExtraElements

protected boolean getIgnoreExtraElements()

getContextPath

public java.lang.String getContextPath()

readInternal

protected java.lang.Object readInternal()
                                 throws java.io.IOException
Read the and convert the descriptor into it's Object graph.

Returns:
Throws:
java.io.IOException

writeInternal

protected void writeInternal(java.lang.Object object)
                      throws java.io.IOException
Write the object graph to it's descriptor.

Parameters:
object -
Throws:
java.io.IOException

getInputStream

protected abstract java.io.InputStream getInputStream()
                                               throws java.io.IOException
Throws:
java.io.IOException

getOutputStream

protected abstract java.io.OutputStream getOutputStream()
                                                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003-2005 . All Rights Reserved.