public class DocumentService extends Object
Modifier and Type | Field and Description |
---|---|
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 |
protected Session |
session |
static String |
SetBlob |
static String |
SetDocumentState |
static String |
SetPermission |
static String |
SetProperty |
static String |
UnlockDocument |
static String |
UpdateDocument |
Constructor and Description |
---|
DocumentService(Session session) |
public static final String FetchDocument
public static final String CreateDocument
public static final String DeleteDocument
public static final String CopyDocument
public static final String MoveDocument
public static final String GetDocumentChildren
public static final String GetDocumentChild
public static final String GetDocumentParent
public static final String Query
public static final String SetPermission
public static final String RemoveAcl
public static final String SetDocumentState
public static final String LockDocument
public static final String UnlockDocument
public static final String SetProperty
public static final String RemoveProperty
public static final String UpdateDocument
public static final String PublishDocument
public static final String CreateRelation
public static final String GetRelations
public static final String SetBlob
public static final String RemoveBlob
public static final String GetBlob
public static final String GetBlobs
public static final String CreateVersion
public static final String FireEvent
public static final String CheckOut
public static final String CheckIn
public DocumentService(Session session)
public Session getSession()
public Document getDocument(String ref) throws IOException
IOException
public Document getDocument(Document document, String... schemas) throws IOException
document
- document to fetchschemas
- schemas related to the document to fetch (* for all)IOException
public Document getDocument(DocRef ref) throws IOException
IOException
public Document getDocument(DocRef ref, String schemas) throws IOException
IOException
public Document getRootDocument() throws IOException
IOException
public Document createDocument(String parent, Document document) throws IOException
parent
- can be PathRef or IdRefdocument
- the document to createIOException
public Document createDocument(DocRef parent, String type, String name) throws IOException
IOException
public Document createDocument(DocRef parent, String type, String name, PropertyMap properties) throws IOException
IOException
public void remove(Document document) throws IOException
document
- the document to removeIOException
public void remove(DocRef doc) throws IOException
IOException
public void remove(String ref) throws IOException
IOException
public Document copy(DocRef src, DocRef targetParent) throws IOException
IOException
public Document copy(DocRef src, DocRef targetParent, String name) throws IOException
IOException
public Document move(DocRef src, DocRef targetParent) throws IOException
IOException
public Document move(DocRef src, DocRef targetParent, String name) throws IOException
IOException
public Documents getChildren(DocRef docRef) throws IOException
IOException
public Document getChild(DocRef docRef, String name) throws IOException
IOException
public Document getParent(DocRef docRef) throws IOException
IOException
public Documents getParent(DocRef docRef, String type) throws IOException
IOException
public Documents query(String query) throws IOException
IOException
public Document setPermission(DocRef doc, String user, String permission) throws IOException
IOException
public Document setPermission(DocRef doc, String user, String permission, boolean granted) throws IOException
IOException
public Document setPermission(DocRef doc, String user, String permission, String acl, boolean granted) throws IOException
IOException
public Document removeAcl(DocRef doc, String acl) throws IOException
IOException
public Document setState(DocRef doc, String state) throws IOException
IOException
public Document lock(DocRef doc) throws IOException
IOException
public Document lock(DocRef doc, String lock) throws IOException
IOException
public Document unlock(DocRef doc) throws IOException
IOException
public Document setProperty(DocRef doc, String key, String value) throws IOException
IOException
public Document removeProperty(DocRef doc, String key) throws IOException
IOException
public Document update(Document document) throws IOException
document
- the document to updateIOException
public Document update(DocRef doc, PropertyMap properties) throws IOException
IOException
public Document publish(DocRef doc, DocRef section) throws IOException
IOException
public Document publish(DocRef doc, DocRef section, boolean override) throws IOException
IOException
public Document createRelation(DocRef subject, String predicate, DocRef object) throws IOException
IOException
public Documents getRelations(DocRef doc, String predicate) throws IOException
IOException
public Documents getRelations(DocRef doc, String predicate, boolean outgoing) throws IOException
IOException
public Documents getRelations(DocRef doc, String predicate, boolean outgoing, String graphName) throws IOException
IOException
public void setBlob(DocRef doc, Blob blob) throws IOException
IOException
public void setBlob(DocRef doc, Blob blob, String xpath) throws IOException
IOException
public void removeBlob(DocRef doc) throws IOException
IOException
public void removeBlob(DocRef doc, String xpath) throws IOException
IOException
public FileBlob getBlob(DocRef doc) throws IOException
IOException
public FileBlob getBlob(DocRef doc, String xpath) throws IOException
IOException
public Blobs getBlobs(DocRef doc) throws IOException
IOException
public Blobs getBlobs(DocRef doc, String xpath) throws IOException
IOException
public Document createVersion(DocRef doc) throws IOException
IOException
public Document createVersion(DocRef doc, String increment) throws IOException
VersionIncrement
IOException
public void fireEvent(String event) throws IOException
IOException
public void fireEvent(DocRef doc, String event) throws IOException
IOException
Copyright © 2016 Nuxeo SA. All rights reserved.