Class AuditLog
java.lang.Object
org.deltava.beans.AuditLog
- All Implemented Interfaces:
Comparable<AuditLog>, AuditEntry, AuthoredBean, RemoteAddressBean
A bean to store an audit log record.
- Since:
- 7.4
- Version:
- 11.1
- Author:
- Luke
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic AuditLogcreate(Auditable a, Collection<BeanUtils.PropertyChange> delta, int authorID) Creates an audit log from a list of bean property changes.booleanReturns the application name.Returns the audit object ID.Returns the audit object type.intReturns the Author of this bean.getDate()Returns the date the entry was created.Returns the entry description.Returns the remote IP address.Returns the remote host name.inthashCode()voidsetApplication(String appName) Updates the application name.voidsetAuthorID(int id) Updates the author of this bean.voidUpdates the entry creation date.voidsetDescription(String desc) Updates the entry description.voidsetRemoteAddr(String addr) Updates the IP address for this audit entry.voidsetRemoteHost(String host) Updates the host name for this audit entry.toString()Methods inherited from interface RemoteAddressBean
getIsResolved
-
Field Details
-
COMMON
- See Also:
-
-
Constructor Details
-
AuditLog
-
AuditLog
Creates the log entry.- Parameters:
a- the Auditable objectauthorID- the author's database ID
-
-
Method Details
-
create
public static AuditLog create(Auditable a, Collection<BeanUtils.PropertyChange> delta, int authorID) Creates an audit log from a list of bean property changes.- Parameters:
a- the Auditable objectdelta- the list of changesauthorID- the author's database ID- Returns:
- an AuditLog, or null if no changes
-
getAuthorID
public int getAuthorID()Description copied from interface:AuthoredBeanReturns the Author of this bean.- Specified by:
getAuthorIDin interfaceAuthoredBean- Returns:
- the author's database ID
- See Also:
-
getAuditType
Description copied from interface:AuditEntryReturns the audit object type.- Specified by:
getAuditTypein interfaceAuditEntry- Returns:
- the type
-
getAuditID
Description copied from interface:AuditEntryReturns the audit object ID.- Specified by:
getAuditIDin interfaceAuditEntry- Returns:
- the ID
-
getDate
Description copied from interface:AuditEntryReturns the date the entry was created.- Specified by:
getDatein interfaceAuditEntry- Returns:
- the creation date/time
-
getApplication
Returns the application name.- Returns:
- the application name, or COMMON for shared objects
-
getDescription
Description copied from interface:AuditEntryReturns the entry description.- Specified by:
getDescriptionin interfaceAuditEntry- Returns:
- the description
-
getRemoteAddr
Description copied from interface:RemoteAddressBeanReturns the remote IP address.- Specified by:
getRemoteAddrin interfaceRemoteAddressBean- Returns:
- an IPv4 or IPv6 address
-
getRemoteHost
Description copied from interface:RemoteAddressBeanReturns the remote host name.- Specified by:
getRemoteHostin interfaceRemoteAddressBean- Returns:
- the host name, or address if unresolved
-
setAuthorID
public void setAuthorID(int id) Description copied from interface:AuthoredBeanUpdates the author of this bean.- Specified by:
setAuthorIDin interfaceAuthoredBean- Parameters:
id- the author's database ID.- See Also:
-
setDescription
Updates the entry description.- Parameters:
desc- the description
-
setDate
-
setApplication
Updates the application name.- Parameters:
appName- the name, or COMMON for shared objects
-
setRemoteAddr
Updates the IP address for this audit entry.- Parameters:
addr- the address
-
setRemoteHost
Updates the host name for this audit entry.- Parameters:
host- the host name
-
toString
-
hashCode
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<AuditLog>
-