ContentBox Core API 1.6.0

contentbox.model.content
Class CustomHTML

WEB-INF.cftags.component
        extended by contentbox.model.content.CustomHTML

public class CustomHTML
extends WEB-INF.cftags.component

******************************************************************************* ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.gocontentbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] 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. ******************************************************************************* I model a custom HTML content piece

Property Summary
Type Property & Description Default Serializable Required
 any cache


Attributes:
  • index = idx_cache
  • ormtype = boolean
  • notnull = true
  • dbdefault = 1
true true false
 any cacheLastAccessTimeout


Attributes:
  • index = idx_cachelastaccesstimeout
  • ormtype = integer
  • notnull = false
  • dbdefault = 0
0 true false
 any cacheTimeout


Attributes:
  • index = idx_cachetimeout
  • ormtype = integer
  • notnull = false
  • dbdefault = 0
0 true false
 any cachebox


Attributes:
  • inject = cachebox
  • persistent = false
true false
 any content


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


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


Attributes:
  • update = false
  • index = idx_createdDate
  • ormtype = timestamp
  • notnull = true
true false
 any creator


Attributes:
  • fieldtype = many-to-one
  • fetch = join
  • notnull = false
  • lazy = true
  • cfc = contentbox.model.security.Author
  • fkcolumn = FK_authorID
true false
 any description


Attributes:
  • notnull = false
  • length = 500
true false
 any expireDate


Attributes:
  • index = idx_expireDate
  • ormtype = timestamp
  • notnull = false
true false
 any interceptorService


Attributes:
  • inject = coldbox:interceptorService
  • persistent = false
true false
 any isPublished


Attributes:
  • index = idx_published,idx_search
  • ormtype = boolean
  • notnull = true
  • dbdefault = 1
true true false
 any markup


Attributes:
  • notnull = true
  • dbdefault = 'HTML'
  • length = 100
html true false
 any populator


Attributes:
  • inject = wirebox:populator
  • persistent = false
true false
 any publishedDate


Attributes:
  • index = idx_published,idx_publishedDate
  • ormtype = timestamp
  • notnull = false
true false
 any renderedContent


Attributes:
  • persistent = false
true false
 any settingService


Attributes:
  • inject = id:settingService@cb
  • persistent = false
true false
 any slug


Attributes:
  • index = idx_customHTML_slug
  • unique = true
  • notnull = true
  • length = 200
true false
 any title


Attributes:
  • notnull = true
  • length = 200
true false
 
Constructor Summary
init()
          constructor
 
Method Summary
 any GETCACHE()
 any GETCACHEBOX()
 any GETCACHELASTACCESSTIMEOUT()
 any GETCACHETIMEOUT()
 any GETCONTENT()
 any GETCONTENTID()
 any GETCREATEDDATE()
 any GETCREATOR()
 any GETDESCRIPTION()
 any GETEXPIREDATE()
 any GETINTERCEPTORSERVICE()
 any GETISPUBLISHED()
 any GETMARKUP()
 any GETPOPULATOR()
 any GETPUBLISHEDDATE()
 any GETRENDEREDCONTENT()
 any GETSETTINGSERVICE()
 any GETSLUG()
 any GETTITLE()
 boolean HASCREATOR()
 CustomHTML SETCACHE(any cache)
 CustomHTML SETCACHEBOX(any cachebox)
 CustomHTML SETCACHELASTACCESSTIMEOUT(any cacheLastAccessTimeout)
 CustomHTML SETCACHETIMEOUT(any cacheTimeout)
 CustomHTML SETCONTENT(any content)
 CustomHTML SETCREATEDDATE(any createdDate)
 CustomHTML SETCREATOR(any creator)
 CustomHTML SETDESCRIPTION(any description)
 CustomHTML SETEXPIREDATE(any expireDate)
 CustomHTML SETINTERCEPTORSERVICE(any interceptorService)
 CustomHTML SETISPUBLISHED(any isPublished)
 CustomHTML SETMARKUP(any markup)
 CustomHTML SETPOPULATOR(any populator)
 CustomHTML SETPUBLISHEDDATE(any publishedDate)
 CustomHTML SETRENDEREDCONTENT(any renderedContent)
 CustomHTML SETSETTINGSERVICE(any settingService)
 CustomHTML SETSLUG(any slug)
 CustomHTML SETTITLE(any title)
 any addExpiredTime(any hour, any minute)
          add expired timestamp to property
 any addPublishedTime(any hour, any minute)
          add published timestamp to property
 string buildContentCacheKey()
          Build content cache keys according to sent content object
 boolean canCacheContent()
          Verify we can do content caching on this content object using global and local rules
 string getCreatorEmail()
          Shorthand Creator email
 string getCreatorName()
          Shorthand Creator name
 string getDisplayCreatedDate()
          Get formatted createdDate
 string getDisplayPublishedDate()
          Get display publishedDate
 string getExpireDateForEditor([boolean showTime='false'])
          Get display expireDate
 any getMemento()
          Get memento representation
 string getPublishedDateForEditor([boolean showTime='false'])
          Get display publishedDate
 boolean isContentPublished()
          Bit that denotes if the content has been published or not
 boolean isExpired()
          Bit that denotes if the content has expired or not, in order to be expired the content must have been published as well
 boolean isLoaded()
          is Loaded
 boolean isPublishedInFuture()
          Bit that denotes if the content has been published or not in the future
 void preInsert()
 CustomHTML prepareForClone(any author, any original, any originalService, boolean publish)
          Wipe primary key, and descendant keys, and prepare for cloning of entire hierarchies
 any renderContent()
          Render content out
 any renderContentSilent([any content='[runtime expression]'])
          Renders the content silently so no caching, or extra fluff is done, just content translation rendering
 array validate()
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
constructor

