ContentBox Core API 1.6.0

contentbox.model.media
Class CFContentMediaProvider

WEB-INF.cftags.component
        extended by contentbox.model.media.CFContentMediaProvider
All Implemented Interfaces:
IMediaProvider

public class CFContentMediaProvider
extends WEB-INF.cftags.component

******************************************************************************* 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. ******************************************************************************* Deliver file via cfcontent

Property Summary
Type Property & Description Default Serializable Required
 any fileUtils


Attributes:
  • inject = coldbox:plugin:FileUtils
true false
 any log


Attributes:
  • inject = logbox:logger:{this}
true false
 any mediaService


Attributes:
  • inject = mediaService@cb
true false
 
Constructor Summary
init()
          Constructor
 
Method Summary
 any GETFILEUTILS()
          get:
 any GETLOG()
          get:
 any GETMEDIASERVICE()
          get:
 CFContentMediaProvider SETFILEUTILS(any fileUtils)
          set:
 CFContentMediaProvider SETLOG(any log)
          set:
 CFContentMediaProvider SETMEDIASERVICE(any mediaService)
          set:
 any deliverMedia(any mediaPath)
          Deliver the media
 any getDescription()
          Get the description of this provider
 any getDisplayName()
          Get the display name of a provider
 any getName()
          The internal name of the provider
private any getRealMediaPath(any mediaPath)
          *********************************** PRIVATE ********************************************
 boolean mediaExists(any mediaPath)
          Validate if a media requested exists
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Property Detail

fileUtils

any fileUtils

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

log

any log

Attributes:
inject - logbox:logger:{this}
required - false
serializable - true
default -

mediaService

any mediaService

Attributes:
inject - mediaService@cb
required - false
serializable - true
default -

Method Detail

GETFILEUTILS

public any GETFILEUTILS()
get:


GETLOG

public any GETLOG()
get:


GETMEDIASERVICE

public any GETMEDIASERVICE()
get:


SETFILEUTILS

public CFContentMediaProvider SETFILEUTILS(any fileUtils)
set:

Parameters:
fileUtils

SETLOG

public CFContentMediaProvider SETLOG(any log)
set:

Parameters:
log

SETMEDIASERVICE

public CFContentMediaProvider SETMEDIASERVICE(any mediaService)
set:

Parameters:
mediaService

deliverMedia

public any deliverMedia(any mediaPath)
Deliver the media

Specified by:
deliverMedia in interface IMediaProvider
Parameters:
mediaPath - the media path to deliver back to the user

getDescription

public any getDescription()
Get the description of this provider

Specified by:
getDescription in interface IMediaProvider

getDisplayName

public any getDisplayName()
Get the display name of a provider

Specified by:
getDisplayName in interface IMediaProvider

getName

public any getName()
The internal name of the provider

Specified by:
getName in interface IMediaProvider

getRealMediaPath

private any getRealMediaPath(any mediaPath)
*********************************** PRIVATE ********************************************

Parameters:
mediaPath

mediaExists

public boolean mediaExists(any mediaPath)
Validate if a media requested exists

Specified by:
mediaExists in interface IMediaProvider
Parameters:
mediaPath - the media path to verify if it exists

ContentBox Core API 1.6.0