biz.c24.io.api.data.swift
Class SwiftFieldDataType

java.lang.Object
  extended by biz.c24.io.api.data.DataType
      extended by biz.c24.io.api.data.ComplexDataType
          extended by biz.c24.io.api.data.swift.SwiftFieldDataType
All Implemented Interfaces:
ModelComponent, Serializable

public class SwiftFieldDataType
extends ComplexDataType

A type representing a S.W.I.F.T field.

Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.

See Also:
Serialized Form

Nested Class Summary
 class SwiftFieldDataType.QualifiedRestrictionMap
          A S.W.I.F.T. specific restriction to ensure the enumeration of a particular subfield is restricted when a certain qualifier, option and data source scheme combination are present.
 
Field Summary
static String IO_SWIFT_SUPRESSWARNINGS
          Deprecated. Use Utils.SYSTEM_PROPERTY_SUPPRESS_SWIFT_WARNINGS instead.
 
Fields inherited from class biz.c24.io.api.data.DataType
duringParsing, hasEnumerations, hasPatternMatching, qualifierValidation
 
Constructor Summary
SwiftFieldDataType()
          Create a new instance.
 
Method Summary
 void addQualifiedRestrictionMap(String qualifier, DataComponent[] options, boolean dssPresent, int[] dssRestrictionMap, String subfieldName, int[] restrictionMap)
          Add a restriction map, which operates when qualifier is matched in one of options, dssPresent equals the presence of the data source scheme, and if present the data source scheme value matches an item in dssRestrictionMap.
static Enumeration getAllowedQualifiers(ComplexDataObject swiftField, SimpleDataType simpleDataType)
           
 String getDataSourceSchemeFieldName()
          Returns the name of the SWIFT data source scheme field.
 SwiftFieldDataType.QualifiedRestrictionMap getQualifiedRestrictionMap(int index)
          Returns the restriction map at index.
 int getQualifiedRestrictionMapCount()
          Returns the number of restriction maps which have been added to this field.
 String getQualifierFieldName()
          Returns the name of the SWIFT qualifier field.
static Enumeration getSpecificRestrictions(ComplexDataObject swiftField, SimpleDataType subfieldType)
          Returns a restricted enumeration containing the specific values which must be matched by an object of type subfieldType inside swiftField.
 void removeQualifiedRestrictionMap(int index)
          Removes the restriction map at index.
 void setDataSourceSchemeFieldName(String dataSourceSchemeFieldName)
          Sets the name of the SWIFT data source scheme field.
 void setQualifierFieldName(String qualifierFieldName)
          Sets the name of the SWIFT qualifier field.
 boolean validateProperties(Object object, DataComponent comp, ComplexDataObject context, ValidationManager manager)
           
 
Methods inherited from class biz.c24.io.api.data.ComplexDataType
addAttrDecl, addElementDecl, addIdGeneratorParameter, containsAttrDecl, containsElementDecl, createObject, getAlignToBorder, getAttrDecl, getAttrDecl, getAttrDeclCount, getAttrDeclIndex, getBaseType, getBitMap, getBlock, getChildSequenceColumnName, getContentModel, getContentType, getDelimiter, getDelimiterFieldWrapper, getDelimiterLocation, getElementDecl, getElementDecl, getElementDeclCount, getElementDeclIndex, getFinal, getFormatType, getIdGenerator, getIdGeneratorParameterIndex, getIdGeneratorParameters, getNativeAttrDecl, getNativeAttrDeclCount, getNativeAttrDeclIndex, getNativeElementDecl, getNativeElementDeclCount, getNativeElementDeclIndex, getOrderingType, getValidObjectClass, isAbstract, isAttributeGroup, isCollated, isComplex, isDelimiterPlaceholder, isElementGroup, isExcludeFromDatabase, isExtension, isMixed, isProcessAsBatch, isRestriction, isSimple, isUrType, lookupExpectedElement, removeAttrDecl, removeAttrDecl, removeElementDecl, removeElementDecl, removeIdGeneratorParameter, setAbstract, setAlignToBorder, setAttributeGroup, setBaseType, setBitMap, setBlock, setChildSequenceColumnName, setCollated, setContentModel, setContentType, setDelimiter, setDelimiterFieldWrapper, setDelimiterLocation, setDelimiterPlaceholder, setElementGroup, setExcludeFromDatabase, setExtension, setFinal, setFormatType, setIdGenerator, setIdGeneratorParameterAt, setMixed, setOrderingType, setProcessAsBatch, setRestriction, setUrType, setValidObjectClass
 
