public class AuditablePropertiesEntity extends Object implements Serializable
Constructor and Description |
---|
AuditablePropertiesEntity()
Default constructor with all null values.
|
AuditablePropertiesEntity(AuditablePropertiesEntity that)
Copy constructor to create an unlocked instance
|
Modifier and Type | Method and Description |
---|---|
Map<org.alfresco.service.namespace.QName,Serializable> |
getAuditableProperties() |
Serializable |
getAuditableProperty(org.alfresco.service.namespace.QName qname) |
static Set<org.alfresco.service.namespace.QName> |
getAuditablePropertyQNames() |
String |
getAuditAccessed()
For persistance use
|
String |
getAuditCreated()
For persistance use
|
String |
getAuditCreator()
For persistance use
|
String |
getAuditModified()
For persistance use
|
String |
getAuditModifier()
For persistance use
|
static boolean |
hasAuditableAspect(org.alfresco.service.namespace.QName typeQName,
org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
static boolean |
hasAuditableProperty(Set<org.alfresco.service.namespace.QName> qnames) |
static boolean |
isAuditableProperty(org.alfresco.service.namespace.QName qname) |
void |
lock()
Lock the entity against further updates to prevent accidental modification
|
void |
setAuditAccessed(String auditAccessed)
For persistance use
|
void |
setAuditCreated(String auditCreated)
For persistance use
|
void |
setAuditCreator(String auditCreator)
For persistance use
|
boolean |
setAuditModified(Date date,
long modifiedDateToleranceMs) |
void |
setAuditModified(String auditModified)
For persistance use
|
void |
setAuditModifier(String auditModifier)
For persistance use
|
boolean |
setAuditValues(String user,
Date date,
boolean force,
long modifiedDateToleranceMs)
Set all cm:auditable parameters as required.
|
boolean |
setAuditValues(String user,
Date date,
Map<org.alfresco.service.namespace.QName,Serializable> properties)
Set all cm:auditable parameters as required, giving precedence to the supplied
property map.
|
String |
toString() |
public AuditablePropertiesEntity()
public AuditablePropertiesEntity(AuditablePropertiesEntity that)
public static Set<org.alfresco.service.namespace.QName> getAuditablePropertyQNames()
public static boolean hasAuditableProperty(Set<org.alfresco.service.namespace.QName> qnames)
qnames
- the property names to checkpublic static boolean isAuditableProperty(org.alfresco.service.namespace.QName qname)
public static boolean hasAuditableAspect(org.alfresco.service.namespace.QName typeQName, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
typeQName
- a node typepublic void lock()
public Serializable getAuditableProperty(org.alfresco.service.namespace.QName qname)
qname
- the property namepublic Map<org.alfresco.service.namespace.QName,Serializable> getAuditableProperties()
public boolean setAuditValues(String user, Date date, boolean force, long modifiedDateToleranceMs)
user
- the username; null to use the
fully-authenticated user
date
- the creation or modification date; null to use the current system timeforce
- true to force the values to overwrite any pre-existing valuesmodifiedDateToleranceMs
- the number of milliseconds' to tolerate before updating the
modification date.
Setting this to 1000L (say) will mean that the modification time will not be
changed if the existing value is withing 1000 ms of the new time.public boolean setAuditValues(String user, Date date, Map<org.alfresco.service.namespace.QName,Serializable> properties)
user
- the usernamedate
- the creation or modification dateproperties
- the properties to override the user and datepublic String getAuditCreator()
public void setAuditCreator(String auditCreator)
public String getAuditCreated()
public void setAuditCreated(String auditCreated)
public String getAuditModifier()
public void setAuditModifier(String auditModifier)
public String getAuditModified()
public void setAuditModified(String auditModified)
public boolean setAuditModified(Date date, long modifiedDateToleranceMs)
modifiedDateToleranceMs
- the number of milliseconds' to tolerate before updating the
modification date.
Setting this to 1000L (say) will mean that the modification time will not be
changed if the existing value is withing 1000 ms of the new time.public String getAuditAccessed()
public void setAuditAccessed(String auditAccessed)
Copyright © 2005–2017 Alfresco Software. All rights reserved.