contentbox.models.security

Class Author

lucee.Component
    extended by contentbox.models.BaseEntityMethods
      extended by contentbox.models.BaseEntity
        extended by contentbox.models.security.Author

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- I am a ContentBox User/Author entity

Class Attributes:
  • entityname : cbAuthor
  •  
  • cacheuse : read-write
  •  
  • table : cb_author
  •  
  • synchronized : false
  •  
  • cachename : cbAuthor
  •  
  • batchsize : 25
  •  
  • accessors : false
  •  
  • persistent : true
  •  
    Property Summary
    type property default serializable required
    any authorID


    • access = public
    • fieldtype = id
    • returntype = any
    • params = { allocationSize = 1, sequence = 'authorID_seq' }
    • generator = native
    • setter = no
    true false
    any authorService


    • access = public
    • returntype = any
    • inject = authorService@cb
    • persistent = false
    true false
    any biography


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = text
    • length = 8000
    true false
    date createdDate


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = timestamp
    • update = false
    • index = idx_createDate
    true false
    any email


    • access = public
    • returntype = any
    • notnull = true
    • index = idx_email
    • length = 255
    true false
    array entries


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = save-update
    • orderby = publishedDate DESC
    • batchsize = 10
    • singularname = entry
    • fkcolumn = FK_authorID
    • cfc = contentbox.models.content.Entry
    • lazy = extra
    true false
    any firstName


    • access = public
    • returntype = any
    • notnull = true
    • length = 100
    true false
    any isActive


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_login,idx_activeAuthor
    false true false
    any isDeleted


    • access = public
    • dbdefault = 0
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_deleted
    • sqltype = bit
    false true false
    any lastLogin


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = timestamp
    true false
    any lastName


    • access = public
    • returntype = any
    • notnull = true
    • length = 100
    true false
    boolean loggedIn


    • access = public
    • returntype = any
    • persistent = false
    false true false
    date modifiedDate


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = timestamp
    • index = idx_modifiedDate
    true false
    any numberOfEntries


    • access = public
    • returntype = any
    • formula = select count(*) from cb_content as content where content.FK_authorID=authorID and content.contentType='entry'
    true false
    any numberOfPages


    • access = public
    • returntype = any
    • formula = select count(*) from cb_content as content where content.FK_authorID=authorID and content.contentType='page'
    true false
    array pages


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = save-update
    • orderby = publishedDate DESC
    • batchsize = 10
    • singularname = page
    • fkcolumn = FK_authorID
    • cfc = contentbox.models.content.Page
    • lazy = extra
    true false
    any password


    • access = public
    • returntype = any
    • notnull = true
    • index = idx_login
    • length = 100
    true false
    any permissionList


    • access = public
    • returntype = any
    • persistent = false
    true false
    array permissions


    • linktable = cb_authorPermissions
    • access = public
    • fieldtype = many-to-many
    • returntype = any
    • cascade = all
    • orderby = permission
    • singularname = permission
    • fkcolumn = FK_authorID
    • inversejoincolumn = FK_permissionID
    • cfc = contentbox.models.security.Permission
    • lazy = extra
    true false
    any preferences


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = text
    • length = 8000
    true false
    any role


    • access = public
    • fieldtype = many-to-one
    • returntype = any
    • notnull = true
    • fkcolumn = FK_roleID
    • cfc = contentbox.models.security.Role
    • lazy = true
    true false
    any username


    • access = public
    • unique = true
    • returntype = any
    • notnull = true
    • index = idx_login
    • length = 100
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any addEntry(any entry)
    any addPage(any page)
    any addPermission(any permission)
    boolean checkPermission(any slug)
         Check for permission.
    Author clearPermissions()
         Clear all permissions.
    struct getAllPreferences()
         Get all user preferences in inflated format.
    string getAuthorID()
    string getAuthorService()
    string getBiography()
    string getDisplayLastLogin()
         Get formatted lastLogin.
    string getEmail()
    string getEntries()
    string getFirstName()
    string getIsActive()
    string getLastLogin()
    string getLastName()
    string getLoggedIn()
    any getMemento([any excludes=''], [boolean showRole='true'], [boolean showPermissions='true'])
         Get a flat representation of this entry.
    string getName()
         Retrieve full name.
    string getNumberOfEntries()
    string getNumberOfPages()
    string getPages()
    string getPassword()
    string getPermissionList()
    string getPermissions()
    any getPreference(any name, [any defaultValue])
         Get a preference, you can pass a default value if preference does not exist.
    string getPreferences()
    string getRole()
    string getUsername()
    boolean hasEntry([any entry])
    boolean hasPage([any page])
    boolean hasPermission([any permission])
    boolean hasRole([any role])
    any inPermissionList(any list)
         Verify that a passed in list of perms the user can use.
    any isLoggedIn()
         Logged in.
    boolean removeEntry(any entry)
    boolean removePage(any page)
    boolean removePermission(any permission)
    any setAuthorService(any authorService)
    any setBiography(any biography)
    any setEmail(any email)
    any setEntries(array entries)
    any setFirstName(any firstName)
    any setIsActive(any isActive)
    any setLastLogin(any lastLogin)
    any setLastName(any lastName)
    any setLoggedIn(boolean loggedIn)
    any setNumberOfEntries(any numberOfEntries)
    any setNumberOfPages(any numberOfPages)
    any setPages(array pages)
    any setPassword(any password)
    any setPermissionList(any permissionList)
    Author setPermissions(array permissions)
         Override the setPermissions.
    Author setPreference(any name, any value)
         Set a preference in the user preferences.
    Author setPreferences(any preferences)
         Store a preferences structure or JSON data in the user prefernces.
    any setRole(any role)
    any setUsername(any username)
     
    Methods inherited from class contentbox.models.BaseEntity
    getCreatedDate, getIsDeleted, getModifiedDate, setCreatedDate, setIsDeleted, setModifiedDate
     
    Methods inherited from class contentbox.models.BaseEntityMethods
    getBaseMemento, getDisplayCreatedDate, getDisplayModifiedDate, isLoaded, preInsert, preUpdate
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    authorID

    property any authorID

    Attributes:
    access - public
    required - false
    fieldtype - id
    returntype - any
    params - { allocationSize = 1, sequence = 'authorID_seq' }
    generator - native
    serializable - true
    setter - no

    authorService

    property any authorService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - authorService@cb
    persistent - false
    serializable - true

    biography

    property any biography

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - text
    length - 8000
    serializable - true

    createdDate

    property date createdDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - timestamp
    update - false
    index - idx_createDate
    serializable - true

    email

    property any email

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    index - idx_email
    length - 255
    serializable - true

    entries

    property array entries

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - save-update
    orderby - publishedDate DESC
    batchsize - 10
    singularname - entry
    fkcolumn - FK_authorID
    serializable - true
    cfc - contentbox.models.content.Entry
    lazy - extra

    firstName

    property any firstName

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    length - 100
    serializable - true

    isActive

    property any isActive = [false]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_login,idx_activeAuthor
    serializable - true

    isDeleted

    property any isDeleted = [false]

    Attributes:
    access - public
    required - false
    dbdefault - 0
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_deleted
    serializable - true
    sqltype - bit

    lastLogin

    property any lastLogin

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - timestamp
    serializable - true

    lastName

    property any lastName

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    length - 100
    serializable - true

    loggedIn

    property boolean loggedIn = [false]

    Attributes:
    access - public
    required - false
    returntype - any
    persistent - false
    serializable - true

    modifiedDate

    property date modifiedDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - timestamp
    index - idx_modifiedDate
    serializable - true

    numberOfEntries

    property any numberOfEntries

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_content as content where content.FK_authorID=authorID and content.contentType='entry'
    serializable - true

    numberOfPages

    property any numberOfPages

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_content as content where content.FK_authorID=authorID and content.contentType='page'
    serializable - true

    pages

    property array pages

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - save-update
    orderby - publishedDate DESC
    batchsize - 10
    singularname - page
    fkcolumn - FK_authorID
    serializable - true
    cfc - contentbox.models.content.Page
    lazy - extra

    password

    property any password

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    index - idx_login
    length - 100
    serializable - true

    permissionList

    property any permissionList

    Attributes:
    access - public
    required - false
    returntype - any
    persistent - false
    serializable - true

    permissions

    property array permissions

    Attributes:
    linktable - cb_authorPermissions
    access - public
    required - false
    fieldtype - many-to-many
    returntype - any
    cascade - all
    orderby - permission
    singularname - permission
    fkcolumn - FK_authorID
    serializable - true
    inversejoincolumn - FK_permissionID
    cfc - contentbox.models.security.Permission
    lazy - extra

    preferences

    property any preferences

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - text
    length - 8000
    serializable - true

    role

    property any role

    Attributes:
    access - public
    required - false
    fieldtype - many-to-one
    returntype - any
    notnull - true
    fkcolumn - FK_roleID
    serializable - true
    cfc - contentbox.models.security.Role
    lazy - true

    username

    property any username

    Attributes:
    access - public
    unique - true
    required - false
    returntype - any
    notnull - true
    index - idx_login
    length - 100
    serializable - true

    Method Detail

    addEntry

    public any addEntry(any entry)

    Parameters:
    entry

    addPage

    public any addPage(any page)

    Parameters:
    page

    addPermission

    public any addPermission(any permission)

    Parameters:
    permission

    checkPermission

    public boolean checkPermission(any slug)

    Check for permission

    Parameters:
    slug - The permission slug or list of slugs to validate the user has. If it's a list then they are ORed together

    clearPermissions

    public Author clearPermissions()

    Clear all permissions


    getAllPreferences

    public struct getAllPreferences()

    Get all user preferences in inflated format


    getAuthorID

    public string getAuthorID()


    getAuthorService

    public string getAuthorService()


    getBiography

    public string getBiography()


    getDisplayLastLogin

    public string getDisplayLastLogin()

    Get formatted lastLogin


    getEmail

    public string getEmail()


    getEntries

    public string getEntries()


    getFirstName

    public string getFirstName()


    getIsActive

    public string getIsActive()


    getLastLogin

    public string getLastLogin()


    getLastName

    public string getLastName()


    getLoggedIn

    public string getLoggedIn()


    getMemento

    public any getMemento([any excludes=''], [boolean showRole='true'], [boolean showPermissions='true'])

    Get a flat representation of this entry

    Parameters:
    excludes - Exclude properties
    showRole - Show Roles
    showPermissions - Show permissions

    getName

    public string getName()

    Retrieve full name


    getNumberOfEntries

    public string getNumberOfEntries()


    getNumberOfPages

    public string getNumberOfPages()


    getPages

    public string getPages()


    getPassword

    public string getPassword()


    getPermissionList

    public string getPermissionList()


    getPermissions

    public string getPermissions()


    getPreference

    public any getPreference(any name, [any defaultValue])

    Get a preference, you can pass a default value if preference does not exist

    Parameters:
    name
    defaultValue

    getPreferences

    public string getPreferences()


    getRole

    public string getRole()


    getUsername

    public string getUsername()


    hasEntry

    public boolean hasEntry([any entry])

    Parameters:
    entry

    hasPage

    public boolean hasPage([any page])

    Parameters:
    page

    hasPermission

    public boolean hasPermission([any permission])

    Parameters:
    permission

    hasRole

    public boolean hasRole([any role])

    Parameters:
    role

    inPermissionList

    public any inPermissionList(any list)

    Verify that a passed in list of perms the user can use

    Parameters:
    list

    isLoggedIn

    public any isLoggedIn()

    Logged in


    removeEntry

    public boolean removeEntry(any entry)

    Parameters:
    entry

    removePage

    public boolean removePage(any page)

    Parameters:
    page

    removePermission

    public boolean removePermission(any permission)

    Parameters:
    permission

    setAuthorService

    public any setAuthorService(any authorService)

    Parameters:
    authorService

    setBiography

    public any setBiography(any biography)

    Parameters:
    biography

    setEmail

    public any setEmail(any email)

    Parameters:
    email

    setEntries

    public any setEntries(array entries)

    Parameters:
    entries

    setFirstName

    public any setFirstName(any firstName)

    Parameters:
    firstName

    setIsActive

    public any setIsActive(any isActive)

    Parameters:
    isActive

    setLastLogin

    public any setLastLogin(any lastLogin)

    Parameters:
    lastLogin

    setLastName

    public any setLastName(any lastName)

    Parameters:
    lastName

    setLoggedIn

    public any setLoggedIn(boolean loggedIn)

    Parameters:
    loggedIn

    setNumberOfEntries

    public any setNumberOfEntries(any numberOfEntries)

    Parameters:
    numberOfEntries

    setNumberOfPages

    public any setNumberOfPages(any numberOfPages)

    Parameters:
    numberOfPages

    setPages

    public any setPages(array pages)

    Parameters:
    pages

    setPassword

    public any setPassword(any password)

    Parameters:
    password

    setPermissionList

    public any setPermissionList(any permissionList)

    Parameters:
    permissionList

    setPermissions

    public Author setPermissions(array permissions)

    Override the setPermissions

    Parameters:
    permissions

    setPreference

    public Author setPreference(any name, any value)

    Set a preference in the user preferences

    Parameters:
    name
    value

    setPreferences

    public Author setPreferences(any preferences)

    Store a preferences structure or JSON data in the user prefernces

    Parameters:
    preferences - A struct of data or a JSON packet to store

    setRole

    public any setRole(any role)

    Parameters:
    role

    setUsername

    public any setUsername(any username)

    Parameters:
    username