net.liftweb.proto

ProtoUser

trait ProtoUser extends AnyRef

A prototypical user class with abstractions to the underlying storage

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ProtoUser
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. trait FieldPointerBridge extends AnyRef

    Attributes
    protected
  2. abstract type FieldPointerType

    A generic representation of a field.

    A generic representation of a field. For example, this represents the abstract "name" field and is used along with an instance of TheCrudType to compute the BaseField that is the "name" field on the specific instance of TheCrudType

  3. case class MenuItem(name: String, path: List[String], loggedIn: Boolean) extends Product with Serializable

    A helper class that holds menu items for the path

  4. abstract type TheUserType

    The underlying record for the User

  5. trait UserBridge extends AnyRef

    Bridges from TheUserType to methods used in this class

Abstract Value Members

  1. implicit abstract def buildFieldBridge(from: FieldPointerType): FieldPointerBridge

    Based on a FieldPointer, build a FieldPointerBridge

    Based on a FieldPointer, build a FieldPointerBridge

    Attributes
    protected
  2. abstract def computeFieldFromPointer(instance: TheUserType, pointer: FieldPointerType): Box[BaseField]

    Given an instance of TheCrudType and FieldPointerType, convert that to an actual instance of a BaseField on the instance of TheCrudType

    Given an instance of TheCrudType and FieldPointerType, convert that to an actual instance of a BaseField on the instance of TheCrudType

    Attributes
    protected
  3. abstract def createNewUserInstance(): TheUserType

    Create a new instance of the User

    Create a new instance of the User

    Attributes
    protected
  4. abstract def editFields: List[FieldPointerType]

    The list of fields presented to the user for editing

  5. abstract def findUserByUniqueId(id: String): Box[TheUserType]

    Given a unique id, find the user

    Given a unique id, find the user

    Attributes
    protected
  6. abstract def findUserByUserName(username: String): Box[TheUserType]

    Given an username (probably email address), find the user

    Given an username (probably email address), find the user

    Attributes
    protected
  7. abstract def signupFields: List[FieldPointerType]

    The list of fields presented to the user at sign-up

  8. implicit abstract def typeToBridge(in: TheUserType): UserBridge

    Convert an instance of TheUserType to the Bridge trait

    Convert an instance of TheUserType to the Bridge trait

    Attributes
    protected
  9. abstract def userFromStringId(id: String): Box[TheUserType]

    Given a String representing the User ID, find the user

    Given a String representing the User ID, find the user

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object AddUserMenusAfter extends LocParam[Any] with Product with Serializable

    Insert this LocParam into your menu if you want the User's menu items to be inserted at the same level and after the item

  7. object AddUserMenusHere extends LocParam[Any] with Product with Serializable

    replace the menu that has this LocParam with the User's menu items

  8. object AddUserMenusUnder extends LocParam[Any] with Product with Serializable

    Insert this LocParam into your menu if you want the User's menu items to be children of that menu

  9. lazy val ItemList: List[MenuItem]

  10. def actionsAfterSignup(theUser: TheUserType, func: () ⇒ Nothing): Nothing

    Override this method to do something else after the user signs up

    Override this method to do something else after the user signs up

    Attributes
    protected
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. var autologinFunc: Box[() ⇒ Unit]

    This function is given a chance to log in a user programmatically when needed

  13. def basePath: List[String]

    The base path for the user related URLs.

    The base path for the user related URLs. Override this method to change the base path

  14. def bccEmail: Box[String]

  15. def capturePreLoginState(): () ⇒ Unit

    If there's any state that you want to capture pre-login to be set post-login (the session is destroyed), then set the state here.

    If there's any state that you want to capture pre-login to be set post-login (the session is destroyed), then set the state here. Just make a function that captures the state... that function will be applied post login.

    Attributes
    protected
  16. def changePassword: NodeSeq

  17. def changePasswordMenuLoc: Box[Menu]

    The menu item for changing password (make this "Empty" to disable)

  18. def changePasswordMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for changing password.

    The LocParams for the menu item for changing password. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  19. lazy val changePasswordPath: List[String]

    The computed path for change password screen

  20. def changePasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

  21. def changePasswordSuffix: String

    The path suffix for the change password screen

  22. def changePasswordXhtml: Elem

  23. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def createUserMenuLoc: Box[Menu]

    The menu item for creating the user/sign up (make this "Empty" to disable)

  25. def createUserMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for creating the user/sign up.

    The LocParams for the menu item for creating the user/sign up. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  26. def currentUser: Box[TheUserType]

  27. def currentUserId: Box[String]

  28. def destroySessionOnLogin: Boolean

    By default, destroy the session on login.

    By default, destroy the session on login. Change this is some of the session information needs to be preserved.

    Attributes
    protected
  29. def doWithUser[T](u: Box[TheUserType])(f: ⇒ T): T

    There may be times when you want to be another user for some stack frames.

    There may be times when you want to be another user for some stack frames. Here's how to do it.

  30. def edit: NodeSeq

  31. object editFunc extends RequestVar[Box[() ⇒ NodeSeq]]

  32. lazy val editPath: List[String]

    The computed path for the edit screen

  33. def editSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

  34. def editSuffix: String

    The path suffix for the edit screen

  35. def editUserMenuLoc: Box[Menu]

    The menu item for editing the user (make this "Empty" to disable)

  36. def editUserMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for editing the user.

    The LocParams for the menu item for editing the user. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  37. def editXhtml(user: TheUserType): Elem

  38. def emailFrom: String

  39. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  40. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  41. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  42. def generateResetEmailBodies(user: TheUserType, resetLink: String): List[MailBodyType]

    Generate the mail bodies to send with the password reset link.

    Generate the mail bodies to send with the password reset link. By default, just an HTML mail body is generated by calling passwordResetMailBody but you can send additional or alternative mail by overriding this method.

    Attributes
    protected
  43. def generateValidationEmailBodies(user: TheUserType, resetLink: String): List[MailBodyType]

    Generate the mail bodies to send with the valdiation link.

    Generate the mail bodies to send with the valdiation link. By default, just an HTML mail body is generated by calling signupMailBody but you can send additional or alternative mail by override this method.

    Attributes
    protected
  44. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  45. def globalUserLocParams: List[LocParam[Unit]]

    If you want to include a LocParam (e.

    If you want to include a LocParam (e.g. LocGroup) on all the User menus, add them here

    Attributes
    protected
  46. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  47. def homePage: String

    The application's home page

  48. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  49. def localForm(user: TheUserType, ignorePassword: Boolean, fields: List[FieldPointerType]): NodeSeq

    Attributes
    protected
  50. def logUserIdIn(id: String): Unit

  51. def logUserIn(who: TheUserType): Unit

  52. def logUserIn(who: TheUserType, postLogin: () ⇒ Nothing): Nothing

  53. def logUserOut(): Unit

  54. def loggedIn_?: Boolean

  55. def login: NodeSeq

  56. def loginFirst: If

    A Menu.

    A Menu.LocParam for testing if the user is logged in and if they're not, redirect them to the login page

  57. def loginMenuLoc: Box[Menu]

    The menu item for login (make this "Empty" to disable)

  58. def loginMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for login.

    The LocParams for the menu item for login. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  59. def loginPageURL: String

    Return the URL of the "login" page

  60. lazy val loginPath: List[String]

    The computed path for the login screen

  61. object loginRedirect extends SessionVar[Box[String]]

    If you want to redirect a user to a different page after login, put the page here

  62. def loginSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

  63. def loginSuffix: String

    The path suffix for the login screen

  64. def loginXhtml: Elem

  65. def logout: Nothing

  66. def logoutCurrentUser: Unit

  67. def logoutMenuLoc: Box[Menu]

    The menu item for logout (make this "Empty" to disable)

  68. def logoutMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for logout.

    The LocParams for the menu item for logout. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  69. lazy val logoutPath: List[String]

    The computed pat for logout

  70. def logoutSuffix: String

    The path suffix for the logout screen

  71. def lostPassword: NodeSeq

  72. def lostPasswordMenuLoc: Box[Menu]

    The menu item for lost password (make this "Empty" to disable)

  73. def lostPasswordMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for lost password.

    The LocParams for the menu item for lost password. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  74. lazy val lostPasswordPath: List[String]

    The computed path for the lost password screen

  75. def lostPasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

  76. def lostPasswordSuffix: String

    The path suffix for the lost password screen

  77. def lostPasswordXhtml: Elem

  78. def menuNameSuffix: String

    If you have more than 1 ProtoUser in your application, you'll need to distinguish the menu names.

    If you have more than 1 ProtoUser in your application, you'll need to distinguish the menu names. Do so by changing the menu name suffix so that there are no name clashes

    Attributes
    protected
  79. def menus: List[Menu]

    An alias for the sitemap property

  80. def mutateUserOnEdit(user: TheUserType): TheUserType

    If there's any mutation to do to the user on retrieval for editing, override this method and mutate the user.

    If there's any mutation to do to the user on retrieval for editing, override this method and mutate the user. This can be used to pull query parameters from the request and assign certain fields. Issue #722

    user

    the user to mutate

    returns

    the mutated user

    Attributes
    protected
  81. def mutateUserOnSignup(user: TheUserType): TheUserType

    If there's any mutation to do to the user on creation for signup, override this method and mutate the user.

    If there's any mutation to do to the user on creation for signup, override this method and mutate the user. This can be used to pull query parameters from the request and assign certain fields. . Issue #722

    user

    the user to mutate

    returns

    the mutated user

    Attributes
    protected
  82. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  83. def niceName(inst: TheUserType): String

    Get a nice name for the user

  84. def niceNameWEmailLink(inst: TheUserType): Elem

    Get an email link for the user

  85. def notLoggedIn_?: Boolean

    Inverted loggedIn_?

  86. final def notify(): Unit

    Definition Classes
    AnyRef
  87. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  88. var onLogIn: List[(TheUserType) ⇒ Unit]

  89. var onLogOut: List[(Box[TheUserType]) ⇒ Unit]

  90. def passwordReset(id: String): NodeSeq

  91. def passwordResetEmailSubject: String

  92. def passwordResetMailBody(user: TheUserType, resetLink: String): Elem

  93. lazy val passwordResetPath: List[String]

    The computed path for the reset password screen

  94. def passwordResetSuffix: String

    The path suffix for the reset password screen

  95. def passwordResetXhtml: Elem

  96. def resetPasswordMenuLoc: Box[Menu]

    The menu item for resetting the password (make this "Empty" to disable)

  97. def resetPasswordMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for resetting the password.

    The LocParams for the menu item for resetting the password. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  98. def resetPasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

  99. def screenWrap: Box[Node]

    What template are you going to wrap the various nodes in

  100. def sendPasswordReset(email: String): Unit

    Send password reset email to the user.

    Send password reset email to the user. The XHTML version of the mail body is generated by calling passwordResetMailBody. You can customize the mail sent to users by overriding generateResetEmailBodies to send non-HTML mail or alternative mail bodies.

  101. def sendValidationEmail(user: TheUserType): Unit

    Send validation email to the user.

    Send validation email to the user. The XHTML version of the mail body is generated by calling signupMailBody. You can customize the mail sent to users by override generateValidationEmailBodies to send non-HTML mail or alternative mail bodies.

  102. def shortName(inst: TheUserType): String

    Get a nice name for the user

  103. lazy val signUpPath: List[String]

    The computed path for the sign up screen

  104. def signUpSuffix: String

    The path suffix for the sign up screen

  105. def signup: NodeSeq

  106. object signupFunc extends RequestVar[Box[() ⇒ NodeSeq]]

    Attributes
    protected
  107. def signupMailBody(user: TheUserType, validationLink: String): Elem

  108. def signupMailSubject: String

  109. def signupSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

  110. def signupXhtml(user: TheUserType): Elem

  111. lazy val sitemap: List[Menu]

  112. def sitemapMutator: (SiteMap) ⇒ SiteMap

    The SiteMap mutator function

  113. def skipEmailValidation: Boolean

  114. def snarfLastItem: String

    Attributes
    protected
  115. def standardSubmitButton(name: String, func: () ⇒ Any = () => {}): Elem

  116. def superUser_?: Boolean

    Is there a user logged in and are they a superUser?

  117. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  118. def testLoggedIn(page: String): Boolean

  119. lazy val testLogginIn: If

    A Menu.

    A Menu.LocParam to test if the user is logged in

  120. lazy val testSuperUser: If

    A Menu.

    A Menu.LocParam to test if the user is a super user

  121. def thePath(end: String): List[String]

    Calculate the path given a suffix by prepending the basePath to the suffix

    Calculate the path given a suffix by prepending the basePath to the suffix

    Attributes
    protected
  122. def toString(): String

    Definition Classes
    AnyRef → Any
  123. def userMenu: List[Node]

  124. def userNameFieldString: String

    How do we prompt the user for the username.

    How do we prompt the user for the username. By default, it's S.?("email.address"), you can can change it to something else

  125. def userNameNotFoundString: String

    The string that's generated when the user name is not found.

    The string that's generated when the user name is not found. By default: S.?("email.address.not.found")

  126. def validateSignup(user: TheUserType): List[FieldError]

    Override this method to validate the user signup (eg by adding captcha verification)

  127. def validateUser(id: String): NodeSeq

  128. def validateUserMenuLoc: Box[Menu]

    The menu item for validating a user (make this "Empty" to disable)

  129. def validateUserMenuLocParams: List[LocParam[Unit]]

    The LocParams for the menu item for validating a user.

    The LocParams for the menu item for validating a user. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  130. lazy val validateUserPath: List[String]

    The calculated path to the user validation screen

  131. def validateUserSuffix: String

    The path suffix for the validate user screen

  132. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  133. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  134. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  135. def wrapIt(in: NodeSeq): NodeSeq

    Attributes
    protected

Inherited from AnyRef

Inherited from Any