org.apache.camel.component.servicenow.ServiceNowEndpointUriFactory Maven / Gradle / Ivy
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.servicenow;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.camel.spi.EndpointUriFactory;
/**
* Generated by camel build tools - do NOT edit this file!
*/
public class ServiceNowEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
private static final String BASE = ":instanceName";
private static final Set PROPERTY_NAMES;
private static final Set SECRET_PROPERTY_NAMES;
private static final Set MULTI_VALUE_PREFIXES;
static {
Set props = new HashSet<>(45);
props.add("apiUrl");
props.add("apiVersion");
props.add("dateFormat");
props.add("dateTimeFormat");
props.add("display");
props.add("displayValue");
props.add("excludeReferenceLink");
props.add("favorites");
props.add("httpClientPolicy");
props.add("includeAggregates");
props.add("includeAvailableAggregates");
props.add("includeAvailableBreakdowns");
props.add("includeScoreNotes");
props.add("includeScores");
props.add("inputDisplayValue");
props.add("instanceName");
props.add("key");
props.add("lazyStartProducer");
props.add("mapper");
props.add("models");
props.add("oauthClientId");
props.add("oauthClientSecret");
props.add("oauthTokenUrl");
props.add("password");
props.add("perPage");
props.add("proxyAuthorizationPolicy");
props.add("proxyHost");
props.add("proxyPassword");
props.add("proxyPort");
props.add("proxyUserName");
props.add("release");
props.add("requestModels");
props.add("resource");
props.add("responseModels");
props.add("retrieveTargetRecordOnImport");
props.add("sortBy");
props.add("sortDir");
props.add("sslContextParameters");
props.add("suppressAutoSysField");
props.add("suppressPaginationHeader");
props.add("table");
props.add("target");
props.add("timeFormat");
props.add("topLevelOnly");
props.add("userName");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
Set secretProps = new HashSet<>(5);
secretProps.add("oauthClientId");
secretProps.add("oauthClientSecret");
secretProps.add("oauthTokenUrl");
secretProps.add("password");
secretProps.add("userName");
SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
Set prefixes = new HashSet<>(3);
prefixes.add("model.");
prefixes.add("request-model.");
prefixes.add("response-model.");
MULTI_VALUE_PREFIXES = Collections.unmodifiableSet(prefixes);
}
@Override
public boolean isEnabled(String scheme) {
return "servicenow".equals(scheme);
}
@Override
public String buildUri(String scheme, Map properties, boolean encode) throws URISyntaxException {
String syntax = scheme + BASE;
String uri = syntax;
Map copy = new HashMap<>(properties);
uri = buildPathParameter(syntax, uri, "instanceName", null, true, copy);
uri = buildQueryParameters(uri, copy, encode);
return uri;
}
@Override
public Set propertyNames() {
return PROPERTY_NAMES;
}
@Override
public Set secretPropertyNames() {
return SECRET_PROPERTY_NAMES;
}
@Override
public Set multiValuePrefixes() {
return MULTI_VALUE_PREFIXES;
}
@Override
public boolean isLenientProperties() {
return false;
}
}