Skip navigation links


org.identityconnectors.flatfile.extension
Class FlatFileSchema

java.lang.Object
  extended by org.identityconnectors.flatfile.extension.FlatFileSchema


public class FlatFileSchema
extends java.lang.Object

Represents the properties that are mentioned in the schema properties file


Constructor Summary
FlatFileSchema(java.lang.String schemaFileName)
           

 

Method Summary
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Boolean>> getBooleanMapping()
          Returns the mapping for boolean attributes
 java.util.Map<java.lang.String,java.lang.Boolean> getBooleanMapping(java.lang.String field)
          Get boolean-string mapping for a particular field
 java.util.List<java.lang.String> getComplexMandatoryAttributes()
          Returns the list of mandatory attributes that are of complex type ie., Multivalued fields with sub-fields
 java.util.Map<java.lang.String,java.lang.String> getDataType()
          Gets the data types of all fields as a map
 java.lang.String getDataType(java.lang.String fieldName)
          Gets the data type of a given field
 java.lang.String getDateFormat()
          Gets the date format used in the flat file
 java.util.Map<java.lang.String,java.lang.String> getEmbeddedObjClassMap()
          Gets the embedded object classes of all fields as a map
 java.lang.String getEmbeddedObjectClass(java.lang.String fieldName)
          Gets the embedded object class for a given field
 java.util.List<java.lang.String> getFieldNames()
           
 java.util.List<java.lang.String> getMandatoryAttrs()
          Gets the list of mandatory attributes
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMultiValueFields()
          Gets all the multi-valued fields along with sub-fields as a map
 java.lang.String getNameAttribute()
          Gets the Name attribute
 org.identityconnectors.framework.common.objects.Schema getSchema()
          Constructs and returns the schema of the flat file by reading the header of the flat file
 java.lang.String getSchemaFileName()
          Gets the name of the flat file schema file
 java.util.Properties getSchemaProps()
          Gets the schema file loaded as a java properties object
 java.util.List<java.lang.String> getSimpleMandatoryAttributes()
          Returns the list of mandatory attributes that are single-valued and multi-valued without sub-fields
 java.lang.String getStatusAttribute()
          Gets the status attribute name
 java.util.List<java.lang.String> getSubFields(java.lang.String fieldName)
          Gets the sub-fields of a given field
 java.lang.String getUidAttribute()
          Gets the Uid attribute
 boolean isMandatory(java.lang.String fieldName)
          Checks if the given field is mandatory field or not
 boolean isMultiValueField(java.lang.String fieldName)
          Checks if the field is multi-valued or not
 void setBooleanMapping(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Boolean>> booleanMapping)
          Sets the mapping for boolean attributes
 void setDataType(java.util.Map<java.lang.String,java.lang.String> dataType)
           
 void setDateFormat(java.lang.String dateFormat)
           
 void setEmbeddedObjClassMap(java.util.Map<java.lang.String,java.lang.String> embeddedObjClassMap)
           
 void setFieldNames(java.util.List<java.lang.String> fieldNames)
           
 void setMandatoryAttrs(java.util.List<java.lang.String> mandatoryAttrs)
           
 void setMultiValueFields(java.util.Map<java.lang.String,java.util.List<java.lang.String>> multiValueFields)
           
 void setNameAttribute(java.lang.String nameAttribute)
           
 void setSchemaFileName(java.lang.String schemaFileName)
           
 void setSchemaProps(java.util.Properties schemaProps)
           
 void setStatusAttribute(java.lang.String statusAttribute)
          Sets the status attribute name
 void setUidAttribute(java.lang.String uidAttribute)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

FlatFileSchema

public FlatFileSchema(java.lang.String schemaFileName)

Method Detail

getSchema

public org.identityconnectors.framework.common.objects.Schema getSchema()
Constructs and returns the schema of the flat file by reading the header of the flat file
Parameters:
cfg - the Flat File Configuration object which contain all information for reading header from flat file
Returns:
the Schema of the flat file

getSchemaFileName

public java.lang.String getSchemaFileName()
Gets the name of the flat file schema file
Returns:
the schemaFileName

setSchemaFileName

public void setSchemaFileName(java.lang.String schemaFileName)
Parameters:
cfg - the schemaFileName to set

getFieldNames

public java.util.List<java.lang.String> getFieldNames()
Returns:
the fieldNames

setFieldNames

public void setFieldNames(java.util.List<java.lang.String> fieldNames)
Parameters:
fieldNames - the fieldNames to set

getEmbeddedObjClassMap

public java.util.Map<java.lang.String,java.lang.String> getEmbeddedObjClassMap()
Gets the embedded object classes of all fields as a map
Returns:
the embeddedObjClassMap

