Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.automation.client.adapters
Class DocumentService

java.lang.Object
  extended by org.nuxeo.ecm.automation.client.adapters.DocumentService

public class DocumentService
extends Object

Author:
Bogdan Stefanescu

Field Summary
static String CheckIn
           
static String CheckOut
           
static String CopyDocument
           
static String CreateDocument
           
static String CreateRelation
           
static String CreateVersion
           
static String DeleteDocument
           
static String FetchDocument
           
static String FireEvent
           
static String GetBlob
           
static String GetBlobs
           
static String GetDocumentChild
           
static String GetDocumentChildren
           
static String GetDocumentParent
           
static String GetRelations
           
static String LockDocument
           
static String MoveDocument
           
static String PublishDocument
           
static String Query
           
static String RemoveAcl
           
static String RemoveBlob
           
static String RemoveProperty
           
static String SetBlob
           
static String SetDocumentState
           
static String SetPermission
           
static String SetProperty
           
static String UnlockDocument
           
static String UpdateDocument
           
 
Constructor Summary
DocumentService(Session session)
           
 
Method Summary
 Document copy(DocRef src, DocRef targetParent)
           
 Document copy(DocRef src, DocRef targetParent, String name)
           
 Document createDocument(DocRef parent, String type, String name)
           
 Document createDocument(DocRef parent, String type, String name, PropertyMap properties)
           
 Document createRelation(DocRef subject, String predicate, DocRef object)
           
 Document createVersion(DocRef doc)
           
 Document createVersion(DocRef doc, String increment)
          Increment is one of "None", "Major", "Minor".
 void fireEvent(DocRef doc, String event)
           
 void fireEvent(String event)
           
 FileBlob getBlob(DocRef doc)
           
 FileBlob getBlob(DocRef doc, String xpath)
           
 Blobs getBlobs(DocRef doc)
           
 Blobs getBlobs(DocRef doc, String xpath)
           
 Document getChild(DocRef docRef, String name)
           
 Documents getChildren(DocRef docRef)
           
 Document getDocument(DocRef ref)
           
 Document getDocument(DocRef ref, String schemas)
           
 Document getDocument(String ref)
           
 Document getParent(DocRef docRef)
           
 Documents getParent(DocRef docRef, String type)
           
 Documents getRelations(DocRef doc, String predicate)
           
 Documents getRelations(DocRef doc, String predicate, boolean outgoing)
           
 Documents getRelations(DocRef doc, String predicate, boolean outgoing, String graphName)
           
 Document getRootDocument()
           
 Session getSession()
           
 Document lock(DocRef doc)
           
 Document lock(DocRef doc, String lock)
           
 Document move(DocRef src, DocRef targetParent)
           
 Document move(DocRef src, DocRef targetParent, String name)
           
 Document publish(DocRef doc, DocRef section)
           
 Document publish(DocRef doc, DocRef section, boolean override)
           
 Documents query(String query)
           
 void remove(DocRef doc)
           
 void remove(String ref)
           
 Document removeAcl(DocRef doc, String acl)
           
 void removeBlob(DocRef doc)
           
 void removeBlob(DocRef doc, String xpath)
           
 Document removeProperty(DocRef doc, String key)
           
 void setBlob(DocRef doc, Blob blob)
           
 void setBlob(DocRef doc, Blob blob, String xpath)
           
 Document setPermission(DocRef doc, String user, String permission)
           
 Document setPermission(DocRef doc, String user, String permission, boolean granted)
           
 Document setPermission(DocRef doc, String user, String permission, String acl, boolean granted)
           
 Document setProperty(DocRef doc, String key, String value)
           
 Document setState(DocRef doc, String state)
           
 Document unlock(DocRef doc)
           
 Document update(DocRef doc, PropertyMap properties)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FetchDocument

public static final String FetchDocument
See Also:
Constant Field Values

CreateDocument

public static final String CreateDocument
See Also:
Constant Field Values

DeleteDocument

public static final String DeleteDocument
See Also:
Constant Field Values

CopyDocument

public static final String CopyDocument
See Also:
Constant Field Values

MoveDocument

public static final String MoveDocument
See Also:
Constant Field Values

GetDocumentChildren

public static final String GetDocumentChildren
See Also:
Constant Field Values

GetDocumentChild

public static final String GetDocumentChild
See Also:
Constant Field Values

GetDocumentParent

public static final String GetDocumentParent
See Also:
Constant Field Values

Query

public static final String Query
See Also:
Constant Field Values

SetPermission

public static final String SetPermission
See Also:
Constant Field Values

RemoveAcl

public static final String RemoveAcl
See Also:
Constant Field Values

SetDocumentState

public static final String SetDocumentState
See Also:
Constant Field Values

LockDocument

public static final String LockDocument
See Also:
Constant Field Values

UnlockDocument

public static final String UnlockDocument
See Also:
Constant Field Values

SetProperty

public static final String SetProperty
See Also:
Constant Field Values

RemoveProperty

public static final String RemoveProperty
See Also:
Constant Field Values

UpdateDocument

public static final String UpdateDocument
See Also:
Constant Field Values

PublishDocument

public static final String PublishDocument
See Also:
Constant Field Values

CreateRelation

public static final String CreateRelation
See Also:
Constant Field Values

GetRelations

public static final String GetRelations
See Also:
Constant Field Values

SetBlob

public static final String SetBlob
See Also:
Constant Field Values

RemoveBlob

public static final String RemoveBlob
See Also:
Constant Field Values

GetBlob

public static final String GetBlob
See Also:
Constant Field Values

GetBlobs

public static final String GetBlobs
See Also:
Constant Field Values

CreateVersion

