Class DocumentRevisionClientImpl
java.lang.Object
com.lexmark.saperion.client.implementation.document.DocumentRevisionClientImpl
- All Implemented Interfaces:
DocumentRevisionClient
This is the default implementation of
DocumentRevisionClient.- Author:
- jschwarz
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentRevisionClientImpl(com.lexmark.saperion.document.DocumentService documentService, com.lexmark.saperion.document.DocumentRevisionReferenceType reference) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()This method deletes the specified document.getElement(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.DocumentRevisionTypeThis 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(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.DocumentStoreInformationTypeThis is a shorthand forupdate(indexData, null)updating only the index data and leaving the document structure untouched.com.lexmark.saperion.document.DocumentStoreInformationTypeupdate(Map<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(String fieldName, InputStream data) This method adds fulltext data to the specified field without creating a new revision.
-
Constructor Details
-
DocumentRevisionClientImpl
public DocumentRevisionClientImpl(com.lexmark.saperion.document.DocumentService documentService, com.lexmark.saperion.document.DocumentRevisionReferenceType reference)
-
-
Method Details
-
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(Map<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.EcmException Description 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(Map<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.EcmException Description 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(String fieldName, InputStream data) throws com.lexmark.saperion.exceptions.EcmException Description 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(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
-