at.ac.tuwien.dslab.rmi.common.interfaces
Interface IDocument

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DocumentImpl

public interface IDocument
extends java.io.Serializable

The IDocument interface represents a document instance in the DSGFileMan system. Each document consists of a name (the file name), a version (starting with 1) and a content.


Method Summary
 byte[] getContent()
          Gets the content of the document.
 java.lang.String getName()
          Gets the name of the document.
 long getVersion()
          Gets the version of this document.
 void setContent(byte[] content)
          Sets the content of the document.
 void setName(java.lang.String name)
          Sets the name of the document.
 void setVersion(long versionId)
          Sets the version of the document (The first version is always assigned the value 1).
 

Method Detail

setName

void setName(java.lang.String name)
Sets the name of the document.

Parameters:
name - The name of the document (has to contain only characters with are allowed in a filename).

getName

java.lang.String getName()
Gets the name of the document.

Returns:
The name of the document.

setVersion

void setVersion(long versionId)
Sets the version of the document (The first version is always assigned the value 1). The version handling has to be done on the server, this class is only a data transfer object, it does not implement any logic.

Parameters:
versionId - The version of this document.

getVersion

long getVersion()
Gets the version of this document.

Returns:
The version of this document.

getContent

byte[] getContent()
Gets the content of the document.

Returns:
The content of the document as byte array.

setContent

void setContent(byte[] content)
Sets the content of the document.

Parameters:
content - The content of the document as byte array.