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 TypeMethodDescriptionint
static AuditLog
create
(Auditable a, Collection<BeanUtils.PropertyChange> delta, int authorID) Creates an audit log from a list of bean property changes.boolean
Returns the application name.Returns the audit object ID.Returns the audit object type.int
Returns 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.int
hashCode()
void
setApplication
(String appName) Updates the application name.void
setAuthorID
(int id) Updates the author of this bean.void
Updates the entry creation date.void
setDescription
(String desc) Updates the entry description.void
setRemoteAddr
(String addr) Updates the IP address for this audit entry.void
setRemoteHost
(String host) Updates the host name for this audit entry.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.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:AuthoredBean
Returns the Author of this bean.- Specified by:
getAuthorID
in interfaceAuthoredBean
- Returns:
- the author's database ID
- See Also:
-
getAuditType
Description copied from interface:AuditEntry
Returns the audit object type.- Specified by:
getAuditType
in interfaceAuditEntry
- Returns:
- the type
-
getAuditID
Description copied from interface:AuditEntry
Returns the audit object ID.- Specified by:
getAuditID
in interfaceAuditEntry
- Returns:
- the ID
-
getDate
Description copied from interface:AuditEntry
Returns the date the entry was created.- Specified by:
getDate
in 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:AuditEntry
Returns the entry description.- Specified by:
getDescription
in interfaceAuditEntry
- Returns:
- the description
-
getRemoteAddr
Description copied from interface:RemoteAddressBean
Returns the remote IP address.- Specified by:
getRemoteAddr
in interfaceRemoteAddressBean
- Returns:
- an IPv4 or IPv6 address
-
getRemoteHost
Description copied from interface:RemoteAddressBean
Returns the remote host name.- Specified by:
getRemoteHost
in interfaceRemoteAddressBean
- Returns:
- the host name, or address if unresolved
-
setAuthorID
public void setAuthorID(int id) Description copied from interface:AuthoredBean
Updates the author of this bean.- Specified by:
setAuthorID
in 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:
compareTo
in interfaceComparable<AuditLog>
-