当前位置: 首页>>代码示例>>Java>>正文


Java LdapException.getLocalizedMessage方法代码示例

本文整理汇总了Java中org.ldaptive.LdapException.getLocalizedMessage方法的典型用法代码示例。如果您正苦于以下问题:Java LdapException.getLocalizedMessage方法的具体用法?Java LdapException.getLocalizedMessage怎么用?Java LdapException.getLocalizedMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ldaptive.LdapException的用法示例。


在下文中一共展示了LdapException.getLocalizedMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: next

import org.ldaptive.LdapException; //导入方法依赖的package包/类
@Override
public LdapEntry next() {
  final String dn = dnsIterator.next();
  final SearchRequest request = new SearchRequest();
  request.setBaseDn(dn);
  request.setSearchFilter(usersFilter);
  request.setSearchScope(OBJECT);
  request.setReturnAttributes(returnAttrs);
  request.setSearchEntryHandlers(new ObjectGuidHandler());
  try {
    final Response<SearchResult> response = searchOp.execute(request);
    if (response.getResultCode() != SUCCESS) {
      throw new SyncException(
          format(
              "Couldn't get entry dn '%s', result code is '%s'", dn, response.getResultCode()));
    }
    return response.getResult().getEntry();
  } catch (LdapException x) {
    throw new SyncException(x.getLocalizedMessage(), x);
  }
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:22,代码来源:MembershipSelector.java

示例2: select

import org.ldaptive.LdapException; //导入方法依赖的package包/类
@Override
public Iterable<LdapEntry> select(Connection connection) {
  final SearchRequest groupsSearch = new SearchRequest();
  groupsSearch.setBaseDn(baseDn);
  groupsSearch.setSearchFilter(new SearchFilter(groupsFilter));
  groupsSearch.setSearchScope(SUBTREE);
  groupsSearch.setReturnAttributes(membersAttr);
  groupsSearch.setSearchEntryHandlers(new RangeEntryHandler());
  try {
    final Response<SearchResult> response = new SearchOperation(connection).execute(groupsSearch);
    if (response.getResultCode() != SUCCESS) {
      throw new SyncException("Couldn't get groups, result code is " + response.getResultCode());
    }
    return new RequestEachEntryIterable(
        response
            .getResult()
            .getEntries()
            .stream()
            .flatMap(entry -> entry.getAttribute(membersAttr).getStringValues().stream())
            .collect(toSet()),
        connection,
        usersFilter,
        returnAttrs);
  } catch (LdapException x) {
    throw new SyncException(x.getLocalizedMessage(), x);
  }
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:28,代码来源:MembershipSelector.java

示例3: requestNextPage

import org.ldaptive.LdapException; //导入方法依赖的package包/类
private void requestNextPage() {
  try {
    response = prClient.execute(request, cm);
    if (response.getResultCode() != SUCCESS) {
      throw new SyncException(
          "Couldn't get a next page of entries, result code is " + response.getResultCode());
    }
    delegate = response.getResult().getEntries().iterator();
  } catch (LdapException x) {
    throw new SyncException(x.getLocalizedMessage(), x);
  }
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:13,代码来源:LookupSelector.java


注:本文中的org.ldaptive.LdapException.getLocalizedMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。