org.alfresco.repo.domain
Class AuditableProperties

java.lang.Object
  extended by org.alfresco.repo.domain.AuditableProperties

public class AuditableProperties
extends java.lang.Object

Class holding properties associated with the cm:auditable aspect. This aspect is common enough to warrant direct inclusion on the Node entity.

Since:
2.2 SP2

Constructor Summary
AuditableProperties()
          Default constructor with all null values.
 
Method Summary
 java.util.Map getAuditableProperties()
           
 java.io.Serializable getAuditableProperty(org.alfresco.service.namespace.QName qname)
           
static boolean isAuditableProperty(org.alfresco.service.namespace.QName qname)
           
 void setAuditValues(java.lang.String user, java.util.Date date, boolean force)
          Set all cm:auditable parameters as required.
 void setAuditValues(java.lang.String user, java.util.Date date, java.util.Map properties)
          Set all cm:auditable parameters as required, giving precedence to the supplied property map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditableProperties

public AuditableProperties()
Default constructor with all null values.

Method Detail

isAuditableProperty

public static boolean isAuditableProperty(org.alfresco.service.namespace.QName qname)
Returns:
Returns true if the property belongs to the cm:auditable aspect

getAuditableProperty

public java.io.Serializable getAuditableProperty(org.alfresco.service.namespace.QName qname)
Parameters:
qname - the property name
Returns:
Returns the value of the cm:auditable property or null

getAuditableProperties

public java.util.Map getAuditableProperties()
Returns:
Returns a Map of auditable properties

setAuditValues

public void setAuditValues(java.lang.String user,
                           java.util.Date date,
                           boolean force)
Set all cm:auditable parameters as required. Where possible, the creation and modification data will be shared so as to reduce data duplication.

Parameters:
user - the username
date - the creation or modification date
force - true to force the values to overwrite any pre-existing values

setAuditValues

public void setAuditValues(java.lang.String user,
                           java.util.Date date,
                           java.util.Map properties)
Set all cm:auditable parameters as required, giving precedence to the supplied property map.

Parameters:
user - the username
date - the creation or modification date
properties - the properties to override the user and date


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.