Class HomeFactoryBase

  extended byorg.sakaiproject.metaobj.shared.mgt.factories.HomeFactoryBase
All Implemented Interfaces:
Direct Known Subclasses:
BinaryFileHomeFactoryImpl, DbXmlHomeFactoryImpl, InteractionHomeFactoryImpl, MapHomeFactoryImpl, XmlHomeFactoryImpl

public abstract class HomeFactoryBase
extends Object
implements HomeFactory

Created by IntelliJ IDEA. User: John Ellis Date: May 14, 2004 Time: 4:22:36 PM To change this template use File | Settings | File Templates.

Constructor Summary
Method Summary
protected  void addHome(ReadableObjectHome newHome)
 ReadableObjectHome findHomeByExternalId(String externalId, Id worksiteId)
          Find a home by an external id.
 Map getHomes(Class requiredHomeType)
          Map of certain homes.
 Map getWorksiteHomes(Id worksiteId)
 void reload()
          forces reloading of any cached homes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.sakaiproject.metaobj.shared.mgt.HomeFactory
getHome, getHomes, handlesType

Constructor Detail


public HomeFactoryBase()
Method Detail


public void reload()
Description copied from interface: HomeFactory
forces reloading of any cached homes. Allows configuration changes to occur at runtime.

Specified by:
reload in interface HomeFactory


public ReadableObjectHome findHomeByExternalId(String externalId,
                                               Id worksiteId)
Description copied from interface: HomeFactory
Find a home by an external id. This id should be unique and naturally occuring. This is used for matching up a home imported from another worksite or system when importing things that use Homes (ie. presentation templates, matrices, etc)

Specified by:
findHomeByExternalId in interface HomeFactory
externalId - naturally occuring id (like the document root and system id of an xml document)
worksiteId - The worksite to import it into or null for global import
the home if found or null.


protected void addHome(ReadableObjectHome newHome)


public Map getHomes(Class requiredHomeType)
Description copied from interface: HomeFactory
Map of certain homes. This map will map the object type as a String to the home as a ReadableObjectHome. The home may support more features. This can be determined by checking instanceof on other home interfaces.

All the homes returned will implement the requiredHomeType interface. This method can be used to get homes that support certain features.

Specified by:
getHomes in interface HomeFactory
requiredHomeType - interface that all returned homes will be an implementation of
map of object type to home


public Map getWorksiteHomes(Id worksiteId)
Specified by:
getWorksiteHomes in interface HomeFactory
worksiteId -
a map with all worksite and global homes