Property Detail

cache

any cache

Attributes:
index - idx_cache
ormtype - boolean
serializable - true
required - false
notnull - true
dbdefault - 1
default - true

cacheLastAccessTimeout

any cacheLastAccessTimeout

Attributes:
index - idx_cachelastaccesstimeout
ormtype - integer
serializable - true
required - false
notnull - false
dbdefault - 0
default - 0

cacheTimeout

any cacheTimeout

Attributes:
index - idx_cachetimeout
ormtype - integer
serializable - true
required - false
notnull - false
dbdefault - 0
default - 0

cachebox

any cachebox

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

content

any content

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

contentID

any contentID

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

createdDate

any createdDate

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

creator

any creator

Attributes:
fieldtype - many-to-one
fetch - join
serializable - true
required - false
notnull - false
lazy - true
cfc - contentbox.model.security.Author
default -
fkcolumn - FK_authorID

description

any description

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

expireDate

any expireDate

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

interceptorService

any interceptorService

Attributes:
inject - coldbox:interceptorService
serializable - true
required - false
persistent - false
default -

isPublished

any isPublished

Attributes:
index - idx_published,idx_search
ormtype - boolean
serializable - true
required - false
notnull - true
dbdefault - 1
default - true

markup

any markup

Attributes:
serializable - true
required - false
notnull - true
dbdefault - 'HTML'
length - 100
default - html

populator

any populator

Attributes:
inject - wirebox:populator
serializable - true
required - false
persistent - false
default -

publishedDate

any publishedDate

Attributes:
index - idx_published,idx_publishedDate
ormtype - timestamp
serializable - true
required - false
notnull - false
default -

renderedContent

any renderedContent

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

settingService

any settingService

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

slug

any slug

Attributes:
index - idx_customHTML_slug
unique - true
serializable - true
required - false
notnull - true
length - 200
default -

title

any title

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

Method Detail

GETCACHE

public any GETCACHE()


GETCACHEBOX

public any GETCACHEBOX()


GETCACHELASTACCESSTIMEOUT

public any GETCACHELASTACCESSTIMEOUT()


GETCACHETIMEOUT

public any GETCACHETIMEOUT()


GETCONTENT

public any GETCONTENT()


GETCONTENTID

public any GETCONTENTID()


GETCREATEDDATE

public any GETCREATEDDATE()


GETCREATOR

public any GETCREATOR()


GETDESCRIPTION

public any GETDESCRIPTION()


GETEXPIREDATE

public any GETEXPIREDATE()


GETINTERCEPTORSERVICE

public any GETINTERCEPTORSERVICE()


GETISPUBLISHED

public any GETISPUBLISHED()


GETMARKUP

public any GETMARKUP()


GETPOPULATOR

public any GETPOPULATOR()


GETPUBLISHEDDATE

public any GETPUBLISHEDDATE()


GETRENDEREDCONTENT

public any GETRENDEREDCONTENT()


GETSETTINGSERVICE

public any GETSETTINGSERVICE()


GETSLUG

