contentbox.models.security

Class Role

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

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- A cool Role entity

Class Attributes:
  • entityname : cbRole
  •  
  • cacheuse : read-write
  •  
  • table : cb_role
  •  
  • synchronized : false
  •  
  • cachename : cbRole
  •  
  • accessors : false
  •  
  • persistent : true
  •  
    Property Summary
    type property default serializable required
    date createdDate


    • access = public
    • returntype = any
    • column = createdDate
    • notnull = true
    • ormtype = timestamp
    • update = false
    • persistent = true
    true false
    any description


    • access = public
    • returntype = any
    • column = description
    • notnull = false
    • ormtype = string
    • length = 500
    true false
    any isDeleted


    • access = public
    • returntype = any
    • column = isDeleted
    • notnull = true
    • ormtype = boolean
    • persistent = true
    false true false
    date modifiedDate


    • access = public
    • returntype = any
    • column = modifiedDate
    • notnull = true
    • ormtype = timestamp
    • persistent = true
    true false
    any numberOfAuthors


    • access = public
    • returntype = any
    • formula = select count(*) from cb_author as author where author.FK_roleID=roleID
    true false
    any numberOfPermissions


    • access = public
    • returntype = any
    • formula = select count(*) from cb_rolePermissions as rolePermissions where rolePermissions.FK_roleID=roleID
    true false
    any permissionList


    • access = public
    • returntype = any
    • persistent = false
    true false
    any permissionService


    • access = public
    • returntype = any
    • inject = provider:permissionService@contentbox
    • persistent = false
    true false
    array permissions


    • linktable = cb_rolePermissions
    • access = public
    • fieldtype = many-to-many
    • returntype = any
    • cascade = save-update
    • cacheuse = read-write
    • orderby = permission
    • fkcolumn = FK_roleID
    • inversejoincolumn = FK_permissionID
    • cfc = contentbox.models.security.Permission
    • lazy = true
    true false
    any role


    • access = public
    • unique = true
    • returntype = any
    • column = role
    • notnull = true
    • ormtype = string
    • index = idx_roleName
    • length = 255
    true false
    any roleID


    • access = public
    • fieldtype = id
    • returntype = any
    • column = roleID
    • ormtype = string
    • update = false
    • generator = uuid
    • length = 36
    true false
    Constructor Summary
    init()
    Method Summary
    any addPermissions(any permissions)
    Role clearPermissions()
         Clear all permissions.
    string getDescription()
    string getName()
         Get the role name, same as getRole().
    string getNumberOfAuthors()
    string getNumberOfPermissions()
    string getPermissionList()
    string getPermissionService()
    string getPermissions()
    string getRole()
    string getRoleID()
    boolean hasPermission(any permission)
         Verify if the role has one or more of the passed in permissions.
    boolean hasPermissions([any permissions])
    boolean removePermissions(any permissions)
    any setDescription(any description)
    any setNumberOfAuthors(any numberOfAuthors)
    any setNumberOfPermissions(any numberOfPermissions)
    any setPermissionList(any permissionList)
    any setPermissionService(any permissionService)
    Role setPermissions(array permissions)
         Override the setPermissions.
    any setRole(any role)
    any setRoleID(any roleID)
     
    Methods inherited from class contentbox.models.BaseEntity
    getCreatedDate, getIsDeleted, getModifiedDate, setCreatedDate, setIsDeleted, setModifiedDate
     
    Methods inherited from class contentbox.models.BaseEntityMethods
    appendToMemento, appendToMementoProfile, arrayWrap, getDisplayCreatedDate, getDisplayModifiedDate, getEntityName, getId, includeMixin, isLoaded, preInsert, preUpdate
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()


    Property Detail

    createdDate

    property date createdDate

    Attributes:
    access - public
    required - false
    returntype - any
    column - createdDate
    notnull - true
    ormtype - timestamp
    update - false
    persistent - true
    serializable - true

    description

    property any description

    Attributes:
    access - public
    required - false
    returntype - any
    column - description
    notnull - false
    ormtype - string
    length - 500
    serializable - true

    isDeleted

    property any isDeleted = [false]

    Attributes:
    access - public
    required - false
    returntype - any
    column - isDeleted
    notnull - true
    ormtype - boolean
    persistent - true
    serializable - true

    modifiedDate

    property date modifiedDate

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

    numberOfAuthors

    property any numberOfAuthors

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_author as author where author.FK_roleID=roleID
    serializable - true

    numberOfPermissions

    property any numberOfPermissions

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_rolePermissions as rolePermissions where rolePermissions.FK_roleID=roleID
    serializable - true

    permissionList

    property any permissionList

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

    permissionService

    property any permissionService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - provider:permissionService@contentbox
    persistent - false
    serializable - true

    permissions

    property array permissions

    Attributes:
    linktable - cb_rolePermissions
    access - public
    required - false
    fieldtype - many-to-many
    returntype - any
    cascade - save-update
    cacheuse - read-write
    orderby - permission
    fkcolumn - FK_roleID
    serializable - true
    inversejoincolumn - FK_permissionID
    cfc - contentbox.models.security.Permission
    lazy - true

    role

    property any role

    Attributes:
    access - public
    unique - true
    required - false
    returntype - any
    column - role
    notnull - true
    ormtype - string
    index - idx_roleName
    length - 255
    serializable - true

    roleID

    property any roleID

    Attributes:
    access - public
    required - false
    fieldtype - id
    returntype - any
    column - roleID
    ormtype - string
    update - false
    generator - uuid
    length - 36
    serializable - true

    Method Detail

    addPermissions

    public any addPermissions(any permissions)

    Parameters:
    permissions

    clearPermissions

    public Role clearPermissions()

    Clear all permissions


    getDescription

    public string getDescription()


    getName

    public string getName()

    Get the role name, same as getRole()


    getNumberOfAuthors

    public string getNumberOfAuthors()


    getNumberOfPermissions

    public string getNumberOfPermissions()


    getPermissionList

    public string getPermissionList()


    getPermissionService

    public string getPermissionService()


    getPermissions

    public string getPermissions()


    getRole

    public string getRole()


    getRoleID

    public string getRoleID()


    hasPermission

    public boolean hasPermission(any permission)

    Verify if the role has one or more of the passed in permissions

    Parameters:
    permission - One or a list of permissions to verify

    hasPermissions

    public boolean hasPermissions([any permissions])

    Parameters:
    permissions

    removePermissions

    public boolean removePermissions(any permissions)

    Parameters:
    permissions

    setDescription

    public any setDescription(any description)

    Parameters:
    description

    setNumberOfAuthors

    public any setNumberOfAuthors(any numberOfAuthors)

    Parameters:
    numberOfAuthors

    setNumberOfPermissions

    public any setNumberOfPermissions(any numberOfPermissions)

    Parameters:
    numberOfPermissions

    setPermissionList

    public any setPermissionList(any permissionList)

    Parameters:
    permissionList

    setPermissionService

    public any setPermissionService(any permissionService)

    Parameters:
    permissionService

    setPermissions

    public Role setPermissions(array permissions)

    Override the setPermissions

    Parameters:
    permissions

    setRole

    public any setRole(any role)

    Parameters:
    role

    setRoleID

    public any setRoleID(any roleID)

    Parameters:
    roleID