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

Quick Search    Search Deep

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

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

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

BookXMLService

Creates an Import Data object from an XML file. This service wound up being fairly customer specific and should probably be deprecated. The more general XML asset creation service, which should be used in favor of this one, is the XMLActionDataService.

Configurable Properties in services.config

None

Configurable Properties in Hot Directory Control File

FieldToSplitForSLF: If the value is booktechGenerate, the value for the server is set to be the same as the server value where the XML file resides; the location is generated by appending a number (based on the number contained in the file name) to the HighFileListBase from the hotdirectory control file; and the file name is made by appending .pdf onto the system_segment1 XML field.
Otherwise, if the value is that of an XML tag in the file, the format for the data in that tag must be of the form: http://server/location/filename
Note: Early August emails from the customer confirmed that the full URL wouldn't be provided. That is why the other process was created.
Legal values: booktechGenerate or an XML tag in the file
makeXMLTemp: This is used to inform the service if the XML file itself should be set to TEMP. The default is to set it to TEMP.
Legal values: N or Y

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        
FLAG
PARENT X X X  
CHLDREN X      
ALL X      
TEMP_PARENT X X   X
TEMP_CHILDREN X      
TEMP_ALL X      

More Configurable Properties in roletype_services.config

rlocationX: The "real" location. Numerous settings can be used. Start with X=0.

vlocationX: The "virtual" location to use in place of the "real" location.

rserverX: The "real" server. Numerous settings can be used. Start with X=0.

vserverX: The "virtual" server to use in place of the "real" server.

Input Data Object

com.flexstor.common.importprocessor.ImportData

Output Data Object

com.flexstor.common.importprocessor.ImportResult


Field Summary
private  com.flexstor.ejb.bucket.persist.ServerBucketExtendData[] allBucketExtend
           
(package private) static com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData[] assetArray
           
(package private) static boolean bDefViewDone
           
protected  boolean bMajorFailure
           
protected  boolean bThisIsJitem
           
protected  com.flexstor.flexdbserver.services.ServiceContext context
           
private static java.lang.String ctlUserId
           
(package private) static java.util.Hashtable dataHash
           
(package private) static int iAssets
           
static java.lang.String IDENTIFIER
           
(package private) static int iEntries
           
(package private) static int iLevel
           
(package private) static int iNormalBuckets
           
(package private) static int iPreviousTagLevel
           
(package private) static int iPrevLevel
           
(package private) static int iPrevType
           
(package private) static int iPrimaryParentLevel
           
protected  java.util.Hashtable locations
           
private  com.flexstor.ejb.disguise.persist.ServerDisguiseExtendData myServDisgExtend
           
private static java.util.Date receivedDate
           
private  com.flexstor.common.data.ejb.disguiserecord.DisguiseBucketRecordData refCurrentBucket
           
private  com.flexstor.common.data.ejb.disguiserecord.DisguiseRecordData refDisguiseRecord
           
(package private) static com.flexstor.common.data.ejb.disguiserecord.DisguiseElementRecordData refElement
           
private  com.flexstor.common.importprocessor.ImportData refImportData
           
(package private) static java.lang.String sCurrentTag
           
private static java.lang.String sDisguise
           
private  com.flexstor.common.gateway.SequenceGateway seqGateway
           
protected  java.util.Hashtable servers
           
(package private)  java.lang.String sFlagOut
           
private static java.lang.String sHighFileListBase
           
protected  boolean shouldMakeXMLTemp
           
private static java.lang.String sOurServer
           
(package private) static java.lang.String sPreviousTag
           
(package private) static java.lang.String sPrevValue
           
(package private)  java.lang.String sRoleOut
           
private static java.lang.String sServerLocationFilename
           
private  java.lang.String sThisService
           
(package private)  java.lang.String sTypeOut
           
protected  boolean successful
           
 
Constructor Summary
XMLService()
           
 
Method Summary
(package private)  void BGPDebug(java.lang.String sSomeString)
           
(package private)  com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData createAsset(java.lang.String sAssetRole)
           
(package private)  com.flexstor.common.data.ejb.disguiserecord.DisguiseBucketRecordData createBucket()
           
(package private)  com.flexstor.common.data.ejb.disguiserecord.DisguiseElementRecordData createElement()
           
(package private)  com.flexstor.ejb.bucket.persist.ServerBucketExtendData findBucket(int typeToSearchFor)
          Return the BucketExtendData of the bucket matching a given type
