org.apache.pluto.descriptors.services.castor
Class PortletAppDescriptorServiceImpl

java.lang.Object
  extended by org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl
All Implemented Interfaces:
PortletAppDescriptorService

public class PortletAppDescriptorServiceImpl
extends java.lang.Object
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: PortletAppDescriptorServiceImpl.java 156743 2005-03-10 05:50:30Z ddewolf $

Field Summary
static java.lang.String PORTLET_XML_MAPPING
           
protected static boolean USING_JAXP
          Whether or not Castor should use JAXP.
 
Constructor Summary
PortletAppDescriptorServiceImpl()
           
 
Method Summary
protected  org.exolab.castor.mapping.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(java.io.InputStream in)
          Read the Web Application Deployment Descriptor.
protected  java.lang.Object readInternal(java.io.InputStream is)
          Read the and convert the descriptor into it's Object graph.
protected  void setCastorMarshallerOptions(org.exolab.castor.xml.Marshaller marshaller, java.lang.Object beingMarshalled)
          Subclasses should override this method if they need to set options on the Castor marshaller, such as a doctype.
 void write(PortletAppDD portlet, java.io.OutputStream out)
          Write the deployment descriptor.
protected  void writeInternal(java.lang.Object object, java.io.OutputStream out)
          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
 

Field Detail

PORTLET_XML_MAPPING

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

USING_JAXP

protected static boolean USING_JAXP
Whether or not Castor should use JAXP. If Castor is not using JAXP, then default to the parser specified by org.exolab.castor.parser.

Constructor Detail

PortletAppDescriptorServiceImpl

public PortletAppDescriptorServiceImpl()
Method Detail

read

public PortletAppDD read(java.io.InputStream in)
                  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,
                  java.io.OutputStream out)
           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()

readInternal

protected java.lang.Object readInternal(java.io.InputStream is)
                                 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,
                             java.io.OutputStream out)
                      throws java.io.IOException
Write the object graph to it's descriptor.

Parameters:
object -
Throws:
java.io.IOException

setCastorMarshallerOptions

protected void setCastorMarshallerOptions(org.exolab.castor.xml.Marshaller marshaller,
                                          java.lang.Object beingMarshalled)
Subclasses should override this method if they need to set options on the Castor marshaller, such as a doctype.

Parameters:
marshaller - the Castor Marshaller
beingMarshalled - the Object being marshalled by Castor.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.