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

Quick Search    Search Deep

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

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

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

ValidationService

[Description of service]
The following fields can be validated:
filesize, RGB Colour, Format
The parameters for this service are as follows:
validate0..n=[keyword][operator][value]
keyword = colorspace, filesize, format
operator = [.gt.,.lt.,.eq.,.ne.]
value = If filesize, then bytes and any operator can be used.
value = colorspace then only value is rgb with operators of .eq./.ne.
value = format then only ops .eq./.ne. can be used
For Example:
validate0=filesize.lt.8000000
validate1=colorspace.eq.rgb
validate2=format.eq.JPEG
All parameters are validated for each file. All validations must be true.

Configurable Properties in roletype_services.config
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      

See description above for more configurable properties.

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
           
protected  int id
           
static java.lang.String IDENTIFIER
           
protected  com.flexstor.common.importprocessor.ImportData importData
           
protected  com.flexstor.common.importprocessor.ImportCtlData refCtlData
           
private  java.lang.String sThisService
           
protected  java.util.Vector validation
           
 
Constructor Summary
ValidationService()
           
 
Method Summary
private  boolean equalToAny(java.lang.String sAssetValue, java.lang.String sParamValues)
           
 com.flexstor.common.data.ActionResult go()
          Start of the Service
 void initData(com.flexstor.common.data.ActionData data)
          Data initialization method called at the beginning of the service.
private  void moveXMLToRejected(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData tempAsset)
           
 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.
 java.lang.String validate(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData asset)
          This will actually validate the asset.
 
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

id

protected int id

fileSeparator

protected java.lang.String fileSeparator

sThisService

private java.lang.String sThisService

refCtlData

protected com.flexstor.common.importprocessor.ImportCtlData refCtlData

importData

protected com.flexstor.common.importprocessor.ImportData importData

validation

protected java.util.Vector validation
Constructor Detail

ValidationService

public ValidationService()
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 data)
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

validate

public java.lang.String validate(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData asset)
This will actually validate the asset.


equalToAny

private boolean equalToAny(java.lang.String sAssetValue,
                           java.lang.String sParamValues)

moveXMLToRejected

private void moveXMLToRejected(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData tempAsset)