setEmbeddedObjClassMap

public void setEmbeddedObjClassMap(java.util.Map<java.lang.String,java.lang.String> embeddedObjClassMap)
Parameters:
embeddedObjClassMap - the embeddedObjClassMap to set

getUidAttribute

public java.lang.String getUidAttribute()
Gets the Uid attribute
Returns:
the uidAttribute

setUidAttribute

public void setUidAttribute(java.lang.String uidAttribute)
Parameters:
uidAttribute - the uidAttribute to set

getNameAttribute

public java.lang.String getNameAttribute()
Gets the Name attribute
Returns:
the nameAttribute

setNameAttribute

public void setNameAttribute(java.lang.String nameAttribute)
Parameters:
nameAttribute - the nameAttribute to set

getStatusAttribute

public java.lang.String getStatusAttribute()
Gets the status attribute name
Returns:

setStatusAttribute

public void setStatusAttribute(java.lang.String statusAttribute)
Sets the status attribute name
Parameters:
statusAttribute -

getBooleanMapping

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Boolean>> getBooleanMapping()
Returns the mapping for boolean attributes
Returns:

setBooleanMapping

public void setBooleanMapping(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Boolean>> booleanMapping)
Sets the mapping for boolean attributes
Parameters:
booleanMapping -

getBooleanMapping

public java.util.Map<java.lang.String,java.lang.Boolean> getBooleanMapping(java.lang.String field)
Get boolean-string mapping for a particular field
Parameters:
field -
Returns:

getMultiValueFields

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMultiValueFields()
Gets all the multi-valued fields along with sub-fields as a map
Returns:
the multiValueFields

setMultiValueFields

public void setMultiValueFields(java.util.Map<java.lang.String,java.util.List<java.lang.String>> multiValueFields)
Parameters:
multiValueFields - the multiValueFields to set

getSchemaProps

public java.util.Properties getSchemaProps()
Gets the schema file loaded as a java properties object
Returns:
the schemaProps

setSchemaProps

public void setSchemaProps(java.util.Properties schemaProps)
Parameters:
schemaProps - the schemaProps to set

getMandatoryAttrs

public java.util.List<java.lang.String> getMandatoryAttrs()
Gets the list of mandatory attributes
Returns:
the mandatoryAttrs

setMandatoryAttrs

public void setMandatoryAttrs(java.util.List<java.lang.String> mandatoryAttrs)
Parameters:
mandatoryAttrs - the mandatoryAttrs to set

getDataType

public java.util.Map<java.lang.String,java.lang.String> getDataType()
Gets the data types of all fields as a map
Returns:
the dataType map

getDataType

public java.lang.String getDataType(java.lang.String fieldName)
Gets the data type of a given field
Parameters:
fieldname - name of the field
Returns:
the dataType of the field

setDataType

public void setDataType(java.util.Map<java.lang.String,java.lang.String> dataType)
Parameters:
dataType - the dataType to set

getDateFormat

public java.lang.String getDateFormat()
Gets the date format used in the flat file
Returns:
the dateFormat if mentioned in schema file, else null

setDateFormat

public void setDateFormat(java.lang.String dateFormat)
Parameters:
dateFormat - the dateFormat to set

isMultiValueField

public boolean isMultiValueField(java.lang.String fieldName)
Checks if the field is multi-valued or not
Parameters:
fieldName - the name of the field
Returns:
true, if field is multi-valued, else false

getSubFields

public java.util.List<java.lang.String> getSubFields(java.lang.String fieldName)
Gets the sub-fields of a given field
Parameters:
fieldName - name of the field
Returns:
list of sub-fields of the field or null if it has no sub-fields

getEmbeddedObjectClass

public java.lang.String getEmbeddedObjectClass(java.lang.String fieldName)
Gets the embedded object class for a given field
Parameters:
fieldName - name of the field
Returns:
embedded object class name for a given field

isMandatory

public boolean isMandatory(java.lang.String fieldName)
Checks if the given field is mandatory field or not
Parameters:
fieldName - name of the field
Returns:
true, if field is mandatory, else false

getComplexMandatoryAttributes

public java.util.List<java.lang.String> getComplexMandatoryAttributes()
Returns the list of mandatory attributes that are of complex type ie., Multivalued fields with sub-fields
Returns:

getSimpleMandatoryAttributes

public java.util.List<java.lang.String> getSimpleMandatoryAttributes()
Returns the list of mandatory attributes that are single-valued and multi-valued without sub-fields
Returns:

Skip navigation links


Copyright © 2014, Oracle and/or its affiliates. All rights reserved.