public class NuxeoRemotingBean extends AbstractNuxeoWebService implements NuxeoRemoting
Constructor and Description |
---|
NuxeoRemotingBean() |
Modifier and Type | Method and Description |
---|---|
protected void |
collectBlobs(String docId,
String schemaName,
WSRemotingSession rs,
String prefix,
Map<String,Object> container,
String name,
Object value,
List<DocumentBlob> blobs,
boolean useDownloadUrl) |
protected void |
collectProperty(String prefix,
String name,
Object value,
List<DocumentProperty> props) |
DocumentDescriptor[] |
getChildren(String sessionId,
String uuid)
Gets the children of the given document.
|
DocumentDescriptor |
getCurrentVersion(String sid,
String uuid)
Gets the current version of the given document.
|
DocumentDescriptor |
getDocument(String sessionId,
String uuid)
Gets the doc descriptor given the doc UUID.
|
WsACE[] |
getDocumentACL(String sid,
String uuid)
Returns the merged ACL of the document (contains all ACEs defined on the document and its parents).
|
protected DocumentBlob[] |
getDocumentBlobs(DocumentModel doc,
WSRemotingSession rs,
boolean useDownloadUrl) |
DocumentBlob[] |
getDocumentBlobs(String sid,
String uuid)
Returns the document blobs only using byte[] format
|
DocumentBlob[] |
getDocumentBlobsExt(String sid,
String uuid,
boolean useDownloadUrl)
Returns the document blobs only.
|
WsACE[] |
getDocumentLocalACL(String sid,
String uuid)
Returns the merged ACL of the document (contains all ACEs defined on the document, filtering the inherited ones).
|
protected DocumentProperty[] |
getDocumentNoBlobProperties(DocumentModel doc,
WSRemotingSession rs) |
DocumentProperty[] |
getDocumentNoBlobProperties(String sid,
String uuid)
Same as
NuxeoRemoting.getDocumentProperties(String, String) but skips blobs. |
DocumentProperty[] |
getDocumentProperties(String sid,
String uuid)
Returns the document properties.
|
DocumentSnapshot |
getDocumentSnapshot(String sid,
String uuid)
Gets all properties and ACLs from a document uses byte[] format to export blob
|
DocumentSnapshot |
getDocumentSnapshotExt(String sid,
String uuid,
boolean useDownloadUrl)
Gets all properties and ACLs from a document
|
protected String |
getDownloadUrl(String repoName,
String docId,
String schemaName,
String xPath,
String fileName) |
String[] |
getGroups(String sid,
String parentGroup)
Gets all sub-groups inside the given group.
|
String |
getRelativePathAsString(String sessionId,
String uuid)
Returns the relative path as a displayable path with parent titles.
|
String |
getRepositoryName(String sid)
Gets the current repository name.
|
DocumentDescriptor |
getRootDocument(String sessionId)
Gets the root document descriptor.
|
protected String |
getSchemaPrefix(String schemaName) |
DocumentDescriptor |
getSourceDocument(String sid,
String uid)
Gets the document that created the version specified by the given uid.
|
String[] |
getUsers(String sid,
String parentGroup)
Get all users inside the given group.
|
DocumentDescriptor[] |
getVersions(String sid,
String uid)
Gets the versions of the given document.
|
boolean |
hasPermission(String sid,
String uuid,
String permission)
Checks the given permission for the current user on the given document.
|
String[] |
listGroups(String sid,
int from,
int to)
Return the list of all groups.
|
String[] |
listUsers(String sid,
int from,
int to)
Returns the list of all users.
|
String |
uploadDocument(String sid,
String parentUUID,
String type,
String[] properties) |
connect, connectOnRepository, disconnect, getSessionsManager, initSession, login
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, disconnect
public NuxeoRemotingBean()
public String getRepositoryName(String sid)
NuxeoRemoting
getRepositoryName
in interface NuxeoRemoting
sid
- the session idpublic WsACE[] getDocumentACL(String sid, String uuid)
NuxeoRemoting
It includes all ACLs for each ACP.
getDocumentACL
in interface NuxeoRemoting
uuid
- the uuid of the documentpublic DocumentSnapshot getDocumentSnapshot(String sid, String uuid)
NuxeoRemoting
getDocumentSnapshot
in interface NuxeoRemoting
sid
- the session iduuid
- the doc uuidpublic DocumentSnapshot getDocumentSnapshotExt(String sid, String uuid, boolean useDownloadUrl)
NuxeoRemoting
getDocumentSnapshotExt
in interface NuxeoRemoting
sid
- the session iduuid
- the doc uuiduseDownloadUrl
- define blob export formatpublic WsACE[] getDocumentLocalACL(String sid, String uuid)
NuxeoRemoting
It includes all ACLs for each ACP.
getDocumentLocalACL
in interface NuxeoRemoting
uuid
- the uuid of the documentpublic boolean hasPermission(String sid, String uuid, String permission)
NuxeoRemoting
hasPermission
in interface NuxeoRemoting
public DocumentBlob[] getDocumentBlobs(String sid, String uuid)
NuxeoRemoting
getDocumentBlobs
in interface NuxeoRemoting
uuid
- the uuid of the document.public DocumentBlob[] getDocumentBlobsExt(String sid, String uuid, boolean useDownloadUrl)
NuxeoRemoting
getDocumentBlobsExt
in interface NuxeoRemoting
uuid
- the uuid of the document.useDownloadUrl
- defines if blob are exported as download url or as byte|[]protected DocumentBlob[] getDocumentBlobs(DocumentModel doc, WSRemotingSession rs, boolean useDownloadUrl)
public String[] listUsers(String sid, int from, int to)
NuxeoRemoting
This method supports pagination in case of large user dbs.
Pagination is not yet working!
listUsers
in interface NuxeoRemoting
from
- pagination startto
- pagination stoppublic String[] listGroups(String sid, int from, int to)
NuxeoRemoting
This method supports pagination in case of large user dbs
Pagination is not yet working!
listGroups
in interface NuxeoRemoting
from
- pagination startto
- pagination stoppublic DocumentProperty[] getDocumentProperties(String sid, String uuid)
NuxeoRemoting
All property are returned even blobs. All values are converted to strings.
It includes the perm link of the document.
No need to includes blobs here. See the dedicated API.
getDocumentProperties
in interface NuxeoRemoting
uuid
- uuid of the document.public DocumentProperty[] getDocumentNoBlobProperties(String sid, String uuid)
NuxeoRemoting
NuxeoRemoting.getDocumentProperties(String, String)
but skips blobs.getDocumentNoBlobProperties
in interface NuxeoRemoting
protected DocumentProperty[] getDocumentNoBlobProperties(DocumentModel doc, WSRemotingSession rs)
public DocumentDescriptor getCurrentVersion(String sid, String uuid)
NuxeoRemoting
getCurrentVersion
in interface NuxeoRemoting
public DocumentDescriptor getSourceDocument(String sid, String uid)
NuxeoRemoting
getSourceDocument
in interface NuxeoRemoting
public DocumentDescriptor[] getVersions(String sid, String uid)
NuxeoRemoting
getVersions
in interface NuxeoRemoting
public DocumentDescriptor getRootDocument(String sessionId)
NuxeoRemoting
getRootDocument
in interface NuxeoRemoting
public DocumentDescriptor getDocument(String sessionId, String uuid)
NuxeoRemoting
getDocument
in interface NuxeoRemoting
sessionId
- the session iduuid
- the doc uuidpublic DocumentDescriptor[] getChildren(String sessionId, String uuid)
NuxeoRemoting
getChildren
in interface NuxeoRemoting
sessionId
- the session iduuid
- the doc uuidprotected void collectProperty(String prefix, String name, Object value, List<DocumentProperty> props)
protected void collectBlobs(String docId, String schemaName, WSRemotingSession rs, String prefix, Map<String,Object> container, String name, Object value, List<DocumentBlob> blobs, boolean useDownloadUrl)
protected String getSchemaPrefix(String schemaName)
protected String getDownloadUrl(String repoName, String docId, String schemaName, String xPath, String fileName)
public String[] getUsers(String sid, String parentGroup)
NuxeoRemoting
getUsers
in interface NuxeoRemoting
sid
- the session idparentGroup
- the parent grouppublic String[] getGroups(String sid, String parentGroup)
NuxeoRemoting
getGroups
in interface NuxeoRemoting
sid
- the session idparentGroup
- the parent grouppublic String getRelativePathAsString(String sessionId, String uuid)
NuxeoRemoting
Example: /Workspaces/My Workspaces/Nice Document
getRelativePathAsString
in interface NuxeoRemoting
sessionId
- : the session iduuid
- : the document uuidpublic String uploadDocument(String sid, String parentUUID, String type, String[] properties)
uploadDocument
in interface NuxeoRemoting
Copyright © 2015 Nuxeo SA. All rights reserved.