miless.webservices
Class PermissionService

java.lang.Object
  extended by miless.webservices.PermissionService

public class PermissionService
extends Object

Implements web service methods to create/update/delete permissions on documents

Version:
$Revision: 15916 $ $Date: 2009-10-13 12:07:52 +0200 (Tue, 13 Oct 2009) $
Author:
Frank L´┐Żtzenkirchen

Constructor Summary
PermissionService()
           
 
Method Summary
 Document getPermissions(int ID)
          Returns the permission data for a document as XML.
 void removeAllPermissions(int ID)
          Removes all read and write permissions on a document
 void setPermissions(int ID, Document permissions)
          Sets the read and write permissions for a document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionService

public PermissionService()
Method Detail

getPermissions

public Document getPermissions(int ID)
                        throws Exception
Returns the permission data for a document as XML. Here is a sample of how the resulting XML document might look like: <permissions> <permission type="user" user="fluetze" right="w" /> <permission type="user" user="hrichter" right="r" /> <permission type="ip" address="132.252." /> </permission>

Parameters:
ID - the ID of the document object
Returns:
the read and write permissions on that document, as XML data
Throws:
Exception

setPermissions

public void setPermissions(int ID,
                           Document permissions)
                    throws Exception
Sets the read and write permissions for a document. See method getPermissions for a sample of how the permission xml document might look like.

Parameters:
ID - the ID of the document object
permissions - the read and write permissions on that document, as XML data
Throws:
Exception
See Also:
getPermissions(int)

removeAllPermissions

public void removeAllPermissions(int ID)
                          throws Exception
Removes all read and write permissions on a document

Parameters:
ID - the ID of the document object
Throws:
Exception