{
try
{
for ( int i = 0; i < object.length; i++ )
{
IConnection conn = new Connection();
ConnectionParameter connectionParameters = ( ConnectionParameter ) object[i][0];
conn.setConnectionParameter( connectionParameters );
if ( object[i].length > 1 )
{
SearchParameter[] searchParameters = ( SearchParameter[] ) object[i][1];
for ( int k = 0; k < searchParameters.length; k++ )
{
ISearch search = new Search( conn, searchParameters[k] );
conn.getSearchManager().addSearch( search );
}
}
if ( object[i].length > 2 )
{
BookmarkParameter[] bookmarkParameters = ( BookmarkParameter[] ) object[i][2];
for ( int k = 0; k < bookmarkParameters.length; k++ )
{
IBookmark bookmark = new Bookmark( conn, bookmarkParameters[k] );
conn.getBookmarkManager().addBookmark( bookmark );
}
}
try
{
String schemaFilename = getSchemaCacheFileName( conn.getName() );
FileReader reader = new FileReader( schemaFilename );
Schema schema = new Schema();
schema.loadFromLdif( reader );
conn.setSchema( schema );
}
catch ( Exception e )
{
}