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

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

public abstract class AbstractPortletAppDescriptorService
extends 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
private  boolean create
          Flag to determine if an empty deployment descriptor should be created (in memory) if the actual descriptor does not exist.
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
private  void dump(java.net.URL url)
           
protected  Mapping getCastorMapping()
          Read and Retrieve the Web Application's Castor Mapping resource.
protected  java.lang.String getDTDUri()
          Retrieve the Web Application Deployment descriptor's DTD uri.
protected  boolean getIgnoreExtraElements()
           
protected  java.lang.String getPublicId()
          Retrieve the Web Application Deployment descriptor's public Id.
 PortletAppDD read()
          Read the Web Application Deployment Descriptor.
 void write(PortletAppDD portlet)
          Write the deployment descriptor.
 
Methods inherited from class org.apache.pluto.descriptors.services.impl.AbstractCastorDescriptorService
getContextPath, getInputStream, getOutputStream, readInternal, writeInternal
 
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

create

private boolean create
Flag to determine if an empty deployment descriptor should be created (in memory) if the actual descriptor does not exist.

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.

Specified by:
getPublicId in class AbstractCastorDescriptorService
Returns:

getDTDUri

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

Specified by:
getDTDUri in class AbstractCastorDescriptorService
Returns:

getCastorMapping

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

Specified by:
getCastorMapping in class AbstractCastorDescriptorService
Returns:
Throws:
java.io.IOException
org.exolab.castor.mapping.MappingException
MappingException

getIgnoreExtraElements

protected boolean getIgnoreExtraElements()
Overrides:
getIgnoreExtraElements in class AbstractCastorDescriptorService

dump

private void dump(java.net.URL url)