ContentBox Core API 1.6.0

contentbox.model.content
Class CategoryService

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

public class CategoryService
extends coldbox.system.orm.hibernate.VirtualEntityService

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

Property Summary
Type Property & Description Default Serializable Required
 any htmlHelper


Attributes:
  • inject = coldbox:plugin:HTMLHelper
true false
 any populator


Attributes:
  • inject = wirebox:populator
true false
 
Constructor Summary
init()
          Constructor
 
Method Summary
 array createCategories([any categories])
          Create categories via a comma delimited list and return the entities created
 boolean deleteCategory(any categoryID)
          Delete a category which also removes itself from all many-to-many relationships
 array getAllForExport()
          Get all data prepared for export
 string importFromData(any importData, [boolean override='false'], [any importLog])
          Import data from an array of structures of categories or just one structure of categories
 string importFromFile(any importFile, [boolean override='false'])
          Import data from a ContentBox JSON file
 array inflateCategories([struct memento])
          Inflate categories from a collection via 'category_X' pattern
 
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, GETORM, GETORMEVENTHANDLER, GETQUERYCACHEREGION, GETUSEQUERYCACHING, GETUSETRANSACTIONS, SETDEFAULTASQUERY, SETEVENTHANDLING, SETHQLDYNAMICCACHE, SETORM, SETORMEVENTHANDLER, SETQUERYCACHEREGION, SETUSEQUERYCACHING, SETUSETRANSACTIONS, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getEntityGivenName, getRestrictions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Property Detail

htmlHelper

any htmlHelper

Attributes:
inject - coldbox:plugin:HTMLHelper
required - false
serializable - true
default -

populator

any populator

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

Method Detail

createCategories

public array createCategories([any categories])
Create categories via a comma delimited list and return the entities created

Parameters:
categories

deleteCategory

public boolean deleteCategory(any categoryID)
Delete a category which also removes itself from all many-to-many relationships

Parameters:
categoryID

getAllForExport

public array getAllForExport()
Get all data prepared for export


importFromData

public string importFromData(any importData, [boolean override='false'], [any importLog])
Import data from an array of structures of categories or just one structure of categories

Parameters:
importData
override
importLog

importFromFile

public string importFromFile(any importFile, [boolean override='false'])
Import data from a ContentBox JSON file. Returns the import log

Parameters:
importFile
override

inflateCategories

public array inflateCategories([struct memento])
Inflate categories from a collection via 'category_X' pattern

Parameters:
memento

ContentBox Core API 1.6.0