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 java.lang.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 LDAP_USER1
          A sample test user whose username contains every non-alphanumeric character on a standard keyboard.
static User SPECIAL_CHARS
           
static User TEST
          A sample test user.
static User TEST2
          A second sample test user.
 
Constructor Summary
User(java.lang.String username, java.lang.String password, java.lang.String fullName, java.lang.String email)
          Constructs a fully formed User object with all fields set.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getDisplayName()
          Returns the display name of the Entity, eg full name for Users.
 java.lang.String getEmail()
           
 java.lang.String getFullName()
           
 java.lang.String getName()
          Returns the Entity name.
 java.lang.String getNameField()
          Returns the name of the field that stores the Entity name.
 java.lang.String getPassword()
           
 java.lang.String getTitle()
           
 java.lang.String getUrl()
           
 java.lang.String getUsername()
           
 java.lang.String getUserPopupUrl()
           
 int hashCode()
           
 boolean isAnonymous()
           
 java.lang.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.


LDAP_USER1

public static User LDAP_USER1
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


SPECIAL_CHARS

public static final User SPECIAL_CHARS
Constructor Detail

User

public User(java.lang.String username,
            java.lang.String password,
            java.lang.String fullName,
            java.lang.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

getUsername

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

getName

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

Specified by:
getName in interface Entity

getNameField

public java.lang.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 java.lang.String getPassword()

getFullName

public java.lang.String getFullName()

getDisplayName

public java.lang.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 java.lang.String getEmail()

getUserPopupUrl

public java.lang.String getUserPopupUrl()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isAnonymous

public boolean isAnonymous()

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface TitledContent

getUrl

public java.lang.String getUrl()
Specified by:
getUrl in interface LinkableContent


Copyright © 2003-2011 Atlassian. All Rights Reserved.