public class Wiki.LogEntry extends Object implements Comparable<Wiki.LogEntry>
Wiki.getLogEntries(int)| Modifier | Constructor and Description |
|---|---|
protected |
LogEntry(String type,
String action,
String reason,
Wiki.User user,
String target,
String timestamp,
Object details)
Creates a new log entry.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Wiki.LogEntry other)
Compares this log entry to another one based on the recentness
of their timestamps.
|
String |
getAction()
Gets a string description of the action performed, for example
"delete", "protect", "overwrite", ...
|
Object |
getDetails()
Gets the details of this log entry.
|
String |
getReason()
Gets the reason supplied by the perfoming user when the action
was performed.
|
String |
getTarget()
Gets the target of the action represented by this log entry.
|
Calendar |
getTimestamp()
Gets the timestamp of this log entry.
|
String |
getType()
Gets the type of log that this entry is in.
|
Wiki.User |
getUser()
Gets the user object representing who performed the action.
|
String |
toString()
Returns a string representation of this log entry.
|
protected LogEntry(String type, String action, String reason, Wiki.User user, String target, String timestamp, Object details)
type - the type of log entry, one of USER_CREATION_LOG,
DELETION_LOG, BLOCK_LOG, etc.action - the type of action that was performed e.g. "delete",
"unblock", "overwrite", etc.reason - why the action was performeduser - the user who performed the actiontarget - the target of the actiontimestamp - the local time when the action was performed.
We will convert this back into a Calendar.details - the details of the action (e.g. the new title of
the page after a move was performed).public String getType()
public String getAction()
public String getReason()
public Wiki.User getUser()
public String getTarget()
public Calendar getTimestamp()
public Object getDetails()
| Log type | Return value |
|---|---|
| MOVE_LOG | The new page title |
| USER_RENAME_LOG | The new username |
| BLOCK_LOG | new Object[] { boolean anononly, boolean nocreate, boolean noautoblock, boolean noemail, boolean nousertalk, String duration } |
| USER_RIGHTS_LOG | The new user rights (String[]) |
| PROTECTION_LOG | action == "protect" or "modify" => the protection level (int, -2 if unrecognized), action == "move_prot" => the old title, else null |
| Others or RevisionDeleted | null |
public String toString()
public int compareTo(Wiki.LogEntry other)
compareTo in interface Comparable<Wiki.LogEntry>other - the log entry to compareCopyright © 2018 BITPlan GmbH. All rights reserved.