|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.repository.Repository
public class Repository
Implementation of a content repository that uses the file system to provide access to documents that are checked in to the repository. An instance of this class is thread safe and may be shared among any number of threads.
Nested Class Summary | |
---|---|
protected static class |
Repository.ListPropertyTypeRenderer
Renderer for writing list property types to XML in a format that they can be read back in with (utilizing the constructed bean handler). |
protected static class |
Repository.MetaClassCache
Class the provides a cache of meta-classes that have been seen by the repository. |
protected static class |
Repository.MetaClassPropertyTypeRenderer
Renderer for writing metaclass property types to XML as deferred property types. |
protected static class |
Repository.PropertyInfoRenderer
Renderer for writing property info objects to XML. |
protected class |
Repository.ReadLockedItem
Repository item implementation for items that are locked for reading only. |
protected class |
Repository.WriteLockedItem
Repository item implementation for items that are locked for reading and writing. |
Constructor Summary | |
---|---|
Repository()
|
Method Summary | |
---|---|
RepositoryItem |
addItem(MetaObject metaData)
Adds an item to the repository, assigning it an id and saving its supplied meta-data. |
void |
close()
Close the repository, release the lock on it. |
void |
deleteItem(RepositoryItem item)
Deletes the given item from the repository. |
void |
deleteItem(java.lang.String itemId)
Deletes the item corresponding to the itemId |
protected java.io.File |
generateItemDataFile(java.io.File itemDir,
java.lang.String itemId)
Determines the file that the data for an item will be stored in. |
protected java.io.File |
generateItemDirectory(java.lang.String itemId)
Returns the directory in the repository where the item should be stored. |
protected java.io.File |
generateItemMetaDataFile(java.io.File itemDir,
java.lang.String itemId)
Determines the file that the meta data for an item will be stored in. |
RepositoryItem |
getItem(java.lang.String itemId)
Returns a repository item handle for the item with the given id and the item will be locked for reading. |
RepositoryItem |
getItem(java.lang.String itemId,
boolean writeLock)
Returns a repository item handle for the item with the given id, optionally locked for writing. |
LockManager |
getLockManager()
Returns the lock manager implementation being used. |
protected java.lang.String |
getNextItemId()
Returns an id string for the next item to be added to the repository. |
java.io.File |
getRepositoryDir()
Returns the repository directory. |
boolean |
getUseMetaClassCache()
Returns the flag indicating if the meta-classes should be cached in the repository. |
void |
open()
Open the repository, creating it if necessary. |
protected MetaObject |
readItemMetaData(java.lang.String itemId)
Reads and returns the meta-data information for the given item. |
void |
releaseLock(Lock lock)
Release the supplied repository item lock. |
protected void |
repositoryOpenCheck()
Checks to see if the repository is open, throwing an exception if it is not. |
void |
setLockManager(LockManager lockManager)
Sets the lock manager implementation to use. |
void |
setRepositoryDir(java.io.File repositoryDir)
Sets the repository directory (i.e. root directory for the repository). |
void |
setUseMetaClassCache(boolean useMetaClassCache)
Sets the flag indicating if meta-classes should be cached in the repository. |
java.lang.String |
toString()
Returns a string summary of the object. |
protected void |
writeItemMetaData(java.lang.String itemId,
MetaObject metaData)
Writes the given meta-data information to the repository for the specified item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Repository()
Method Detail |
---|
public void setRepositoryDir(java.io.File repositoryDir)
public java.io.File getRepositoryDir()
public void setLockManager(LockManager lockManager)
public LockManager getLockManager()
public void setUseMetaClassCache(boolean useMetaClassCache)
public boolean getUseMetaClassCache()
public void open()
public void close()
public RepositoryItem getItem(java.lang.String itemId, boolean writeLock)
public RepositoryItem getItem(java.lang.String itemId)
public RepositoryItem addItem(MetaObject metaData)
public void deleteItem(RepositoryItem item)
public void deleteItem(java.lang.String itemId)
itemId
- public void releaseLock(Lock lock)
public java.lang.String toString()
toString
in class java.lang.Object
protected void repositoryOpenCheck()
protected java.lang.String getNextItemId()
protected java.io.File generateItemDirectory(java.lang.String itemId)
protected java.io.File generateItemMetaDataFile(java.io.File itemDir, java.lang.String itemId)
protected java.io.File generateItemDataFile(java.io.File itemDir, java.lang.String itemId)
protected MetaObject readItemMetaData(java.lang.String itemId)
protected void writeItemMetaData(java.lang.String itemId, MetaObject metaData)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |