|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmonks.dms.versioncontrol.ri.DefaultRepositoryEntry
org.jmonks.dms.versioncontrol.ri.DefaultDirectoryEntry
org.jmonks.dms.versioncontrol.ri.DefaultRepository
Field Summary | |
private int |
cleanupInterval
|
private static org.apache.log4j.Logger |
logger
|
private static DefaultRepository |
repository
|
(package private) static java.lang.String |
REPOSITORY_CLEANUP_INTERVAL
|
(package private) static java.lang.String |
REPOSITORY_CONFIG_FILE_EXTENSION
|
(package private) static long |
REPOSITORY_ENTRY_ID
|
(package private) static java.lang.String |
REPOSITORY_ROOT_PATH_PROPERTY_NAME
|
private java.lang.String |
repositoryRootPath
|
Fields inherited from class org.jmonks.dms.versioncontrol.ri.DefaultDirectoryEntry |
absoluteDirectoryName |
Fields inherited from class org.jmonks.dms.versioncontrol.ri.DefaultRepositoryEntry |
absoluteConfigFilePath, deletedDate, ENTRY_DELETE_KEY_NAME, ENTRY_DELETED_DATE_KEY_NAME, ENTRY_ID_KEY_NAME, ENTRY_NAME_KEY_NAME, ENTRY_PARENT_ENTRY_ID_KEY_NAME, ENTRY_TYPE_DIRECTORY, ENTRY_TYPE_FILE, ENTRY_TYPE_KEY_NAME, entryID, entryName, isDeleted, parentEntryID |
Constructor Summary | |
private |
DefaultRepository()
Creates a an instance of DefaultRepository and assigns the default directory as repository i.e., "." |
Method Summary | |
private void |
cleanupDeletedEntries(DefaultRepositoryEntry entry)
|
boolean |
cleanupRepository()
This method helps to cleanup the deleted entries from the repository. |
private boolean |
createRepositoryDirectoryInHome()
|
(package private) long |
generateEntryID()
Generates the uniquie id to be used as a entry ID in Repository implementation. |
java.util.Map |
getCompleteDirectoryEntryList()
It returns all the directory entries in the repository as a map which holds the entryID as key and entryName as the value. |
private void |
getCompleteDirectoryEntryList(DefaultDirectoryEntry directoryEntry,
java.util.Map entryMap)
|
private java.io.File |
getConfigFile(java.io.File directory,
java.lang.String fileName)
Gets the configuration file with the name "fileName.vc" in given directory. |
java.lang.String |
getEntryNameToShowInUI(RepositoryEntry entry)
It returns the string representation of the input entry to be shown in UI. |
static DefaultRepository |
getInstance()
Method which returns the singleton object. |
RepositoryEntry |
getRepositoryEntry(long entryID)
Gets the requested Repository Entry in the repository. |
boolean |
moveEntry(RepositoryEntry sourceEntry,
RepositoryEntry targetEntry)
Moves the contents of sourceEntry to the targetEntry. |
java.lang.String |
toString()
|
Methods inherited from class org.jmonks.dms.versioncontrol.ri.DefaultDirectoryEntry |
createDirectoryEntry, createFileEntry, getAbosluteConfigFileName, getAbsoluteDirectoryEntryName, getAllEntries, isExistingEntry, moveEntry, remove |
Methods inherited from class org.jmonks.dms.versioncontrol.ri.DefaultRepositoryEntry |
cancelDelete, compareTo, delete, getDeletedDate, getEntryID, getEntryName, getEntryType, getParentEntryID, getParentRepositoryEntry, getRepositoryEntry, isDeleted |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jmonks.dms.versioncontrol.api.Repository |
createDirectoryEntry, createFileEntry, getAllEntries |
Methods inherited from interface org.jmonks.dms.versioncontrol.api.RepositoryEntry |
cancelDelete, delete, getDeletedDate, getEntryID, getEntryName, getEntryType, getParentEntryID, getParentRepositoryEntry, isDeleted |
Field Detail |
private java.lang.String repositoryRootPath
private int cleanupInterval
static final java.lang.String REPOSITORY_ROOT_PATH_PROPERTY_NAME
static final java.lang.String REPOSITORY_CLEANUP_INTERVAL
static final java.lang.String REPOSITORY_CONFIG_FILE_EXTENSION
static final long REPOSITORY_ENTRY_ID
private static final org.apache.log4j.Logger logger
private static final DefaultRepository repository
Constructor Detail |
private DefaultRepository()
Method Detail |
private boolean createRepositoryDirectoryInHome()
public static DefaultRepository getInstance()
public RepositoryEntry getRepositoryEntry(long entryID)
Repository
getRepositoryEntry
in interface Repository
entryID
- ID which identifies the entry.
Repository.getRepositoryEntry(long)
private java.io.File getConfigFile(java.io.File directory, java.lang.String fileName)
directory
- Directory, where configuration file needs to be found.fileName
- configuration filename to look for.
long generateEntryID()
public java.lang.String getEntryNameToShowInUI(RepositoryEntry entry)
Repository
getEntryNameToShowInUI
in interface Repository
entry
- The entry would like to be shown in UI.
Repository.getEntryNameToShowInUI(RepositoryEntry)
public java.util.Map getCompleteDirectoryEntryList()
Repository
Key Value --- ----- 1234 REPOSITORY/abc/xyz.txt
getCompleteDirectoryEntryList
in interface Repository
Repository.getCompleteDirectoryEntryList()
private void getCompleteDirectoryEntryList(DefaultDirectoryEntry directoryEntry, java.util.Map entryMap)
public boolean cleanupRepository()
Repository
cleanupRepository
in interface Repository
Repository.cleanupRepository()
private void cleanupDeletedEntries(DefaultRepositoryEntry entry) throws java.lang.Exception
java.lang.Exception
public boolean moveEntry(RepositoryEntry sourceEntry, RepositoryEntry targetEntry) throws java.lang.IllegalArgumentException
Repository
moveEntry
in interface Repository
sourceEntry
- RepositoryEntry that needs to be moved.targetEntry
- RepositoryEntry where the source needs to be moved.
java.lang.IllegalArgumentException
- if the targetEntry is not a directory Entry.Repository.moveEntry(RepositoryEntry,RepositoryEntry)
public java.lang.String toString()
toString
in class DefaultDirectoryEntry
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |