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


Java RecordingDocIdPusher.getGroupDefinitions方法代码示例

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


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

示例1: testFakeAdaptorUserAndPasswordSpecified

import com.google.enterprise.adaptor.testing.RecordingDocIdPusher; //导入方法依赖的package包/类
@Test
public void testFakeAdaptorUserAndPasswordSpecified() throws Exception {
  AdAdaptor adAdaptor = new FakeAdaptor();
  RecordingDocIdPusher pusher = new RecordingDocIdPusher();
  Map<String, String> configEntries = new HashMap<String, String>();
  configEntries.put("gsa.hostname", "localhost");
  configEntries.put("ad.servers", "server1");
  configEntries.put("ad.servers.server1.host", "localhost");
  configEntries.put("ad.servers.server1.port", "1234");
  configEntries.put("ad.servers.server1.user", "username");
  configEntries.put("ad.servers.server1.password", "password");
  configEntries.put("ad.servers.server1.method", "ssl");
  configEntries.put("ad.userSearchBaseDN", "ou=DoesNotMatter");
  configEntries.put("server.port", "5680");
  configEntries.put("server.dashboardPort", "5681");
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ true,
      /*init=*/ true);
  Map<GroupPrincipal, Collection<Principal>> results =
      pusher.getGroupDefinitions();
  // the above (eventually) calls AdAdaptor.init() with the specified config.
}
 
开发者ID:googlegsa,项目名称:activedirectory,代码行数:22,代码来源:AdAdaptorTest.java

示例2: testFakeAdaptorDefaultUserAndPasswordSpecified

import com.google.enterprise.adaptor.testing.RecordingDocIdPusher; //导入方法依赖的package包/类
@Test
public void testFakeAdaptorDefaultUserAndPasswordSpecified()
    throws Exception {
  AdAdaptor adAdaptor = new FakeAdaptor();
  RecordingDocIdPusher pusher = new RecordingDocIdPusher();
  Map<String, String> configEntries = new HashMap<String, String>();
  configEntries.put("gsa.hostname", "localhost");
  configEntries.put("ad.servers", "server1");
  configEntries.put("ad.servers.server1.host", "localhost");
  configEntries.put("ad.servers.server1.port", "1234");
  configEntries.put("ad.servers.server1.method", "ssl");
  configEntries.put("ad.defaultUser", "defaultUser");
  configEntries.put("ad.defaultPassword", "defaultPassword");
  configEntries.put("ad.groupSearchBaseDN", "ou=DoesNotMatter");
  configEntries.put("server.port", "5680");
  configEntries.put("server.dashboardPort", "5681");
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ true,
      /*init=*/ true);
  Map<GroupPrincipal, Collection<Principal>> results =
      pusher.getGroupDefinitions();
  // the above (eventually) calls AdAdaptor.init() with the specified config.
}
 
开发者ID:googlegsa,项目名称:activedirectory,代码行数:23,代码来源:AdAdaptorTest.java

示例3: testFakeAdaptorInit

import com.google.enterprise.adaptor.testing.RecordingDocIdPusher; //导入方法依赖的package包/类
@Test
public void testFakeAdaptorInit() throws Exception {
  AdAdaptor adAdaptor = new FakeAdaptor();
  RecordingDocIdPusher pusher = new RecordingDocIdPusher();
  Map<String, String> configEntries = new HashMap<String, String>();
  configEntries.put("gsa.hostname", "localhost");
  configEntries.put("ad.servers", "server1,server2");
  configEntries.put("ad.servers.server1.host", "localhost");
  configEntries.put("ad.servers.server1.port", "1234");
  configEntries.put("ad.servers.server1.user", "user-override");
  configEntries.put("ad.servers.server1.method", "ssl");
  configEntries.put("ad.servers.server2.host", "localhost");
  configEntries.put("ad.servers.server2.port", "1234");
  configEntries.put("ad.servers.server2.password", "password-override");
  configEntries.put("ad.servers.server2.method", "standard");
  configEntries.put("ad.defaultUser", "defaultUser");
  configEntries.put("ad.defaultPassword", "password");
  configEntries.put("ad.ldapReadTimeoutSecs", "");
  configEntries.put("ad.userSearchFilter", "cn=UserNotFound");
  configEntries.put("server.port", "5680");
  configEntries.put("server.dashboardPort", "5681");
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ true,
      /*init=*/ true);
  Map<GroupPrincipal, Collection<Principal>> results =
      pusher.getGroupDefinitions();
  // the above (eventually) calls AdAdaptor.init() with the specified config.
}
 
