ContentBox Core API 1.6.0

contentbox.model.importers
Class ContentBoxImporter

WEB-INF.cftags.component
        extended by contentbox.model.importers.ContentBoxImporter

public class ContentBoxImporter
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. ******************************************************************************* Import a .cbox package into contentbox

Property Summary
Type Property & Description Default Serializable Required
 any ContentBoxPackagePath


Attributes:
true false
 any authorService


Attributes:
  • inject = id:authorService@cb
true false
 any categoryService


Attributes:
  • inject = id:categoryService@cb
true false
 any contentStoreService


Attributes:
  • inject = id:contentStoreService@cb
true false
 any entryService


Attributes:
  • inject = id:entryService@cb
true false
 array fileNames


Attributes:
true false
 any fileUtils


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


Attributes:
  • inject = id:layoutService@cb
true false
 any log


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


Attributes:
  • inject = id:moduleService@cb
true false
 any moduleSettings


Attributes:
  • inject = coldbox:setting:modules
true false
 any pageService


Attributes:
  • inject = id:pageService@cb
true false
 any permissionService


Attributes:
  • inject = id:permissionService@cb
true false
 any roleService


Attributes:
  • inject = id:roleService@cb
true false
 any securityRuleService


Attributes:
  • inject = id:securityRuleService@cb
true false
 any securityService


Attributes:
  • inject = id:securityService@cb
true false
 any settingService


Attributes:
  • inject = id:settingService@cb
true false
 any templateService


Attributes:
  • inject = id:emailtemplateService@cb
true false
 any widgetService


Attributes:
  • inject = id:widgetService@cb
true false
 any zipUtil


Attributes:
  • inject = zipUtil@cb
true false
 
Constructor Summary
init()
          Constructor
 
Method Summary
 any GETAUTHORSERVICE()
 any GETCATEGORYSERVICE()
 any GETCONTENTBOXPACKAGEPATH()
 any GETCONTENTSTORESERVICE()
 any GETENTRYSERVICE()
 array GETFILENAMES()
 any GETFILEUTILS()
 any GETLAYOUTSERVICE()
 any GETLOG()
 any GETMODULESERVICE()
 any GETMODULESETTINGS()
 any GETPAGESERVICE()
 any GETPERMISSIONSERVICE()
 any GETROLESERVICE()
 any GETSECURITYRULESERVICE()
 any GETSECURITYSERVICE()
 any GETSETTINGSERVICE()
 any GETTEMPLATESERVICE()
 any GETWIDGETSERVICE()
 any GETZIPUTIL()
 ContentBoxImporter SETAUTHORSERVICE(any authorService)
 ContentBoxImporter SETCATEGORYSERVICE(any categoryService)
 ContentBoxImporter SETCONTENTBOXPACKAGEPATH(any ContentBoxPackagePath)
 ContentBoxImporter SETCONTENTSTORESERVICE(any contentStoreService)
 ContentBoxImporter SETENTRYSERVICE(any entryService)
 ContentBoxImporter SETFILENAMES(array fileNames)
 ContentBoxImporter SETFILEUTILS(any fileUtils)
 ContentBoxImporter SETLAYOUTSERVICE(any layoutService)
 ContentBoxImporter SETLOG(any log)
 ContentBoxImporter SETMODULESERVICE(any moduleService)
 ContentBoxImporter SETMODULESETTINGS(any moduleSettings)
 ContentBoxImporter SETPAGESERVICE(any pageService)
 ContentBoxImporter SETPERMISSIONSERVICE(any permissionService)
 ContentBoxImporter SETROLESERVICE(any roleService)
 ContentBoxImporter SETSECURITYRULESERVICE(any securityRuleService)
 ContentBoxImporter SETSECURITYSERVICE(any securityService)
 ContentBoxImporter SETSETTINGSERVICE(any settingService)
 ContentBoxImporter SETTEMPLATESERVICE(any templateService)
 ContentBoxImporter SETWIDGETSERVICE(any widgetService)
 ContentBoxImporter SETZIPUTIL(any zipUtil)
 string execute(boolean overrideContent='false')
          Main method for processing import
 any getDescriptorContents(boolean asObject='false')
          Retrieves contents of descriptor file
private boolean hasFile(string fileName)
          Determines if passed file name exists in zip collection
 boolean isValid()
          Method which analyzes the uploaded package and determines whether or not the descriptor file documents what is being uploaded
 void setup(any importFile)
          Setup method to configure service
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Property Detail

ContentBoxPackagePath

any ContentBoxPackagePath

Attributes:
default -
serializable - true
required - false

authorService

any authorService

Attributes:
inject - id:authorService@cb
required - false
serializable - true
default -

categoryService

any categoryService

Attributes:
inject - id:categoryService@cb
required - false
serializable - true
default -

contentStoreService

any contentStoreService

Attributes:
inject - id:contentStoreService@cb
required - false
serializable - true
default -

entryService

any entryService

Attributes:
inject - id:entryService@cb
required - false
serializable - true
default -

fileNames

array fileNames

Attributes:
default -
serializable - true
required - false

fileUtils

any fileUtils

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

layoutService

any layoutService

Attributes:
inject - id:layoutService@cb
required - false
serializable - true
default -

log

any log

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

moduleService

any moduleService

Attributes:
inject - id:moduleService@cb
required - false
serializable - true
default -

moduleSettings

any moduleSettings

Attributes:
inject - coldbox:setting:modules
required - false
serializable - true
default -

pageService

any pageService

