java.lang.Object
com.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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ValidationService
public ValidationService()
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)