com.ibm.team.fvt.tests.clm.config
Class ClmUser

java.lang.Object
  extended by com.ibm.team.fvt.tests.config.User
      extended by com.ibm.team.fvt.tests.clm.config.ClmUser
All Implemented Interfaces:
ClmLicensingConstants, com.ibm.team.fvt.tests.config.UserConstants
Direct Known Subclasses:
ClmAdminUser

public class ClmUser
extends com.ibm.team.fvt.tests.config.User
implements ClmLicensingConstants

Manages a CLM user.

The typical specialization for a CLM user is to tell whether it's a default user or not (see isDefaultUser()).

Note that, by default, a user is not a Jazz Admin.


Field Summary
 
Fields inherited from interface com.ibm.team.fvt.tests.clm.pages.jts.admin.ClmLicensingConstants
ALL_LICENSES, CCM_COLLECTOR, CCM_DATA_COLLECTOR, CLM_CONTRIBUTOR, CLM_PRACTITIONER, CLM_STAKEHOLDER, DEFAULT_LICENSES, LPA_APPLICATION_INTERNAL, QM_DATA_COLLECTOR, RM_ANALYST, RM_APPLICATION_INTERNAL, RM_CONTRIBUTOR, RM_DATA_COLLECTOR, RQM_CONNECTOR, RQM_CONTRIBUTOR, RQM_QUALITY_PROFESSIONAL, RTC_BUILD_SYSTEM, RTC_CLEARCASE_SYNCHRONIZER, RTC_CLEARQUEST_SYNCHRONIZER, RTC_CONTRIBUTOR, RTC_DEVELOPER, RTC_DEVELOPER_PLATFORMS, RTC_STAKEHOLDER, TRS_CONSUMER_INTERNAL
 
Fields inherited from interface com.ibm.team.fvt.tests.config.UserConstants
EMAIL_ID, MAIL_DOMAIN_ID, PASSWORD_ID, USERID_ID, USERNAME_ID
 
Constructor Summary
ClmUser(ClmClientAccessLicense license)
          Create a user instance with the given license.
ClmUser(java.lang.String userId)
          Create a user instance with a default user ID.
ClmUser(java.lang.String userId, ClmClientAccessLicense... userLicenses)
          Create a user instance with a default user ID.
ClmUser(java.lang.String prefix, java.lang.String userId)
          Create a user instance using a property prefix and a default user ID.
ClmUser(java.lang.String prefix, java.lang.String userId, boolean defaultUser)
          Create a user instance using a property prefix and a default user ID.
ClmUser(java.lang.String prefix, java.lang.String userId, boolean defaultUser, boolean adminUser)
          Create a user instance using a property prefix and a default user ID.
ClmUser(java.lang.String prefix, java.lang.String userId, boolean defaultUser, boolean adminUser, ClmClientAccessLicense... userLicenses)
          Create a user instance using a property prefix and a default user ID.
ClmUser(java.lang.String prefix, java.lang.String userId, boolean defaultUser, ClmClientAccessLicense... licenses)
          Create a user instance using a property prefix and a default user ID.
ClmUser(java.lang.String prefix, java.lang.String userId, ClmClientAccessLicense... licenses)
          Create a user instance using a property prefix and a default user ID.
ClmUser(java.lang.String userId, java.lang.String userName, java.lang.String password, java.lang.String email)
          Create a user instance with given information.
ClmUser(java.lang.String userId, java.lang.String userName, java.lang.String password, java.lang.String email, boolean adminUser)
          Create a user instance with given information.
ClmUser(java.lang.String userId, java.lang.String userName, java.lang.String password, java.lang.String email, boolean adminUser, ClmClientAccessLicense... userLicenses)
          Create a user instance with given information.
ClmUser(java.lang.String userId, java.lang.String userName, java.lang.String password, java.lang.String email, ClmClientAccessLicense... userLicenses)
          Create a user instance with given information.
 
Method Summary
 java.util.List<ClmClientAccessLicense> getLicenses()
          Return the user licenses.
 boolean hasLicense(ClmClientAccessLicense license)
          Returns whether current user has the given license or not.
 boolean hasReadAccess()
          Returns whether current user has read access or not.
 boolean hasRtcWriteAccess()
          Returns whether current user has write access for CCM application.
 boolean isDefaultUser()
          Return whether the current user is the default user.
 boolean isJazzAdmin()
          Return whether the current user has Jazz Admin CAL or not.
 void setAdmin(boolean adminUser)
          Set whether the current user has Jazz Admin CAL or not.
 
