private AccessGrant createAccessGrant(Map<String,String> params){
  AccessGrant accessGrant=new AccessGrant();
  if (params.get("access_token") != null) {
    String accessToken=params.get("access_token");
    Integer expires=null;
    if (params.get("expires") != null) {
      expires=Integer.valueOf(params.get("expires"));
    }
    accessGrant.setKey(accessToken);
    accessGrant.setAttribute("expires",expires);
  }
  accessGrant.setProviderId(mProviderName.toString());
  return accessGrant;
}

private AccessGrant createAccessGrant ( Map < String , String > params ) { AccessGrant accessGrant = new AccessGrant ( ) ; if ( params . get ( "access_token" ) != null ) { String accessToken = params . get ( "access_token" ) ; Integer expires = null ; if ( params . get ( "expires" ) != null ) { expires = Integer . valueOf ( params . get ( "expires" ) ) ; } accessGrant . setKey ( accessToken ) ; accessGrant . setAttribute ( "expires" , expires ) ; } accessGrant . setProviderId ( mProviderName . toString ( ) ) ; return accessGrant ; }
internal method to create new create accessgrant
