|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRepository
The IRepository specifies the basic
operations of a repository which have to be implemented
on the server side.
| Method Summary | |
|---|---|
void |
create()
Creates the repository physically on the disk. |
void |
createDocument(IDocument doc)
Creates a new document and add it to the repository. |
void |
delete(IUser user)
Deletes the repository physically from the disk by deleting all its content and the repository directory itself. |
IDocument[] |
getAllDocuments()
Gets all documents which are in the repository. |
java.lang.String[] |
getAllowedUsers()
Gets the users which are allowed to access the repository or null if only the owner is allowed. |
IDocument |
getDocument(java.lang.String filename,
long version)
Gets one specific document from the repository. |
java.lang.String |
getName()
Gets the name of the repository or null if not set. |
IUser |
getOwner()
Gets the owner of the repository or null if not set. |
java.lang.String |
getServerUrl()
Gets the URL of the DSGFileMan server or null if not set. |
void |
load()
Loads the repository from the disk. |
IDocument |
removeDocument(java.lang.String documentName)
Removes a document from the repository. |
void |
setAllowedUsers(java.lang.String[] users)
Sets the users which are allowed to access the repository. |
void |
setName(java.lang.String name)
Sets the name of the repository. |
void |
setOwner(IUser user)
Sets the owner of the repository. |
void |
setServerUrl(java.lang.String url)
Sets the URL of the DSGFileMan server |
void |
updateDocument(IDocument doc)
Updates the given document in the repository. |
| Method Detail |
|---|
void setName(java.lang.String name)
name - The name of the repository.java.lang.String getName()
void setServerUrl(java.lang.String url)
url - The URL of the serverjava.lang.String getServerUrl()
void setOwner(IUser user)
user - the owner of the repository.IUser getOwner()
void setAllowedUsers(java.lang.String[] users)
users - The users which are allowed to access the repository.java.lang.String[] getAllowedUsers()
void create()
throws java.io.IOException,
RepositoryExistsException
java.io.IOException - If an error occurs while writing repository to disk.
RepositoryExistsException - If the repository already exists.
void load()
throws java.io.IOException,
RepositoryNotExistsException
java.io.IOException - If an error occurs while deleting the repository physically.
RepositoryNotExistsException - If the repository does not exist.
void delete(IUser user)
throws java.io.IOException,
UserAccessException,
RepositoryNotExistsException
user - The user who wants to delete the repository.
UserAccessException - If the user is not allowed to delete the repository.
RepositoryNotExistsException - If the repository does not exist.
java.io.IOException - If an error occurs while deleting the repository physically.
void createDocument(IDocument doc)
throws java.io.IOException,
DocumentAlreadyExistsException
doc - The document to create.
java.io.IOException - If an error occurs while deleting the repository physically.
DocumentAlreadyExistsException - If the given document already exists in the repository.
IDocument[] getAllDocuments()
throws java.io.IOException
java.io.IOException - If an error occurs while accessing the repository.
IDocument getDocument(java.lang.String filename,
long version)
throws java.io.IOException,
DocumentNotExistsException
filename - The name of the document to get from the repository.version - The version of the document to get from the repository or -1 if the most recent document should be retrieved.
java.io.IOException - If an error occurs while accessing the repository.
DocumentNotExistsException - If the requested document does not exist in the repository.
void updateDocument(IDocument doc)
throws java.io.IOException,
FileManException,
DocumentNotExistsException
doc - The document to update.
java.io.IOException - If an error occurs while accessing the repository.
DocumentNotExistsException - If the given document does not exist in the repository.
FileManException - If the version number of the given document is not correct.
IDocument removeDocument(java.lang.String documentName)
throws java.io.IOException,
DocumentNotExistsException
documentName - The document that should be removed.
java.io.IOException - If an error occurs while accessing the repository.
DocumentNotExistsException - If the given document does not exist in the repository.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||