private static BookmarkParameter readBookmark( Element bookmarkParameterElement,
IBrowserConnection browserConnection ) throws ConnectionIOException
{
BookmarkParameter bookmarkParameter = new BookmarkParameter();
// Name
Attribute nameAttribute = bookmarkParameterElement.attribute( NAME_TAG );
if ( nameAttribute != null )
{
bookmarkParameter.setName( nameAttribute.getValue() );
}
// DN
Attribute dnAttribute = bookmarkParameterElement.attribute( DN_TAG );
if ( dnAttribute != null )
{
try
{
bookmarkParameter.setDn( new LdapDN( dnAttribute.getValue() ) );
}
catch ( InvalidNameException e )
{
throw new ConnectionIOException( "Unable to parse 'DN' of bookmark '" + bookmarkParameter.getName()
+ "' :" + dnAttribute.getValue() );
}
}
return bookmarkParameter;