CA Identity Manager
Java SDK r12.5 SP 8

 

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()
          Gets all types of actions.
 java.lang.String getCurrentRecordActionValue()
          Gets the action attribute for the current record.
 java.lang.String getCurrentRecordSearchObjValue()
          Gets the search object for the specific record.
 java.lang.String getDeletionSequence()
           
 java.util.List getHeaders()
          Gets the header of the file.
 java.util.List getNextRecord()
          Gets the next record in the file.
 int getRecordsCount()
          Gets records count.
 boolean hasMoreRecords()
          Checks whether there are more records to read.
 java.lang.String isValidFile(java.lang.String fileName)
          Validates the input file.
 void setActionsAttrName(java.lang.String actionsAttrName)
          Sets actions attribute name.
 void setDeletionSequence(java.lang.String deletionSequence)
          Sets 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)
          Sets search object attribute name.
 

Method Detail

getNextRecord

java.util.List getNextRecord()
Gets 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**", 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()
Gets 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
Gets 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()
Gets the header of the file.

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

getAllActions

java.util.List getAllActions()
Gets 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()
Gets 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
Sets 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)
Sets search object attribute name.

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

isValidFile

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

Note - This method returns NULL when 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)
Sets 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 SP 8

06/13/2011

© 2011 CA Technologies, Inc. All rights reserved.