Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.flexdbserver.services.asset
Class ImportMoveService  view ImportMoveService download ImportMoveService.java

java.lang.Object
  extended bycom.flexstor.flexdbserver.services.asset.ImportMoveService
All Implemented Interfaces:
com.flexstor.flexdbserver.services.Service

public class ImportMoveService
extends java.lang.Object
implements com.flexstor.flexdbserver.services.Service

ImportMoveService

Moves files during the import process. This service accepts assets for which the destination location has already been set or can be configured to create the destination path for each asset. See SetDestinationService for configurable properties if you want to create paths.

Configurable Properties in roletype_services.config (or *.ctl file if run as a preservice)
In/Out Properties for Assets
Attribute IN OUT Default IN Default OUT
ROLE     ALL  
Highres X      
Lowres X      
Thumbnail X      
Layout X      
Video X      
Audio X      
TYPE X   ALL  
FLAG
PARENT X   X  
CHLDREN X      
ALL X      
TEMP_PARENT X      
TEMP_CHILDREN X      
TEMP_ALL X      

mode: If the destination paths for the assets have already been defined, set this property to DestinationSet to avoid running the SetDestinationService; otherwise see the SetDestinationService for more possible values.

destinationbase: Path where files will be copied. If ImportMoveService is specified as a preservice in the input control (*.ctl) file and this property is not declared, it will default to either the lowcopybase or highcopybase property (depending on role) in the input control file. If ImportMoveService is not defined as a preservice, this property must be declared.
Legal values: Full path

originalbase: Base path where original files reside. If ImportMoveService is specified as a preservice in the input control file and this property is not declared, it will default to either the lowfilelistbase or highfilelistbase property (depending on role) in the input control file. If ImportMoveService is not defined as a preservice, this property must be declared.
Legal values: Full path

Input Data Object
com.flexstor.common.importprocessor.ImportData

Output Data Object

com.flexstor.common.importprocessor.ImportResult

Programmable Properties (passed inside data object)
Specific Properties (apply to each individual asset)

DestinationLocation: Location where files will be moved.
Set using DisguiseAssetRecordData.addProperty( String key, Object value );
Data type: String
Legal values: Full path to destination directory


Field Summary
protected  com.flexstor.flexdbserver.services.ServiceContext context
           
private  com.flexstor.common.data.ejb.disguiserecord.DisguiseRecordData disguiseRecord
           
protected  java.lang.String fileSeparator
           
protected  int id
           
static java.lang.String IDENTIFIER
           
private  com.flexstor.common.importprocessor.ImportData importData
           
protected  com.flexstor.common.services.ServiceBrokerI serviceBroker
           
private  java.lang.String sThisService
           
 
Constructor Summary
ImportMoveService()
           
 
Method Summary
private  com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData getAsset(com.flexstor.common.data.AssetRecordData record, java.util.Vector vAssetsIn)
           
 com.flexstor.common.data.ActionResult go()
          This methods carries the load of the business logic for the service.
 void initData(com.flexstor.common.data.ActionData actionData)
          A data initialization method called at the beginning of the service.
private  boolean processResult(com.flexstor.common.data.ActionResult result, java.util.Vector vAssetsIn)
           
 void setServiceContext(com.flexstor.flexdbserver.services.ServiceContext context)
          Calls before the service is initialized (before initData is called) to pass information about the environment in which the service is running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values

context

protected com.flexstor.flexdbserver.services.ServiceContext context

serviceBroker

protected com.flexstor.common.services.ServiceBrokerI serviceBroker

id

protected int id

fileSeparator

protected java.lang.String fileSeparator

importData

private com.flexstor.common.importprocessor.ImportData importData

disguiseRecord

private com.flexstor.common.data.ejb.disguiserecord.DisguiseRecordData disguiseRecord

sThisService

private java.lang.String sThisService
Constructor Detail

ImportMoveService

public ImportMoveService()
Method Detail

setServiceContext

public void setServiceContext(com.flexstor.flexdbserver.services.ServiceContext context)
Calls before the service is initialized (before initData is called) to pass information about the environment in which the service is running. This environment consists of information about the properties set for the service in one of these files (services.config, roletype_services.config, or *.ctl), plus methods to access other information such as an instance of the service broker to invoke other services, the transaction id for the service, file separator character and local path for the installation directory and configuration directory.

Specified by:
setServiceContext in interface com.flexstor.flexdbserver.services.Service

initData

public void initData(com.flexstor.common.data.ActionData actionData)
Description copied from interface: com.flexstor.flexdbserver.services.Service
A data initialization method called at the beginning of the service. Not business logic, relevant to the functionality of the service, should be added here, other than initializing some variables, etc.

Specified by:
initData in interface com.flexstor.flexdbserver.services.Service

go

public com.flexstor.common.data.ActionResult go()
Description copied from interface: com.flexstor.flexdbserver.services.Service
This methods carries the load of the business logic for the service.

Specified by:
go in interface com.flexstor.flexdbserver.services.Service

processResult

private boolean processResult(com.flexstor.common.data.ActionResult result,
                              java.util.Vector vAssetsIn)

getAsset

private com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData getAsset(com.flexstor.common.data.AssetRecordData record,
                                                                                     java.util.Vector vAssetsIn)