CA Identity Manager
Java SDK r12.5

 

com.ca.identitymanager.feeder.util
Interface FeederParser

All Superinterfaces:
java.io.Serializable

public interface FeederParser
extends java.io.Serializable

Presents services which have to be supplied when creating your personal parser.

The FeederParser implementation must be in the following package: com.ca.identitymanager.feeder.parser

The following are services that have to be implemented when creating your parser:


Method Summary
 java.util.List getAllActions()
          Get all types of actions
 java.lang.String getCurrentRecordActionValue()
          Get the action attribute for the current record
 java.lang.String getCurrentRecordSearchObjValue()
          Get the search object for the specific record
 java.lang.String getDeletionSequence()
           
 java.util.List getHeaders()
          Get the header of the file
 java.util.List getNextRecord()
          Get the next record in the file returns a list of lists of values (each list represent attribute values which might be single or multi-valued) the returned list takes into consideration the deletionSequence value for example if the deletionSequence is set to "**NULL**" then the parser will return in getNextRecord() a list for a single record in which null will appear for each "**NULL**" value in the record and "" will appear for each attribute which should be ignored when setting a managed object.
 int getRecordsCount()
          Get records count
 boolean hasMoreRecords()
          Checks whether there are more records to read
 java.lang.String isValidFile(java.lang.String fileName)
          Validate the input file.
 void setActionsAttrName(java.lang.String actionsAttrName)
          Set actions attribute name
 void setDeletionSequence(java.lang.String deletionSequence)
          Set deletion sequence string which is used to determine which value in the parsed file should be deleted from the managed object later.
 void setSearchObjectAttrName(java.lang.String searchObjAttrName)
          Set search object attribute name
 

Method Detail

getNextRecord

java.util.List getNextRecord()
Get the next record in the file returns a list of lists of values (each list represent attribute values which might be single or multi-valued) the returned list takes into consideration the deletionSequence value for example if the deletionSequence is set to "**NULL**" then the parser will return in getNextRecord() a list for a single record in which null will appear for each "**NULL**" value in the record and "" will appear for each attribute which should be ignored when setting a managed object.

Returns:
a list of values (record presentation) ONLY if the record is valid. this is a list of lists

hasMoreRecords

boolean hasMoreRecords()
Checks whether there are more records to read

Returns:
true if there are more records to read in the file

getCurrentRecordActionValue

java.lang.String getCurrentRecordActionValue()
Get the action attribute for the current record

Returns:
the value of the action attribute (according to the action attribute that was set) in the current record.

getCurrentRecordSearchObjValue

java.lang.String getCurrentRecordSearchObjValue()
                                                throws FeederParserException
Get the search object for the specific record

Returns:
the values of the search objects (according to the search object attribute that was set) in the current record.
Throws:
FeederParserException

getHeaders

java.util.List getHeaders()
Get the header of the file

Returns:
a list of strings represents the header of the file

getAllActions

java.util.List getAllActions()
Get all types of actions

Returns:
all actions (one instance of each action) from all the valid records. empty string is not a valid action

getRecordsCount

int getRecordsCount()
Get records count

Returns:
number of records to read including non valid records excluding the header line

setActionsAttrName

void setActionsAttrName(java.lang.String actionsAttrName)
                        throws FeederParserException
Set actions attribute name

Parameters:
actionsAttrName - the actions 'column' (attribute) presentation
Throws:
FeederParserException - if the actions 'column' was not found in the header

setSearchObjectAttrName

void setSearchObjectAttrName(java.lang.String searchObjAttrName)
Set search object attribute name

Parameters:
searchObjAttrName - the search object 'column' (attribute) presentation

isValidFile

java.lang.String isValidFile(java.lang.String fileName)
Validate the input file. Check the contentType/file extension

NOTE! - THIS METHOD SHOULD RETURN NULL IF THE FILE IS VALID

Parameters:
fileName - the name of the uploaded file
Returns:
The error string which will be displayed to the user as a task error or null if file is valid

setDeletionSequence

void setDeletionSequence(java.lang.String deletionSequence)
Set deletion sequence string which is used to determine which value in the parsed file should be deleted from the managed object later. for example if the deleteSequence is set to "**NULL**" then the parser will return in getNextRecord() a list for a single record in which null will appear for each "**NULL**" value in the record and "" will appear for each attribute which should be ignored when setting a managed object.

Parameters:
deletionSequence -

getDeletionSequence

java.lang.String getDeletionSequence()
Returns:
deletionSequence string. A parser should have a default deleteSequence value. for example: "NULL"

CA Identity Manager
Java SDK r12.5

10/22/2009

© 2009 CA, Inc. All rights reserved.