ContentBox Core API 1.6.0

contentbox.model.security
Class Author

WEB-INF.cftags.component
        extended by contentbox.model.security.Author

public class Author
extends WEB-INF.cftags.component

I am a author entity

Property Summary
Type Property & Description Default Serializable Required
 any authorID


Attributes:
  • generator = native
  • fieldtype = id
  • setter = false
true false
 any authorService


Attributes:
  • inject = authorService@cb
  • persistent = false
true false
 any biography


Attributes:
  • ormtype = text
  • notnull = false
  • length = 8000
true false
 any createdDate


Attributes:
  • update = false
  • ormtype = timestamp
  • notnull = true
true false
 any email


Attributes:
  • index = idx_email
  • notnull = true
  • length = 255
true false
 array entries


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


Attributes:
  • notnull = true
  • length = 100
true false
 any isActive


Attributes:
  • index = idx_login,idx_active
  • ormtype = boolean
  • notnull = true
  • dbdefault = 0
false true false
 any lastLogin


Attributes:
  • ormtype = timestamp
  • notnull = false
true false
 any lastName


Attributes:
  • notnull = true
  • length = 100
true false
 boolean loggedIn


Attributes:
  • persistent = false
false true false
 any numberOfEntries


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


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


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


Attributes:
  • index = idx_login
  • notnull = true
  • length = 100
true false
 any permissionList


Attributes:
  • persistent = false
true false
 array permissions


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


Attributes:
  • ormtype = text
  • notnull = false
  • length = 8000
true false
 any role


Attributes:
  • fieldtype = many-to-one
  • notnull = true
  • lazy = true
  • cfc = contentbox.model.security.Role
  • fkcolumn = FK_roleID
true false
 any username


Attributes:
  • index = idx_login
  • unique = true
  • notnull = true
  • length = 100
true false
 
Constructor Summary
init()
          Constructor
 
Method Summary
 void ADDENTRY(Entry entry)
 void ADDPAGE(Page page)
 void ADDPERMISSION(Permission permission)
 any GETAUTHORID()
 any GETAUTHORSERVICE()
 any GETBIOGRAPHY()
 any GETCREATEDDATE()
 any GETEMAIL()
 array GETENTRIES()
 any GETFIRSTNAME()
 any GETISACTIVE()
 any GETLASTLOGIN()
 any GETLASTNAME()
 boolean GETLOGGEDIN()
 any GETNUMBEROFENTRIES()
 any GETNUMBEROFPAGES()
 array GETPAGES()
 any GETPASSWORD()
 any GETPERMISSIONLIST()
 array GETPERMISSIONS()
 any GETPREFERENCES()
 any GETROLE()
 any GETUSERNAME()
 boolean HASENTRY([Entry entries])
 boolean HASPAGE([Page pages])
 boolean HASPERMISSION([Permission permissions])
 boolean HASROLE()
 boolean REMOVEENTRY(Entry entry)
 boolean REMOVEPAGE(Page page)
 boolean REMOVEPERMISSION(Permission permission)
 Author SETAUTHORSERVICE(any authorService)
 Author SETBIOGRAPHY(any biography)
 Author SETCREATEDDATE(any createdDate)
 Author SETEMAIL(any email)
 Author SETENTRIES(array entries)
 Author SETFIRSTNAME(any firstName)
 Author SETISACTIVE(any isActive)
 Author SETLASTLOGIN(any lastLogin)
 Author SETLASTNAME(any lastName)
 Author SETLOGGEDIN(boolean loggedIn)
 Author SETNUMBEROFENTRIES(any numberOfEntries)
 Author SETNUMBEROFPAGES(any numberOfPages)
 Author SETPAGES(array pages)
 Author SETPASSWORD(any password)
 Author SETPERMISSIONLIST(any permissionList)
 Author SETROLE(any role)
 Author SETUSERNAME(any username)
 boolean checkPermission(any slug)
          Check for permission
 Author clearPermissions()
          Clear all permissions
 struct getAllPreferences()
          Get all user preferences in inflated format
 string getDisplayCreatedDate()
          Get formatted createdDate
 string getDisplayLastLogin()
          Get formatted lastLogin
 any getMemento()
          Get a flat representation of this entry
 string getName()
          Retrieve full name
 any getPreference(any name, [any defaultValue])
          Get a preference, you can pass a default value if preference does not exist
 any inPermissionList(any list)
          Verify that a passed in list of perms the user can use
 boolean isLoaded()
          is loaded?
 any isLoggedIn()
          Logged in
 void preInsert()
 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
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Property Detail

authorID

any authorID

Attributes:
generator - native
fieldtype - id
serializable - true
required - false
default -
setter - false

authorService

any authorService

Attributes:
inject - authorService@cb
serializable - true
required - false
persistent - false
default -

biography

any biography

Attributes:
ormtype - text
serializable - true
required - false
notnull - false
length - 8000
default -

createdDate

any createdDate

Attributes:
update - false
ormtype - timestamp
serializable - true
required - false
notnull - true
default -

email

any email

Attributes:
index - idx_email
serializable - true
required - false
notnull - true
length - 255
default -

entries

array entries

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

firstName

any firstName

Attributes:
serializable - true
required - false
notnull - true
length - 100
default -

isActive

any isActive

Attributes:
index - idx_login,idx_active
ormtype - boolean
serializable - true
required - false
notnull - true
dbdefault - 0
default - false

lastLogin

any lastLogin