Methods inherited from class com.ibm.team.fvt.tests.config.User
equals, getEmail, getId, getName, getPassword, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClmUser

public ClmUser(ClmClientAccessLicense license)
Create a user instance with the given license.

The user will have its ID, name and password be set with the license key. Its e-mail value will be set to userId+"@example.com"

Note that the created user will not be considered as a default user.

Parameters:
license - The license set to the user.
See Also:
ClmClientAccessLicense.key()

ClmUser

public ClmUser(java.lang.String userId)
Create a user instance with a default user ID.

The user will have its ID, name and password be set with the given ID value. Its e-mail value will be set to userId+"@example.com"

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
userId - The default user ID used if no property matching the prefix is found.

ClmUser

public ClmUser(java.lang.String userId,
               ClmClientAccessLicense... userLicenses)
Create a user instance with a default user ID.

The user will have its ID, name and password be set with the given ID value. Its e-mail value will be set to userId+"@example.com"

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
userId - The default user ID used if no property matching the prefix is found.
userLicenses - The licenses assigned to the current user. If null then all licenses are available.

ClmUser

public ClmUser(java.lang.String prefix,
               java.lang.String userId)
Create a user instance using a property prefix and a default user ID.

When prefix is not null, then information for user are got from following system properties:

Warning: the properties names are case sensitive.

If prefix is null or if no crresponding system properties are defined, then the user ID, the user name and user password will be set with the default user ID value. The e-mail value will be set to userId+"@example.com"

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
prefix - The user properties prefix to look at to initialize the user information.
userId - The default user ID used if no property matching the prefix is found.

ClmUser

public ClmUser(java.lang.String prefix,
               java.lang.String userId,
               boolean defaultUser)
Create a user instance using a property prefix and a default user ID. Specify whether the created will be a default user or not.

When prefix is not null, then information for user are got from following system properties:

Warning: the properties names are case sensitive.

If prefix is null or if no corresponding system properties are defined, then the user ID, the user name and user password will be set with the default user ID value. The e-mail value will be set to userId+"@example.com"

Note that the created user have all licenses activated by default.

Parameters:
prefix - The user properties prefix to look at to initialize the user information.
userId - The default user ID used if no property matching the prefix is found.
defaultUser - Tells whether the created user is a default user (e.g. etl_user) or not.

ClmUser

public ClmUser(java.lang.String prefix,
               java.lang.String userId,
               boolean defaultUser,
               boolean adminUser)
Create a user instance using a property prefix and a default user ID. Specify whether the created will be a default user or not.

When prefix is not null, then information for user are got from following system properties:

Warning: the properties names are case sensitive.

If prefix is null or if no corresponding system properties are defined, then the user ID, the user name and user password will be set with the default user ID value. The e-mail value will be set to userId+"@example.com"

Note that the created user have all licenses activated by default.

Parameters:
prefix - The user properties prefix to look at to initialize the user information.
userId - The default user ID used if no property matching the prefix is found.
defaultUser - Tells whether the created user is a default user (e.g. etl_user) or not.
adminUser - Tells whether the created user is an admin user or not.

ClmUser

public ClmUser(java.lang.String prefix,
               java.lang.String userId,
               boolean defaultUser,
               boolean adminUser,
               ClmClientAccessLicense... userLicenses)
Create a user instance using a property prefix and a default user ID. Specify whether the created will be a default user or not.

When prefix is not null, then information for user are got from following system properties:

Warning: the properties names are case sensitive.

If prefix is null or if no corresponding system properties are defined, then the user ID, the user name and user password will be set with the default user ID value. The e-mail value will be set to userId+"@example.com"

Note that the created user have all licenses activated by default.

Parameters:
prefix - The user properties prefix to look at to initialize the user information.
userId - The default user ID used if no property matching the prefix is found.
defaultUser - Tells whether the created user is a default user (e.g. etl_user) or not.
adminUser - Tells whether the created user is an admin user or not.
userLicenses - The licenses assigned to the current user. If null then all licenses are available.