public static final String CreateVersion
See Also:
Constant Field Values

FireEvent

public static final String FireEvent
See Also:
Constant Field Values

CheckOut

public static final String CheckOut
See Also:
Constant Field Values

CheckIn

public static final String CheckIn
See Also:
Constant Field Values
Constructor Detail

DocumentService

public DocumentService(Session session)
Method Detail

getSession

public Session getSession()

getDocument

public Document getDocument(String ref)
                     throws Exception
Throws:
Exception

getDocument

public Document getDocument(DocRef ref)
                     throws Exception
Throws:
Exception

getDocument

public Document getDocument(DocRef ref,
                            String schemas)
                     throws Exception
Throws:
Exception

getRootDocument

public Document getRootDocument()
                         throws Exception
Throws:
Exception

createDocument

public Document createDocument(DocRef parent,
                               String type,
                               String name)
                        throws Exception
Throws:
Exception

createDocument

public Document createDocument(DocRef parent,
                               String type,
                               String name,
                               PropertyMap properties)
                        throws Exception
Throws:
Exception

remove

public void remove(DocRef doc)
            throws Exception
Throws:
Exception

remove

public void remove(String ref)
            throws Exception
Throws:
Exception

copy

public Document copy(DocRef src,
                     DocRef targetParent)
              throws Exception
Throws:
Exception

copy

public Document copy(DocRef src,
                     DocRef targetParent,
                     String name)
              throws Exception
Throws:
Exception

move

public Document move(DocRef src,
                     DocRef targetParent)
              throws Exception
Throws:
Exception

move

public Document move(DocRef src,
                     DocRef targetParent,
                     String name)
              throws Exception
Throws:
Exception

getChildren

public Documents getChildren(DocRef docRef)
                      throws Exception
Throws:
Exception

getChild

public Document getChild(DocRef docRef,
                         String name)
                  throws Exception
Throws:
Exception

getParent

public Document getParent(DocRef docRef)
                   throws Exception
Throws:
Exception

getParent

public Documents getParent(DocRef docRef,
                           String type)
                    throws Exception
Throws:
Exception

query

public Documents query(String query)
                throws Exception
Throws:
Exception

setPermission

public Document setPermission(DocRef doc,
                              String user,
                              String permission)
                       throws Exception
Throws:
Exception

setPermission

public Document setPermission(DocRef doc,
                              String user,
                              String permission,
                              boolean granted)
                       throws Exception
Throws:
Exception

setPermission

public Document setPermission(DocRef doc,
                              String user,
                              String permission,
                              String acl,
                              boolean granted)
                       throws Exception
Throws:
Exception

removeAcl

public Document removeAcl(DocRef doc,
                          String acl)
                   throws Exception
Throws:
Exception

setState

public Document setState(DocRef doc,
                         String state)
                  throws Exception
Throws:
Exception

lock

public Document lock(DocRef doc)
              throws Exception
Throws:
Exception

lock

public Document lock(DocRef doc,
                     String lock)
              throws Exception
Throws:
Exception

unlock

public Document unlock(DocRef doc)
                throws Exception
Throws:
Exception

setProperty

public Document setProperty(DocRef doc,
                            String key,
                            String value)
                     throws Exception
Throws:
Exception

removeProperty

public Document removeProperty(DocRef doc,
                               String key)
                        throws Exception
Throws:
Exception

update

public Document update(DocRef doc,
                       PropertyMap properties)
                throws Exception
Throws:
Exception

publish

public Document publish(DocRef doc,
                        DocRef section)
                 throws Exception
Throws:
Exception

publish

public Document publish(DocRef doc,
                        DocRef section,
                        boolean override)
                 throws Exception
Throws:
Exception

createRelation

public Document createRelation(DocRef subject,
                               String predicate,
                               DocRef object)
                        throws Exception
Throws:
Exception

getRelations

public Documents getRelations(DocRef doc,
                              String predicate)
                       throws Exception
Throws:
Exception

getRelations

public Documents getRelations(DocRef doc,
                              String predicate,
                              boolean outgoing)
                       throws Exception
Throws:
Exception

getRelations

public Documents getRelations(DocRef doc,
                              String predicate,
                              boolean outgoing,
                              String graphName)
                       throws Exception
Throws:
Exception
Since:
5.4.3

setBlob

public void setBlob(DocRef doc,
                    Blob blob)
             throws Exception
Throws:
Exception

setBlob

public void setBlob(DocRef doc,
                    Blob blob,
                    String xpath)
             throws Exception
Throws:
Exception

removeBlob

public void removeBlob(DocRef doc)
                throws Exception
Throws:
Exception

removeBlob

public void removeBlob(DocRef doc,
                       String xpath)
                throws Exception
Throws:
Exception

getBlob

public FileBlob getBlob(DocRef doc)
                 throws Exception
Throws:
Exception

getBlob

public FileBlob getBlob(DocRef doc,
                        String xpath)
                 throws Exception
Throws:
Exception

getBlobs

public Blobs getBlobs(DocRef doc)
               throws Exception
Throws:
Exception

getBlobs

public Blobs getBlobs(DocRef doc,
                      String xpath)
               throws Exception
Throws:
Exception

createVersion

public Document createVersion(DocRef doc)
                       throws Exception
Throws:
Exception

createVersion

public Document createVersion(DocRef doc,
                              String increment)
                       throws Exception
Increment is one of "None", "Major", "Minor". If null the server default will be used. See VersionIncrement

Throws:
Exception

fireEvent

public void fireEvent(String event)
               throws Exception
Throws:
Exception

fireEvent

public void fireEvent(DocRef doc,
                      String event)
               throws Exception
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.