(package private)  com.flexstor.ejb.bucket.persist.ServerBucketExtendData findBucket(java.lang.String sBucketLabel)
          Return the BucketExtendData of the bucket matching a given label
private  long getSequence()
           
 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.
private  void parseXMLfile(java.lang.String pathToFile)
           
 void printHashtable(java.util.Hashtable hTable, java.lang.String sLabel)
           
 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.
(package private)  java.lang.String spaceToSpecial(java.lang.String sSomeString)
           
(package private)  java.lang.String specialToSpace(java.lang.String sSomeString)
           
(package private)  java.lang.String translateLocation(java.lang.String loc)
           
(package private)  java.lang.String translateServer(java.lang.String serv)
           
private  void XMLprocess(org.w3c.dom.Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servers

protected java.util.Hashtable servers

locations

protected java.util.Hashtable locations

IDENTIFIER

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

sThisService

private java.lang.String sThisService

context

protected com.flexstor.flexdbserver.services.ServiceContext context

sRoleOut

java.lang.String sRoleOut

sTypeOut

java.lang.String sTypeOut

sFlagOut

java.lang.String sFlagOut

refImportData

private com.flexstor.common.importprocessor.ImportData refImportData

myServDisgExtend

private com.flexstor.ejb.disguise.persist.ServerDisguiseExtendData myServDisgExtend

refDisguiseRecord

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

refCurrentBucket

private com.flexstor.common.data.ejb.disguiserecord.DisguiseBucketRecordData refCurrentBucket

allBucketExtend

private com.flexstor.ejb.bucket.persist.ServerBucketExtendData[] allBucketExtend

seqGateway

private com.flexstor.common.gateway.SequenceGateway seqGateway

sDisguise

private static java.lang.String sDisguise

sServerLocationFilename

private static java.lang.String sServerLocationFilename

receivedDate

private static java.util.Date receivedDate

ctlUserId

private static java.lang.String ctlUserId

sOurServer

private static java.lang.String sOurServer

sHighFileListBase

private static java.lang.String sHighFileListBase

shouldMakeXMLTemp

protected boolean shouldMakeXMLTemp

bMajorFailure

protected boolean bMajorFailure

bThisIsJitem

protected boolean bThisIsJitem

successful

protected boolean successful

sCurrentTag

static java.lang.String sCurrentTag

sPreviousTag

static java.lang.String sPreviousTag

iLevel

static int iLevel

iEntries

static int iEntries

iNormalBuckets

static int iNormalBuckets

iAssets

static int iAssets

bDefViewDone

static boolean bDefViewDone

iPrimaryParentLevel

static int iPrimaryParentLevel

iPreviousTagLevel

static int iPreviousTagLevel

dataHash

static java.util.Hashtable dataHash

assetArray

static com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData[] assetArray

refElement

static com.flexstor.common.data.ejb.disguiserecord.DisguiseElementRecordData refElement

iPrevLevel

static int iPrevLevel

iPrevType

static int iPrevType

sPrevValue

static java.lang.String sPrevValue
Constructor Detail

XMLService

public XMLService()
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

parseXMLfile

private void parseXMLfile(java.lang.String pathToFile)
                   throws java.io.IOException,
                          org.xml.sax.SAXException

XMLprocess

private void XMLprocess(org.w3c.dom.Node node)

createBucket

com.flexstor.common.data.ejb.disguiserecord.DisguiseBucketRecordData createBucket()

createElement

com.flexstor.common.data.ejb.disguiserecord.DisguiseElementRecordData createElement()

createAsset

com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData createAsset(java.lang.String sAssetRole)

specialToSpace

java.lang.String specialToSpace(java.lang.String sSomeString)

spaceToSpecial

java.lang.String spaceToSpecial(java.lang.String sSomeString)

printHashtable

public void printHashtable(java.util.Hashtable hTable,
                           java.lang.String sLabel)

findBucket

com.flexstor.ejb.bucket.persist.ServerBucketExtendData findBucket(java.lang.String sBucketLabel)
Return the BucketExtendData of the bucket matching a given label


findBucket

com.flexstor.ejb.bucket.persist.ServerBucketExtendData findBucket(int typeToSearchFor)
Return the BucketExtendData of the bucket matching a given type


BGPDebug

void BGPDebug(java.lang.String sSomeString)

translateServer

java.lang.String translateServer(java.lang.String serv)

translateLocation

java.lang.String translateLocation(java.lang.String loc)

getSequence

private long getSequence()