ContentBox Core API 1.5.7

contentbox.model.content
Class ContentStoreService

WEB-INF.cftags.component
        extended by coldbox.system.orm.hibernate.BaseORMService
            extended by coldbox.system.orm.hibernate.VirtualEntityService
                extended by contentbox.model.content.ContentService
                    extended by contentbox.model.content.ContentStoreService

public class ContentStoreService
extends ContentService

******************************************************************************* 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. ******************************************************************************* Entry service for contentbox


Constructor Summary
init()
          Constructor
 
Method Summary
 any findPublishedEntries([numeric max='0'], [numeric offset='0'], [any category=''], [any searchTerm=''], [boolean asQuery='false'])
          Find published entries by filters
 any findPublishedEntriesByDate([numeric year='0'], [numeric month='0'], [numeric day='0'], [numeric max='0'], [numeric offset='0'], [boolean asQuery='false'])
          Entry listing by Date
 array getAllForExport()
          Get all content for export as flat data
 any saveContent([any content], [boolean transactional='true'])
          Save content
 struct search([any search=''], [any isPublished], [any category], [any author], [numeric max='0'], [numeric offset='0'], [any sortOrder='publishedDate DESC'], [boolean searchActiveContent='true'])
          content search returns struct with keys [content,count]
 
Methods inherited from class contentbox.model.content.ContentService
bulkPublishStatus, clearAllCaches, clearAllPageWrapperCaches, clearPageWrapper, clearPageWrapperCaches, deleteContent, findBySlug, findPublishedContent, getAllFlatSlugs, getIDBySlug, getTopCommentedContent, getTopVisitedContent, importFromData, importFromFile, inflateFromStruct, isSlugUnique, searchContent, syncUpdateHits, updateHits
 
Methods inherited from class coldbox.system.orm.hibernate.VirtualEntityService
GETDATASOURCE, GETENTITYNAME, SETDATASOURCE, SETENTITYNAME, clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getAll, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod
 
Methods inherited from class coldbox.system.orm.hibernate.BaseORMService
$delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, GETDEFAULTASQUERY, GETEVENTHANDLING, GETHQLDYNAMICCACHE, GETQUERYCACHEREGION, GETUSEQUERYCACHING, GETUSETRANSACTIONS, SETDEFAULTASQUERY, SETEVENTHANDLING, SETHQLDYNAMICCACHE, SETQUERYCACHEREGION, SETUSEQUERYCACHING, SETUSETRANSACTIONS, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getEntityGivenName, getRestrictions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, refresh, save, saveAll, sessionContains
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init()
Constructor

Method Detail

findPublishedEntries

public any findPublishedEntries([numeric max='0'], [numeric offset='0'], [any category=''], [any searchTerm=''], [boolean asQuery='false'])
Find published entries by filters

Parameters:
max - The maximum number of records to retrieve
offset - Where to start in the pagination
category - One or more categories to filter on
searchTerm - The search term to use for search
asQuery - Return results as query or array of objects. Defaults to false

findPublishedEntriesByDate

public any findPublishedEntriesByDate([numeric year='0'], [numeric month='0'], [numeric day='0'], [numeric max='0'], [numeric offset='0'], [boolean asQuery='false'])
Entry listing by Date

Parameters:
year - The year to search
month - The month to search
day - The day to search
max - The maximum number of records to retrieve
offset - Where to start in the pagination
asQuery - Return results as query or array of objects. Defaults to false

getAllForExport

public array getAllForExport()
Get all content for export as flat data

Overrides:
getAllForExport in class ContentService

saveContent

public any saveContent([any content], [boolean transactional='true'])
Save content

Parameters:
content - The content object
transactional - Use a transaction or not.

search

public struct search([any search=''], [any isPublished], [any category], [any author], [numeric max='0'], [numeric offset='0'], [any sortOrder='publishedDate DESC'], [boolean searchActiveContent='true'])
content search returns struct with keys [content,count]

Parameters:
search - The search string to search
isPublished - Can be 'any', 'true' or 'false
category - one or more categories to search content for
author - The author ID to filter on or use 'any' for all
max - The maximum number of records to retrieve
offset - Where to start in the pagination
sortOrder - The sort ordering to apply to the results
searchActiveContent - Whether active content will be searched or not, by default it does

ContentBox Core API 1.5.7