public class Wiki.User extends Object implements Cloneable, Serializable
Modifier | Constructor and Description |
---|---|
protected |
User(String username)
Creates a new user object.
|
Modifier and Type | Method and Description |
---|---|
Wiki.LogEntry[] |
blockLog()
Returns a log of the times when the user has been blocked.
|
Wiki.User |
clone()
Copies this user object.
|
Wiki.Revision[] |
contribs(int... ns)
Fetches the contributions for this user in a particular namespace(s).
|
int |
countEdits()
Fetches the internal edit count for this user, which includes all
live edits and deleted edits after (I think) January 2007.
|
boolean |
equals(Object x)
Tests whether this user is equal to another one.
|
Map<String,Object> |
getUserInfo()
Gets various properties of this user.
|
String |
getUsername()
Gets this user's username.
|
int |
hashCode()
Returns a hashcode of this user.
|
boolean |
isA(String group)
Returns true if the user is a member of the specified group.
|
boolean |
isAllowedTo(String right)
Returns true if the user is allowed to perform the specified action.
|
boolean |
isBlocked()
Determines whether this user is blocked by looking it up on the IP
block list.
|
String |
toString()
Returns a string representation of this user.
|
protected User(String username)
username
- the username of the userpublic String getUsername()
public Map<String,Object> getUserInfo() throws IOException
countEdits()
the user's edit
count
IOException
- if a network error occurspublic boolean isAllowedTo(String right) throws IOException
right
- a specific actionIOException
- if a network error occurspublic boolean isA(String group) throws IOException
group
- a specific groupIOException
- if a network error occurspublic Wiki.LogEntry[] blockLog() throws IOException
IOException
- if something goes wrongpublic boolean isBlocked() throws IOException
IOException
- if we cannot retrieve the IP block listpublic int countEdits() throws IOException
IOException
- if a network error occurspublic Wiki.Revision[] contribs(int... ns) throws IOException
ns
- a list of namespaces to filter by, empty = all namespaces.IOException
- if a network error occurspublic Wiki.User clone()
public boolean equals(Object x)
public String toString()
Copyright © 2018 BITPlan GmbH. All rights reserved.