org.apache.beehive.wsm.jsr181.model.jsr181
Class Jsr181ObjectModelStore

Object
  extended by Jsr181ObjectModelStore

public class Jsr181ObjectModelStore
extends Object

Encapsulates all knowledge about where and how object models are persisted.


Constructor Summary
Jsr181ObjectModelStore(AnnotationProcessorEnvironment env)
          Constructor.
 
Method Summary
static File getLocation(String className)
          Encapsulates the encoding of the pathname for object models.
static BeehiveWsTypeMetadata load(Class clazz)
           
static BeehiveWsTypeMetadata load(InputStream is)
           
static Class loadWebServiceClass(String className)
          Tries to find the class with a given className.
 void store(BeehiveWsTypeMetadata objectModel)
          Persists a given objectModel.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jsr181ObjectModelStore

public Jsr181ObjectModelStore(AnnotationProcessorEnvironment env)
Constructor.

Parameters:
env - A context that is required to access the filer. TODO needs to be abstracted further.
Method Detail

getLocation

public static File getLocation(String className)
Encapsulates the encoding of the pathname for object models.

Parameters:
-
Returns:

load

public static BeehiveWsTypeMetadata load(Class clazz)
                                  throws IOException,
                                         ClassNotFoundException
Parameters:
clazz -
Throws:
IOException
ClassNotFoundException

load

public static BeehiveWsTypeMetadata load(InputStream is)
                                  throws IOException,
                                         ClassNotFoundException
Parameters:
is -
Throws:
IOException
ClassNotFoundException

store

public void store(BeehiveWsTypeMetadata objectModel)
           throws IOException
Persists a given objectModel.

Parameters:
objectModel - The object mode to be persisted.
Throws:
IOException - If the object model cannot be persisted.

loadWebServiceClass

public static Class loadWebServiceClass(String className)
                                 throws ClassNotFoundException
Tries to find the class with a given className. If className is a simple name, the method tries to find a matching fully qualified class name. The respective class is then loaded and returned.

Parameters:
className - A class name; may be a fully qualified or a simple class name.
Returns:
A class with a matching name.
Throws:
ClassNotFoundException