ClmUser

public ClmUser(java.lang.String prefix,
               java.lang.String userId,
               boolean defaultUser,
               ClmClientAccessLicense... licenses)
Create a user instance using a property prefix and a default user ID. Specify whether the created will be a default user or not.

When prefix is not null, then information for user are got from following system properties:

Warning: the properties names are case sensitive.

If prefix is null or if no corresponding system properties are defined, then the user ID, the user name and user password will be set with the default user ID value. The e-mail value will be set to userId+"@example.com"

Note that the created user have all licenses activated by default.

Parameters:
prefix - The user properties prefix to look at to initialize the user information.
userId - The default user ID used if no property matching the prefix is found.
defaultUser - Tells whether the created user is a default user (e.g. etl_user) or not.
licenses - The licenses assigned to the current user. If null then all licenses are available.

ClmUser

public ClmUser(java.lang.String prefix,
               java.lang.String userId,
               ClmClientAccessLicense... licenses)
Create a user instance using a property prefix and a default user ID.

When prefix is not null, then information for user are got from following system properties:

Warning: the properties names are case sensitive.

If prefix is null or if no crresponding system properties are defined, then the user ID, the user name and user password will be set with the default user ID value. The e-mail value will be set to userId+"@example.com"

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
prefix - The user properties prefix to look at to initialize the user information.
userId - The default user ID used if no property matching the prefix is found.
licenses - The licenses assigned to the current user. If null then all licenses are available.

ClmUser

public ClmUser(java.lang.String userId,
               java.lang.String userName,
               java.lang.String password,
               java.lang.String email)
Create a user instance with given information.

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
userId - The user ID
userName - The user name
password - The user password
email - The use e-mail

ClmUser

public ClmUser(java.lang.String userId,
               java.lang.String userName,
               java.lang.String password,
               java.lang.String email,
               boolean adminUser)
Create a user instance with given information.

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
userId - The user ID
userName - The user name
password - The user password
email - The use e-mail
adminUser - Tells whether the created user is an admin user or not.

ClmUser

public ClmUser(java.lang.String userId,
               java.lang.String userName,
               java.lang.String password,
               java.lang.String email,
               boolean adminUser,
               ClmClientAccessLicense... userLicenses)
Create a user instance with given information.

Note that the created user will not be considered as a default user.

Parameters:
userId - The user ID
userName - The user name
password - The user password
email - The use e-mail
adminUser - Tells whether the created user is an admin user or not.
userLicenses - The licenses assigned to the current user. If null then all licenses are available.

ClmUser

public ClmUser(java.lang.String userId,
               java.lang.String userName,
               java.lang.String password,
               java.lang.String email,
               ClmClientAccessLicense... userLicenses)
Create a user instance with given information.

Note that the created user will not be considered as a default user. It will also have all licenses activated by default.

Parameters:
userId - The user ID
userName - The user name
password - The user password
email - The use e-mail
userLicenses - The licenses assigned to the current user. If null then all licenses are available.
Method Detail

getLicenses

public java.util.List<ClmClientAccessLicense> getLicenses()
Return the user licenses.

Returns:
The list of user licenses as a List of ClmClientAccessLicense.

hasLicense

public boolean hasLicense(ClmClientAccessLicense license)
Returns whether current user has the given license or not.

Parameters:
license - The license name
Returns:
true if the current user has the given license, false otherwise.

hasRtcWriteAccess

public boolean hasRtcWriteAccess()
Returns whether current user has write access for CCM application.

Returns:
true or false.

hasReadAccess

public boolean hasReadAccess()
Returns whether current user has read access or not.

Returns:
true if the current user has at least one license set, false otherwise.

isDefaultUser

public boolean isDefaultUser()
Return whether the current user is the default user.

Returns:
false by default.

isJazzAdmin

public boolean isJazzAdmin()
Return whether the current user has Jazz Admin CAL or not.

Returns:
true if the user is a Jazz Admin, false otherwise.

setAdmin

public void setAdmin(boolean adminUser)
Set whether the current user has Jazz Admin CAL or not.

Parameters:
adminUser - Tells whether the user should be admin or not.