public class WSIndexingGatewayBean extends AbstractNuxeoWebService implements WSIndexingGateway
| Constructor and Description |
|---|
WSIndexingGatewayBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
connect(String username,
String password)
Connects to the default nuxeo core repository.
|
void |
disconnect(String sid)
Disconnect the Nuxeo core given the session id.
|
DocumentDescriptor[] |
getChildren(String sessionId,
String uuid)
Gets the children of the given document.
|
DocumentDescriptor |
getCurrentVersion(String sid,
String uid)
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).
|
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.
|
DocumentDescriptor |
getDocumentFromPath(String sessionId,
String path) |
WsACE[] |
getDocumentLocalACL(String sid,
String uuid)
Returns the merged ACL of the document (contains all ACEs defined on the
document, filtering the inherited ones).
|
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 sessionId,
String uuid)
Gets all properties and ACLs from a document
uses byte[] format to export blob
|
DocumentSnapshot |
getDocumentSnapshotExt(String sessionId,
String uuid,
boolean useDownloadUrl)
Gets all properties and ACLs from a document
|
String[] |
getGroups(String sid,
String parentGroup)
Gets all sub-groups inside the given group.
|
String[] |
getRecursiveChildrenUUIDs(String sid,
String uuid) |
UUIDPage |
getRecursiveChildrenUUIDsByPage(String sid,
String uuid,
int page,
int pageSize) |
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.
|
DocumentDescriptor |
getSourceDocument(String sid,
String uid)
Gets the document that created the version specified by the given uid.
|
DocumentTypeDescriptor[] |
getTypeDefinitions() |
String[] |
getUserGroups(String sessionId,
String username) |
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.
|
ModifiedDocumentDescriptorPage |
listDeletedDocumentsByPage(String sessionId,
String dateRangeQuery,
String path,
int page,
int pageSize)
Returns the list of deleted documents within a timestamp.
|
EventDescriptorPage |
listDocumentEventsByPage(String sessionId,
String dateRangeQuery,
String startDate,
String path,
int page,
int pageSize)
Gets a filtered list of document events.
|
EventDescriptorPage |
listEventsByPage(String sessionId,
String dateRangeQuery,
int page,
int pageSize) |
String[] |
listGroups(String sid,
int from,
int to)
Return the list of all groups.
|
ModifiedDocumentDescriptor[] |
listModifiedDocuments(String sessionId,
String dateRangeQuery)
Returns the list of modified document within a timestamp.
|
ModifiedDocumentDescriptorPage |
listModifiedDocumentsByPage(String sessionId,
String dateRangeQuery,
String path,
int page,
int pageSize) |
String[] |
listUsers(String sid,
int from,
int to)
Returns the list of all users.
|
EventDescriptorPage |
queryEventsByPage(String sessionId,
String whereClause,
int page,
int pageSize) |
String |
resolvePathToUUID(String sessionId,
String path) |
String |
uploadDocument(String sid,
String path,
String type,
String[] properties) |
boolean |
validateUserPassword(String sessionId,
String username,
String password) |
connectOnRepositorypublic DocumentDescriptor[] getChildren(String sessionId, String uuid) throws ClientException
NuxeoRemotinggetChildren in interface NuxeoRemotingsessionId - the session iduuid - the doc uuidClientExceptionpublic DocumentDescriptor getCurrentVersion(String sid, String uid) throws ClientException
NuxeoRemotinggetCurrentVersion in interface NuxeoRemotingClientExceptionpublic DocumentDescriptor getDocument(String sessionId, String uuid) throws ClientException
NuxeoRemotinggetDocument in interface NuxeoRemotingsessionId - the session iduuid - the doc uuidClientExceptionpublic WsACE[] getDocumentACL(String sid, String uuid) throws ClientException
NuxeoRemotingIt includes all ACLs for each ACP.
getDocumentACL in interface NuxeoRemotinguuid - the uuid of the documentClientExceptionpublic WsACE[] getDocumentLocalACL(String sid, String uuid) throws ClientException
NuxeoRemotingIt includes all ACLs for each ACP.
getDocumentLocalACL in interface NuxeoRemotinguuid - the uuid of the documentClientExceptionpublic DocumentBlob[] getDocumentBlobsExt(String sid, String uuid, boolean useDownloadUrl) throws ClientException
NuxeoRemotinggetDocumentBlobsExt in interface NuxeoRemotinguuid - the uuid of the document.useDownloadUrl - defines if blob are exported as download url or as byte|[]ClientExceptionpublic DocumentBlob[] getDocumentBlobs(String sid, String uuid) throws ClientException
NuxeoRemotinggetDocumentBlobs in interface NuxeoRemotinguuid - the uuid of the document.ClientExceptionpublic DocumentProperty[] getDocumentNoBlobProperties(String sid, String uuid) throws ClientException
NuxeoRemotingNuxeoRemoting.getDocumentProperties(String, String) but skips
blobs.getDocumentNoBlobProperties in interface NuxeoRemotingClientExceptionpublic DocumentProperty[] getDocumentProperties(String sid, String uuid) throws ClientException
NuxeoRemotingAll 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 NuxeoRemotinguuid - uuid of the document.ClientExceptionpublic String[] getGroups(String sid, String parentGroup) throws ClientException
NuxeoRemotinggetGroups in interface NuxeoRemotingsid - the session idparentGroup - the parent groupClientExceptionpublic String getRepositoryName(String sid) throws ClientException
NuxeoRemotinggetRepositoryName in interface NuxeoRemotingsid - the session idClientExceptionpublic DocumentDescriptor getRootDocument(String sessionId) throws ClientException
NuxeoRemotinggetRootDocument in interface NuxeoRemotingClientExceptionpublic String resolvePathToUUID(String sessionId, String path) throws ClientException
resolvePathToUUID in interface WSIndexingGatewayClientExceptionpublic UUIDPage getRecursiveChildrenUUIDsByPage(String sid, String uuid, int page, int pageSize) throws ClientException
getRecursiveChildrenUUIDsByPage in interface WSIndexingGatewayClientExceptionpublic String[] getRecursiveChildrenUUIDs(String sid, String uuid) throws ClientException
getRecursiveChildrenUUIDs in interface WSIndexingGatewayClientExceptionpublic DocumentTypeDescriptor[] getTypeDefinitions() throws ClientException
getTypeDefinitions in interface WSIndexingGatewayClientExceptionpublic DocumentDescriptor getDocumentFromPath(String sessionId, String path) throws ClientException
getDocumentFromPath in interface WSIndexingGatewayClientExceptionpublic DocumentDescriptor getSourceDocument(String sid, String uid) throws ClientException
NuxeoRemotinggetSourceDocument in interface NuxeoRemotingClientExceptionpublic String[] getUsers(String sid, String parentGroup) throws ClientException
NuxeoRemotinggetUsers in interface NuxeoRemotingsid - the session idparentGroup - the parent groupClientException - if any error occurspublic DocumentDescriptor[] getVersions(String sid, String uid) throws ClientException
NuxeoRemotinggetVersions in interface NuxeoRemotingClientExceptionpublic String[] listGroups(String sid, int from, int to) throws ClientException
NuxeoRemotingThis method supports pagination in case of large user dbs
Pagination is not yet working!
listGroups in interface NuxeoRemotingfrom - pagination startto - pagination stopClientExceptionpublic String[] listUsers(String sid, int from, int to) throws ClientException
NuxeoRemotingThis method supports pagination in case of large user dbs.
Pagination is not yet working!
listUsers in interface NuxeoRemotingfrom - pagination startto - pagination stopClientExceptionpublic ModifiedDocumentDescriptor[] listModifiedDocuments(String sessionId, String dateRangeQuery) throws AuditException
WSAuditlistModifiedDocuments in interface WSAuditsessionId - the Nuxeo core session id.dateRangeQuery - the date range query.AuditExceptionpublic ModifiedDocumentDescriptorPage listModifiedDocumentsByPage(String sessionId, String dateRangeQuery, String path, int page, int pageSize) throws AuditException
listModifiedDocumentsByPage in interface WSAuditAuditExceptionpublic EventDescriptorPage listEventsByPage(String sessionId, String dateRangeQuery, int page, int pageSize) throws AuditException
listEventsByPage in interface WSAuditAuditExceptionpublic EventDescriptorPage listDocumentEventsByPage(String sessionId, String dateRangeQuery, String startDate, String path, int page, int pageSize) throws AuditException
WSAuditExpecting either a dateRangeQuery or a startDate.
listDocumentEventsByPage in interface WSAuditsessionId - the Nuxeo core session id.dateRangeQuery - the date range query like "24h" for the last 24 hours,
may be null if startDate is set.startDate - return events that occurs after startDate, expecting W3C date
time format. May be null if dateRangeQuery is set.
Will be ignored if dateRangeQuery is set.path - filter events for documents starting with this path.page - page number starting with page 1.pageSize - number of items in a page.AuditExceptionpublic String getRelativePathAsString(String sessionId, String uuid) throws ClientException
NuxeoRemotingExample: /Workspaces/My Workspaces/Nice Document
getRelativePathAsString in interface NuxeoRemotingsessionId - : the session iduuid - : the document uuidClientExceptionpublic boolean hasPermission(String sid, String uuid, String permission) throws ClientException
NuxeoRemotinghasPermission in interface NuxeoRemotingClientExceptionpublic String uploadDocument(String sid, String path, String type, String[] properties) throws ClientException
uploadDocument in interface NuxeoRemotingClientExceptionpublic String connect(String username, String password) throws ClientException
BaseNuxeoWebServiceconnect in interface BaseNuxeoWebServiceconnect in class AbstractNuxeoWebServiceusername - the user namepassword - the user passwordClientExceptionpublic void disconnect(String sid) throws ClientException
BaseNuxeoWebServicedisconnect in interface BaseNuxeoWebServicedisconnect in class AbstractNuxeoWebServicesid - the Nuxeo core session id.ClientExceptionpublic EventDescriptorPage queryEventsByPage(String sessionId, String whereClause, int page, int pageSize) throws AuditException
queryEventsByPage in interface WSAuditAuditExceptionpublic boolean validateUserPassword(String sessionId, String username, String password) throws ClientException
validateUserPassword in interface WSIndexingGatewayClientExceptionpublic String[] getUserGroups(String sessionId, String username) throws ClientException
getUserGroups in interface WSIndexingGatewayClientExceptionpublic DocumentSnapshot getDocumentSnapshotExt(String sessionId, String uuid, boolean useDownloadUrl) throws ClientException
NuxeoRemotinggetDocumentSnapshotExt in interface NuxeoRemotingsessionId - the session iduuid - the doc uuiduseDownloadUrl - define blob export formatClientExceptionpublic DocumentSnapshot getDocumentSnapshot(String sessionId, String uuid) throws ClientException
NuxeoRemotinggetDocumentSnapshot in interface NuxeoRemotingsessionId - the session iduuid - the doc uuidClientExceptionpublic ModifiedDocumentDescriptorPage listDeletedDocumentsByPage(String sessionId, String dateRangeQuery, String path, int page, int pageSize) throws AuditException
WSAuditlistDeletedDocumentsByPage in interface WSAuditAuditExceptionCopyright © 2012 Nuxeo SA. All Rights Reserved.