本文整理汇总了Java中com.google.enterprise.adaptor.Config.addKey方法的典型用法代码示例。如果您正苦于以下问题:Java Config.addKey方法的具体用法?Java Config.addKey怎么用?Java Config.addKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.enterprise.adaptor.Config
的用法示例。
在下文中一共展示了Config.addKey方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initConfig
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Override
public void initConfig(Config config) {
config.addKey("ad.servers", null);
config.addKey("adaptor.namespace", "Default");
config.addKey("ad.defaultUser", "");
config.addKey("ad.defaultPassword", "");
config.addKey("ad.localized.Everyone", "Everyone");
config.addKey("ad.localized.NTAuthority", "NT Authority");
config.addKey("ad.localized.Interactive", "Interactive");
config.addKey("ad.localized.AuthenticatedUsers", "Authenticated Users");
config.addKey("ad.localized.Builtin", "BUILTIN");
config.addKey("ad.feedBuiltinGroups", "false");
config.addKey("ad.ldapReadTimeoutSecs", "90");
config.addKey("ad.userSearchBaseDN", "");
config.addKey("ad.groupSearchBaseDN", "");
config.addKey("ad.userSearchFilter", "");
config.addKey("ad.groupSearchFilter", "");
}
示例2: testSoapFactoryImplGetWebServiceAddress
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
/**
* Check that trailing slashes or the lack thereof are handled
* on the webServicesUrl property.
*/
@Test
public void testSoapFactoryImplGetWebServiceAddress() {
Config config = new Config();
config.addKey("opentext.directoryServicesUrl", "");
config.addKey("opentext.webServicesUrl", "webServicesUrl");
config.addKey("opentext.webServicesServer", "Tomcat");
SoapFactoryImpl factory = new SoapFactoryImpl();
factory.configure(config);
assertEquals("webServicesUrl/Authentication",
factory.getWebServiceAddress("Authentication"));
config.overrideKey("opentext.webServicesUrl", "webServicesUrl/");
factory.configure(config);
assertEquals("webServicesUrl/Authentication",
factory.getWebServiceAddress("Authentication"));
}
示例3: testGetDisplayUrl
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testGetDisplayUrl() throws Exception {
SoapFactoryMock soapFactory = new SoapFactoryMock();
OpentextAdaptor adaptor = new OpentextAdaptor(soapFactory);
AdaptorContext context = ProxyAdaptorContext.getInstance();
Config config = initConfig(adaptor, context);
config.addKey("opentext.displayUrl.objAction.111", "actionFor111");
adaptor.init(context);
URI displayUrl = adaptor.getDisplayUrl("Document", 12345);
assertEquals("http://localhost/otcs/livelink.exe"
+ "?func=ll&objAction=overview&objId=12345", displayUrl.toString());
displayUrl = adaptor.getDisplayUrl("UnknownType", 12345);
assertEquals("http://localhost/otcs/livelink.exe"
+ "?func=ll&objAction=properties&objId=12345", displayUrl.toString());
displayUrl = adaptor.getDisplayUrl("GenericNode:111", 12345);
assertEquals("http://localhost/otcs/livelink.exe"
+ "?func=ll&objAction=actionFor111&objId=12345", displayUrl.toString());
}
示例4: testGetDisplayUrlPathInfo
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testGetDisplayUrlPathInfo() throws Exception {
SoapFactoryMock soapFactory = new SoapFactoryMock();
OpentextAdaptor adaptor = new OpentextAdaptor(soapFactory);
AdaptorContext context = ProxyAdaptorContext.getInstance();
Config config = initConfig(adaptor, context);
config.addKey(
"opentext.displayUrl.queryString.Document", "/open/{1}");
config.addKey(
"opentext.displayUrl.queryString.111", "/open111/{1}");
adaptor.init(context);
URI displayUrl = adaptor.getDisplayUrl("Document", 12345);
assertEquals("http://localhost/otcs/livelink.exe/open/12345",
displayUrl.toString());
displayUrl = adaptor.getDisplayUrl("GenericNode:111", 12345);
assertEquals("http://localhost/otcs/livelink.exe/open111/12345",
displayUrl.toString());
}
示例5: testDoNodeFeatures
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testDoNodeFeatures() {
SoapFactoryMock soapFactory = new SoapFactoryMock();
OpentextAdaptor adaptor = new OpentextAdaptor(soapFactory);
AdaptorContext context = ProxyAdaptorContext.getInstance();
Config config = initConfig(adaptor, context);
config.addKey("opentext.includedNodeFeatures.NodeType",
"Feature1,Feature2");
adaptor.init(context);
NodeMock node = new NodeMock(3143, "Node Name", "NodeType");
NodeFeature feature = new NodeFeature();
feature.setName("Feature1");
feature.setBooleanValue(true);
feature.setType("Boolean");
node.getFeatures().add(feature);
RecordingResponse response = new RecordingResponse();
adaptor.doNodeFeatures(node, response);
assertEquals(
expectedMetadata(
ImmutableMap.of("Feature1", "true")),
response.getMetadata());
}
示例6: testDoNodeFeaturesWithDate
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testDoNodeFeaturesWithDate() {
SoapFactoryMock soapFactory = new SoapFactoryMock();
OpentextAdaptor adaptor = new OpentextAdaptor(soapFactory);
AdaptorContext context = ProxyAdaptorContext.getInstance();
Config config = initConfig(adaptor, context);
config.addKey("opentext.includedNodeFeatures.NodeType",
"Feature1,Feature2");
adaptor.init(context);
NodeMock node = new NodeMock(3143, "Node Name", "NodeType");
NodeFeature feature = new NodeFeature();
feature.setName("Feature1");
feature.setDateValue(getXmlGregorianCalendar(2011, 01, 01, 01, 01, 01));
feature.setType("Date");
node.getFeatures().add(feature);
RecordingResponse response = new RecordingResponse();
adaptor.doNodeFeatures(node, response);
assertEquals(
expectedMetadata(
ImmutableMap.of("Feature1", "2011-02-01")),
response.getMetadata());
}
示例7: initTestAdaptorConfig
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
private Config initTestAdaptorConfig(AdaptorContext context) {
Config config = context.getConfig();
config.addKey("documentum.username", "testuser");
config.addKey("documentum.password", "testpwd");
config.addKey("documentum.docbaseName", "testdocbase");
config.addKey("documentum.displayUrlPattern", "http://webtop/drl/{0}");
config.addKey("documentum.src", START_PATH);
config.addKey("documentum.src.separator", ",");
config.addKey("documentum.documentTypes", "dm_document");
config.addKey("documentum.indexFolders", "true");
config.addKey("documentum.excludedAttributes", "");
config.addKey("adaptor.namespace", "globalNS");
config.addKey("documentum.windowsDomain", "");
config.addKey("documentum.pushLocalGroupsOnly", "false");
config.addKey("documentum.queryBatchSize", "0");
config.addKey("documentum.maxHtmlSize", "1000");
config.addKey("documentum.modifiedDocumentsQuery", "");
config.addKey("documentum.cabinetWhereCondition", "");
config.addKey("adaptor.caseSensitivityType", "");
return config;
}
示例8: initConfig
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Override
public void initConfig(Config config) {
config.addKey("opentext.directoryServicesUrl", "");
config.addKey("opentext.webServicesUrl", null);
config.addKey("opentext.webServicesServer", "");
config.addKey("opentext.username", null);
config.addKey("opentext.password", null);
config.addKey("opentext.adminUsername", "");
config.addKey("opentext.adminPassword", "");
config.addKey("opentext.publicAccessGroupEnabled", "false");
config.addKey("opentext.windowsDomain", "");
config.addKey("adaptor.namespace", Principal.DEFAULT_NAMESPACE);
config.addKey("opentext.pushLocalGroupsOnly", "false");
config.addKey("opentext.src", "EnterpriseWS");
config.addKey("opentext.src.separator", ",");
config.addKey("opentext.displayUrl.contentServerUrl", null);
config.addKey("opentext.displayUrl.queryString.default",
"?func=ll&objAction={0}&objId={1}");
config.addKey("opentext.displayUrl.objAction.Document", "overview");
config.addKey("opentext.displayUrl.objAction.default", "properties");
config.addKey("opentext.indexing.contentServerUrl", "");
config.addKey("opentext.indexing.downloadMethod",
DownloadMethod.CONTENTSERVER.name());
config.addKey("opentext.indexing.contentHandlerUrl", "");
config.addKey("opentext.excludedNodeTypes", "");
config.addKey("opentext.excludedNodeTypes.separator", ",");
config.addKey("opentext.indexFolders", "true");
config.addKey("opentext.currentVersionType", "-2");
config.addKey("opentext.indexCategories", "true");
config.addKey("opentext.indexCategoryNames", "true");
config.addKey("opentext.indexSearchableAttributesOnly", "true");
config.addKey("opentext.includedCategories", "");
config.addKey("opentext.includedCategories.separator", ",");
config.addKey("opentext.excludedCategories", "");
config.addKey("opentext.excludedCategories.separator", ",");
config.addKey("opentext.includedNodeFeatures.separator", ",");
config.addKey("opentext.metadataDateFormat", "yyyy-MM-dd");
}
示例9: testSoapFactoryImplServerTomcat
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
/**
* Verify that the ENDPOINT_ADDRESS_PROPERTY is set.
*/
@Test
public void testSoapFactoryImplServerTomcat() {
Config config = new Config();
config.addKey("opentext.directoryServicesUrl", "");
config.addKey("opentext.webServicesUrl", "webServicesUrl/");
config.addKey("opentext.webServicesServer", "Tomcat");
SoapFactoryImpl factory = new SoapFactoryImpl();
factory.configure(config);
Authentication authentication = factory.newAuthentication();
assertEquals("webServicesUrl/Authentication",
((BindingProvider) authentication).getRequestContext().get(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY));
}
示例10: testSoapFactoryImplServerUnset
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testSoapFactoryImplServerUnset() {
SoapFactoryImpl soapFactory = new SoapFactoryImpl();
Config config = new Config();
config.addKey("opentext.directoryServicesUrl", "");
config.addKey("opentext.webServicesUrl", "webServicesUrl");
config.addKey("opentext.webServicesServer", "");
soapFactory.configure(config);
Authentication authentication = soapFactory.newAuthentication();
assertEquals("webServicesUrl/Authentication.svc",
((BindingProvider) authentication).getRequestContext().get(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY));
}
示例11: testSoapFactoryImplServerIis
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testSoapFactoryImplServerIis() {
SoapFactoryImpl soapFactory = new SoapFactoryImpl();
Config config = new Config();
config.addKey("opentext.directoryServicesUrl", "");
config.addKey("opentext.webServicesUrl", "webServicesUrl");
config.addKey("opentext.webServicesServer", "IIS");
soapFactory.configure(config);
Authentication authentication = soapFactory.newAuthentication();
assertEquals("webServicesUrl/Authentication.svc",
((BindingProvider) authentication).getRequestContext().get(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY));
}
示例12: testInvalidDisplayUrlBadQueryString
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testInvalidDisplayUrlBadQueryString() throws Exception {
SoapFactoryMock soapFactory = new SoapFactoryMock();
OpentextAdaptor adaptor = new OpentextAdaptor(soapFactory);
AdaptorContext context = ProxyAdaptorContext.getInstance();
Config config = initConfig(adaptor, context);
config.addKey("opentext.displayUrl.queryString.bad",
"?func=ll&objAction={0}&objId={1}&invalid={2}");
thrown.expect(InvalidConfigurationException.class);
adaptor.init(context);
}
示例13: testInvalidDisplayUrlBadObjectAction
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Test
public void testInvalidDisplayUrlBadObjectAction() throws Exception {
SoapFactoryMock soapFactory = new SoapFactoryMock();
OpentextAdaptor adaptor = new OpentextAdaptor(soapFactory);
AdaptorContext context = ProxyAdaptorContext.getInstance();
Config config = initConfig(adaptor, context);
config.addKey("opentext.displayUrl.objAction.bad", "invalid{?}action");
thrown.expect(InvalidConfigurationException.class);
adaptor.init(context);
}
示例14: initConfig
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Override
public void initConfig(Config config) {
config.addKey("sharepoint.server", null);
boolean onWindows = System.getProperty("os.name").contains("Windows");
// When running on Windows, Windows Authentication can log us in.
config.addKey("sharepoint.username", onWindows ? "" : null);
config.addKey("sharepoint.password", onWindows ? "" : null);
config.addKey("profile.setacl", "true");
config.addKey("adaptor.namespace", "Default");
config.addKey("profile.mysitehost", "");
// When running against ADFS authentication, set this to ADFS endpoint.
config.addKey("sharepoint.sts.endpoint", "");
// When running against ADFS authentication, set this to realm value.
// Normally realm value is either http://sharepointurl/_trust or
// urn:sharepointenv:com format. You can use
// Get-SPTrustedIdentityTokenIssuer to get "DefaultProviderRealm" value
config.addKey("sharepoint.sts.realm", "");
// You can override default value of http://sharepointurl/_trust by
// specifying this property.
config.addKey("sharepoint.sts.trustLocation", "");
// You can override default value of
// http://sharepointurl/_layouts/Authenticate.aspx by specifying this
// property.
config.addKey("sharepoint.sts.login", "");
// Set this to true when using Live authentication.
config.addKey("sharepoint.useLiveAuthentication", "false");
// Set this to specific user-agent value to be used by adaptor while making
// request to SharePoint
config.addKey("adaptor.userAgent", "");
// Set this to static factor method name which will return
// custom SamlHandshakeManager object
config.addKey("sharepoint.customSamlManager", "");
}
示例15: initConfig
import com.google.enterprise.adaptor.Config; //导入方法依赖的package包/类
@Override
public void initConfig(Config config) {
config.addKey("ldap.servers", null);
config.addKey("ldap.readTimeoutSecs", "90");
config.addKey("adaptor.namespace", "");
}