contentbox.models.content

Class ContentVersionService

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

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Content version services

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init()
          Constructor.
    Method Summary
    struct findRelatedVersions(any contentID, [any max='0'], [any offset='0'])
         Find all the versions related to the passed content Id.
    any getActiveVersion(any contentId)
         Get an active version according to content.
    numeric getNumberOfVersions([string contentId=''], [boolean isActive])
         Get the total version counts by content object and if the versions are active or not or all.
     
    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


    Method Detail

    findRelatedVersions

    public struct findRelatedVersions(any contentID, [any max='0'], [any offset='0'])

    Find all the versions related to the passed content Id

    Parameters:
    contentID - The content id to get the versions for
    max - Maximum records to get
    offset - The pagination offset
    Returns:
    struct of { count : numeric, versions : array}

    getActiveVersion

    public any getActiveVersion(any contentId)

    Get an active version according to content

    Parameters:
    contentId - The content id to get the active version for
    Returns:
    The active version if found, else a new ContentVersion object

    getNumberOfVersions

    public numeric getNumberOfVersions([string contentId=''], [boolean isActive])

    Get the total version counts by content object and if the versions are active or not or all

    Parameters:
    contentId - The content id to count on
    isActive - If passed, it evaluated the total using active or non-active versions. If not passed, it does them all
    Returns:
    The number of versions a content object has by filters