org.apache.wsif.mapping
Class WSIFMapperFactory

java.lang.Object
  extended by org.apache.wsif.mapping.WSIFMapperFactory

public class WSIFMapperFactory
extends java.lang.Object

A factory to produce instances of WSIFMapper

Author:
Owen Burroughs

Constructor Summary
WSIFMapperFactory()
           
 
Method Summary
static WSIFMapper newMapper()
          Get a new WSIFMapper.
static WSIFMapper newMapper(boolean refresh)
          Get a new WSIFMapper.
static WSIFMapper newMapper(java.lang.String mapperClassName)
          Create a new instance of an implementation WSIFMapper.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSIFMapperFactory

public WSIFMapperFactory()
Method Detail

newMapper

public static WSIFMapper newMapper()
                            throws WSIFException
Get a new WSIFMapper. This method is equivalent to calling newMapper(false)

Returns:
A new instance of WSIFMapper
Throws:
An - exception if the class cannot be found or is not an implemenation of WSIFMapper
WSIFException

newMapper

public static WSIFMapper newMapper(boolean refresh)
                            throws WSIFException
Get a new WSIFMapper. This method allows the user to refresh the class name of the WSIFMapper to return. If the flag is true or a class name has not yet to be established the class name will be looked up in the following order:
  1. Look for a system property named org.apache.wsif.mapper
  2. Look for a property in wsif.properties called org.apache.wsif.mapper
  3. Use the default class name - org.apache.wsif.mapping.WSIFDefaultMapper
If the flag is false and a class name has already been establshed, that class name will be used.

Parameters:
refresh - A flag to indicate whether or not to reuse the class name for the WSIFMapper implementation if it has already been established rather than determine it again.
Returns:
A new instance of WSIFMapper
Throws:
An - exception if the class cannot be found or is not an implemenation of WSIFMapper
WSIFException

newMapper

public static WSIFMapper newMapper(java.lang.String mapperClassName)
                            throws WSIFException
Create a new instance of an implementation WSIFMapper. This method will attempt to use the class name given. If the class is not an instance of WSIFMapper an exception will be thrown. Calling this method will not override the class name stored by this instance of WSIFMapperFactory. The class is looked up in isolation.

Parameters:
mapperClassName - The class name of the implementation of WSIFMapper to use
Returns:
An instance of WSIFMapper
Throws:
An - exception if the class cannot be found or is not an implemenation of WSIFMapper
WSIFException


Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.