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

Quick Search    Search Deep

com.flexstor.flexdbserver.services.triggers
Class FixNameService  view FixNameService download FixNameService.java

java.lang.Object
  extended bycom.flexstor.flexdbserver.services.triggers.FixNameService
All Implemented Interfaces:
com.flexstor.flexdbserver.services.Service

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

FixNameService

Reads a file (fixname.mappings) containing patterns to search for in OPI file names and patterns to replace them with.

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

Input Data Object

com.flexstor.common.importprocessor.ImportData

Output Data Object

com.flexstor.common.importprocessor.ImportResult


Field Summary
protected  com.flexstor.flexdbserver.services.ServiceContext context
           
protected  java.lang.String fileSeparator
           
 java.lang.String IDENTIFIER
           
private  com.flexstor.common.importprocessor.ImportData importData
           
private static java.util.Hashtable mappings
           
private  int nDisguiseId
           
private  java.lang.String sThisService
           
protected  boolean successful
           
 
Constructor Summary
FixNameService()
           
 
Method Summary
private  boolean fixName(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData anAsset)
          Method to search for strigs in filename and replace them with the mapped strings
private  void getMappings()
          Method to get the mappings of the strings to search with the strings to replace
 com.flexstor.common.data.ActionResult go()
          Start of the Service
 void initData(com.flexstor.common.data.ActionData actionData)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public java.lang.String IDENTIFIER

sThisService

private java.lang.String sThisService

successful

protected boolean successful

mappings

private static java.util.Hashtable mappings

importData

private com.flexstor.common.importprocessor.ImportData importData

nDisguiseId

private int nDisguiseId

context

protected com.flexstor.flexdbserver.services.ServiceContext context

fileSeparator

protected java.lang.String fileSeparator
Constructor Detail

FixNameService

public FixNameService()
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)
Data initialization method called at the beginning of the service.

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

go

public com.flexstor.common.data.ActionResult go()
Start of the Service

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

getMappings

private void getMappings()
                  throws com.flexstor.common.util.PropertyMapperException,
                         java.io.IOException
Method to get the mappings of the strings to search with the strings to replace


fixName

private boolean fixName(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData anAsset)
Method to search for strigs in filename and replace them with the mapped strings