|
|||||||||||
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.DefaultFileEntry
123.vc ############################################################################# entry.id=123 entry.name=foo.txt version.count=1 entry.type=1 checkout=false 1.version.author=Suresh Pragada 1.version.description=This is the first version. 1.version.date=12032005193456
Orignal version of the files will be stored as filename(entry.name)_versionNumber.
Field Summary | |
protected java.lang.String |
absoluteFileName
Holds the absolute path of absoluteFileName. |
static java.lang.String |
DATE_FORMAT
|
static java.lang.String |
ENTRY_CHECKOUT_KEY_NAME
|
static java.lang.String |
ENTRY_VERSION_AUTHOR_KEY_NAME
|
static java.lang.String |
ENTRY_VERSION_COUNT_KEY_NAME
|
static java.lang.String |
ENTRY_VERSION_DATE_KEY_NAME
|
static java.lang.String |
ENTRY_VERSION_DESCRIPTION_KEY_NAME
|
static int |
INITIAL_VERSION_NUMBER
|
protected boolean |
isCheckOut
|
private static org.apache.log4j.Logger |
logger
|
protected int |
versionCount
|
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 | |
(package private) |
DefaultFileEntry(java.io.File configFile,
java.util.ResourceBundle configBundle)
Creates a new instance of DefaultFileEntry from configuration file. |
(package private) |
DefaultFileEntry(java.lang.Object parent,
java.lang.String fileName,
java.lang.String parentPath,
java.lang.String authorName,
java.lang.String description,
java.util.Date versionDate,
java.io.InputStream inputStream)
Creates a new instance of DefaultFileEntry to create a File Entry. |
Method Summary | |
boolean |
cancelCheckOut()
Cancels the reservation made to edit the file. |
FileVersion |
checkin(java.lang.String authorName,
java.util.Date versionDate,
java.lang.String description,
java.io.InputStream inputStream)
Checks in the file as a latest version of the file. |
boolean |
checkOut()
Reserves the file for edit. |
(package private) java.lang.String |
getAbsoluteFileName()
|
java.util.List |
getAllVersions()
Returns the list, which contains all the versions of the File Entry. |
FileVersion |
getVersion(int versionNumber)
Gets the requested version of file File Entry as an FileVersion object. |
int |
getVersionCount()
Returns the number of versions exists for this entry. |
boolean |
isCheckedOut()
Tells whether the file has been checked out for edit or not. |
boolean |
remove()
This process actually permanently delete the entry from repository. |
java.lang.String |
toString()
|
private boolean |
updateConfigFile(int versionNumber,
java.lang.String authorName,
java.lang.String versionDate,
java.lang.String description)
Adds the neewer version configuration information and updates the version count in the configuration file. |
private boolean |
updateConfigFileForCheckOut(boolean checkOut)
Flips the checkout flag in configuration file. |
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.RepositoryEntry |
cancelDelete, delete, getDeletedDate, getEntryID, getEntryName, getEntryType, getParentEntryID, getParentRepositoryEntry, isDeleted |
Field Detail |
protected int versionCount
protected boolean isCheckOut
protected java.lang.String absoluteFileName
public static final java.lang.String ENTRY_VERSION_COUNT_KEY_NAME
public static final java.lang.String ENTRY_CHECKOUT_KEY_NAME
public static final java.lang.String ENTRY_VERSION_AUTHOR_KEY_NAME
public static final java.lang.String ENTRY_VERSION_DATE_KEY_NAME
public static final java.lang.String ENTRY_VERSION_DESCRIPTION_KEY_NAME
public static final java.lang.String DATE_FORMAT
public static final int INITIAL_VERSION_NUMBER
private static final org.apache.log4j.Logger logger
Constructor Detail |
DefaultFileEntry(java.io.File configFile, java.util.ResourceBundle configBundle)
configFile
- Configuration file of the file entry.configBundle
- Resource bundle of the config file.DefaultFileEntry(java.lang.Object parent, java.lang.String fileName, java.lang.String parentPath, java.lang.String authorName, java.lang.String description, java.util.Date versionDate, java.io.InputStream inputStream)
fileName
- Entry nameparentPath
- where the file needs to be created.authorName
- Author name of the first version.description
- Description of the first version.versionDate
- Create date of the first version.inputStream
- InputStream of the first version.Method Detail |
public FileVersion getVersion(int versionNumber)
FileEntry
getVersion
in interface FileEntry
versionNumber
- Required version of the file. The first version of the file start with 1. So,
this should be in between the 1 and total number of versions.
FileEntry.getVersion(int)
public java.util.List getAllVersions()
FileEntry
getAllVersions
in interface FileEntry
org.jmonks.dms.versioncontrol.api.FileEntry#getAllVersions(java.util.List)
public FileVersion checkin(java.lang.String authorName, java.util.Date versionDate, java.lang.String description, java.io.InputStream inputStream)
FileEntry
checkin
in interface FileEntry
authorName
- Author name to be stored in meta info of this version.versionDate
- Version created date to be stored in meta info of this version.description
- Description to be stored in meta info of this version.inputStream
- InputStream of the information needs to be checked-in as the latest version.
FileEntry.checkin(java.lang.String,java.util.Date,java.lang.String,java.io.InputStream)
private boolean updateConfigFile(int versionNumber, java.lang.String authorName, java.lang.String versionDate, java.lang.String description)
versionNumber
- Version info to add.authorName
- Author name of the first version.description
- Description of the first version.versionDate
- Create date of the first version.public boolean checkOut()
FileEntry
checkOut
in interface FileEntry
FileEntry.checkOut()
public boolean cancelCheckOut()
FileEntry
cancelCheckOut
in interface FileEntry
FileEntry.cancelCheckOut()
private boolean updateConfigFileForCheckOut(boolean checkOut)
public int getVersionCount()
FileEntry
getVersionCount
in interface FileEntry
FileEntry.getVersionCount()
public boolean isCheckedOut()
FileEntry
isCheckedOut
in interface FileEntry
FileEntry.isCheckedOut()
java.lang.String getAbsoluteFileName()
public boolean remove()
RepositoryEntry
remove
in interface RepositoryEntry
RepositoryEntry.remove()
public java.lang.String toString()
toString
in class DefaultRepositoryEntry
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |