public static BlogConnection getBlogConnection ( final String type , final String url , final String username , final String password ) throws BlogClientException { BlogConnection blogConnection = null ; if ( type == null || type . equals ( "metaweblog" ) ) { blogConnection = createBlogConnection ( METAWEBLOG_IMPL_CLASS , url , username , password ) ; } else if ( type . equals ( "atom" ) ) { blogConnection = createBlogConnection ( ATOMPROTOCOL_IMPL_CLASS , url , username , password ) ; } else { throw new BlogClientException ( "Type must be 'atom' or 'metaweblog'" ) ; } return blogConnection ; }
Create a connection to a blog server .