public class SharedDriveHelpers
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_rcsid |
| Constructor and Description |
|---|
SharedDriveHelpers(java.lang.String serverName,
java.lang.String userName,
java.lang.String password)
Construct the helper and initialize the connection.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addDocument(java.lang.String targetPath,
java.lang.String sourceFile)
Add a document.
|
void |
addUserToFolder(java.lang.String targetPath,
java.lang.String userName)
Add user ACL to folder.
|
void |
close()
Close the connection.
|
void |
deleteDocument(java.lang.String targetPath)
Delete a document.
|
java.lang.String |
lookupDocument(java.lang.String targetPath)
See if a document exists.
|
protected java.lang.String |
mapToIdentifier(java.lang.String path)
Map a "path" specification to a full identifier.
|
void |
removeUserFromFolder(java.lang.String targetPath,
java.lang.String userName)
Remove user ACL from folder.
|
public static final java.lang.String _rcsid
public SharedDriveHelpers(java.lang.String serverName,
java.lang.String userName,
java.lang.String password)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
serverName - is the DNS name of the server.userName - is the name to use to log in.password - is the password.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void close()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic java.lang.String lookupDocument(java.lang.String targetPath)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
targetPath - is the document's path, beginning with the share name and
separated by "/" characters.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic java.lang.String addDocument(java.lang.String targetPath,
java.lang.String sourceFile)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
targetPath - is the target path, beginning with the share name and separated
by "/" characters.sourceFile - is the local source file name to copy to the target.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void deleteDocument(java.lang.String targetPath)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
targetPath - is the file path to delete, beginning with the share name and
separated by "/" characters.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void addUserToFolder(java.lang.String targetPath,
java.lang.String userName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
targetPath - is the folder path to add the acl to, beginning with the share
name and separated by "/" characters.userName - is the user to add.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void removeUserFromFolder(java.lang.String targetPath,
java.lang.String userName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
targetPath - is the folder path to add the acl to, beginning with the share
name and separated by "/" characters.userName - is the user to remove.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected java.lang.String mapToIdentifier(java.lang.String path)
throws java.io.IOException
java.io.IOException