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 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 String PROPERTY_USER_EMAIL_MIMETYPE
           
static String PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS
           
static String PROPERTY_USER_SITE_HOMEPAGE
           
static User SPECIAL_CHARS
           
static User SYS_ADMIN
           
static User TEST
          Deprecated. since 5.6. Use a user generated specifically for your test, e.g. from AcceptanceTestHelper.createTestUser()
static User TEST2
          Deprecated. since 5.6. Use a user generated specifically for your test, e.g. from AcceptanceTestHelper.createTestUser()
static User UNICODE
           
 
Constructor Summary
User(String username, String password, String fullName, String email)
          Constructs a fully formed User object with all fields set.
 
Method Summary
 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()
           
 UrlBuilder getUrlBuilder()
           
 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

PROPERTY_USER_SITE_HOMEPAGE

public static final String PROPERTY_USER_SITE_HOMEPAGE
See Also:
Constant Field Values

PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS

public static final String PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS
See Also:
Constant Field Values

PROPERTY_USER_EMAIL_MIMETYPE

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

@Deprecated
public static final User TEST
Deprecated. since 5.6. Use a user generated specifically for your test, e.g. from AcceptanceTestHelper.createTestUser()
A sample test user. May or may not have permissions, depending on your test. Details are retrieved from the PropertiesManager.


TEST2

@Deprecated
public static final User TEST2
Deprecated. since 5.6. Use a user generated specifically for your test, e.g. from AcceptanceTestHelper.createTestUser()
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(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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

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

getUrlBuilder

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


Copyright © 2003–2015 Atlassian. All rights reserved.