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) |
connectOnRepository
public DocumentDescriptor[] getChildren(String sessionId, String uuid) throws ClientException
NuxeoRemoting
getChildren
in interface NuxeoRemoting
sessionId
- the session iduuid
- the doc uuidClientException
public DocumentDescriptor getCurrentVersion(String sid, String uid) throws ClientException
NuxeoRemoting
getCurrentVersion
in interface NuxeoRemoting
ClientException
public DocumentDescriptor getDocument(String sessionId, String uuid) throws ClientException
NuxeoRemoting
getDocument
in interface NuxeoRemoting
sessionId
- the session iduuid
- the doc uuidClientException
public WsACE[] getDocumentACL(String sid, String uuid) throws ClientException
NuxeoRemoting
It includes all ACLs for each ACP.
getDocumentACL
in interface NuxeoRemoting
uuid
- the uuid of the documentClientException
public WsACE[] getDocumentLocalACL(String sid, String uuid) throws ClientException
NuxeoRemoting
It includes all ACLs for each ACP.
getDocumentLocalACL
in interface NuxeoRemoting
uuid
- the uuid of the documentClientException
public DocumentBlob[] getDocumentBlobsExt(String sid, String uuid, boolean useDownloadUrl) throws ClientException
NuxeoRemoting
getDocumentBlobsExt
in interface NuxeoRemoting
uuid
- the uuid of the document.useDownloadUrl
- defines if blob are exported as download url or as byte|[]ClientException
public DocumentBlob[] getDocumentBlobs(String sid, String uuid) throws ClientException
NuxeoRemoting
getDocumentBlobs
in interface NuxeoRemoting
uuid
- the uuid of the document.ClientException
public DocumentProperty[] getDocumentNoBlobProperties(String sid, String uuid) throws ClientException
NuxeoRemoting
NuxeoRemoting.getDocumentProperties(String, String)
but skips blobs.getDocumentNoBlobProperties
in interface NuxeoRemoting
ClientException
public DocumentProperty[] getDocumentProperties(String sid, String uuid) throws ClientException
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.ClientException
public String[] getGroups(String sid, String parentGroup) throws ClientException
NuxeoRemoting
getGroups
in interface NuxeoRemoting
sid
- the session idparentGroup
- the parent groupClientException
public String getRepositoryName(String sid) throws ClientException
NuxeoRemoting
getRepositoryName
in interface NuxeoRemoting
sid
- the session idClientException
public DocumentDescriptor getRootDocument(String sessionId) throws ClientException
NuxeoRemoting
getRootDocument
in interface NuxeoRemoting
ClientException
public String resolvePathToUUID(String sessionId, String path) throws ClientException
resolvePathToUUID
in interface WSIndexingGateway
ClientException
public UUIDPage getRecursiveChildrenUUIDsByPage(String sid, String uuid, int page, int pageSize) throws ClientException
getRecursiveChildrenUUIDsByPage
in interface WSIndexingGateway
ClientException
public String[] getRecursiveChildrenUUIDs(String sid, String uuid) throws ClientException
getRecursiveChildrenUUIDs
in interface WSIndexingGateway
ClientException
public DocumentTypeDescriptor[] getTypeDefinitions() throws ClientException
getTypeDefinitions
in interface WSIndexingGateway
ClientException
public DocumentDescriptor getDocumentFromPath(String sessionId, String path) throws ClientException
getDocumentFromPath
in interface WSIndexingGateway
ClientException
public DocumentDescriptor getSourceDocument(String sid, String uid) throws ClientException
NuxeoRemoting
getSourceDocument
in interface NuxeoRemoting
ClientException
public String[] getUsers(String sid, String parentGroup) throws ClientException
NuxeoRemoting
getUsers
in interface NuxeoRemoting
sid
- the session idparentGroup
- the parent groupClientException
- if any error occurspublic DocumentDescriptor[] getVersions(String sid, String uid) throws ClientException
NuxeoRemoting
getVersions
in interface NuxeoRemoting
ClientException
public String[] listGroups(String sid, int from, int to) throws ClientException
NuxeoRemoting
This method supports pagination in case of large user dbs
Pagination is not yet working!
listGroups
in interface NuxeoRemoting
from
- pagination startto
- pagination stopClientException
public String[] listUsers(String sid, int from, int to) throws ClientException
NuxeoRemoting
This method supports pagination in case of large user dbs.
Pagination is not yet working!
listUsers
in interface NuxeoRemoting
from
- pagination startto
- pagination stopClientException
public ModifiedDocumentDescriptor[] listModifiedDocuments(String sessionId, String dateRangeQuery) throws AuditException
WSAudit
listModifiedDocuments
in interface WSAudit
sessionId
- the Nuxeo core session id.dateRangeQuery
- the date range query.AuditException
public ModifiedDocumentDescriptorPage listModifiedDocumentsByPage(String sessionId, String dateRangeQuery, String path, int page, int pageSize) throws AuditException
listModifiedDocumentsByPage
in interface WSAudit
AuditException
public EventDescriptorPage listEventsByPage(String sessionId, String dateRangeQuery, int page, int pageSize) throws AuditException
listEventsByPage
in interface WSAudit
AuditException
public EventDescriptorPage listDocumentEventsByPage(String sessionId, String dateRangeQuery, String startDate, String path, int page, int pageSize) throws AuditException
WSAudit
Expecting either a dateRangeQuery or a startDate.
listDocumentEventsByPage
in interface WSAudit
sessionId
- 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.AuditException
public String getRelativePathAsString(String sessionId, String uuid) throws ClientException
NuxeoRemoting
Example: /Workspaces/My Workspaces/Nice Document
getRelativePathAsString
in interface NuxeoRemoting
sessionId
- : the session iduuid
- : the document uuidClientException
public boolean hasPermission(String sid, String uuid, String permission) throws ClientException
NuxeoRemoting
hasPermission
in interface NuxeoRemoting
ClientException
public String uploadDocument(String sid, String path, String type, String[] properties) throws ClientException
uploadDocument
in interface NuxeoRemoting
ClientException
public String connect(String username, String password) throws ClientException
BaseNuxeoWebService
connect
in interface BaseNuxeoWebService
connect
in class AbstractNuxeoWebService
username
- the user namepassword
- the user passwordClientException
public void disconnect(String sid) throws ClientException
BaseNuxeoWebService
disconnect
in interface BaseNuxeoWebService
disconnect
in class AbstractNuxeoWebService
sid
- the Nuxeo core session id.ClientException
public EventDescriptorPage queryEventsByPage(String sessionId, String whereClause, int page, int pageSize) throws AuditException
queryEventsByPage
in interface WSAudit
AuditException
public boolean validateUserPassword(String sessionId, String username, String password) throws ClientException
validateUserPassword
in interface WSIndexingGateway
ClientException
public String[] getUserGroups(String sessionId, String username) throws ClientException
getUserGroups
in interface WSIndexingGateway
ClientException
public DocumentSnapshot getDocumentSnapshotExt(String sessionId, String uuid, boolean useDownloadUrl) throws ClientException
NuxeoRemoting
getDocumentSnapshotExt
in interface NuxeoRemoting
sessionId
- the session iduuid
- the doc uuiduseDownloadUrl
- define blob export formatClientException
public DocumentSnapshot getDocumentSnapshot(String sessionId, String uuid) throws ClientException
NuxeoRemoting
getDocumentSnapshot
in interface NuxeoRemoting
sessionId
- the session iduuid
- the doc uuidClientException
public ModifiedDocumentDescriptorPage listDeletedDocumentsByPage(String sessionId, String dateRangeQuery, String path, int page, int pageSize) throws AuditException
WSAudit
listDeletedDocumentsByPage
in interface WSAudit
AuditException
Copyright © 2015 Nuxeo SA. All rights reserved.