Methods inherited from class biz.c24.io.api.data.DataType
addDerivedType, addValidator, addValidator, derivedTypeKeySet, getAnnotation, getDatabaseColumnName, getDerivedType, getDerivedType, getDerivedTypes, getDescription, getEnumeration, getInitiator, getModel, getName, getNullDefiningElementDecl, getOriginalName, getOriginalPatternMatch, getPatternMatch, getPatternType, getTerminator, getValidator, getValidatorCount, getValidatorIndex, hasDerivedTypes, isLocal, isValidObjectClass, removeDerivedType, removeValidator, setAnnotation, setDatabaseColumnName, setInitiator, setLocal, setModel, setName, setOriginalName, setOriginalPatternMatch, setPatternMatch, setPatternType, setTerminator, toString, validate, validateProperties, validateProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IO_SWIFT_SUPRESSWARNINGS

public static final String IO_SWIFT_SUPRESSWARNINGS
Deprecated. Use Utils.SYSTEM_PROPERTY_SUPPRESS_SWIFT_WARNINGS instead.
The System property key which should be set to the value "true" to supress warnings created when errors occur validating SWIFT fields.

See Also:
Constant Field Values
Constructor Detail

SwiftFieldDataType

public SwiftFieldDataType()
Create a new instance.

Method Detail

getDataSourceSchemeFieldName

public String getDataSourceSchemeFieldName()
Returns the name of the SWIFT data source scheme field.

Returns:
The SWIFT data source scheme field name.

setDataSourceSchemeFieldName

public void setDataSourceSchemeFieldName(String dataSourceSchemeFieldName)
Sets the name of the SWIFT data source scheme field.

Parameters:
dataSourceSchemeFieldName - The SWIFT data source scheme field name.

getQualifierFieldName

public String getQualifierFieldName()
Returns the name of the SWIFT qualifier field.

Returns:
The SWIFT qualifier field name.

setQualifierFieldName

public void setQualifierFieldName(String qualifierFieldName)
Sets the name of the SWIFT qualifier field.

Parameters:
qualifierFieldName - The SWIFT qualifier field name.

addQualifiedRestrictionMap

public void addQualifiedRestrictionMap(String qualifier,
                                       DataComponent[] options,
                                       boolean dssPresent,
                                       int[] dssRestrictionMap,
                                       String subfieldName,
                                       int[] restrictionMap)
Add a restriction map, which operates when qualifier is matched in one of options, dssPresent equals the presence of the data source scheme, and if present the data source scheme value matches an item in dssRestrictionMap.

Parameters:
qualifier - The value of the qualifier to match.
options - The array of options to match.
dssPresent - The presence of the data source scheme to match.
dssRestrictionMap - The restriction map to apply to the data source scheme. May be null.
subfieldName - The index of the subfield to be restricted.
restrictionMap - The restriction map to apply to the designated subfield.

removeQualifiedRestrictionMap

public void removeQualifiedRestrictionMap(int index)
Removes the restriction map at index.

Parameters:
index - The index of the map to be removed.

getQualifiedRestrictionMapCount

public int getQualifiedRestrictionMapCount()
Returns the number of restriction maps which have been added to this field.

Returns:
The count.

getQualifiedRestrictionMap

public SwiftFieldDataType.QualifiedRestrictionMap getQualifiedRestrictionMap(int index)
Returns the restriction map at index.

Parameters:
index - The index of the map to return.
Returns:
The map.

getAllowedQualifiers

public static Enumeration getAllowedQualifiers(ComplexDataObject swiftField,
                                               SimpleDataType simpleDataType)

getSpecificRestrictions

public static Enumeration getSpecificRestrictions(ComplexDataObject swiftField,
                                                  SimpleDataType subfieldType)
Returns a restricted enumeration containing the specific values which must be matched by an object of type subfieldType inside swiftField.

The restrictions applied will be drawn from the qualified restriction maps present on this type and the values of the qualifier and data source scheme inside swiftField.

Parameters:
swiftField - The field to examine.
subfieldType - The type of the subfield to find.
Returns:
A restricted enumeration or the full enumeration of subfieldType if no specialisations exist (this will be null if subfieldType does not contain an enumeration).
Throws:
IllegalArgumentException - If the type of swiftField is not an instance of this class.

validateProperties

public boolean validateProperties(Object object,
                                  DataComponent comp,
                                  ComplexDataObject context,
                                  ValidationManager manager)
                           throws ValidationException
Overrides:
validateProperties in class ComplexDataType
Throws:
ValidationException


C24 Technologies © 2002-2012: All Rights Reserved.