public any GETSLUG()


GETTITLE

public any GETTITLE()


HASCREATOR

public boolean HASCREATOR()


SETCACHE

public CustomHTML SETCACHE(any cache)

Parameters:
cache

SETCACHEBOX

public CustomHTML SETCACHEBOX(any cachebox)

Parameters:
cachebox

SETCACHELASTACCESSTIMEOUT

public CustomHTML SETCACHELASTACCESSTIMEOUT(any cacheLastAccessTimeout)

Parameters:
cacheLastAccessTimeout

SETCACHETIMEOUT

public CustomHTML SETCACHETIMEOUT(any cacheTimeout)

Parameters:
cacheTimeout

SETCONTENT

public CustomHTML SETCONTENT(any content)

Parameters:
content

SETCREATEDDATE

public CustomHTML SETCREATEDDATE(any createdDate)

Parameters:
createdDate

SETCREATOR

public CustomHTML SETCREATOR(any creator)

Parameters:
creator

SETDESCRIPTION

public CustomHTML SETDESCRIPTION(any description)

Parameters:
description

SETEXPIREDATE

public CustomHTML SETEXPIREDATE(any expireDate)

Parameters:
expireDate

SETINTERCEPTORSERVICE

public CustomHTML SETINTERCEPTORSERVICE(any interceptorService)

Parameters:
interceptorService

SETISPUBLISHED

public CustomHTML SETISPUBLISHED(any isPublished)

Parameters:
isPublished

SETMARKUP

public CustomHTML SETMARKUP(any markup)

Parameters:
markup

SETPOPULATOR

public CustomHTML SETPOPULATOR(any populator)

Parameters:
populator

SETPUBLISHEDDATE

public CustomHTML SETPUBLISHEDDATE(any publishedDate)

Parameters:
publishedDate

SETRENDEREDCONTENT

public CustomHTML SETRENDEREDCONTENT(any renderedContent)

Parameters:
renderedContent

SETSETTINGSERVICE

public CustomHTML SETSETTINGSERVICE(any settingService)

Parameters:
settingService

SETSLUG

public CustomHTML SETSLUG(any slug)

Parameters:
slug

SETTITLE

public CustomHTML SETTITLE(any title)

Parameters:
title

addExpiredTime

public any addExpiredTime(any hour, any minute)
add expired timestamp to property

Parameters:
hour
minute

addPublishedTime

public any addPublishedTime(any hour, any minute)
add published timestamp to property

Parameters:
hour
minute

buildContentCacheKey

public string buildContentCacheKey()
Build content cache keys according to sent content object


canCacheContent

public boolean canCacheContent()
Verify we can do content caching on this content object using global and local rules


getCreatorEmail

public string getCreatorEmail()
Shorthand Creator email


getCreatorName

public string getCreatorName()
Shorthand Creator name


getDisplayCreatedDate

public string getDisplayCreatedDate()
Get formatted createdDate


getDisplayPublishedDate

public string getDisplayPublishedDate()
Get display publishedDate


getExpireDateForEditor

public string getExpireDateForEditor([boolean showTime='false'])
Get display expireDate

Parameters:
showTime

getMemento

public any getMemento()
Get memento representation


getPublishedDateForEditor

public string getPublishedDateForEditor([boolean showTime='false'])
Get display publishedDate

Parameters:
showTime

isContentPublished

public boolean isContentPublished()
Bit that denotes if the content has been published or not


isExpired

public boolean isExpired()
Bit that denotes if the content has expired or not, in order to be expired the content must have been published as well


isLoaded

public boolean isLoaded()
is Loaded


isPublishedInFuture

public boolean isPublishedInFuture()
Bit that denotes if the content has been published or not in the future


preInsert

public void preInsert()


prepareForClone

public CustomHTML prepareForClone(any author, any original, any originalService, boolean publish)
Wipe primary key, and descendant keys, and prepare for cloning of entire hierarchies

Parameters:
author - The author doing the cloning
original - The original content object that will be cloned into this content object
originalService - The ContentBox content service object used
publish - Publish pages or leave as drafts

renderContent

public any renderContent()
Render content out


renderContentSilent

public any renderContentSilent([any content='[runtime expression]'])
Renders the content silently so no caching, or extra fluff is done, just content translation rendering.

Parameters:
content - The content markup to translate, by default it uses the active content version's content

validate

public array validate()


ContentBox Core API 1.6.0