Class DocumentRevisionClientImpl
- java.lang.Object
-
- com.lexmark.saperion.client.implementation.document.DocumentRevisionClientImpl
-
- All Implemented Interfaces:
DocumentRevisionClient
public class DocumentRevisionClientImpl extends java.lang.Object implements DocumentRevisionClient
This is the default implementation ofDocumentRevisionClient.- Author:
- jschwarz
-
-
Constructor Summary
Constructors Constructor Description DocumentRevisionClientImpl(com.lexmark.saperion.document.DocumentService documentService, com.lexmark.saperion.document.DocumentRevisionReferenceType reference)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()This method deletes the specified document.DocumentElementClientgetElement(com.lexmark.saperion.document.DocumentElementReferenceType elementReference)This method returns the document element client for the given document element id.com.lexmark.saperion.document.DocumentRevisionTypeload()This method loads a document revision with its content.com.lexmark.saperion.document.DocumentRevisionTypeloadMetadata()This method loads a document revision without its content.voidpurge()This method removes every revision of this document as well as every element of those revisions.SearchClient<com.lexmark.saperion.PropertyType>searchMultiValueField(java.lang.String fieldName)This method returns a search client for the content of the given multi value field of the given document revision.com.lexmark.saperion.document.DocumentStoreInformationTypeupdate(com.lexmark.saperion.document.DocumentElementType documentElement)This is a shorthand forupdate(Collections.<String, PropertyType> emptyMap(), documentElement)updating only the document element and leaving the index data untouched.com.lexmark.saperion.document.DocumentStoreInformationTypeupdate(com.lexmark.saperion.document.UpdateDocumentInputType properties)This method updates the document with the given properties containing index-data, structure-data and ACLs.com.lexmark.saperion.document.DocumentStoreInformationTypeupdate(java.util.Map<java.lang.String,com.lexmark.saperion.PropertyType> indexData)This is a shorthand forupdate(indexData, null)updating only the index data and leaving the document structure untouched.com.lexmark.saperion.document.DocumentStoreInformationTypeupdate(java.util.Map<java.lang.String,com.lexmark.saperion.PropertyType> indexData, com.lexmark.saperion.document.DocumentElementType documentElement)This method updates the document instance and replaces the document with the given entity.voidwriteFulltextData(java.lang.String fieldName, java.io.InputStream data)This method adds fulltext data to the specified field without creating a new revision.
-
-
-
Method Detail
-
loadMetadata
public com.lexmark.saperion.document.DocumentRevisionType loadMetadata() throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method loads a document revision without its content.- Specified by:
loadMetadatain interfaceDocumentRevisionClient- Returns:
- the document revision without its content
- Throws:
com.lexmark.saperion.exceptions.EcmException- indicates that a system exception occurred
-
load
public com.lexmark.saperion.document.DocumentRevisionType load() throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method loads a document revision with its content.- Specified by:
loadin interfaceDocumentRevisionClient- Returns:
- the complete document revision
- Throws:
com.lexmark.saperion.exceptions.EcmException- indicates that a system exception occurred
-
delete
public void delete() throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method deletes the specified document.- Specified by:
deletein interfaceDocumentRevisionClient- Throws:
com.lexmark.saperion.exceptions.EcmException- indicates that a system exception occurred
-
update
public com.lexmark.saperion.document.DocumentStoreInformationType update(java.util.Map<java.lang.String,com.lexmark.saperion.PropertyType> indexData, com.lexmark.saperion.document.DocumentElementType documentElement) throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method updates the document instance and replaces the document with the given entity.- Specified by:
updatein interfaceDocumentRevisionClient- Parameters:
indexData- the index data changes of the documentdocumentElement- the new document root structure- Throws:
com.lexmark.saperion.exceptions.EcmException- indicates that a system exception occurred
-
update
public com.lexmark.saperion.document.DocumentStoreInformationType update(com.lexmark.saperion.document.DocumentElementType documentElement) throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis is a shorthand forupdate(Collections.<String, PropertyType> emptyMap(), documentElement)updating only the document element and leaving the index data untouched.- Specified by:
updatein interfaceDocumentRevisionClient- Parameters:
documentElement- the new document root structure- Throws:
com.lexmark.saperion.exceptions.EcmException
-
update
public com.lexmark.saperion.document.DocumentStoreInformationType update(java.util.Map<java.lang.String,com.lexmark.saperion.PropertyType> indexData) throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis is a shorthand forupdate(indexData, null)updating only the index data and leaving the document structure untouched.- Specified by:
updatein interfaceDocumentRevisionClient- Parameters:
indexData- the index data changes of the document- Throws:
com.lexmark.saperion.exceptions.EcmException
-
update
public com.lexmark.saperion.document.DocumentStoreInformationType update(com.lexmark.saperion.document.UpdateDocumentInputType properties) throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method updates the document with the given properties containing index-data, structure-data and ACLs.- Specified by:
updatein interfaceDocumentRevisionClient- Parameters:
properties- the properties to update- Returns:
- information about the new revision
- Throws:
com.lexmark.saperion.exceptions.EcmException- when updating the document failed
-
writeFulltextData
public void writeFulltextData(java.lang.String fieldName, java.io.InputStream data) throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method adds fulltext data to the specified field without creating a new revision. The field must be a fulltext-enabled text field. Note that fulltext data is stored in the database only.- Specified by:
writeFulltextDatain interfaceDocumentRevisionClient- Parameters:
fieldName- the name of the field used to store fulltext datadata- the fulltext data- Throws:
com.lexmark.saperion.exceptions.EcmException- when writing the data failed
-
searchMultiValueField
public SearchClient<com.lexmark.saperion.PropertyType> searchMultiValueField(java.lang.String fieldName) throws com.lexmark.saperion.exceptions.EcmException
Description copied from interface:DocumentRevisionClientThis method returns a search client for the content of the given multi value field of the given document revision.- Specified by:
searchMultiValueFieldin interfaceDocumentRevisionClient- Parameters:
fieldName- the name of the multi value field- Returns:
- a search client for the content of the given multi value field of the given document revision
- Throws:
com.lexmark.saperion.exceptions.EcmException
-
getElement
public DocumentElementClient getElement(com.lexmark.saperion.document.DocumentElementReferenceType elementReference) throws com.lexmark.saperion.exceptions.EcmException
Description copied from interface:DocumentRevisionClientThis method returns the document element client for the given document element id.- Specified by:
getElementin interfaceDocumentRevisionClient- Parameters:
elementReference- the document element reference- Returns:
- the document element client for the given document element id
- Throws:
com.lexmark.saperion.exceptions.EcmException
-
purge
public void purge() throws com.lexmark.saperion.exceptions.EcmExceptionDescription copied from interface:DocumentRevisionClientThis method removes every revision of this document as well as every element of those revisions. This operation cannot be undone.- Specified by:
purgein interfaceDocumentRevisionClient- Throws:
com.lexmark.saperion.exceptions.EcmException
-
-