开发者ID:googlegsa,项目名称:activedirectory,代码行数:28,代码来源:AdAdaptorTest.java

示例4: testFakeAdaptorInitZeroTimeout

import com.google.enterprise.adaptor.testing.RecordingDocIdPusher; //导入方法依赖的package包/类
@Test
public void testFakeAdaptorInitZeroTimeout() throws Exception {
  AdAdaptor adAdaptor = new FakeAdaptor();
  RecordingDocIdPusher pusher = new RecordingDocIdPusher();
  Map<String, String> configEntries = new HashMap<String, String>();
  configEntries.put("gsa.hostname", "localhost");
  configEntries.put("ad.servers", "server1,server2");
  configEntries.put("ad.servers.server1.host", "localhost");
  configEntries.put("ad.servers.server1.port", "1234");
  configEntries.put("ad.servers.server1.user", "user-override");
  configEntries.put("ad.servers.server1.method", "ssl");
  configEntries.put("ad.servers.server2.host", "localhost");
  configEntries.put("ad.servers.server2.port", "1234");
  configEntries.put("ad.servers.server2.password", "password-override");
  configEntries.put("ad.servers.server2.method", "standard");
  configEntries.put("ad.defaultUser", "defaultUser");
  configEntries.put("ad.defaultPassword", "password");
  configEntries.put("ad.ldapReadTimeoutSecs", "0");
  configEntries.put("ad.groupSearchFilter", "cn=GroupNotFound");
  configEntries.put("server.port", "5680");
  configEntries.put("server.dashboardPort", "5681");
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ true,
      /*init=*/ true);
  Map<GroupPrincipal, Collection<Principal>> results =
      pusher.getGroupDefinitions();
  // the above (eventually) calls AdAdaptor.init() with the specified config.
}
 
开发者ID:googlegsa,项目名称:activedirectory,代码行数:28,代码来源:AdAdaptorTest.java

示例5: testFakeAdaptorGetDocIds

import com.google.enterprise.adaptor.testing.RecordingDocIdPusher; //导入方法依赖的package包/类
@Test
public void testFakeAdaptorGetDocIds() throws Exception {
  AdAdaptor adAdaptor = new FakeAdaptor();
  RecordingDocIdPusher pusher = new RecordingDocIdPusher();
  Map<String, String> configEntries = defaultConfig();
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ true,
      /*init=*/ true);
  Map<GroupPrincipal, Collection<Principal>> results =
      pusher.getGroupDefinitions();

  final Map<GroupPrincipal, Collection<Principal>> goldenGroups =
      new HashMap<GroupPrincipal, Collection<Principal>>();
  {
    Principal everyone = new GroupPrincipal("Everyone", "Default");
    goldenGroups.put((GroupPrincipal) everyone, new ArrayList<Principal>());
    goldenGroups.put(new GroupPrincipal("[email protected]", "Default"),
        new ArrayList<Principal>());
    goldenGroups.put(new GroupPrincipal("Authenticated [email protected] Authority",
        "Default"), Arrays.asList(everyone));
    goldenGroups.put(new GroupPrincipal("[email protected] Authority",
        "Default"), Arrays.asList(everyone));
  }
  assertEquals(goldenGroups, results);

  // make sure pushGroupDefinitions call is idempotent
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ true,
      /*init=*/ false);
  results = pusher.getGroupDefinitions();
  assertEquals(goldenGroups, results);

  // even when doing an incremental push
  pushGroupDefinitions(adAdaptor, configEntries, pusher, /*fullPush=*/ false,
      /*init=*/ false);
  results = pusher.getGroupDefinitions();
  assertEquals(goldenGroups, results);
}
 
开发者ID:googlegsa,项目名称:activedirectory,代码行数:37,代码来源:AdAdaptorTest.java

示例6: getGroups

import com.google.enterprise.adaptor.testing.RecordingDocIdPusher; //导入方法依赖的package包/类
private Map<GroupPrincipal, ? extends Collection<Principal>> getGroups(
    DocumentumAdaptor adaptor, DfException expectedCause)
    throws DfException, IOException, InterruptedException {
  RecordingDocIdPusher pusher = new RecordingDocIdPusher();
  try {
    adaptor.getDocIds(pusher);
    assertNull("Expected an exception: " + expectedCause, expectedCause);
  } catch (IOException e) {
    if (expectedCause == NO_EXCEPTION || expectedCause != e.getCause()) {
      throw e;
    }
  }
  return pusher.getGroupDefinitions();
}
 
开发者ID:googlegsa,项目名称:documentum,代码行数:15,代码来源:DocumentumAdaptorTest.java


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