org.identityconnectors.flatfile
Class FlatFileConfiguration

java.lang.Object
  extended by org.identityconnectors.framework.spi.AbstractConfiguration
      extended by org.identityconnectors.flatfile.FlatFileConfiguration
All Implemented Interfaces:
org.identityconnectors.framework.spi.Configuration

public class FlatFileConfiguration
extends org.identityconnectors.framework.spi.AbstractConfiguration

Configuration information required for the Connector to attach to a file.


Constructor Summary
FlatFileConfiguration()
           
 
Method Summary
 String getEncoding()
           
 char getFieldDelimiter()
           
 File getFile()
          Get the currently set file.
 char getTextQualifier()
           
 String getUniqueAttributeName()
           
 void setEncoding(String value)
          Set the encoding to use when reading the CSV file.
 void setFieldDelimiter(char value)
           
 void setFile(File value)
          File to parse from the file system.
 void setTextQualifier(char value)
           
 void setUniqueAttributeName(String value)
           
 void validate()
          Determine if all the values are valid.
 
Methods inherited from class org.identityconnectors.framework.spi.AbstractConfiguration
getConnectorMessages, setConnectorMessages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileConfiguration

public FlatFileConfiguration()
Method Detail

setFile

public void setFile(File value)
File to parse from the file system. An exception will throw in the validate() method if the file does not exist.

Parameters:
value - Valid CSV file that exists.

getFile

public File getFile()
Get the currently set file.

Returns:
the reference object to the CSV file.

setEncoding

public void setEncoding(String value)
Set the encoding to use when reading the CSV file. The default value is the character set of the OS.

Parameters:
value - encoding to reading the file in (recommended to set to UTF-8).

getEncoding

public String getEncoding()

setTextQualifier

public void setTextQualifier(char value)

getTextQualifier

public char getTextQualifier()

setFieldDelimiter

public void setFieldDelimiter(char value)

getFieldDelimiter

public char getFieldDelimiter()

setUniqueAttributeName

public void setUniqueAttributeName(String value)

getUniqueAttributeName

public String getUniqueAttributeName()

validate

public void validate()
Determine if all the values are valid.

Specified by:
validate in interface org.identityconnectors.framework.spi.Configuration
Specified by:
validate in class org.identityconnectors.framework.spi.AbstractConfiguration
Throws:
IllegalArgumentException - iff the unique identifier attribute is blank or encoding is set to null
IllegalStateException - iff the text qualifier and field delimiter are the same.
RuntimeException - iff the file is not found.
IllegalCharsetNameException - iff the character set name is invalid
See Also:
org.identityconnectors.framework.Configuration#validate()


Copyright © 2011. All Rights Reserved.