com.atlassian.confluence.it
Class User

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

public class User
extends java.lang.Object
implements Entity, TitledContent, LinkableContent

The login details of a given user.


Nested Class Summary
static class User.Simpsons
           
 
Field Summary
static User ADMIN
           
static User ANONYMOUS
          Represents anonymous users, i.e.
static User APOSTROPHE
          A sample test user that contains an apostrophe in the username and fullname.
static User CONF_ADMIN
          A sample administrator user.
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 java.lang.String PROPERTY_USER_EMAIL_MIMETYPE
           
static java.lang.String PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS
           
static java.lang.String PROPERTY_USER_SITE_HOMEPAGE
           
static User SPECIAL_CHARS
           
static User SYS_ADMIN
           
static User TEST
          A sample test user.
static User TEST2
          A second sample test user.
static User UNICODE
           
 
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()
           
 UrlBuilder getUrlBuilder()
           
 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

PROPERTY_USER_SITE_HOMEPAGE

public static final java.lang.String PROPERTY_USER_SITE_HOMEPAGE
See Also:
Constant Field Values

PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS

public static final java.lang.String PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS
See Also:
Constant Field Values

PROPERTY_USER_EMAIL_MIMETYPE

public static final java.lang.String PROPERTY_USER_EMAIL_MIMETYPE
See Also:
Constant Field Values

ANONYMOUS

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


CONF_ADMIN

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


SYS_ADMIN

public static final User SYS_ADMIN

ADMIN

public static final User ADMIN

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.


APOSTROPHE

public static final User APOSTROPHE
A sample test user that contains an apostrophe in the username and fullname.


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

UNICODE

public static final User UNICODE
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

hashCode

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

toString

public java.lang.String toString()
Overrides:
toString 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

getUrlBuilder

public UrlBuilder getUrlBuilder()
Specified by:
getUrlBuilder in interface LinkableContent


Copyright © 2003-2013 Atlassian. All Rights Reserved.