org.jmonks.dms.versioncontrol.api
Interface DirectoryEntry

All Superinterfaces:
RepositoryEntry
All Known Implementing Classes:
DefaultDirectoryEntry

public interface DirectoryEntry
extends RepositoryEntry

Author:
Suresh Pragada

Method Summary
 DirectoryEntry createDirectoryEntry(java.lang.String directoryName)
          Let users create a directory entry in the system.
 FileEntry createFileEntry(java.lang.String fileName, java.lang.String authorName, java.lang.String description, java.util.Date versionDate, java.io.InputStream inputStream)
          Let users create a file entry in the system.
 java.util.List getAllEntries()
          Gets all repository entries available under this entry.
 boolean isExistingEntry(java.lang.String entryName, java.lang.String entryType)
          To find out the is the entry already exist in repository.
 
Methods inherited from interface org.jmonks.dms.versioncontrol.api.RepositoryEntry
cancelDelete, delete, getDeletedDate, getEntryID, getEntryName, getEntryType, getParentEntryID, getParentRepositoryEntry, isDeleted, remove
 

Method Detail

getAllEntries

public java.util.List getAllEntries()
Gets all repository entries available under this entry.

Returns:
Returns the list of RepositoryEntry objects. If not exists, it returns the list of size 0.

createDirectoryEntry

public DirectoryEntry createDirectoryEntry(java.lang.String directoryName)
Let users create a directory entry in the system.

Parameters:
directoryName - Name with which the directory entry needs to be created.
Returns:
Returns newly created Directory Entry.

createFileEntry

public FileEntry createFileEntry(java.lang.String fileName,
                                 java.lang.String authorName,
                                 java.lang.String description,
                                 java.util.Date versionDate,
                                 java.io.InputStream inputStream)
Let users create a file entry in the system.

Parameters:
fileName - Entry name with which the file entry needs to be created.
authorName - Authro name to be stored with meta info of the first version of the file.
description - Description to be stored with meta info of the first version of the file.
versionDate - Version Date to be stored with meta info of the first version of the file.
inputStream - InputStream of the information to be checked-in as the first version of the file.
Returns:
Returns newly created File Entry.

isExistingEntry

public boolean isExistingEntry(java.lang.String entryName,
                               java.lang.String entryType)
To find out the is the entry already exist in repository. Though operating system doesnt allow us to create file and folder with the same name, since we are creating file entries along with the version name, there wont be any conflicts.

Parameters:
entryName - Entry name to create.
entryType - Type of the entry to find out.
Returns:
Returns true if the entry exists, false otherwise.