com.atlassian.confluence.it
Class User

java.lang.Object
  extended by com.atlassian.confluence.it.User
All Implemented Interfaces:
Entity, LinkableContent, TitledContent

public class User
extends Object
implements Entity, TitledContent, LinkableContent

The login details of a given user.


Field Summary
static User ADMIN
          A sample administrator user.
static User ANONYMOUS
          Represents anonymous users, IE those who haven't logged in.
static User EVIL
          A sample test user that contains html markup in the username and fullname.
static User SPECIAL_CHARS
          A sample test user whose username contains every non-alphanumeric character on a standard keyboard.
static User TEST
          A sample test user.
static User TEST2
          A second sample test user.
 
Constructor Summary
User(String username, String password, String fullName, String email)
          Constructs a fully formed User object with all fields set.
 
Method Summary
static User createUserFromPropertyPrefix(String propertyPrefix)
          Factory method to create users based on properties.
 boolean equals(Object o)
           
 String getDisplayName()
          Returns the display name of the Entity, eg full name for Users.
 String getEmail()
           
 String getFullName()
           
 String getName()
          Returns the Entity name.
 String getNameField()
          Returns the name of the field that stores the Entity name.
 String getPassword()
           
 String getTitle()
           
 String getUrl()
           
 String getUsername()
           
 String getUserPopupUrl()
           
 int hashCode()
           
 boolean isAnonymous()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ANONYMOUS

public static final User ANONYMOUS
Represents anonymous users, IE those who haven't logged in.


ADMIN

public static final User ADMIN
A sample administrator user. May or may not have permissions, depending on your test. Details are retrieved from the PropertiesManager.


TEST

public static final User TEST
A sample test user. May or may not have permissions, depending on your test. Details are retrieved from the PropertiesManager.


TEST2

public static final User TEST2
A second sample test user. May or may not have permissions, depending on your test. Details are retrieved from the PropertiesManager.


EVIL

public static final User EVIL
A sample test user that contains html markup in the username and fullname. For use in anti-XSS testing. Details are retrieved from the PropertiesManager.


SPECIAL_CHARS

public static final User SPECIAL_CHARS
A sample test user whose username contains every non-alphanumeric character on a standard keyboard. This was created to test cases where special characters in usernames (such as LDAP usernames) cause problems. Details are retrieved from the PropertiesManager

Constructor Detail

User

public User(String username,
            String password,
            String fullName,
            String email)
Constructs a fully formed User object with all fields set.

Parameters:
username - the name the user uses to log into the system.
password - in plain text, the password the user uses to log into the system.
fullName - the user's full name.
email - the user's email address.
Method Detail

createUserFromPropertyPrefix

public static User createUserFromPropertyPrefix(String propertyPrefix)
Factory method to create users based on properties.

Parameters:
propertyPrefix - The prefix to look for in the properties file. Must not be null.
Returns:
A User object generated from the properties file with the given prefix.

getUsername

public String getUsername()
Returns:
The name the user gives to log into the system.

getName

public String getName()
Description copied from interface: Entity
Returns the Entity name.

Specified by:
getName in interface Entity

getNameField

public String getNameField()
Description copied from interface: Entity
Returns the name of the field that stores the Entity name.

Specified by:
getNameField in interface Entity

getPassword

public String getPassword()

getFullName

public String getFullName()

getDisplayName

public String getDisplayName()
Description copied from interface: Entity
Returns the display name of the Entity, eg full name for Users.

Specified by:
getDisplayName in interface Entity
Returns:

getEmail

public String getEmail()

getUserPopupUrl

public String getUserPopupUrl()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isAnonymous

public boolean isAnonymous()

getTitle

public String getTitle()
Specified by:
getTitle in interface TitledContent

getUrl

public String getUrl()
Specified by:
getUrl in interface LinkableContent


Copyright © 2003-2010 Atlassian. All Rights Reserved.