Attributes:
inject - id:pageService@cb
required - false
serializable - true
default -

permissionService

any permissionService

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

roleService

any roleService

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

securityRuleService

any securityRuleService

Attributes:
inject - id:securityRuleService@cb
required - false
serializable - true
default -

securityService

any securityService

Attributes:
inject - id:securityService@cb
required - false
serializable - true
default -

settingService

any settingService

Attributes:
inject - id:settingService@cb
required - false
serializable - true
default -

templateService

any templateService

Attributes:
inject - id:emailtemplateService@cb
required - false
serializable - true
default -

widgetService

any widgetService

Attributes:
inject - id:widgetService@cb
required - false
serializable - true
default -

zipUtil

any zipUtil

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

Method Detail

GETAUTHORSERVICE

public any GETAUTHORSERVICE()


GETCATEGORYSERVICE

public any GETCATEGORYSERVICE()


GETCONTENTBOXPACKAGEPATH

public any GETCONTENTBOXPACKAGEPATH()


GETCONTENTSTORESERVICE

public any GETCONTENTSTORESERVICE()


GETENTRYSERVICE

public any GETENTRYSERVICE()


GETFILENAMES

public array GETFILENAMES()


GETFILEUTILS

public any GETFILEUTILS()


GETLAYOUTSERVICE

public any GETLAYOUTSERVICE()


GETLOG

public any GETLOG()


GETMODULESERVICE

public any GETMODULESERVICE()


GETMODULESETTINGS

public any GETMODULESETTINGS()


GETPAGESERVICE

public any GETPAGESERVICE()


GETPERMISSIONSERVICE

public any GETPERMISSIONSERVICE()


GETROLESERVICE

public any GETROLESERVICE()


GETSECURITYRULESERVICE

public any GETSECURITYRULESERVICE()


GETSECURITYSERVICE

public any GETSECURITYSERVICE()


GETSETTINGSERVICE

public any GETSETTINGSERVICE()


GETTEMPLATESERVICE

public any GETTEMPLATESERVICE()


GETWIDGETSERVICE

public any GETWIDGETSERVICE()


GETZIPUTIL

public any GETZIPUTIL()


SETAUTHORSERVICE

public ContentBoxImporter SETAUTHORSERVICE(any authorService)

Parameters:
authorService

SETCATEGORYSERVICE

public ContentBoxImporter SETCATEGORYSERVICE(any categoryService)

Parameters:
categoryService

SETCONTENTBOXPACKAGEPATH

public ContentBoxImporter SETCONTENTBOXPACKAGEPATH(any ContentBoxPackagePath)

Parameters:
ContentBoxPackagePath

SETCONTENTSTORESERVICE

public ContentBoxImporter SETCONTENTSTORESERVICE(any contentStoreService)

Parameters:
contentStoreService

SETENTRYSERVICE

public ContentBoxImporter SETENTRYSERVICE(any entryService)

Parameters:
entryService

SETFILENAMES

public ContentBoxImporter SETFILENAMES(array fileNames)

Parameters:
fileNames

SETFILEUTILS

public ContentBoxImporter SETFILEUTILS(any fileUtils)

Parameters:
fileUtils

SETLAYOUTSERVICE

public ContentBoxImporter SETLAYOUTSERVICE(any layoutService)

Parameters:
layoutService

SETLOG

public ContentBoxImporter SETLOG(any log)

Parameters:
log

SETMODULESERVICE

public ContentBoxImporter SETMODULESERVICE(any moduleService)

Parameters:
moduleService

SETMODULESETTINGS

public ContentBoxImporter SETMODULESETTINGS(any moduleSettings)

Parameters:
moduleSettings

SETPAGESERVICE

public ContentBoxImporter SETPAGESERVICE(any pageService)

Parameters:
pageService

SETPERMISSIONSERVICE

public ContentBoxImporter SETPERMISSIONSERVICE(any permissionService)

Parameters:
permissionService

SETROLESERVICE

public ContentBoxImporter SETROLESERVICE(any roleService)

Parameters:
roleService

SETSECURITYRULESERVICE

public ContentBoxImporter SETSECURITYRULESERVICE(any securityRuleService)

Parameters:
securityRuleService

SETSECURITYSERVICE

public ContentBoxImporter SETSECURITYSERVICE(any securityService)

Parameters:
securityService

SETSETTINGSERVICE

public ContentBoxImporter SETSETTINGSERVICE(any settingService)

Parameters:
settingService

SETTEMPLATESERVICE

public ContentBoxImporter SETTEMPLATESERVICE(any templateService)

Parameters:
templateService

SETWIDGETSERVICE

public ContentBoxImporter SETWIDGETSERVICE(any widgetService)

Parameters:
widgetService

SETZIPUTIL

public ContentBoxImporter SETZIPUTIL(any zipUtil)

Parameters:
zipUtil

execute

public string execute(boolean overrideContent='false')
Main method for processing import

Parameters:
overrideContent - Whether or not to override existing content with uploaded data (default=false)

getDescriptorContents

public any getDescriptorContents(boolean asObject='false')
Retrieves contents of descriptor file

Parameters:
asObject

hasFile

private boolean hasFile(string fileName)
Determines if passed file name exists in zip collection

Parameters:
fileName - The file name to validate

isValid

public boolean isValid()
Method which analyzes the uploaded package and determines whether or not the descriptor file documents what is being uploaded


setup

public void setup(any importFile)
Setup method to configure service

Parameters:
importFile - The uploaded .cbox package

ContentBox Core API 1.6.0