contentbox.models.content

Class RelocationService

lucee.Component
    extended by cborm.models.BaseORMService
      extended by cborm.models.VirtualEntityService
        extended by contentbox.models.content.RelocationService

ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp 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. A generic content service for content objects

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any CBHelper


    • access = public
    • returntype = any
    • inject = CBHelper@contentbox
    true false
    any log


    • access = public
    • returntype = any
    • inject = logbox:logger:{this}
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    Relocation createContentRelocation(BaseContent contentItem, string originalSlug)
         Creates a content-assigned relocation.
    Relocation createTargetRelocation(string slug, string target)
         Creates a target ( no content assigned ) relocation for global site relocations.
    any getRelocationBySlug(string slug, [string contentType='Page'], [contentbox.models.content.Site site])
         Returns a relocation by slug, contentType, and site.
    struct search([any search=''], [any siteID=''], [boolean isPublic], [any max='0'], [any offset='0'], [any sortOrder='slug asc'])
         Relocation search with filters.
     
    Methods inherited from class cborm.models.VirtualEntityService
    autoCast, convertIdValueToJavaType, convertValueToJavaType, count, countWhere, deleteAll, deleteByID, deleteByQuery, deleteWhere, evictCollection, executeQuery, exists, findAllWhere, findWhere, get, getAll, getEntityName, getKey, getOrFail, getPropertyNames, getTableName, idCast, list, new, newCriteria, onMissingMethod, setEntityName
     
    Methods inherited from class cborm.models.BaseORMService
    $transactioned, buildJavaProxy, clear, createService, delete, evict, evictQueries, findAll, findByExample, findIt, findOrFail, getBeanPopulator, getDatasource, getDefaultAsQuery, getDirtyPropertyNames, getDynamicProcessor, getEntityGivenName, getEntityMetadata, getEventHandling, getKeyValue, getLogger, getORMEventHandler, getObjectPopulator, getOrm, getPropertyValues, getQueryCacheRegion, getRestrictions, getSessionStatistics, getStringBuilder, getUseQueryCaching, getUseTransactions, getWirebox, isDirty, isSessionDirty, merge, nullValue, populate, populateFromJson, populateFromQuery, populateFromXml, populateWithPrefix, refresh, save, saveAll, sessionContains, setDatasource, setDefaultAsQuery, setEventHandling, setLogger, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions, setWirebox, when
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    CBHelper

    property any CBHelper

    Attributes:
    access - public
    required - false
    returntype - any
    inject - CBHelper@contentbox
    serializable - true

    log

    property any log

    Attributes:
    access - public
    required - false
    returntype - any
    inject - logbox:logger:{this}
    serializable - true

    Method Detail

    createContentRelocation

    public Relocation createContentRelocation(BaseContent contentItem, string originalSlug)

    Creates a content-assigned relocation

    Parameters:
    contentItem - the content item to associate to this relocation
    originalSlug - the slug which will be relocated

    createTargetRelocation

    public Relocation createTargetRelocation(string slug, string target)

    Creates a target ( no content assigned ) relocation for global site relocations

    Parameters:
    slug - The URI to be checked
    target - The target to relocate the URI to

    getRelocationBySlug

    public any getRelocationBySlug(string slug, [string contentType='Page'], [contentbox.models.content.Site site])

    Returns a relocation by slug, contentType, and site

    Parameters:
    slug - the URI value to test
    contentType - the content type to restrict
    site - the site to restrict the search to

    search

    public struct search([any search=''], [any siteID=''], [boolean isPublic], [any max='0'], [any offset='0'], [any sortOrder='slug asc'])

    Relocation search with filters

    Parameters:
    search - The search term for the name
    siteID - The site id to filter on
    isPublic - Filter on this public (true) / private (false) or all (null)
    max - The max records
    offset - The offset to use
    sortOrder - The sort order
    Returns:
    struct of { count, relocations }