java.lang.Object
org.springframework.extensions.webscripts.connector.User
All Implemented Interfaces:
Serializable, Principal

public class User extends Object implements Principal, Serializable
Default user profile object.
Author:
muzquiano, kevinr
See Also:
  • Field Details

    • PROP_ID

      public static String PROP_ID
    • PROP_FIRST_NAME

      public static String PROP_FIRST_NAME
    • PROP_MIDDLE_NAME

      public static String PROP_MIDDLE_NAME
    • PROP_LAST_NAME

      public static String PROP_LAST_NAME
    • PROP_EMAIL

      public static String PROP_EMAIL
    • PROP_ORGANIZATION

      public static String PROP_ORGANIZATION
    • PROP_JOB_TITLE

      public static String PROP_JOB_TITLE
    • PROP_LOCATION

      public static String PROP_LOCATION
    • PROP_BIOGRAPHY

      public static String PROP_BIOGRAPHY
    • PROP_TELEPHONE

      public static String PROP_TELEPHONE
    • PROP_MOBILE_PHONE

      public static String PROP_MOBILE_PHONE
    • PROP_SKYPE

      public static String PROP_SKYPE
    • PROP_INSTANTMSG

      public static String PROP_INSTANTMSG
    • PROP_GOOGLEUSERNAME

      public static String PROP_GOOGLEUSERNAME
    • PROP_COMPANY_ADDRESS1

      public static String PROP_COMPANY_ADDRESS1
    • PROP_COMPANY_ADDRESS2

      public static String PROP_COMPANY_ADDRESS2
    • PROP_COMPANY_ADDRESS3

      public static String PROP_COMPANY_ADDRESS3
    • PROP_COMPANY_POSTCODE

      public static String PROP_COMPANY_POSTCODE
    • PROP_COMPANY_TELEPHONE

      public static String PROP_COMPANY_TELEPHONE
    • PROP_COMPANY_FAX

      public static String PROP_COMPANY_FAX
    • PROP_COMPANY_EMAIL

      public static String PROP_COMPANY_EMAIL
    • CAPABILITY_ADMIN

      public static final String CAPABILITY_ADMIN
      See Also:
    • CAPABILITY_GUEST

      public static final String CAPABILITY_GUEST
      See Also:
    • CAPABILITY_MUTABLE

      public static final String CAPABILITY_MUTABLE
      See Also:
    • fullName

      protected String fullName
    • capabilities

      protected final Map<String,Boolean> capabilities
    • map

      protected final Map<String,Serializable> map
  • Constructor Details

    • User

      public User(String id, Map<String,Boolean> capabilities)
      Instantiates a new user.
      Parameters:
      id - the user id
      capabilities - map of string keyed boolean capabilities given to the user
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Principal
    • getId

      public String getId()
      Gets the id - this is usually the username.
      Returns:
      the id
    • getFirstName

      public String getFirstName()
      Gets the first name.
      Returns:
      the first name
    • setFirstName

      public void setFirstName(String value)
      Sets the first name.
      Parameters:
      value - the new first name
    • getLastName

      public String getLastName()
      Gets the last name.
      Returns:
      the last name
    • setLastName

      public void setLastName(String value)
      Sets the last name.
      Parameters:
      value - the new last name
    • getMiddleName

      public String getMiddleName()
      Gets the middle name.
      Returns:
      the middle name
    • setMiddleName

      public void setMiddleName(String value)
      Sets the middle name.
      Parameters:
      value - the new middle name
    • getEmail

      public String getEmail()
      Gets the email.
      Returns:
      the email
    • setEmail

      public void setEmail(String value)
      Sets the email.
      Parameters:
      value - the new email
    • getOrganization

      public String getOrganization()
      Gets the organization.
      Returns:
      the organization
    • setOrganization

      public void setOrganization(String value)
      Sets the organization.
      Parameters:
      value - the new organization
    • getJobTitle

      public String getJobTitle()
      Gets the job title.
      Returns:
      the job title
    • setJobTitle

      public void setJobTitle(String value)
      Sets the job title.
      Parameters:
      value - the new job title
    • getLocation

      public String getLocation()
      Get the location
      Returns:
      the location
    • setLocation

      public void setLocation(String value)
      Set the location
      Parameters:
      value - the new location
    • getBiography

      public String getBiography()
      Get the biography
      Returns:
      the biography
    • setBiography

      public void setBiography(String value)
      Set the biography
      Parameters:
      value - the new biography
    • getTelephone

      public String getTelephone()
      Gets the home phone.
      Returns:
      the home phone
    • setTelephone

      public void setTelephone(String value)
      Sets the home phone.
      Parameters:
      value - the new home phone
    • getMobilePhone

      public String getMobilePhone()
      Gets the mobile phone.
      Returns:
      the mobile phone
    • setMobilePhone

      public void setMobilePhone(String value)
      Sets the mobile phone.
      Parameters:
      value - the new mobile phone
    • getSkype

      public String getSkype()
      Gets the skype id.
      Returns:
      the skype id
    • setSkype

      public void setSkype(String value)
      Sets the skype id
      Parameters:
      value - the new skype id
    • getInstantMsg

      public String getInstantMsg()
      Gets the instant msg id.
      Returns:
      the instant msg id
    • setInstantMsg

      public void setInstantMsg(String value)
      Sets the instant msg id
      Parameters:
      value - the new instant msg id
    • getGoogleUsername

      public String getGoogleUsername()
      Gets the google user name.
      Returns:
      the google user name
    • setGoogleUsername

      public void setGoogleUsername(String value)
      Sets the google user name
      Parameters:
      value - the new google user name
    • getCompanyAddress1

      public String getCompanyAddress1()
      Gets Company Address1
      Returns:
      the Company Address1
    • setCompanyAddress1

      public void setCompanyAddress1(String value)
      Sets the Company Address1
      Parameters:
      value - the new Company Address1
    • getCompanyAddress2

      public String getCompanyAddress2()
      Gets Company Address2
      Returns:
      the Company Address2
    • setCompanyAddress2

      public void setCompanyAddress2(String value)
      Sets the Company Address2
      Parameters:
      value - the new Company Address2
    • getCompanyAddress3

      public String getCompanyAddress3()
      Gets Company Address3
      Returns:
      the Company Address3
    • setCompanyAddress3

      public void setCompanyAddress3(String value)
      Sets the Company Address3
      Parameters:
      value - the new Company Address3
    • getCompanyPostcode

      public String getCompanyPostcode()
      Gets Company Postcode
      Returns:
      the Company Postcode
    • setCompanyPostcode

      public void setCompanyPostcode(String value)
      Sets the Company Postcode
      Parameters:
      value - the new Company Postcode
    • getCompanyTelephone

      public String getCompanyTelephone()
      Gets Company Telephone
      Returns:
      the Company Telephone
    • setCompanyTelephone

      public void setCompanyTelephone(String value)
      Sets the Company Telephone
      Parameters:
      value - the new Company Telephone
    • getCompanyFax

      public String getCompanyFax()
      Gets Company Fax
      Returns:
      the Company Fax
    • setCompanyFax

      public void setCompanyFax(String value)
      Sets the Company Fax
      Parameters:
      value - the new Company Fax
    • getCompanyEmail

      public String getCompanyEmail()
      Gets Company Email
      Returns:
      the Company Email
    • setCompanyEmail

      public void setCompanyEmail(String value)
      Sets the Company Email
      Parameters:
      value - the new Company Email
    • getProperty

      public Object getProperty(String key)
      Gets the property.
      Parameters:
      key - the key
      Returns:
      the property
    • getStringProperty

      public String getStringProperty(String key)
      Gets the string property.
      Parameters:
      key - the key
      Returns:
      the string property
    • setProperty

      public void setProperty(String key, Serializable value)
      Sets the property.
      Parameters:
      key - the key
      value - the value
    • getProperties

      public Map<String,Serializable> getProperties()
      Gets the properties.
      Returns:
      the properties
    • isAdmin

      public boolean isAdmin()
      Checks if is admin.
      Returns:
      the isAdmin
    • isGuest

      public boolean isGuest()
      Returns true if this user is a guest user
      Returns:
      true if this user is a guest user
    • getCapabilities

      public Map<String,Boolean> getCapabilities()
      Gets a map of capabilities (boolean assertions) for the user.
      Returns:
      the capability map
    • toString

      public String toString()
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object
    • getFullName

      public String 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