net.sf.mmm.content.repository.base
Class AbstractCachedContentRepository

java.lang.Object
  extended by net.sf.mmm.content.base.AbstractContentObject.AbstractContentObjectModifier
      extended by net.sf.mmm.content.resource.base.AbstractContentResource.AbstractContentResourceModifier
          extended by net.sf.mmm.content.repository.base.AbstractContentRepository
              extended by net.sf.mmm.content.repository.base.AbstractCachedContentRepository
All Implemented Interfaces:
ContentObjectReadAccess, ContentObjectWriteAccess, ContentRepository

public abstract class AbstractCachedContentRepository
extends AbstractContentRepository

TODO: this class ...

Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Constructor Summary
AbstractCachedContentRepository()
          The constructor.
 
Method Summary
 ContentObject get(ContentId id)
          This method gets the ContentObject with the given id.
 int getClosedResourceCacheSize()
           
protected  AbstractContentObject getFromCache(SmartId id)
           
 int getLatestResourceCacheSize()
           
 void initialize()
          This method initializes this class.
 void move(ContentResource entity, ContentResource newParent)
          This method moves the given entity to the new parent given by newParent.
protected abstract  AbstractContentResource readResource(SmartId id)
           
 void rename(ContentObject entity, String newName)
          This method renames the given contentObject.
 void setClosedResourceCacheSize(int closedResourceCacheSize)
           
 void setLatestResourceCacheSize(int latestResourceCacheSize)
           
 
Methods inherited from class net.sf.mmm.content.repository.base.AbstractContentRepository
cast, create, createInstance, createVersion, get, get, get, getContentModel, getRawObject, getRootFolder, save, setContentModel, setRootFolder
 
Methods inherited from class net.sf.mmm.content.resource.base.AbstractContentResource.AbstractContentResourceModifier
setContentResourceParent
 
Methods inherited from class net.sf.mmm.content.base.AbstractContentObject.AbstractContentObjectModifier
setContentObjectClassAccess, setContentObjectDeletedFlag, setContentObjectId, setContentObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCachedContentRepository

public AbstractCachedContentRepository()
The constructor.

Method Detail

getClosedResourceCacheSize

public int getClosedResourceCacheSize()
Returns:
the closedResourceCacheSize

setClosedResourceCacheSize

public void setClosedResourceCacheSize(int closedResourceCacheSize)
Parameters:
closedResourceCacheSize - the closedResourceCacheSize to set

getLatestResourceCacheSize

public int getLatestResourceCacheSize()
Returns:
the latestResourceCacheSize

setLatestResourceCacheSize

public void setLatestResourceCacheSize(int latestResourceCacheSize)
Parameters:
latestResourceCacheSize - the latestResourceCacheSize to set

initialize

@PostConstruct
public void initialize()
This method initializes this class. It has to be called after construction and injection is completed.


getFromCache

protected AbstractContentObject getFromCache(SmartId id)
                                      throws ContentException
Throws:
ContentException

get

public ContentObject get(ContentId id)
                  throws ContentException
This method gets the ContentObject with the given id.

Parameters:
id - is the unique identifier of the requested object.
Returns:
the object with the given identifier.
Throws:
ContentException - if no object exists with the given ID.

readResource

protected abstract AbstractContentResource readResource(SmartId id)
                                                 throws ContentException
Throws:
ContentException

move

public void move(ContentResource entity,
                 ContentResource newParent)
          throws ContentException
This method moves the given entity to the new parent given by newParent. TODO: operate on object or resource?

Parameters:
entity - is the ContentResource to move.
newParent - is the new parent where to move the entity to.
Throws:
ContentException - if the operation fails. This can have one of the following reasons:
  • TODO

rename

public void rename(ContentObject entity,
                   String newName)
            throws ContentException
This method renames the given contentObject.

Parameters:
entity - is the ContentObject to rename.
newName - is the new name of the content-object.
Throws:
ContentException - if the operation failed. This can have one of the following reasons:


Copyright © 2001-2008 mmm-Team. All Rights Reserved.