contentbox.model.security

Class AuthorService

railo-context.Component
        extended by coldbox.system.orm.hibernate.BaseORMService
            extended by coldbox.system.orm.hibernate.VirtualEntityService
                extended by contentbox.model.security.AuthorService
Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  

    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. Service to handle auhtor operations.

    Property Summary
    type property default serializable required
    any hashType


    true false
    any permissionService


    • inject = permissionService@cb
    true false
    any populator


    • inject = wirebox:populator
    true false
    any roleService


    • inject = roleService@cb
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    array getAllForExport()
         Get all data prepared for export.
    string getHashType()
    string getPermissionService()
    string getPopulator()
    string getRoleService()
    string importFromData(any importData, [boolean override='false'], [any importLog])
         Import data from an array of structures of authors or just one structure of author.
    string importFromFile(any importFile, [boolean override='false'])
         Import data from a ContentBox JSON file.
    any saveAuthor([any author], [boolean passwordChange='false'], [boolean transactional='true'])
         Save an author with extra pizazz!.
    any search([string searchTerm=''], [string isActive], [string role], [numeric max='0'], [numeric offset='0'], [boolean asQuery='false'], [string sortOrder='lastName'])
         Author search by name, email or username.
    any setHashType(any hashType)
    any setPermissionService(any permissionService)
    any setPopulator(any populator)
    any setRoleService(any roleService)
    boolean usernameFound(any username)
         Username checks for authors.
     
    Methods inherited from class coldbox.system.orm.hibernate.VirtualEntityService
    clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getAll, getDatasource, getEntityName, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod, setDatasource, setEntityName
     
    Methods inherited from class coldbox.system.orm.hibernate.BaseORMService
    $delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getDefaultAsQuery, getEntityGivenName, getEventHandling, getHQLDynamicCache, getORM, getORMEventHandler, getQueryCacheRegion, getRestrictions, getUseQueryCaching, getUseTransactions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains, setDefaultAsQuery, setEventHandling, setHQLDynamicCache, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    hashType

    property any hashType

    Attributes:
    required - false
    serializable - true

    permissionService

    property any permissionService

    Attributes:
    required - false
    inject - permissionService@cb
    serializable - true

    populator

    property any populator

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

    roleService

    property any roleService

    Attributes:
    required - false
    inject - roleService@cb
    serializable - true

    Method Detail

    getAllForExport

    public array getAllForExport()

    Get all data prepared for export


    getHashType

    public string getHashType()


    getPermissionService

    public string getPermissionService()


    getPopulator

    public string getPopulator()


    getRoleService

    public string getRoleService()


    importFromData

    public string importFromData(any importData, [boolean override='false'], [any importLog])

    Import data from an array of structures of authors or just one structure of author

    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

    saveAuthor

    public any saveAuthor([any author], [boolean passwordChange='false'], [boolean transactional='true'])

    Save an author with extra pizazz!

    Parameters:
    author
    passwordChange
    transactional

    search

    public any search([string searchTerm=''], [string isActive], [string role], [numeric max='0'], [numeric offset='0'], [boolean asQuery='false'], [string sortOrder='lastName'])

    Author search by name, email or username

    Parameters:
    searchTerm - Search in firstname, lastname and email fields
    isActive - Search with active bit
    role - Apply a role filter
    max - The max returned objects
    offset - The offset for pagination
    asQuery - Query or objects
    sortOrder - The sort order to apply

    setHashType

    public any setHashType(any hashType)

    Parameters:
    hashType

    setPermissionService

    public any setPermissionService(any permissionService)

    Parameters:
    permissionService

    setPopulator

    public any setPopulator(any populator)

    Parameters:
    populator

    setRoleService

    public any setRoleService(any roleService)

    Parameters:
    roleService

    usernameFound

    public boolean usernameFound(any username)

    Username checks for authors

    Parameters:
    username