org.hardtokenmgmt.admin.control
Class CSVBatchAdminImportFileParser

java.lang.Object
  extended by org.hardtokenmgmt.admin.control.CSVBatchAdminImportFileParser
All Implemented Interfaces:
IBatchAdminImportFileParser

public class CSVBatchAdminImportFileParser
extends java.lang.Object
implements IBatchAdminImportFileParser

Comma Separated File Batch Admin Importer that reads a rows of text and converts them into AdminDataVO It's configured in global.properties with the following settings csvbatchadminimport.columnseparator (default ",") Each row should have the following order: "unique user id","full name","department (optional)"

Version:
$Id$
Author:
Philip Vendil 15 mar 2009

Method Summary
 boolean hasMore()
           
 void init(java.lang.String orgId)
          Initialization method that should be called before any users are parsed form the data.
 AdminDataVO next()
          Fetches the next available AdminDataVO from the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasMore

public boolean hasMore()
Specified by:
hasMore in interface IBatchAdminImportFileParser
Returns:
true if file have more AdminDataVO to return.
See Also:
IBatchAdminImportFileParser.hasMore()

next

public AdminDataVO next()
                 throws java.text.ParseException
Description copied from interface: IBatchAdminImportFileParser
Fetches the next available AdminDataVO from the file.

Specified by:
next in interface IBatchAdminImportFileParser
Returns:
the next AdminDataVO
Throws:
java.text.ParseException - if the row in the import was invalid and couldn't be parsed properly.
See Also:
IBatchAdminImportFileParser.next()

init

public void init(java.lang.String orgId)
Description copied from interface: IBatchAdminImportFileParser
Initialization method that should be called before any users are parsed form the data.

Specified by:
init in interface IBatchAdminImportFileParser
Parameters:
orgId - organization id of organization to import users to.