org.eclipse.stardust.engine.core.spi.dms
Class RepositoryAuditTrailUtils

java.lang.Object
  extended by org.eclipse.stardust.engine.core.spi.dms.RepositoryAuditTrailUtils

public class RepositoryAuditTrailUtils
extends Object

This utility allows to store, retrieve and delete Document and Folder beans as ClobDataBean in the AuditTrail using a json format. The entries are stored uniquely by Resource.getId(), Document.getRevisionId() and Resource.getId().

Author:
roland.stamm

Method Summary
static Map deserialize(String stringValue)
           
static void removeDocument(String documentId)
          Deletes the entry from the AuditTrail if it exists.
static void removeFolder(String folderId)
          Deletes the entry from the AuditTrail if it exists.
static void removeImportDocumentMetaData(List<String> resourceIds)
           
static Document retrieveDocument(String documentId)
          Fetches the document from the AuditTrail.
static Folder retrieveFolder(String folderId)
          Fetches the folder from the AuditTrail.
static String serialize(Map map)
           
static void storeDocument(Document document)
          Stores a document in the AuditTrail by Resource.getId() and Document.getRevisionId() if a revesionId exists and is not RepositoryConstants.VERSION_UNVERSIONED.
static void storeFolder(Folder folder)
          Stores a folder in the AuditTrail by Resource.getId()
static void storeImportDocument(Document document)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

storeDocument

public static void storeDocument(Document document)
Stores a document in the AuditTrail by Resource.getId() and Document.getRevisionId() if a revesionId exists and is not RepositoryConstants.VERSION_UNVERSIONED.

Parameters:
document - The document to persist in the AuditTrail.

storeImportDocument

public static void storeImportDocument(Document document)

removeImportDocumentMetaData

public static void removeImportDocumentMetaData(List<String> resourceIds)

retrieveDocument

public static Document retrieveDocument(String documentId)
Fetches the document from the AuditTrail.

Parameters:
documentId - The document Resource.getId() or Document.getRevisionId() to look up the document for.
Returns:
The fetched Document from the AuditTrail.

removeDocument

public static void removeDocument(String documentId)
Deletes the entry from the AuditTrail if it exists.

Parameters:
documentId - The document Resource.getId() or Document.getRevisionId() to delete the AuditTrail entry for.

storeFolder

public static void storeFolder(Folder folder)
Stores a folder in the AuditTrail by Resource.getId()

Parameters:
folder - The folder to persist in the AuditTrail.

retrieveFolder

public static Folder retrieveFolder(String folderId)
Fetches the folder from the AuditTrail.

Parameters:
folderId - The folder Resource.getId() to look up the folder for.
Returns:
The fetched Folder from the AuditTrail.

removeFolder

public static void removeFolder(String folderId)
Deletes the entry from the AuditTrail if it exists.

Parameters:
folderId - The folder Resource.getId() to delete the AuditTrail entry for.

deserialize

public static Map deserialize(String stringValue)
                       throws IOException,
                              ClassNotFoundException
Throws:
IOException
ClassNotFoundException

serialize

public static String serialize(Map map)
                        throws IOException
Throws:
IOException


Copyright © 2017 Eclipse Stardust. All Rights Reserved.