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

Quick Search    Search Deep

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

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

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

ImportCopyService

Provides functionality to copy files during the import process.

Configurable Properties in roletype_services.config
In/Out Properties for Assets
Attribute IN OUT Default IN Default OUT
ROLE     ALL ALL
Highres X X    
Lowres X X    
Thumbnail X X    
Layout X X    
Video X X    
Audio X X    
TYPE X X ALL ALL
FLAG
PARENT X X X X
CHLDREN X X    
ALL X X    
TEMP_PARENT X X    
TEMP_CHILDREN X X    
TEMP_ALL X X    

copyflat: Indicates if the source file must be copied into the destination location, duplicating the source path under the destination. For instance, if set to true, then the file /path/to/file will be copied in /dest/ as /dest/path/to/file; otherwise, it will be copied as /dest/file (optional; defaults to true).
Legal values: true or false

destination: Path where files will be copied. If ImportCopyService 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 ImportCopyService 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


Field Summary
private  boolean bFromPreservice
           
private  boolean bInputOutputSame
           
protected  com.flexstor.flexdbserver.services.ServiceContext context
           
protected  java.lang.String fileSeparator
           
protected  int id
           
static java.lang.String IDENTIFIER
           
protected  com.flexstor.common.importprocessor.ImportCtlData refCtlData
           
protected  com.flexstor.common.importprocessor.ImportData refImportData
           
private  java.lang.String sServer
           
private  java.lang.String sThisService
           
 
Constructor Summary
ImportCopyService()
           
 
Method Summary
protected  java.lang.String buildCompositeDir(java.lang.String sLocation, java.lang.String sRootPath, java.lang.String sListBasePath)
          Build up the directory from the element & root paths specified.
private  java.lang.String createOutputPath(java.lang.String sInputPath, int nRoleId)
           
private  int getRoleId(java.lang.String sRole)
           
 com.flexstor.common.data.ActionResult go()
          The start of the Copy Service.
 void initData(com.flexstor.common.data.ActionData actionData)
          A data initialization method called at the beginning of the service.
 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.
private  void storeNewLocation(java.lang.String sOutputPath, com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData assetOut, com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData assetIn)
           
 
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

refImportData

protected com.flexstor.common.importprocessor.ImportData refImportData

refCtlData

protected com.flexstor.common.importprocessor.ImportCtlData refCtlData

context

protected com.flexstor.flexdbserver.services.ServiceContext context

id

protected int id

fileSeparator

protected java.lang.String fileSeparator

sThisService

private java.lang.String sThisService

sServer

private java.lang.String sServer

bFromPreservice

private boolean bFromPreservice

bInputOutputSame

private boolean bInputOutputSame
Constructor Detail

ImportCopyService

public ImportCopyService()
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)
A data initialization method called at the beginning of the service. The input argument, ActionData must be cast into its subclass, ImportData in order to extract the CopyService specific data from it.

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

go

public com.flexstor.common.data.ActionResult go()
The start of the Copy Service.

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

createOutputPath

private java.lang.String createOutputPath(java.lang.String sInputPath,
                                          int nRoleId)

buildCompositeDir

protected java.lang.String buildCompositeDir(java.lang.String sLocation,
                                             java.lang.String sRootPath,
                                             java.lang.String sListBasePath)
Build up the directory from the element & root paths specified.


getRoleId

private int getRoleId(java.lang.String sRole)

storeNewLocation

private void storeNewLocation(java.lang.String sOutputPath,
                              com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData assetOut,
                              com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData assetIn)