Attributes:
ormtype - timestamp
serializable - true
required - false
notnull - false
default -

lastName

any lastName

Attributes:
serializable - true
required - false
notnull - true
length - 100
default -

loggedIn

boolean loggedIn

Attributes:
required - false
serializable - true
persistent - false
default - false

numberOfEntries

any numberOfEntries

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

numberOfPages

any numberOfPages

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

pages

array pages

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

password

any password

Attributes:
index - idx_login
serializable - true
required - false
notnull - true
length - 100
default -

permissionList

any permissionList

Attributes:
required - false
serializable - true
persistent - false
default -

permissions

array permissions

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

preferences

any preferences

Attributes:
ormtype - text
serializable - true
required - false
notnull - false
length - 8000
default -

role

any role

Attributes:
fieldtype - many-to-one
serializable - true
required - false
notnull - true
lazy - true
cfc - contentbox.model.security.Role
default -
fkcolumn - FK_roleID

username

any username

Attributes:
index - idx_login
unique - true
serializable - true
required - false
notnull - true
length - 100
default -

Method Detail

ADDENTRY

public void ADDENTRY(Entry entry)

Parameters:
entry

ADDPAGE

public void ADDPAGE(Page page)

Parameters:
page

ADDPERMISSION

public void ADDPERMISSION(Permission permission)

Parameters:
permission

GETAUTHORID

public any GETAUTHORID()


GETAUTHORSERVICE

public any GETAUTHORSERVICE()


GETBIOGRAPHY

public any GETBIOGRAPHY()


GETCREATEDDATE

public any GETCREATEDDATE()


GETEMAIL

public any GETEMAIL()


GETENTRIES

public array GETENTRIES()


GETFIRSTNAME

public any GETFIRSTNAME()


GETISACTIVE

public any GETISACTIVE()


GETLASTLOGIN

public any GETLASTLOGIN()


GETLASTNAME

public any GETLASTNAME()


GETLOGGEDIN

public boolean GETLOGGEDIN()


GETNUMBEROFENTRIES

public any GETNUMBEROFENTRIES()


GETNUMBEROFPAGES

public any GETNUMBEROFPAGES()


GETPAGES

public array GETPAGES()


GETPASSWORD

public any GETPASSWORD()


GETPERMISSIONLIST

public any GETPERMISSIONLIST()


GETPERMISSIONS

public array GETPERMISSIONS()


GETPREFERENCES

public any GETPREFERENCES()


GETROLE

public any GETROLE()


GETUSERNAME

public any GETUSERNAME()


HASENTRY

public boolean HASENTRY([Entry entries])

Parameters:
entries

HASPAGE

public boolean HASPAGE([Page pages])

Parameters:
pages

HASPERMISSION

public boolean HASPERMISSION([Permission permissions])

Parameters:
permissions

HASROLE

public boolean HASROLE()


REMOVEENTRY

public boolean REMOVEENTRY(Entry entry)

Parameters:
entry

REMOVEPAGE

public boolean REMOVEPAGE(Page page)

Parameters:
page

REMOVEPERMISSION

public boolean REMOVEPERMISSION(Permission permission)

Parameters:
permission

SETAUTHORSERVICE

public Author SETAUTHORSERVICE(any authorService)

Parameters:
authorService

SETBIOGRAPHY

public Author SETBIOGRAPHY(any biography)

Parameters:
biography

SETCREATEDDATE

public Author SETCREATEDDATE(any createdDate)

Parameters:
createdDate

SETEMAIL

public Author SETEMAIL(any email)

Parameters:
email

SETENTRIES

public Author SETENTRIES(array entries)

Parameters:
entries

SETFIRSTNAME

public Author SETFIRSTNAME(any firstName)

Parameters:
firstName

SETISACTIVE

public Author SETISACTIVE(any isActive)

Parameters:
isActive

SETLASTLOGIN

public Author SETLASTLOGIN(any lastLogin)

Parameters:
lastLogin

SETLASTNAME

public Author SETLASTNAME(any lastName)

Parameters:
lastName

SETLOGGEDIN

public Author SETLOGGEDIN(boolean loggedIn)

Parameters:
loggedIn

SETNUMBEROFENTRIES

public Author SETNUMBEROFENTRIES(any numberOfEntries)

Parameters:
numberOfEntries

SETNUMBEROFPAGES

public Author SETNUMBEROFPAGES(any numberOfPages)

Parameters:
numberOfPages

SETPAGES

public Author SETPAGES(array pages)

Parameters:
pages

SETPASSWORD

public Author SETPASSWORD(any password)

Parameters:
password

SETPERMISSIONLIST

public Author SETPERMISSIONLIST(any permissionList)

Parameters:
permissionList

SETROLE

public Author SETROLE(any role)

Parameters:
role

SETUSERNAME

public Author SETUSERNAME(any username)

Parameters:
username

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


getDisplayCreatedDate

public string getDisplayCreatedDate()
Get formatted createdDate


getDisplayLastLogin

public string getDisplayLastLogin()
Get formatted lastLogin


getMemento

public any getMemento()
Get a flat representation of this entry


getName

public string getName()
Retrieve full name


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

inPermissionList

public any inPermissionList(any list)
Verify that a passed in list of perms the user can use

Parameters:
list

isLoaded

public boolean isLoaded()
is loaded?


isLoggedIn

public any isLoggedIn()
Logged in


preInsert

public void preInsert()


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

ContentBox Core API 1.6.0