Class User
java.lang.Object
org.springframework.extensions.webscripts.connector.User
- All Implemented Interfaces:
Serializable,Principal
Default user profile object.
- Author:
- muzquiano, kevinr
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected final Map<String,Serializable> static Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the biographyGets a map of capabilities (boolean assertions) for the user.Gets Company Address1Gets Company Address2Gets Company Address3Gets Company EmailGets Company FaxGets Company PostcodeGets Company TelephonegetEmail()Gets the email.Gets the first name.Provides the full name for the user.Gets the google user name.getId()Gets the id - this is usually the username.Gets the instant msg id.Gets the job title.Gets the last name.Get the locationGets the middle name.Gets the mobile phone.getName()Gets the organization.Gets the properties.getProperty(String key) Gets the property.getSkype()Gets the skype id.getStringProperty(String key) Gets the string property.Gets the home phone.booleanisAdmin()Checks if is admin.booleanisGuest()Returnstrueif this user is a guest uservoidsave()Persist this uservoidsetBiography(String value) Set the biographyvoidsetCompanyAddress1(String value) Sets the Company Address1voidsetCompanyAddress2(String value) Sets the Company Address2voidsetCompanyAddress3(String value) Sets the Company Address3voidsetCompanyEmail(String value) Sets the Company EmailvoidsetCompanyFax(String value) Sets the Company FaxvoidsetCompanyPostcode(String value) Sets the Company PostcodevoidsetCompanyTelephone(String value) Sets the Company TelephonevoidSets the email.voidsetFirstName(String value) Sets the first name.voidsetGoogleUsername(String value) Sets the google user namevoidsetInstantMsg(String value) Sets the instant msg idvoidsetJobTitle(String value) Sets the job title.voidsetLastName(String value) Sets the last name.voidsetLocation(String value) Set the locationvoidsetMiddleName(String value) Sets the middle name.voidsetMobilePhone(String value) Sets the mobile phone.voidsetOrganization(String value) Sets the organization.voidsetProperty(String key, Serializable value) Sets the property.voidSets the skype idvoidsetTelephone(String value) Sets the home phone.toString()
-
Field Details
-
PROP_ID
-
PROP_FIRST_NAME
-
PROP_MIDDLE_NAME
-
PROP_LAST_NAME
-
PROP_EMAIL
-
PROP_ORGANIZATION
-
PROP_JOB_TITLE
-
PROP_LOCATION
-
PROP_BIOGRAPHY
-
PROP_TELEPHONE
-
PROP_MOBILE_PHONE
-
PROP_SKYPE
-
PROP_INSTANTMSG
-
PROP_GOOGLEUSERNAME
-
PROP_COMPANY_ADDRESS1
-
PROP_COMPANY_ADDRESS2
-
PROP_COMPANY_ADDRESS3
-
PROP_COMPANY_POSTCODE
-
PROP_COMPANY_TELEPHONE
-
PROP_COMPANY_FAX
-
PROP_COMPANY_EMAIL
-
CAPABILITY_ADMIN
- See Also:
-
CAPABILITY_GUEST
- See Also:
-
CAPABILITY_MUTABLE
- See Also:
-
fullName
-
capabilities
-
map
-
-
Constructor Details
-
User
Instantiates a new user.- Parameters:
id- the user idcapabilities- map of string keyed boolean capabilities given to the user
-
-
Method Details
-
getName
-
getId
Gets the id - this is usually the username.- Returns:
- the id
-
getFirstName
Gets the first name.- Returns:
- the first name
-
setFirstName
Sets the first name.- Parameters:
value- the new first name
-
getLastName
Gets the last name.- Returns:
- the last name
-
setLastName
Sets the last name.- Parameters:
value- the new last name
-
getMiddleName
Gets the middle name.- Returns:
- the middle name
-
setMiddleName
Sets the middle name.- Parameters:
value- the new middle name
-
getEmail
Gets the email.- Returns:
- the email
-
setEmail
Sets the email.- Parameters:
value- the new email
-
getOrganization
Gets the organization.- Returns:
- the organization
-
setOrganization
Sets the organization.- Parameters:
value- the new organization
-
getJobTitle
Gets the job title.- Returns:
- the job title
-
setJobTitle
Sets the job title.- Parameters:
value- the new job title
-
getLocation
Get the location- Returns:
- the location
-
setLocation
Set the location- Parameters:
value- the new location
-
getBiography
Get the biography- Returns:
- the biography
-
setBiography
Set the biography- Parameters:
value- the new biography
-
getTelephone
Gets the home phone.- Returns:
- the home phone
-
setTelephone
Sets the home phone.- Parameters:
value- the new home phone
-
getMobilePhone
Gets the mobile phone.- Returns:
- the mobile phone
-
setMobilePhone
Sets the mobile phone.- Parameters:
value- the new mobile phone
-
getSkype
Gets the skype id.- Returns:
- the skype id
-
setSkype
Sets the skype id- Parameters:
value- the new skype id
-
getInstantMsg
Gets the instant msg id.- Returns:
- the instant msg id
-
setInstantMsg
Sets the instant msg id- Parameters:
value- the new instant msg id
-
getGoogleUsername
Gets the google user name.- Returns:
- the google user name
-
setGoogleUsername
Sets the google user name- Parameters:
value- the new google user name
-
getCompanyAddress1
Gets Company Address1- Returns:
- the Company Address1
-
setCompanyAddress1
Sets the Company Address1- Parameters:
value- the new Company Address1
-
getCompanyAddress2
Gets Company Address2- Returns:
- the Company Address2
-
setCompanyAddress2
Sets the Company Address2- Parameters:
value- the new Company Address2
-
getCompanyAddress3
Gets Company Address3- Returns:
- the Company Address3
-
setCompanyAddress3
Sets the Company Address3- Parameters:
value- the new Company Address3
-
getCompanyPostcode
Gets Company Postcode- Returns:
- the Company Postcode
-
setCompanyPostcode
Sets the Company Postcode- Parameters:
value- the new Company Postcode
-
getCompanyTelephone
Gets Company Telephone- Returns:
- the Company Telephone
-
setCompanyTelephone
Sets the Company Telephone- Parameters:
value- the new Company Telephone
-
getCompanyFax
Gets Company Fax- Returns:
- the Company Fax
-
setCompanyFax
Sets the Company Fax- Parameters:
value- the new Company Fax
-
getCompanyEmail
Gets Company Email- Returns:
- the Company Email
-
setCompanyEmail
Sets the Company Email- Parameters:
value- the new Company Email
-
getProperty
Gets the property.- Parameters:
key- the key- Returns:
- the property
-
getStringProperty
Gets the string property.- Parameters:
key- the key- Returns:
- the string property
-
setProperty
Sets the property.- Parameters:
key- the keyvalue- the value
-
getProperties
Gets the properties.- Returns:
- the properties
-
isAdmin
public boolean isAdmin()Checks if is admin.- Returns:
- the isAdmin
-
isGuest
public boolean isGuest()Returnstrueif this user is a guest user- Returns:
trueif this user is a guest user
-
getCapabilities
Gets a map of capabilities (boolean assertions) for the user.- Returns:
- the capability map
-
toString
-
getFullName
Provides the full name for the user. This makes a best attempt at building the full name based on what it knows about the user. If a first name is not known, the returned name will be the user id of the user. If a first name is known, then the first name will be returned. If a first and middle name are known, then the first and middle name will be returned. Valid full names are therefore: jsmith Joe Joe D Joe Smith Joe D Smith- Returns:
- A valid full name
-
save
public void save()Persist this user
-