org.apache.portals.graffito.jcr.mapper.impl
Class DigesterMapperImpl

java.lang.Object
  extended by org.apache.portals.graffito.jcr.mapper.impl.DigesterMapperImpl
All Implemented Interfaces:
Mapper

public class DigesterMapperImpl
extends java.lang.Object
implements Mapper

Digester implementation for Mapper

Author:
Lombart Christophe , Alexandru Popescu

Constructor Summary
DigesterMapperImpl()
          No-arg constructor.
DigesterMapperImpl(java.io.InputStream stream)
          Constructor
DigesterMapperImpl(java.io.InputStream[] streams)
          Constructor
DigesterMapperImpl(java.lang.String xmlFile)
          Constructor
DigesterMapperImpl(java.lang.String[] files)
          Constructor
 
Method Summary
 ClassDescriptor getClassDescriptorByClass(java.lang.Class clazz)
          Get the mapping defition to be used for a specific java bean
 ClassDescriptor getClassDescriptorByNodeType(java.lang.String jcrNodeType)
          Get the mapping defition to be used for a specific JCR node type
 void setDescriptorReader(DigesterDescriptorReader reader)
           
 void setMappingFile(java.lang.String file)
          Set a mapping file.
 void setMappingFiles(java.lang.String[] files)
           
 void setMappingStream(java.io.InputStream stream)
           
 void setMappingStreams(java.io.InputStream[] streams)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigesterMapperImpl

public DigesterMapperImpl()
No-arg constructor.


DigesterMapperImpl

public DigesterMapperImpl(java.lang.String xmlFile)
Constructor

Parameters:
xmlFile - The xml mapping file to read

DigesterMapperImpl

public DigesterMapperImpl(java.lang.String[] files)
Constructor

Parameters:
files - a set of xml mapping files to read

DigesterMapperImpl

public DigesterMapperImpl(java.io.InputStream stream)
Constructor

Parameters:
stream - The xml mapping file to read

DigesterMapperImpl

public DigesterMapperImpl(java.io.InputStream[] streams)
Constructor

Parameters:
streams - a set of mapping files to read
Method Detail

setMappingFile

public void setMappingFile(java.lang.String file)
Set a mapping file.

Parameters:
file - path to mapping file

setMappingFiles

public void setMappingFiles(java.lang.String[] files)
Parameters:
files -

setMappingStream

public void setMappingStream(java.io.InputStream stream)

setMappingStreams

public void setMappingStreams(java.io.InputStream[] streams)

setDescriptorReader

public void setDescriptorReader(DigesterDescriptorReader reader)

getClassDescriptorByClass

public ClassDescriptor getClassDescriptorByClass(java.lang.Class clazz)
Description copied from interface: Mapper
Get the mapping defition to be used for a specific java bean

Specified by:
getClassDescriptorByClass in interface Mapper
Parameters:
clazz - The java bean class
Returns:
The mapping class found for the desired java bean class
See Also:
Mapper.getClassDescriptorByClass(java.lang.Class)

getClassDescriptorByNodeType

public ClassDescriptor getClassDescriptorByNodeType(java.lang.String jcrNodeType)
Description copied from interface: Mapper
Get the mapping defition to be used for a specific JCR node type

Specified by:
getClassDescriptorByNodeType in interface Mapper
Parameters:
jcrNodeType - the jcr node type
Returns:
The mapping class found for the desired java bean class
See Also:
Mapper.getClassDescriptorByNodeType(String)


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.