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 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 Document retrieveDocument(String documentId)
          Fetches the document from the AuditTrail.
static Folder retrieveFolder(String folderId)
          Fetches the folder from the AuditTrail.
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()
 
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.

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.


Copyright © 2014 Eclipse Stardust. All Rights Reserved.