|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFileManager
The IFileManager
implements the base class of the DSGFileMan
server. All this methods have to be implemented according to the specification.
Please also read the JavaDoc very carefully. It describes each method in detail
(e.g., method arguments, which exception to throw in which case, etc.).
Method Summary | |
---|---|
void |
addRepositoryListener(java.lang.String repoName,
IUser user,
IRepositoryListener listener)
Add a repository listener to the repository to get notifications when certain events on the server occur. |
IDocument[] |
checkout(java.lang.String repoName,
IUser user)
Checks out all documents from the repository. |
long |
commitDocument(java.lang.String repoName,
IUser user,
IDocument doc)
Commits an existing document to the repository. |
void |
createRepository(java.lang.String name,
IUser owner,
java.lang.String... allowedUserNames)
Creates a new repository on the document server. |
void |
importDocument(java.lang.String repoName,
IUser user,
IDocument doc)
Imports a new document to the repository. |
void |
removeDocument(java.lang.String repoName,
IUser user,
java.lang.String documentName)
Removes a document from the repository. |
void |
removeRepository(java.lang.String name,
IUser owner)
Removes the repository and all the documents it contains, if the given user matches the owner of the repository. |
void |
removeRespositoryListener(java.lang.String repoName,
IRepositoryListener listener)
Removes a repository listener to stop listening to notifications. |
IDocument[] |
updateAllDocuments(java.lang.String repoName,
IUser user)
Updates all documents from the repository. |
IDocument |
updateDocument(java.lang.String repoName,
IUser user,
java.lang.String filename,
long version)
Updates a local document with the most recent (or a specific) version from the repository. |
Method Detail |
---|
void createRepository(java.lang.String name, IUser owner, java.lang.String... allowedUserNames) throws RepositoryExistsException, RepositoryNamingException, UserAccessException, FileManException, java.rmi.RemoteException
name
- The name of the repository. The repository has to start
with dsgfm_ as prefix (e.g., dsgfm001_reponame) otherwise you
get a RepositoryNamingException
. You can find the dsgfm account information
in your account directory.owner
- The owner of the repository (use your dsgfm username and password).allowedUserNames
- A list of users which have access to the repository (the owner has always access).
RepositoryExistsException
- If the repository already exists on the server.
RepositoryNamingException
- If you do not stick to the naming convention 'dsgfmXXX_' as prefix.
UserAccessException
- If the owner is not a valid user (either the owner does not exist, or the password is wrong).
FileManException
- If an error occurs while creating the repository.
java.rmi.RemoteException
- If a communication error occurs.void removeRepository(java.lang.String name, IUser owner) throws RepositoryNotExistsException, UserAccessException, FileManException, java.rmi.RemoteException
name
- The name of the repository.owner
- The owner of the repository.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to delete the repository.
FileManException
- If an error occurs while deleting the repository.
java.rmi.RemoteException
- If a communication error occurs.long commitDocument(java.lang.String repoName, IUser user, IDocument doc) throws RepositoryNotExistsException, UserAccessException, DocumentNotExistsException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository.user
- The user who wants to commit a document.doc
- The document to commit.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
DocumentNotExistsException
- If the document does not exist in the repository (i.e., the document has not been imported, or has already been deleted).
FileManException
- If an error occurs while committing the document.
java.rmi.RemoteException
- If a communication error occurs.void importDocument(java.lang.String repoName, IUser user, IDocument doc) throws RepositoryNotExistsException, UserAccessException, DocumentAlreadyExistsException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository.user
- The user who wants to import the document.doc
- The document to import.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
DocumentAlreadyExistsException
- If the document already exists in the repository.
FileManException
- If an error occurs while importing the document.
java.rmi.RemoteException
- If a communication error occurs.void removeDocument(java.lang.String repoName, IUser user, java.lang.String documentName) throws RepositoryNotExistsException, UserAccessException, FileManException, java.rmi.RemoteException
repoName
- The name of repository.user
- The user who want to add the document.documentName
- The name of the document to delete.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
DocumentNotExistsException
- If the document does not exist in the repository (i.e., the document has not been imported or has already been deleted)
FileManException
- If an error occurs while removing the document.
java.rmi.RemoteException
- If a communication error occurs.IDocument[] updateAllDocuments(java.lang.String repoName, IUser user) throws RepositoryNotExistsException, UserAccessException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository.user
- The user who wants to update all documents.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
FileManException
- If an error occurs while updating all documents.
java.rmi.RemoteException
- If a communication error occurs.IDocument updateDocument(java.lang.String repoName, IUser user, java.lang.String filename, long version) throws RepositoryNotExistsException, UserAccessException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository.user
- The user who wants to update a document.filename
- The name of the document to update.version
- The version of the document to update (-1 means the most recent version).
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
FileManException
- If an error occurs while updating the document.
java.rmi.RemoteException
- If a communication error occurs.IDocument[] checkout(java.lang.String repoName, IUser user) throws RepositoryNotExistsException, UserAccessException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository to checkout.user
- The user who wants to checkout the repository.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
FileManException
- If an error occurs while checking out the repository.
java.rmi.RemoteException
- If a communication error occurs.void addRepositoryListener(java.lang.String repoName, IUser user, IRepositoryListener listener) throws RepositoryNotExistsException, UserAccessException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository that should be watched.user
- The user who wants to add the repository listener.listener
- The repository listener to add.
RepositoryNotExistsException
- If the given repository does not exist.
UserAccessException
- If the owner is not a valid user, or if the user is not allowed to access the repository.
FileManException
- If an error occurs while adding the repository listener.
java.rmi.RemoteException
- If a communication error occurs.void removeRespositoryListener(java.lang.String repoName, IRepositoryListener listener) throws RepositoryNotExistsException, FileManException, java.rmi.RemoteException
repoName
- The name of the repository.listener
- The repository listener to remove.
RepositoryNotExistsException
- If the given repository does not exist.
FileManException
- If an error occurs while removing the repository listener.
java.rmi.RemoteException
- If a communication error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |