com.bea.apps.groupspace.content
Class ContentFactoryImpl<T extends ContentBase>

java.lang.Object
  extended by com.bea.apps.groupspace.content.ContentFactoryImpl<T>
All Implemented Interfaces
ContentFactory<T>, Serializable
Direct Known Subclasses:
CmBrowserContentBaseFactory, ContentBaseFactory

public abstract class ContentFactoryImpl<T extends ContentBase>
extends Object
implements ContentFactory<T>, Serializable

Copyright (c) 2005-2006 by BEA Systems, Inc. All Rights Reserved.

See Also
Serialized Form

Field Summary
protected static Debug debug
           
 
Constructor Summary
protected ContentFactoryImpl()
           
 
Method Summary
 T createContentWrapper(Node nodeToWrap, Class<T> typeConstraint)
          Creates a thing of Type T that wraps the provided node;
 T createContentWrapper(String cmTypeName, Class<T> typeConstraint)
          Creates a thing of Type T corresponding to the cmTypeName provided
protected abstract  Class getClassFromMap(String cmTypeName)
           
protected abstract  Class getMinimumClass()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static Debug debug
Constructor Detail

ContentFactoryImpl

protected ContentFactoryImpl()
Method Detail

createContentWrapper

public T createContentWrapper(Node nodeToWrap,
                              Class<T> typeConstraint)
                                           throws InstantiationException,
                                                  IllegalAccessException
Description copied from interface: ContentFactory
Creates a thing of Type T that wraps the provided node;

Specified by:
createContentWrapper in interface ContentFactory<T extends ContentBase>
Parameters
nodeToWrap - - CM node to be wrapped within a ContentBase object
typeConstraint - - Class that represents the minimum class supported; same as T for homogenious, same as class that T must extend for heterogenious
Returns
instance of T that wraps the node
Throws
InstantiationException - - from call to constructor via reflection
IllegalAccessException - - from call to constructor via reflection

createContentWrapper

public T createContentWrapper(String cmTypeName,
                              Class<T> typeConstraint)
                                           throws InstantiationException,
                                                  IllegalAccessException
Description copied from interface: ContentFactory
Creates a thing of Type T corresponding to the cmTypeName provided

Specified by:
createContentWrapper in interface ContentFactory<T extends ContentBase>
Parameters
cmTypeName - - type name for which a wrapper is needed
typeConstraint - - Class that represents the minimum class supported; same as T for homogenious, same as class that T must extend for heterogenious
Returns
instance of T that wraps the node
Throws
InstantiationException - - from call to constructor via reflection
IllegalAccessException - - from call to constructor via reflection

getMinimumClass

protected abstract Class getMinimumClass()
Returns
should match the class T extends as specified in the class declaration

getClassFromMap

protected abstract Class getClassFromMap(String cmTypeName)
Returns
Class keyed by the string cmTypeName


Copyright © 2006 BEA Systems, Inc. All Rights Reserved