com.uwyn.rife.cmf.dam
Class ContentDataUser<ResultType,DataType>

java.lang.Object
  extended by com.uwyn.rife.cmf.dam.ContentDataUser<ResultType,DataType>
All Implemented Interfaces:
Cloneable

public abstract class ContentDataUser<ResultType,DataType>
extends Object
implements Cloneable


Field Summary
protected  DataType mData
           
 
Constructor Summary
ContentDataUser()
          Creates a new instance.
ContentDataUser(DataType data)
          Creates a new instance with a data object.
 
Method Summary
 ContentDataUser<ResultType,DataType> clone()
          Simply clones the instance with the default clone method since this class contains no member variables.
 DataType getData()
          Retrieves the data object that was provided through the constructor.
 void throwException(Exception exception)
          Calling this method makes it possible to throw a checked exception from within this class.
abstract  ResultType useContentData(Object contentData)
          Should be implemented by all extending classes.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mData

protected DataType mData
Constructor Detail

ContentDataUser

public ContentDataUser()
Creates a new instance.

Since:
1.0

ContentDataUser

public ContentDataUser(DataType data)
Creates a new instance with a data object.

Since:
1.0
Method Detail

getData

public DataType getData()
Retrieves the data object that was provided through the constructor.

Returns:
this intance's data object
Since:
1.0

throwException

public void throwException(Exception exception)
                    throws InnerClassException
Calling this method makes it possible to throw a checked exception from within this class.

To catch it you should surround the using method with a try-catch block that catching InnerClassException. The original exception is then available through getCause() and can for example be rethrown.

Throws:
InnerClassException - when a checked exception needs to be thrown from within this class and caught outside the caller.
Since:
1.0

useContentData

public abstract ResultType useContentData(Object contentData)
                                   throws InnerClassException
Should be implemented by all extending classes.

Throws:
InnerClassException
Since:
1.0

clone

public ContentDataUser<ResultType,DataType> clone()
Simply clones the instance with the default clone method since this class contains no member variables.

Overrides:
clone in class Object
Since:
1.0


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.