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 Dn( dnAttribute.getValue() ) );
}
catch ( LdapInvalidDnException e )
{
throw new ConnectionIOException( NLS.bind( BrowserCoreMessages.BrowserConnectionIO_UnableToParseDn,
new String[]
{ bookmarkParameter.getName(), dnAttribute.getValue() } ) );
}
}
return bookmarkParameter;
}