|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sas.drugdev.remote.admin.UserBean
public class UserBean
Simple bean to represent a user. This can be constructed various ways. This class allows the user
to construct a User
without requiring a server call.
It is the only way to create a User on the server. Construct a UserBean, then pass it into
UserService.create(UserBean)
. If creating a user to authenticate via an external authentication
provider, when setting the authentication provider, the name should be the name as it
appears in the configuration file on the server.
In order to successfully create a user in SDD, you must set values for the following properties.
Note that PROPERTY_PASSWORD is required even if using an external authentication provider as the provider
can be changed to SDD.
It is also the only means for performing write operations on the User, such as updating policies
and personal information. Construct a UserBean object then call addPolicy(Policy)
,
removePolicy(Policy)
or setLastName(String)
method. Then pass
that bean into UserService.update(UserBean)
to perform those operations
on the server side.
Field Summary | |
---|---|
static java.util.Set |
EDITABLE_PROPERTIES
|
static java.lang.String |
PROPERTY_AUTHENTICATION_PROVIDER
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_AUTHENTICATION_PROVIDER_USERID
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_CERTIFICATE
|
static java.lang.String |
PROPERTY_CERTIFICATEDATE
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_CITY
|
static java.lang.String |
PROPERTY_COMPANY
|
static java.lang.String |
PROPERTY_CONSENT
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_COUNTRY
|
static java.lang.String |
PROPERTY_CREATEDATE
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_CREATEDBY
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_DEPARTMENT
|
static java.lang.String |
PROPERTY_EMAILADDRESS
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_EMPLOYEEID
|
static java.lang.String |
PROPERTY_FAX
|
static java.lang.String |
PROPERTY_FIRSTNAME
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_IMAGEURL
|
static java.lang.String |
PROPERTY_LASTLOGIN
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_LASTMODIFIED
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_LASTNAME
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_LOGIN_ATTEMPTS
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_LOGINS
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_MIDDLENAME
|
static java.lang.String |
PROPERTY_MOBILE
|
static java.lang.String |
PROPERTY_MODIFIEDBY
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_OFFICE
|
static java.lang.String |
PROPERTY_PAGER
|
static java.lang.String |
PROPERTY_PASSWORDDATE
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_PASSWORDRESET
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_PHONE
|
static java.lang.String |
PROPERTY_POSTALCODE
|
static java.lang.String |
PROPERTY_SALUTATION
|
static java.lang.String |
PROPERTY_STATE
|
static java.lang.String |
PROPERTY_STATUS
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_STATUSDATE
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_STATUSREASON
Should not pass to UserService.update(UserBean) |
static java.lang.String |
PROPERTY_STREET
|
static java.lang.String |
PROPERTY_TITLE
|
static java.lang.String |
PROPERTY_USERID
Should not pass to UserService.update(UserBean) |
static java.util.Set |
SYSTEM_PROPERTIES
|
Constructor Summary | |
---|---|
UserBean(RemoteUser remoteUser)
Constructor that takes a RemoteUser. |
|
UserBean(java.lang.String userId)
Constructor that takes only a userId |
Method Summary | |
---|---|
void |
addPolicies(java.util.List policies)
Adds the SDD policies to this user. |
void |
addPolicy(Policy policy)
Adds the SDD policy to this user. |
java.lang.String |
getAuthenticationProvider()
Gets the name of the authentication provider for this user. |
java.lang.String |
getAuthenticationProviderUserId()
Gets the userId associated with this user that is defined in the external authentication provider. |
java.lang.String |
getEmailAddress()
Get the email address of this user in SDD |
java.lang.String |
getFirstName()
Get the first name of this user in SDD |
java.lang.String |
getLastName()
Get the last name of this user in SDD |
boolean |
getPasswordReset()
Sets whether the password should be reset. |
java.util.List |
getPolicies()
Get the policies assigned to this user in SDD. |
java.util.Map |
getProperties()
Get all properties of this user in SDD except policies |
java.lang.String |
getReason()
|
java.lang.String |
getUserId()
Get the userId of this user as defined within SDD |
boolean |
isActive()
returns the active status of the user |
boolean |
isRetired()
returns whether the user is retired or not |
void |
removePolicies(java.util.List policies)
Removes the list of SDD policies from this user. |
void |
removePolicy(Policy policy)
Removes the SDD policy from this user. |
void |
retire(java.lang.String reason)
Retires the user. |
void |
setActive(boolean active,
java.lang.String reason)
Sets the active status of the user |
void |
setAuthenticationProvider(java.lang.String authenticationprovider)
Sets the default authentication provider for this user. |
void |
setAuthenticationProviderUserId(java.lang.String providerUserId)
Sets the providerUserId associated with this user as it is defined in the external authentication provider. |
void |
setEmailAddress(java.lang.String email)
Sets the email address of this user. |
void |
setFirstName(java.lang.String firstName)
Sets the first name of this user. |
void |
setLastName(java.lang.String lastName)
Sets the last name of this user. |
void |
setPassword(char[] password)
Sets the SDD password for this user. |
void |
setPasswordReset(boolean passwordReset)
Set whether the user will be required to reset their password. |
void |
setPolicies(java.util.List policies)
Sets the SDD policies for this user. |
void |
setProperties(java.util.Map properties)
Set all the properties contained in the map. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set the property with the given name to the given value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_MIDDLENAME
public static final java.lang.String PROPERTY_SALUTATION
public static final java.lang.String PROPERTY_IMAGEURL
public static final java.lang.String PROPERTY_EMPLOYEEID
public static final java.lang.String PROPERTY_COMPANY
public static final java.lang.String PROPERTY_TITLE
public static final java.lang.String PROPERTY_DEPARTMENT
public static final java.lang.String PROPERTY_OFFICE
public static final java.lang.String PROPERTY_STREET
public static final java.lang.String PROPERTY_CITY
public static final java.lang.String PROPERTY_STATE
public static final java.lang.String PROPERTY_POSTALCODE
public static final java.lang.String PROPERTY_COUNTRY
public static final java.lang.String PROPERTY_PHONE
public static final java.lang.String PROPERTY_FAX
public static final java.lang.String PROPERTY_PAGER
public static final java.lang.String PROPERTY_MOBILE
public static final java.lang.String PROPERTY_CERTIFICATE
public static final java.lang.String PROPERTY_EMAILADDRESS
UserService.update(UserBean)
public static final java.lang.String PROPERTY_FIRSTNAME
UserService.update(UserBean)
public static final java.lang.String PROPERTY_LASTNAME
UserService.update(UserBean)
public static final java.lang.String PROPERTY_AUTHENTICATION_PROVIDER
UserService.update(UserBean)
public static final java.lang.String PROPERTY_AUTHENTICATION_PROVIDER_USERID
UserService.update(UserBean)
public static final java.lang.String PROPERTY_USERID
UserService.update(UserBean)
public static final java.lang.String PROPERTY_PASSWORDRESET
UserService.update(UserBean)
public static final java.lang.String PROPERTY_CREATEDATE
UserService.update(UserBean)
public static final java.lang.String PROPERTY_CREATEDBY
UserService.update(UserBean)
public static final java.lang.String PROPERTY_LASTMODIFIED
UserService.update(UserBean)
public static final java.lang.String PROPERTY_MODIFIEDBY
UserService.update(UserBean)
public static final java.lang.String PROPERTY_PASSWORDDATE
UserService.update(UserBean)
public static final java.lang.String PROPERTY_CERTIFICATEDATE
UserService.update(UserBean)
public static final java.lang.String PROPERTY_STATUSDATE
UserService.update(UserBean)
public static final java.lang.String PROPERTY_CONSENT
UserService.update(UserBean)
public static final java.lang.String PROPERTY_LOGIN_ATTEMPTS
UserService.update(UserBean)
public static final java.lang.String PROPERTY_LOGINS
UserService.update(UserBean)
public static final java.lang.String PROPERTY_LASTLOGIN
UserService.update(UserBean)
public static final java.lang.String PROPERTY_STATUS
UserService.update(UserBean)
public static final java.lang.String PROPERTY_STATUSREASON
UserService.update(UserBean)
public static final java.util.Set SYSTEM_PROPERTIES
public static final java.util.Set EDITABLE_PROPERTIES
Constructor Detail |
---|
public UserBean(java.lang.String userId)
userId
- userId with which to populate the UserBeanpublic UserBean(RemoteUser remoteUser)
remoteUser
- remoteUser with which to populate the UserBeanMethod Detail |
---|
public java.lang.String getEmailAddress()
User
getEmailAddress
in interface User
public void setEmailAddress(java.lang.String email) throws InvalidEmailException
UserService.update(UserBean)
or UserService.create(UserBean)
.
email
- email address of this user
InvalidEmailException
- if email address is not validpublic java.lang.String getFirstName()
User
getFirstName
in interface User
public void setFirstName(java.lang.String firstName)
UserService.update(UserBean)
or UserService.create(UserBean)
.
firstName
- First name of this userpublic java.lang.String getLastName()
User
getLastName
in interface User
public void setLastName(java.lang.String lastName)
UserService.update(UserBean)
or UserService.create(UserBean)
.
lastName
- Last name of this userpublic java.lang.String getUserId()
User
getUserId
in interface User
public java.lang.String getReason()
public java.util.List getPolicies()
User
getPolicies
in interface User
public void setPassword(char[] password)
UserService.update(UserBean)
or UserService.create(UserBean)
.
password
- char[] of this user's passwordpublic void setPolicies(java.util.List policies)
UserService.update(UserBean)
or UserService.create(UserBean)
.
policies
- List of SDD Policy
s to set on the userpublic void addPolicy(Policy policy)
UserService.update(UserBean)
or UserService.create(UserBean)
.
policy
- SDD Policy
to add to the userpublic void addPolicies(java.util.List policies)
UserService.update(UserBean)
or UserService.create(UserBean)
.
policies
- List of SDD Policy
s to add to the userpublic void removePolicy(Policy policy)
UserService.update(UserBean)
.
policy
- SDD Policy
to remove from the userpublic void removePolicies(java.util.List policies)
UserService.update(UserBean)
.
policies
- List of SDD Policy
s to remove from the userpublic void setAuthenticationProvider(java.lang.String authenticationprovider)
UserService.update(UserBean)
or UserService.create(UserBean)
.
authenticationprovider
- public java.lang.String getAuthenticationProvider()
User
getAuthenticationProvider
in interface User
public java.lang.String getAuthenticationProviderUserId()
User
getAuthenticationProviderUserId
in interface User
public void setAuthenticationProviderUserId(java.lang.String providerUserId)
UserService.update(UserBean)
or UserService.create(UserBean)
.
providerUserId
- userId as defined in external authentication providerpublic void setProperties(java.util.Map properties)
UserService.update(UserBean)
or UserService.create(UserBean)
.
properties
- map of properties with a String key and a String valuepublic void setProperty(java.lang.String name, java.lang.Object value)
UserService.update(UserBean)
or UserService.create(UserBean)
.
name
- name of the property to setvalue
- value of the property to setpublic java.util.Map getProperties()
User
getProperties
in interface User
public boolean getPasswordReset()
User
getPasswordReset
in interface User
public void setPasswordReset(boolean passwordReset)
passwordReset
- true to require the user to reset their password, otherwise falsepublic void retire(java.lang.String reason)
reason
- reason for updating user statuspublic void setActive(boolean active, java.lang.String reason)
active
- true for active, false for inactivereason
- reason for updating user statuspublic boolean isActive()
isActive
in interface User
public boolean isRetired()
isRetired
in interface User
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |