public class DocumentClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseURI |
static int |
DEFAULT_PAGE_SIZE |
static String |
DEFAULT_TYPE |
protected String |
items |
protected int |
pageIndex |
protected int |
pageSize |
protected List<javax.ws.rs.client.ClientRequestFilter> |
requestFilterList |
protected String |
sortBy |
protected boolean |
sortReverse |
protected String |
type |
| Constructor and Description |
|---|
DocumentClient(String base_uri)
Initialize the client by a BASE_URL.
|
| Modifier and Type | Method and Description |
|---|---|
org.imixs.workflow.ItemCollection |
createAdminPJob(org.imixs.workflow.ItemCollection document)
Creates a new AdminPJobInstance
|
void |
deleteDocument(String uniqueid)
Deletes a single workItem or document instance by UniqueID.
|
String |
getBaseURI() |
List<org.imixs.workflow.ItemCollection> |
getCustomResource(String uri)
Returns the custom data list by uri GET
|
org.imixs.workflow.xml.XMLDataCollection |
getCustomResourceXML(String uri)
Returns the custom data list by uri GET as a collection of XMLDocument
elements.
|
org.imixs.workflow.ItemCollection |
getDocument(String uniqueid)
Returns a single document instance by UniqueID.
|
String |
getItems() |
int |
getPageIndex() |
int |
getPageSize() |
String |
getSortBy() |
String |
getType()
retruns the document type.
|
boolean |
isSortReverse() |
javax.ws.rs.client.Client |
newClient()
This method creates a new javax.ws.rs.client.Client instance using the
default client builder implementation class provided by the JAX-RS
implementation provider.
|
void |
registerClientRequestFilter(javax.ws.rs.client.ClientRequestFilter filter)
Register a ClientRequestFilter instance.
|
org.imixs.workflow.ItemCollection |
saveDocument(org.imixs.workflow.ItemCollection document)
Creates or updates a single document instance.
|
List<org.imixs.workflow.ItemCollection> |
searchDocuments(String query)
Returns the the search result of a lucene search.
|
void |
setBaseURI(String baseURI) |
void |
setItems(String items) |
void |
setPageIndex(int pageIndex) |
void |
setPageSize(int pageSize) |
void |
setSortBy(String sortBy) |
void |
setSortOrder(String sortBy,
boolean sortReverse) |
void |
setSortReverse(boolean sortReverse) |
void |
setType(String type) |
public static final int DEFAULT_PAGE_SIZE
public static final String DEFAULT_TYPE
protected String baseURI
protected String sortBy
protected boolean sortReverse
protected String type
protected int pageSize
protected int pageIndex
protected String items
protected List<javax.ws.rs.client.ClientRequestFilter> requestFilterList
public DocumentClient(String base_uri)
base_uri - public void registerClientRequestFilter(javax.ws.rs.client.ClientRequestFilter filter)
filter - - request filter instance.public String getBaseURI()
public void setBaseURI(String baseURI)
public int getPageSize()
public void setPageSize(int pageSize)
public int getPageIndex()
public void setPageIndex(int pageIndex)
public String getItems()
public void setItems(String items)
public String getType()
public void setType(String type)
public String getSortBy()
public void setSortBy(String sortBy)
public boolean isSortReverse()
public void setSortReverse(boolean sortReverse)
public void setSortOrder(String sortBy, boolean sortReverse)
public javax.ws.rs.client.Client newClient()
The method registers all known filter instances.
The client instance should be closed after the request if finished.
public org.imixs.workflow.ItemCollection saveDocument(org.imixs.workflow.ItemCollection document)
throws RestAPIException
document - - a ItemCollection representing the document.RestAPIExceptionpublic org.imixs.workflow.ItemCollection createAdminPJob(org.imixs.workflow.ItemCollection document)
throws RestAPIException
document - - a ItemCollection representing the job.RestAPIExceptionpublic org.imixs.workflow.ItemCollection getDocument(String uniqueid) throws RestAPIException
uniqueid - RestAPIExceptionpublic void deleteDocument(String uniqueid) throws RestAPIException
userid - RestAPIExceptionpublic List<org.imixs.workflow.ItemCollection> searchDocuments(String query) throws RestAPIException, UnsupportedEncodingException
The method creates a search URL and requests a CustomResource by GET. The lucene query is encoded by this method. The method throws a UnsupportedEncodingException if the query string can not be encoded.
query - - lucene search queryRestAPIExceptionUnsupportedEncodingExceptionpublic List<org.imixs.workflow.ItemCollection> getCustomResource(String uri) throws RestAPIException
userid - items - RestAPIExceptionpublic org.imixs.workflow.xml.XMLDataCollection getCustomResourceXML(String uri) throws RestAPIException
userid - items - RestAPIExceptionCopyright © 2018–2019 Imixs Software Solutions GmbH. All rights reserved.