macaw.businessLayer
Class User

java.lang.Object
  extended by macaw.businessLayer.User
All Implemented Interfaces:
java.lang.Cloneable, Displayable

public class User
extends java.lang.Object
implements Displayable


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
User()
           
User(java.lang.String userID, java.lang.String password)
           
 
Method Summary
static void checkValidEmail(java.lang.String candidateEmail)
           
static void checkValidUserIDField(java.lang.String candidateUserID)
           
 java.lang.Object clone()
           
static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User admin, User originalUser, User revisedUser)
           
 java.lang.String getAddressLine1()
           
 java.lang.String getAddressLine2()
           
 java.lang.String getAffiliation()
           
 java.lang.String getCity()
           
 java.lang.String getCounty()
           
 java.lang.String getDisplayItemIdentifier()
           
 java.lang.String getDisplayName()
           
 java.lang.String getEmail()
           
 java.lang.String getFirstName()
           
 int getIdentifier()
           
 java.lang.String getLastName()
           
 java.lang.String getPassword()
           
 java.lang.String getPhone()
           
 java.lang.String getPostCode()
           
 java.lang.String getStatus()
           
 java.lang.String getUserID()
           
 boolean hasSameDisplayName(User user)
           
 void setAddressLine1(java.lang.String addressLine1)
           
 void setAddressLine2(java.lang.String addressLine2)
           
 void setAffiliation(java.lang.String affiliation)
           
 void setCity(java.lang.String city)
           
 void setCounty(java.lang.String county)
           
 void setEmail(java.lang.String email)
           
 void setFirstName(java.lang.String firstName)
           
 void setIdentifier(int identifier)
           
 void setLastName(java.lang.String lastName)
           
 void setPassword(java.lang.String password)
           
 void setPhone(java.lang.String phone)
           
 void setPostCode(java.lang.String postCode)
           
 void setStatus(java.lang.String status)
           
 void setUserID(java.lang.String userID)
           
static void validateFields(User user)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User()

User

public User(java.lang.String userID,
            java.lang.String password)
Method Detail

getIdentifier

public int getIdentifier()
Returns:
the identifier

setIdentifier

public void setIdentifier(int identifier)
Parameters:
identifier - the identifier to set

getUserID

public java.lang.String getUserID()
Returns:
the userID

setUserID

public void setUserID(java.lang.String userID)
Parameters:
userID - the userID to set

getFirstName

public java.lang.String getFirstName()
Returns:
the firstName

setFirstName

public void setFirstName(java.lang.String firstName)
Parameters:
firstName - the firstName to set

getLastName

public java.lang.String getLastName()
Returns:
the lastName

setLastName

public void setLastName(java.lang.String lastName)
Parameters:
lastName - the lastName to set

getAffiliation

public java.lang.String getAffiliation()
Returns:
the affiliation

setAffiliation

public void setAffiliation(java.lang.String affiliation)
Parameters:
affiliation - the affiliation to set

getAddressLine1

public java.lang.String getAddressLine1()
Returns:
the addressLine1

setAddressLine1

public void setAddressLine1(java.lang.String addressLine1)
Parameters:
addressLine1 - the addressLine1 to set

getAddressLine2

public java.lang.String getAddressLine2()
Returns:
the addressLine2

setAddressLine2

public void setAddressLine2(java.lang.String addressLine2)
Parameters:
addressLine2 - the addressLine2 to set

getCity

public java.lang.String getCity()
Returns:
the city

setCity

public void setCity(java.lang.String city)
Parameters:
city - the city to set

getPostCode

public java.lang.String getPostCode()
Returns:
the postCode

setPostCode

public void setPostCode(java.lang.String postCode)
Parameters:
postCode - the postCode to set

getCounty

public java.lang.String getCounty()
Returns:
the county

setCounty

public void setCounty(java.lang.String county)
Parameters:
county - the county to set

getPhone

public java.lang.String getPhone()
Returns:
the phone

setPhone

public void setPhone(java.lang.String phone)
Parameters:
phone - the phone to set

getEmail

public java.lang.String getEmail()
Returns:
the email

setEmail

public void setEmail(java.lang.String email)
Parameters:
email - the email to set

getStatus

public java.lang.String getStatus()
Returns:
the status

setStatus

public void setStatus(java.lang.String status)
Parameters:
status - the status to set

getPassword

public java.lang.String getPassword()
Returns:
the password

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - the password to set

detectFieldChanges

public static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User admin,
                                                                       User originalUser,
                                                                       User revisedUser)

hasSameDisplayName

public boolean hasSameDisplayName(User user)

checkValidEmail

public static void checkValidEmail(java.lang.String candidateEmail)
                            throws MacawException
Throws:
MacawException

checkValidUserIDField

public static void checkValidUserIDField(java.lang.String candidateUserID)
                                  throws MacawException
Throws:
MacawException

validateFields

public static void validateFields(User user)
                           throws MacawException
Throws:
MacawException

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface Displayable

getDisplayItemIdentifier

public java.lang.String getDisplayItemIdentifier()
Specified by:
getDisplayItemIdentifier in interface Displayable

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object