camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject [13/19] camel git commit: CAMEL-11555: ServiceNow : create a maven plugin to generate models based on table layout
Date Fri, 04 Aug 2017 16:10:04 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
deleted file mode 100644
index bc46bcb..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
+++ /dev/null
@@ -1,689 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriParams;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.jsse.SSLContextParameters;
-import org.apache.cxf.configuration.security.ProxyAuthorizationPolicy;
-import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
-
-@UriParams
-public class ServiceNowConfiguration implements Cloneable {
-
-    private static final ObjectMapper MAPPER = new ObjectMapper()
-        .configure(
-            DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
-            false)
-        .setSerializationInclusion(
-            JsonInclude.Include.NON_NULL
-        );
-
-    @UriParam(label = "security", secret = true)
-    @Metadata(required = "true")
-    private String userName;
-    @UriParam(label = "security", secret = true)
-    @Metadata(required = "true")
-    private String password;
-    @UriParam(label = "security", secret = true)
-    private String oauthClientId;
-    @UriParam(label = "security", secret = true)
-    private String oauthClientSecret;
-    @UriParam(label = "security", secret = true)
-    private String oauthTokenUrl;
-    @UriParam(label = "security")
-    private String apiUrl;
-    @UriParam(label = "advanced")
-    private String apiVersion;
-    @UriParam
-    private String resource;
-    @UriParam
-    private String table;
-    @UriParam
-    private Boolean excludeReferenceLink = false;
-    @UriParam
-    private Boolean suppressAutoSysField = false;
-    @UriParam
-    private Boolean includeScores = false;
-    @UriParam
-    private Boolean includeAggregates = false;
-    @UriParam
-    private Boolean includeAvailableBreakdowns = false;
-    @UriParam
-    private Boolean includeAvailableAggregates = false;
-    @UriParam
-    private Boolean includeScoreNotes = false;
-    @UriParam
-    private Boolean topLevelOnly;
-    @UriParam
-    private Boolean favorites;
-    @UriParam(label = "advanced", defaultValue = "false")
-    private Boolean retrieveTargetRecordOnImport = false;
-    @UriParam
-    private Boolean key;
-    @UriParam
-    private Boolean target;
-    @UriParam(defaultValue = "true", enums = "false,true,all")
-    private String display = "true";
-    @UriParam(defaultValue = "10")
-    private Integer perPage = 10;
-    @UriParam(enums = "value,change,changeperc,gap,gapperc,duedate,name,order,default,group,indicator_group,frequency,target,date,trend,bullet,direction")
-    private String sortBy;
-    @UriParam(enums = "asc,desc")
-    private String sortDir;
-    @UriParam
-    private Boolean suppressPaginationHeader = false;
-    @UriParam(defaultValue = "false", enums = "false,true,all")
-    private String displayValue = "false";
-    @UriParam
-    private Boolean inputDisplayValue = false;
-    @UriParam(prefix = "model.", multiValue = true, javaType = "java.lang.String", description = "Defines both request and response models")
-    private transient Map<String, Class<?>> models; // field not in use as its a shortcut for both requestModels/responseModels
-    @UriParam(prefix = "request-model.", multiValue = true, javaType = "java.lang.String")
-    private Map<String, Class<?>> requestModels;
-    @UriParam(prefix = "response-model.", multiValue = true, javaType = "java.lang.String")
-    private Map<String, Class<?>> responseModels;
-    @UriParam(label = "advanced")
-    private ObjectMapper mapper = MAPPER;
-    @UriParam(defaultValue = "HELSINKI", enums = "FUJI,GENEVA,HELSINKI")
-    private ServiceNowRelease release = ServiceNowRelease.HELSINKI;
-    @UriParam(label = "security")
-    private SSLContextParameters sslContextParameters;
-    @UriParam(label = "advanced")
-    private HTTPClientPolicy httpClientPolicy;
-    @UriParam(label = "advanced")
-    private ProxyAuthorizationPolicy proxyAuthorizationPolicy;
-    @UriParam(label = "proxy")
-    private String proxyHost;
-    @UriParam(label = "proxy")
-    private Integer proxyPort;
-    @UriParam(label = "proxy,security")
-    private String proxyUserName;
-    @UriParam(label = "proxy,security")
-    private String proxyPassword;
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public String getApiUrl() {
-        return apiUrl;
-    }
-
-    /**
-     * The ServiceNow REST API url
-     */
-    public void setApiUrl(String apiUrl) {
-        this.apiUrl = apiUrl;
-    }
-
-    public boolean hasApiUrl() {
-        return apiUrl != null;
-    }
-
-    public String getApiVersion() {
-        return apiVersion;
-    }
-
-    /**
-     * The ServiceNow REST API version, default latest
-     */
-    public void setApiVersion(String apiVersion) {
-        this.apiVersion = apiVersion;
-    }
-
-    /**
-     * ServiceNow user account name, MUST be provided
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    /**
-     * ServiceNow account password, MUST be provided
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getOauthClientId() {
-        return oauthClientId;
-    }
-
-    /**
-     * OAuth2 ClientID
-     */
-    public void setOauthClientId(String oauthClientId) {
-        this.oauthClientId = oauthClientId;
-    }
-
-    public String getOauthClientSecret() {
-        return oauthClientSecret;
-    }
-
-    /**
-     * OAuth2 ClientSecret
-     */
-    public void setOauthClientSecret(String oauthClientSecret) {
-        this.oauthClientSecret = oauthClientSecret;
-    }
-
-    public String getOauthTokenUrl() {
-        return oauthTokenUrl;
-    }
-
-    public boolean hasOauthTokenUrl() {
-        return oauthTokenUrl != null;
-    }
-
-    /**
-     * OAuth token Url
-     */
-    public void setOauthTokenUrl(String oauthTokenUrl) {
-        this.oauthTokenUrl = oauthTokenUrl;
-    }
-
-    public boolean hasBasicAuthentication() {
-        return ObjectHelper.isNotEmpty(userName)
-            && ObjectHelper.isNotEmpty(password);
-    }
-
-    public boolean hasOAuthAuthentication() {
-        return ObjectHelper.isNotEmpty(userName)
-            && ObjectHelper.isNotEmpty(password)
-            && ObjectHelper.isNotEmpty(oauthClientId)
-            && ObjectHelper.isNotEmpty(oauthClientSecret);
-    }
-
-    public String getResource() {
-        return resource;
-    }
-
-    /**
-     * The default resource, can be overridden by header CamelServiceNowResource
-     */
-    public void setResource(String resource) {
-        this.resource = resource;
-    }
-
-    public String getTable() {
-        return table;
-    }
-
-    /**
-     * The default table, can be overridden by header CamelServiceNowTable
-     */
-    public void setTable(String table) {
-        this.table = table;
-    }
-
-    public Boolean getExcludeReferenceLink() {
-        return excludeReferenceLink;
-    }
-
-    /**
-     * True to exclude Table API links for reference fields (default: false)
-     */
-    public void setExcludeReferenceLink(Boolean excludeReferenceLink) {
-        this.excludeReferenceLink = excludeReferenceLink;
-    }
-
-    public Boolean getSuppressAutoSysField() {
-        return suppressAutoSysField;
-    }
-
-    /**
-     * True to suppress auto generation of system fields (default: false)
-     */
-    public void setSuppressAutoSysField(Boolean suppressAutoSysField) {
-        this.suppressAutoSysField = suppressAutoSysField;
-    }
-
-    public Boolean getSuppressPaginationHeader() {
-        return suppressPaginationHeader;
-    }
-
-    /**
-     * Set this value to true to remove the Link header from the response. The
-     * Link header allows you to request additional pages of data when the number
-     * of records matching your query exceeds the query limit
-     */
-    public void setSuppressPaginationHeader(Boolean suppressPaginationHeader) {
-        this.suppressPaginationHeader = suppressPaginationHeader;
-    }
-
-    public Boolean getIncludeScores() {
-        return includeScores;
-    }
-
-    /**
-     * Set this parameter to true to return all scores for a scorecard. If a value
-     * is not specified, this parameter defaults to false and returns only the most
-     * recent score value.
-     */
-    public void setIncludeScores(Boolean includeScores) {
-        this.includeScores = includeScores;
-    }
-
-    public Boolean getIncludeAggregates() {
-        return includeAggregates;
-    }
-
-    /**
-     * Set this parameter to true to always return all available aggregates for
-     * an indicator, including when an aggregate has already been applied. If a
-     * value is not specified, this parameter defaults to false and returns no
-     * aggregates.
-     */
-    public void setIncludeAggregates(Boolean includeAggregates) {
-        this.includeAggregates = includeAggregates;
-    }
-
-    public Boolean getIncludeAvailableBreakdowns() {
-        return includeAvailableBreakdowns;
-    }
-
-    /**
-     * Set this parameter to true to return all available breakdowns for an indicator.
-     * If a value is not specified, this parameter defaults to false and returns
-     * no breakdowns.
-     */
-    public void setIncludeAvailableBreakdowns(Boolean includeAvailableBreakdowns) {
-        this.includeAvailableBreakdowns = includeAvailableBreakdowns;
-    }
-
-    public Boolean getIncludeAvailableAggregates() {
-        return includeAvailableAggregates;
-    }
-
-    /**
-     * Set this parameter to true to return all available aggregates for an indicator
-     * when no aggregate has been applied. If a value is not specified, this parameter
-     * defaults to false and returns no aggregates.
-     */
-    public void setIncludeAvailableAggregates(Boolean includeAvailableAggregates) {
-        this.includeAvailableAggregates = includeAvailableAggregates;
-    }
-
-    public Boolean getIncludeScoreNotes() {
-        return includeScoreNotes;
-    }
-
-    /**
-     * Set this parameter to true to return all notes associated with the score.
-     * The note element contains the note text as well as the author and timestamp
-     * when the note was added.
-     */
-    public void setIncludeScoreNotes(Boolean includeScoreNotes) {
-        this.includeScoreNotes = includeScoreNotes;
-    }
-
-    public Boolean getFavorites() {
-        return favorites;
-    }
-
-    /**
-     * Set this parameter to true to return only scorecards that are favorites of
-     * the querying user.
-     */
-    public void setFavorites(Boolean favorites) {
-        this.favorites = favorites;
-    }
-
-    public Boolean getRetrieveTargetRecordOnImport() {
-        return retrieveTargetRecordOnImport;
-    }
-
-    /**
-     * Set this parameter to true to retrieve the target record when using import
-     * set api. The import set result is then replaced by the target record
-     */
-    public void setRetrieveTargetRecordOnImport(Boolean retrieveTargetRecordOnImport) {
-        this.retrieveTargetRecordOnImport = retrieveTargetRecordOnImport;
-    }
-
-    public Boolean getKey() {
-        return key;
-    }
-
-    /**
-     * Set this parameter to true to return only scorecards for key indicators.
-     */
-    public void setKey(Boolean key) {
-        this.key = key;
-    }
-
-    public Boolean getTarget() {
-        return target;
-    }
-
-    /**
-     * Set this parameter to true to return only scorecards that have a target.
-     */
-    public void setTarget(Boolean target) {
-        this.target = target;
-    }
-
-    public String getDisplay() {
-        return display;
-    }
-
-    /**
-     * Set this parameter to true to return only scorecards where the indicator
-     * Display field is selected. Set this parameter to all to return scorecards
-     * with any Display field value. This parameter is true by default.
-     */
-    public void setDisplay(String display) {
-        this.display = display;
-    }
-
-    public Integer getPerPage() {
-        return perPage;
-    }
-
-    /**
-     * Enter the maximum number of scorecards each query can return. By default
-     * this value is 10, and the maximum is 100.
-     */
-    public void setPerPage(Integer perPage) {
-        this.perPage = perPage;
-    }
-
-    public String getSortBy() {
-        return sortBy;
-    }
-
-    /**
-     * Specify the value to use when sorting results. By default, queries sort
-     * records by value.
-     */
-    public void setSortBy(String sortBy) {
-        this.sortBy = sortBy;
-    }
-
-    public String getSortDir() {
-        return sortDir;
-    }
-
-    /**
-     * Specify the sort direction, ascending or descending. By default, queries
-     * sort records in descending order. Use sysparm_sortdir=asc to sort in
-     * ascending order.
-     */
-    public void setSortDir(String sortDir) {
-        this.sortDir = sortDir;
-    }
-
-    public String getDisplayValue() {
-        return displayValue;
-    }
-
-    /**
-     * Return the display value (true), actual value (false), or both (all) for
-     * reference fields (default: false)
-     */
-    public void setDisplayValue(String displayValue) {
-        this.displayValue = displayValue;
-    }
-
-    public Boolean getInputDisplayValue() {
-        return inputDisplayValue;
-    }
-
-    /**
-     * True to set raw value of input fields (default: false)
-     */
-    public void setInputDisplayValue(Boolean inputDisplayValue) {
-        this.inputDisplayValue = inputDisplayValue;
-    }
-
-    public Map<String, Class<?>> getRequestModels() {
-        return requestModels;
-    }
-
-    /**
-     * Sets Jackson's ObjectMapper to use for request/reply
-     */
-    public void setMapper(ObjectMapper mapper) {
-        this.mapper = mapper;
-    }
-
-    public ObjectMapper getMapper() {
-        return mapper;
-    }
-
-    public boolean hasMapper() {
-        return mapper != null;
-    }
-
-    /**
-     * The ServiceNow release to target, default to Helsinki
-     *
-     * See https://docs.servicenow.com
-     */
-    public void setRelease(ServiceNowRelease release) {
-        this.release = release;
-    }
-
-    public ServiceNowRelease getRelease() {
-        return release;
-    }
-
-    public Boolean getTopLevelOnly() {
-        return topLevelOnly;
-    }
-
-    /**
-     * Gets only those categories whose parent is a catalog.
-     */
-    public void setTopLevelOnly(Boolean topLevelOnly) {
-        this.topLevelOnly = topLevelOnly;
-    }
-
-    public SSLContextParameters getSslContextParameters() {
-        return sslContextParameters;
-    }
-
-    /**
-     * To configure security using SSLContextParameters. See http://camel.apache.org/camel-configuration-utilities.html
-     */
-    public void setSslContextParameters(SSLContextParameters sslContextParameters) {
-        this.sslContextParameters = sslContextParameters;
-    }
-
-    public HTTPClientPolicy getHttpClientPolicy() {
-        return httpClientPolicy;
-    }
-
-    /**
-     * To configure http-client
-     */
-    public void setHttpClientPolicy(HTTPClientPolicy httpClientPolicy) {
-        this.httpClientPolicy = httpClientPolicy;
-    }
-
-    public ProxyAuthorizationPolicy getProxyAuthorizationPolicy() {
-        return proxyAuthorizationPolicy;
-    }
-
-    /**
-     * To configure proxy authentication
-     */
-    public void setProxyAuthorizationPolicy(ProxyAuthorizationPolicy proxyAuthorizationPolicy) {
-        this.proxyAuthorizationPolicy = proxyAuthorizationPolicy;
-    }
-
-    public String getProxyHost() {
-        return proxyHost;
-    }
-
-    /**
-     * The proxy host name
-     */
-    public void setProxyHost(String proxyHost) {
-        this.proxyHost = proxyHost;
-    }
-
-    public Integer getProxyPort() {
-        return proxyPort;
-    }
-
-    /**
-     * The proxy port number
-     */
-    public void setProxyPort(Integer proxyPort) {
-        this.proxyPort = proxyPort;
-    }
-
-    public String getProxyUserName() {
-        return proxyUserName;
-    }
-
-    /**
-     * Username for proxy authentication
-     */
-    public void setProxyUserName(String proxyUserName) {
-        this.proxyUserName = proxyUserName;
-    }
-
-    public String getProxyPassword() {
-        return proxyPassword;
-    }
-
-    /**
-     * Password for proxy authentication
-     */
-    public void setProxyPassword(String proxyPassword) {
-        this.proxyPassword = proxyPassword;
-    }
-
-    // *************************************************
-    //
-    // *************************************************
-
-    public void setModels(Map<String, Class<?>> models) {
-        setRequestModels(models);
-        setResponseModels(models);
-    }
-
-    public void addModel(String name, Class<?> type) {
-        addRequestModel(name, type);
-        addResponseModel(name, type);
-    }
-
-    // *************************************************
-    // Request model
-    // *************************************************
-
-    /**
-     * Defines the request model
-     */
-    public void setRequestModels(Map<String, Class<?>> models) {
-        if (this.requestModels == null) {
-            this.requestModels = new HashMap<>();
-        }
-
-        this.requestModels.clear();
-        this.requestModels.putAll(models);
-    }
-
-    public void addRequestModel(String name, Class<?> type) {
-        if (this.requestModels == null) {
-            this.requestModels = new HashMap<>();
-        }
-
-        this.requestModels.put(name, type);
-    }
-
-    public Class<?> getRequestModel(String name) {
-        return getRequestModel(name, null);
-    }
-
-    public Class<?> getRequestModel(String name, Class<?> defaultType) {
-        Class<?> model = defaultType;
-
-        if (this.requestModels != null && this.requestModels.containsKey(name)) {
-            model = this.requestModels.get(name);
-        }
-
-        return model;
-    }
-
-    // *************************************************
-    // Response model
-    // *************************************************
-
-    /**
-     * Defines the response model
-     */
-    public void setResponseModels(Map<String, Class<?>> models) {
-        if (this.responseModels == null) {
-            this.responseModels = new HashMap<>();
-        }
-
-        this.responseModels.putAll(models);
-    }
-
-    public void addResponseModel(String name, Class<?> type) {
-        if (this.responseModels == null) {
-            this.responseModels = new HashMap<>();
-        }
-
-        this.responseModels.clear();
-        this.responseModels.put(name, type);
-    }
-
-    public Class<?> getResponseModel(String name) {
-        return getResponseModel(name, null);
-    }
-
-    public Class<?> getResponseModel(String name, Class<?> defaultType) {
-        Class<?> model = defaultType;
-
-        if (this.responseModels != null && this.responseModels.containsKey(name)) {
-            model = this.responseModels.get(name);
-        }
-
-        return model;
-    }
-
-    // *************************************************
-    //
-    // *************************************************
-
-    public ServiceNowConfiguration copy() {
-        try {
-            return (ServiceNowConfiguration)super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new RuntimeCamelException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConstants.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConstants.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConstants.java
deleted file mode 100644
index b967bbe..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConstants.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-public final class ServiceNowConstants {
-    public static final String CAMEL_HEADER_PREFIX = "CamelServiceNow";
-
-    public static final String RESOURCE = "CamelServiceNowResource";
-    public static final String ACTION = "CamelServiceNowAction";
-    public static final String ACTION_SUBJECT = "CamelServiceNowActionSubject";
-    public static final String MODEL = "CamelServiceNowModel";
-    public static final String REQUEST_MODEL = "CamelServiceNowRequestModel";
-    public static final String RESPONSE_MODEL = "CamelServiceNowResponseModel";
-    public static final String OFFSET_NEXT = "CamelServiceNowOffsetNext";
-    public static final String OFFSET_PREV = "CamelServiceNowOffsetPrev";
-    public static final String OFFSET_FIRST = "CamelServiceNowOffsetFirst";
-    public static final String OFFSET_LAST = "CamelServiceNowOffsetLast";
-    public static final String CONTENT_TYPE = "CamelServiceNowContentType";
-    public static final String CONTENT_ENCODING = "CamelServiceNowContentEncoding";
-    public static final String CONTENT_META = "CamelServiceNowContentMeta";
-    public static final String RESPONSE_META = "CamelServiceNowResponseMeta";
-    public static final String API_VERSION = "CamelServiceNowApiVersion";
-    public static final String RESPONSE_TYPE = "CamelServiceNowResponseType";
-    public static final String RETRIEVE_TARGET_RECORD = "CamelServiceNowRetrieveTargetRecord";
-
-    public static final String ATTACHMENT_META_HEADER = "X-Attachment-Metadata";
-
-    public static final String RESOURCE_TABLE = "table";
-    public static final String RESOURCE_AGGREGATE = "aggregate";
-    public static final String RESOURCE_IMPORT = "import";
-    public static final String RESOURCE_ATTACHMENT = "attachment";
-    public static final String RESOURCE_SCORECARDS = "scorecards";
-    public static final String RESOURCE_MISC = "misc";
-    public static final String RESOURCE_SERVICE_CATALOG = "service_catalog";
-    public static final String RESOURCE_SERVICE_CATALOG_ITEMS = "service_catalog_items";
-    public static final String RESOURCE_SERVICE_CATALOG_CARTS = "service_catalog_cart";
-    public static final String RESOURCE_SERVICE_CATALOG_CATEGORIES = "service_catalog_categories";
-
-    public static final String ACTION_RETRIEVE = "retrieve";
-    public static final String ACTION_CONTENT = "content";
-    public static final String ACTION_CREATE = "create";
-    public static final String ACTION_MODIFY = "modify";
-    public static final String ACTION_DELETE = "delete";
-    public static final String ACTION_UPDATE = "update";
-    public static final String ACTION_UPLOAD = "upload";
-
-    public static final String ACTION_SUBJECT_CATEGORIES = "categories";
-    public static final String ACTION_SUBJECT_CART = "cart";
-    public static final String ACTION_SUBJECT_PRODUCER = "producer";
-    public static final String ACTION_SUBJECT_GUIDE = "guide";
-    public static final String ACTION_SUBJECT_SUBMIT_GUIDE = "submit_guide";
-    public static final String ACTION_SUBJECT_CHECKOUT_GUIDE = "checkout_guide";
-    public static final String ACTION_SUBJECT_PERFORMANCE_ANALYTICS = "performance_analytics";
-    public static final String ACTION_SUBJECT_USER_ROLE_INHERITANCE = "user_role_inheritance";
-    public static final String ACTION_SUBJECT_IDENTIFY_RECONCILE = "identify_reconcile";
-    public static final String ACTION_SUBJECT_DELIVERY_ADDRESS = "delivery_address";
-    public static final String ACTION_SUBJECT_CHECKOUT = "checkout";
-
-    public static final String LINK_NEXT = "next";
-    public static final String LINK_PREV = "prev";
-    public static final String LINK_FIRST = "first";
-    public static final String LINK_LAST = "last";
-
-    private ServiceNowConstants() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowDispatcher.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowDispatcher.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowDispatcher.java
deleted file mode 100644
index e3a0473..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowDispatcher.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.function.Predicate;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.util.ObjectHelper;
-
-public class ServiceNowDispatcher {
-    private final Predicate<Exchange> predicate;
-    private final Processor delegate;
-
-    public ServiceNowDispatcher(Predicate<Exchange> predicate, Processor delegate) {
-        this.predicate = ObjectHelper.notNull(predicate, "predicate");
-        this.delegate = ObjectHelper.notNull(delegate, "delegate");
-    }
-
-    public boolean match(Exchange exchange) {
-        return predicate.test(exchange);
-    }
-
-    public void process(Exchange exchange) throws Exception {
-        delegate.process(exchange);
-    }
-
-    // ********************
-    // Helpers
-    // ********************
-
-    public static ServiceNowDispatcher on(final String action, final String subject, final Processor delegate) {
-        return new ServiceNowDispatcher(e -> matches(e.getIn(), action, subject), delegate);
-    }
-
-    public static boolean matches(Message in, String action, final String subject) {
-        return ObjectHelper.equal(action, in.getHeader(ServiceNowConstants.ACTION, String.class), true)
-            && ObjectHelper.equal(subject, in.getHeader(ServiceNowConstants.ACTION_SUBJECT, String.class), true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowEndpoint.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowEndpoint.java
deleted file mode 100644
index dcf3563..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowEndpoint.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.impl.DefaultEndpoint;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriPath;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The servicenow component is used to integrate Camel with <a href="http://www.servicenow.com/">ServiceNow</a> cloud services.
- */
-@UriEndpoint(firstVersion = "2.18.0", scheme = "servicenow", title = "ServiceNow", syntax = "servicenow:instanceName", producerOnly = true, label = "api,cloud,management")
-public class ServiceNowEndpoint extends DefaultEndpoint {
-    private static final Logger LOGGER = LoggerFactory.getLogger(ServiceNowEndpoint.class);
-
-    @UriPath(description = "The ServiceNow instance name")
-    @Metadata(required = "true")
-    private final String instanceName;
-
-    @UriParam
-    private final ServiceNowConfiguration configuration;
-
-    public ServiceNowEndpoint(String uri, ServiceNowComponent component, ServiceNowConfiguration configuration, String instanceName) throws Exception {
-        super(uri, component);
-
-        this.configuration = configuration;
-        this.instanceName = instanceName;
-    }
-
-    @Override
-    public Producer createProducer() throws Exception {
-        ServiceNowProducer producer = configuration.getRelease().get(this);
-        LOGGER.info("Producer for ServiceNow Rel. {} = {}/{}",
-            configuration.getRelease().name(),
-            producer.getRelease().name(),
-            producer.getClass().getName()
-        );
-
-        return producer;
-    }
-
-    @Override
-    public Consumer createConsumer(Processor processor) throws Exception {
-        throw new UnsupportedOperationException("Consumer is not supported");
-    }
-
-    @Override
-    public boolean isSingleton() {
-        return true;
-    }
-
-    public ServiceNowConfiguration getConfiguration() {
-        return configuration;
-    }
-
-    public String getInstanceName() {
-        return instanceName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowException.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowException.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowException.java
deleted file mode 100644
index 6a5e0a9..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowException.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.apache.camel.CamelException;
-
-public class ServiceNowException extends CamelException {
-    private final Integer code;
-    private final String status;
-    private final String detail;
-    private final Map<Object, Object> attributes;
-
-    public ServiceNowException(Integer code, String status, String message, String detail) {
-        super(message);
-        this.code = code;
-        this.status = status;
-        this.detail = detail;
-        this.attributes = Collections.emptyMap();
-    }
-
-    public ServiceNowException(Integer code, Map<Object, Object> attributes) {
-        super(String.format("Status (%d)", code));
-        this.code = code;
-        this.status = null;
-        this.detail = null;
-        this.attributes = Collections.unmodifiableMap(attributes);
-    }
-
-    public Integer getCode() {
-        return code;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public String getDetail() {
-        return detail;
-    }
-
-    public Map<Object, Object> getAttributes() {
-        return attributes;
-    }
-
-    @Override
-    public String toString() {
-        return getMessage() != null
-            ? "" + this.status + ": " + getMessage()
-            : super.toString();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowExceptionModel.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowExceptionModel.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowExceptionModel.java
deleted file mode 100644
index a881d4a..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowExceptionModel.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-public final class ServiceNowExceptionModel {
-    private final String status;
-    private final Map<String, String> error;
-
-    public ServiceNowExceptionModel(
-        @JsonProperty("status") String status,
-        @JsonProperty("error") Map<String, String> error) {
-        this.status = status;
-        this.error = error;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public Map<String, String> getError() {
-        return error;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowHelper.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowHelper.java
deleted file mode 100644
index 2d9b70e..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowHelper.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.function.BiConsumer;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-
-import org.apache.camel.util.StringHelper;
-import org.apache.camel.util.URISupport;
-
-public final class ServiceNowHelper {
-    private ServiceNowHelper() {
-    }
-
-    public static void findOffsets(Response response, BiConsumer<String, Object> consumer) throws Exception {
-        List<String> links = response.getStringHeaders().get(HttpHeaders.LINK);
-        if (links != null) {
-            for (String link : links) {
-                String[] parts = link.split(";");
-                if (parts.length != 2) {
-                    continue;
-                }
-
-                // Sanitize parts
-                String uri = StringHelper.between(parts[0], "<", ">");
-                String rel = StringHelper.removeQuotes(StringHelper.after(parts[1], "="));
-
-                Map<String, Object> query = URISupport.parseQuery(uri);
-                Object offset = query.get(ServiceNowParams.SYSPARM_OFFSET.getId());
-
-                if (offset != null) {
-                    switch (rel) {
-                    case ServiceNowConstants.LINK_FIRST:
-                        consumer.accept(ServiceNowConstants.OFFSET_FIRST, offset);
-                        break;
-                    case ServiceNowConstants.LINK_LAST:
-                        consumer.accept(ServiceNowConstants.OFFSET_LAST, offset);
-                        break;
-                    case ServiceNowConstants.LINK_NEXT:
-                        consumer.accept(ServiceNowConstants.OFFSET_NEXT, offset);
-                        break;
-                    case ServiceNowConstants.LINK_PREV:
-                        consumer.accept(ServiceNowConstants.OFFSET_PREV, offset);
-                        break;
-                    default:
-                        break;
-                    }
-                }
-            }
-        }
-    }
-
-    public static Optional<String> findOffset(Response response, String type) throws Exception {
-        List<String> links = response.getStringHeaders().get(HttpHeaders.LINK);
-        if (links != null) {
-            for (String link : links) {
-                String[] parts = link.split(";");
-                if (parts.length != 2) {
-                    continue;
-                }
-
-                // Sanitize parts
-                String uri = StringHelper.between(parts[0], "<", ">");
-                String rel = StringHelper.removeQuotes(StringHelper.after(parts[1], "="));
-
-                Map<String, Object> query = URISupport.parseQuery(uri);
-                Object offset = query.get(ServiceNowParams.SYSPARM_OFFSET.getId());
-
-                if (offset != null && type.equals(rel)) {
-                    return Optional.of(offset.toString());
-                }
-            }
-        }
-
-        return Optional.empty();
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtension.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtension.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtension.java
deleted file mode 100644
index f7e2df8..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtension.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Stack;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.function.Consumer;
-import java.util.regex.Pattern;
-import java.util.stream.Stream;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.component.extension.MetaDataExtension;
-import org.apache.camel.component.extension.metadata.AbstractMetaDataExtension;
-import org.apache.camel.component.extension.metadata.MetaDataBuilder;
-import org.apache.camel.component.servicenow.model.DictionaryEntry;
-import org.apache.camel.util.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StringHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-final class ServiceNowMetaDataExtension extends AbstractMetaDataExtension {
-    private static final Logger LOGGER = LoggerFactory.getLogger(ServiceNowMetaDataExtension.class);
-    private final ConcurrentMap<String, String> properties;
-
-    ServiceNowMetaDataExtension() {
-        this.properties = new ConcurrentHashMap<>();
-    }
-
-    @Override
-    public Optional<MetaDataExtension.MetaData> meta(Map<String, Object> parameters) {
-        try {
-            final MetaContext context = new MetaContext(parameters);
-
-            if (!ObjectHelper.equalIgnoreCase(context.getObjectType(), "table")) {
-                throw new UnsupportedOperationException("Unsupported object type <" + context.getObjectType() + ">");
-            }
-
-            return tableMeta(context);
-
-        } catch (UnsupportedOperationException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private Optional<MetaDataExtension.MetaData> tableMeta(MetaContext context) {
-        try {
-            final List<String> names = getObjectHierarchy(context);
-            final ObjectNode root = context.getConfiguration().getMapper().createObjectNode();
-
-            if (names.isEmpty()) {
-                return Optional.empty();
-            }
-
-            loadProperties(context);
-            registerDefinitions(context, root);
-
-            root.putObject("properties");
-            root.put("$schema", "http://json-schema.org/schema#");
-            root.put("id", "http://camel.apache.org/schemas/servicenow/" + context.getObjectName() + ".json");
-            root.put("type", "object");
-            root.put("additionalProperties", false);
-            root.putArray("required");
-
-            for (String name : names) {
-                context.getStack().push(name);
-
-                LOGGER.debug("Load dictionary <{}>", context.getStack());
-                loadDictionary(context, name, root);
-                context.getStack().pop();
-            }
-
-            return Optional.of(
-                MetaDataBuilder.on(getCamelContext())
-                    .withAttribute(MetaData.CONTENT_TYPE, "application/schema+json")
-                    .withAttribute(MetaData.JAVA_TYPE, JsonNode.class)
-                    .withPayload(root)
-                    .build()
-            );
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    // ********************************
-    // Properties
-    // ********************************
-
-    private synchronized void loadProperties(MetaContext context) {
-        if (!properties.isEmpty()) {
-            return;
-        }
-
-        try {
-            String offset = "0";
-
-            while (true) {
-                Response response = context.getClient().reset()
-                    .types(MediaType.APPLICATION_JSON_TYPE)
-                    .path("now")
-                    .path(context.getConfiguration().getApiVersion())
-                    .path("table")
-                    .path("sys_properties")
-                    .query("sysparm_exclude_reference_link", "true")
-                    .query("sysparm_fields", "name%2Cvalue")
-                    .query("sysparm_offset", offset)
-                    .query("sysparm_query", "name=glide.sys.date_format^ORname=glide.sys.time_format")
-                    .invoke(HttpMethod.GET);
-
-                findResultNode(response).ifPresent(node -> processResult(node, n -> {
-                    if (n.hasNonNull("name") && n.hasNonNull("value")) {
-                        properties.put(
-                            n.findValue("name").asText(),
-                            n.findValue("value").asText()
-                        );
-                    }
-                }));
-
-                Optional<String> next = ServiceNowHelper.findOffset(response, ServiceNowConstants.LINK_NEXT);
-                if (next.isPresent()) {
-                    offset = next.get();
-                } else {
-                    break;
-                }
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    // ********************************
-    // Definitions
-    // ********************************
-
-    private void registerDefinitions(MetaContext context, ObjectNode root) {
-        final ObjectNode definitions = root.putObject("definitions");
-
-        // Global Unique ID
-        definitions.putObject("guid")
-            .put("type", "string")
-            .put("pattern", "^[a-fA-F0-9]{32}");
-
-        // Date/Time
-        String dateFormat = properties.getOrDefault("glide.sys.date_format", "yyyy-MM-dd");
-        String timeFormat = properties.getOrDefault("glide.sys.time_format", "HH:mm:ss");
-
-        definitions.putObject("date")
-            .put("type", "string")
-            .put("format", dateFormat);
-        definitions.putObject("time")
-            .put("type", "string")
-            .put("format", timeFormat);
-        definitions.putObject("date-time")
-            .put("type", "string")
-            .put("format", dateFormat + " " + timeFormat);
-    }
-
-    // ********************************
-    // Dictionary
-    // ********************************
-
-    private void loadDictionary(MetaContext context, String name, ObjectNode root) throws Exception {
-        String offset = "0";
-
-        while (true) {
-            Response response = context.getClient().reset()
-                .types(MediaType.APPLICATION_JSON_TYPE)
-                .path("now")
-                .path(context.getConfiguration().getApiVersion())
-                .path("table")
-                .path("sys_dictionary")
-                .query("sysparm_display_value", "false")
-                .queryF("sysparm_query", "name=%s", name)
-                .query("sysparm_offset", offset)
-                .invoke(HttpMethod.GET);
-
-            findResultNode(response).ifPresent(node -> processResult(node, n -> {
-                processDictionaryNode(context, root, n);
-            }));
-
-            Optional<String> next = ServiceNowHelper.findOffset(response, ServiceNowConstants.LINK_NEXT);
-            if (next.isPresent()) {
-                offset = next.get();
-            } else {
-                break;
-            }
-        }
-    }
-
-    private void processDictionaryNode(MetaContext context, ObjectNode root, JsonNode node) {
-        if (node.hasNonNull("element")) {
-            final String id = node.get("element").asText();
-
-            if (ObjectHelper.isNotEmpty(id)) {
-                String parent = context.getStack().peek();
-                String includeKey = "object." + parent + ".fields";
-                String fields = (String)context.getParameters().get(includeKey);
-
-                boolean included = false;
-
-                if (ObjectHelper.isNotEmpty(fields)) {
-                    if (Stream.of(fields.split(",")).map(StringHelper::trimToNull).filter(Objects::nonNull).map(Pattern::compile).anyMatch(p -> p.matcher(id).matches())) {
-                        included = true;
-                    }
-                    if (Stream.of(fields.split(",")).map(StringHelper::trimToNull).filter(Objects::nonNull).anyMatch(id::equalsIgnoreCase)) {
-                        included = true;
-                    }
-                } else {
-                    included = !context.getParameters().containsKey(includeKey);
-                }
-
-                if (!included) {
-                    return;
-                }
-
-                context.getStack().push(id);
-                LOGGER.debug("Load dictionary element <{}>", context.getStack());
-
-                try {
-                    final DictionaryEntry entry = context.getConfiguration().getMapper().treeToValue(node, DictionaryEntry.class);
-                    final ObjectNode property = ((ObjectNode)root.get("properties")).putObject(id);
-
-                    // Add custom fields for code generation, json schema
-                    // validators are not supposed to use this extensions.
-                    final ObjectNode servicenow = property.putObject("servicenow");
-
-                    // the internal type
-                    servicenow.put("internal_type", entry.getInternalType().getValue());
-
-                    switch (entry.getInternalType().getValue()) {
-                    case "integer":
-                        property.put("type", "number");
-                        break;
-                    case "boolean":
-                        property.put("type", "boolean");
-                        break;
-                    case "guid":
-                    case "GUID":
-                        property.put("$ref", "#/definitions/guid");
-                        break;
-                    case "glide_date":
-                        property.put("$ref", "#/definitions/date");
-                        break;
-                    case "due_date":
-                    case "glide_date_time":
-                    case "glide_time":
-                    case "glide_duration":
-                        property.put("$ref", "#/definitions/date-time");
-                        break;
-                    case "reference":
-                        property.put("$ref", "#/definitions/guid");
-
-                        if (entry.getReference().getValue() != null) {
-                            // the referenced object type
-                            servicenow.put("sys_db_object", entry.getReference().getValue());
-                        }
-
-                        break;
-                    default:
-                        property.put("type", "string");
-
-                        if (entry.getMaxLength() != null) {
-                            property.put("maxLength", entry.getMaxLength());
-                        }
-                        break;
-                    }
-
-                    if (entry.isMandatory()) {
-                        ArrayNode required = (ArrayNode)root.get("required");
-                        if (required == null) {
-                            required = root.putArray("required");
-                        }
-
-                        required.add(id);
-                    }
-
-                } catch (JsonProcessingException e) {
-                    throw new RuntimeCamelException(e);
-                } finally {
-
-                    context.getStack().pop();
-                }
-            }
-        }
-    }
-
-    // *************************************
-    // Helpers
-    // *************************************
-
-    private List<String> getObjectHierarchy(MetaContext context) throws Exception {
-        List<String> hierarchy = new ArrayList<>();
-        String query = String.format("name=%s", context.getObjectName());
-
-        while (true) {
-            Optional<JsonNode> response = context.getClient().reset()
-                .types(MediaType.APPLICATION_JSON_TYPE)
-                .path("now")
-                .path(context.getConfiguration().getApiVersion())
-                .path("table")
-                .path("sys_db_object")
-                .query("sysparm_exclude_reference_link", "true")
-                .query("sysparm_fields", "name%2Csuper_class")
-                .query("sysparm_query", query)
-                .trasform(HttpMethod.GET, this::findResultNode);
-
-            if (response.isPresent()) {
-                JsonNode node = response.get();
-                JsonNode nameNode = node.findValue("name");
-                JsonNode classNode = node.findValue("super_class");
-
-                if (nameNode != null && classNode != null) {
-                    query = String.format("sys_id=%s", classNode.textValue());
-                    hierarchy.add(0, nameNode.textValue());
-                } else {
-                    break;
-                }
-            } else {
-                break;
-            }
-        }
-
-        return hierarchy;
-    }
-
-    private void processResult(JsonNode node, Consumer<JsonNode> consumer) {
-        if (node.isArray()) {
-            Iterator<JsonNode> it = node.elements();
-            while (it.hasNext()) {
-                consumer.accept(it.next());
-            }
-        } else {
-            consumer.accept(node);
-        }
-    }
-
-    private Optional<JsonNode> findResultNode(Response response) {
-        if (ObjectHelper.isNotEmpty(response.getHeaderString(HttpHeaders.CONTENT_TYPE))) {
-            JsonNode root = response.readEntity(JsonNode.class);
-            if (root != null) {
-                Iterator<Map.Entry<String, JsonNode>> fields = root.fields();
-                while (fields.hasNext()) {
-                    final Map.Entry<String, JsonNode> entry = fields.next();
-                    final String key = entry.getKey();
-                    final JsonNode node = entry.getValue();
-
-                    if (ObjectHelper.equal("result", key, true)) {
-                        return Optional.of(node);
-                    }
-                }
-            }
-        }
-
-        return Optional.empty();
-    }
-
-    // *********************************
-    // Context class
-    // *********************************
-
-    private final class MetaContext {
-        private final Map<String, Object> parameters;
-        private final ServiceNowConfiguration configuration;
-        private final ServiceNowClient client;
-        private final String instanceName;
-        private final String objectName;
-        private final String objectType;
-        private final Stack<String> stack;
-
-        MetaContext(Map<String, Object> parameters) throws Exception {
-            this.parameters = parameters;
-            this.configuration = getComponent(ServiceNowComponent.class).getConfiguration().copy();
-            this.stack = new Stack<>();
-
-            IntrospectionSupport.setProperties(configuration, new HashMap<>(parameters));
-
-            this.instanceName = (String)parameters.getOrDefault("instanceName", getComponent(ServiceNowComponent.class).getInstanceName());
-            this.objectType = (String)parameters.getOrDefault("objectType", "table");
-            this.objectName = (String)parameters.getOrDefault("objectName", configuration.getTable());
-
-            ObjectHelper.notNull(instanceName, "instanceName");
-            ObjectHelper.notNull(objectName, "objectName");
-            ObjectHelper.notNull(objectType, "objectType");
-
-            // Configure Api and OAuthToken ULRs using instanceName
-            if (!configuration.hasApiUrl()) {
-                configuration.setApiUrl(String.format("https://%s.service-now.com/api", instanceName));
-            }
-            if (!configuration.hasOauthTokenUrl()) {
-                configuration.setOauthTokenUrl(String.format("https://%s.service-now.com/oauth_token.do", instanceName));
-            }
-
-            this.client = new ServiceNowClient(getCamelContext(), configuration);
-        }
-
-        public Map<String, Object> getParameters() {
-            return parameters;
-        }
-
-        public ServiceNowConfiguration getConfiguration() {
-            return configuration;
-        }
-
-        public ServiceNowClient getClient() {
-            return client;
-        }
-
-        public String getInstanceName() {
-            return instanceName;
-        }
-
-        public String getObjectType() {
-            return objectType;
-        }
-
-        public String getObjectName() {
-            return objectName;
-        }
-
-        public Stack<String> getStack() {
-            return stack;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParam.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParam.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParam.java
deleted file mode 100644
index 5353753..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParam.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import org.apache.camel.Message;
-
-public interface ServiceNowParam {
-    String getId();
-    String getHeader();
-    Class<?> getType();
-    Object getDefaultValue(ServiceNowConfiguration configuration);
-    Object getHeaderValue(Message message);
-    Object getHeaderValue(Message message, ServiceNowConfiguration configuration);
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParams.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParams.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParams.java
deleted file mode 100644
index 75f16f9..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowParams.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.function.Function;
-
-import org.apache.camel.Message;
-import org.apache.camel.util.ObjectHelper;
-
-public enum ServiceNowParams implements ServiceNowParam {
-    PARAM_SYS_ID("sys_id", "CamelServiceNowSysId", String.class),
-    PARAM_USER_SYS_ID("user_sysid", "CamelServiceNowUserSysId", String.class),
-    PARAM_USER_ID("user_id", "CamelServiceNowUserId", String.class),
-    PARAM_CART_ITEM_ID("cart_item_id", "CamelServiceNowCartItemId", String.class),
-    PARAM_FILE_NAME("file_name", "CamelServiceNowFileName", String.class),
-    PARAM_TABLE_NAME("table_name", "CamelServiceNowTable", String.class),
-    PARAM_TABLE_SYS_ID("table_sys_id", "CamelServiceNowTableSysId", String.class),
-    PARAM_ENCRYPTION_CONTEXT("encryption_context", "CamelServiceNowEncryptionContext", String.class),
-    SYSPARM_CATEGORY("sysparm_category", "CamelServiceNowCategory", String.class),
-    SYSPARM_TYPE("sysparm_type", "CamelServiceNowType", String.class),
-    SYSPARM_CATALOG("sysparm_catalog", "CamelServiceNowCatalog", String.class),
-    SYSPARM_QUERY("sysparm_query", "CamelServiceNowQuery", String.class),
-    SYSPARM_DISPLAY_VALUE("sysparm_display_value", "CamelServiceNowDisplayValue", String.class, ServiceNowConfiguration::getDisplayValue),
-    SYSPARM_INPUT_DISPLAY_VALUE("sysparm_input_display_value", "CamelServiceNowInputDisplayValue", Boolean.class, ServiceNowConfiguration::getInputDisplayValue),
-    SYSPARM_EXCLUDE_REFERENCE_LINK("sysparm_exclude_reference_link", "CamelServiceNowExcludeReferenceLink", Boolean.class, ServiceNowConfiguration::getExcludeReferenceLink),
-    SYSPARM_FIELDS("sysparm_fields", "CamelServiceNowFields", String.class),
-    SYSPARM_LIMIT("sysparm_limit", "CamelServiceNowLimit", Integer.class),
-    SYSPARM_TEXT("sysparm_text", "CamelServiceNowText", String.class),
-    SYSPARM_OFFSET("sysparm_offset", "CamelServiceNowOffset", Integer.class),
-    SYSPARM_VIEW("sysparm_view", "CamelServiceNowView", String.class),
-    SYSPARM_SUPPRESS_AUTO_SYS_FIELD("sysparm_suppress_auto_sys_field", "CamelServiceNowSuppressAutoSysField", Boolean.class, ServiceNowConfiguration::getSuppressAutoSysField),
-    SYSPARM_SUPPRESS_PAGINATION_HEADER("sysparm_suppress_pagination_header", "CamelServiceNowSuppressPaginationHeader", Boolean.class, ServiceNowConfiguration::getSuppressPaginationHeader),
-    SYSPARM_MIN_FIELDS("sysparm_min_fields", "CamelServiceNowMinFields", String.class),
-    SYSPARM_MAX_FIELDS("sysparm_max_fields", "CamelServiceNowMaxFields", String.class),
-    SYSPARM_SUM_FIELDS("sysparm_sum_fields", "CamelServiceNowSumFields", String.class),
-    SYSPARM_AVG_FIELDS("sysparm_avg_fields", "CamelServiceNowAvgFields", String.class),
-    SYSPARM_COUNT("sysparm_count", "CamelServiceNowCount", Boolean.class),
-    SYSPARM_GROUP_BY("sysparm_group_by", "CamelServiceNowGroupBy", String.class),
-    SYSPARM_ORDER_BY("sysparm_order_by", "CamelServiceNowOrderBy", String.class),
-    SYSPARM_HAVING("sysparm_having", "CamelServiceNowHaving", String.class),
-    SYSPARM_UUID("sysparm_uuid", "CamelServiceNowUUID", String.class),
-    SYSPARM_BREAKDOWN("sysparm_breakdown", "CamelServiceNowBreakdown", String.class),
-    SYSPARM_INCLUDE_SCORES("sysparm_include_scores", "CamelServiceNowIncludeScores", Boolean.class, ServiceNowConfiguration::getIncludeScores),
-    SYSPARM_INCLUDE_SCORE_NOTES("sysparm_include_score_notes", "CamelServiceNowIncludeScoreNotes", Boolean.class, ServiceNowConfiguration::getIncludeScoreNotes),
-    SYSPARM_INCLUDE_AGGREGATES("sysparm_include_aggregates", "CamelServiceNowIncludeAggregates", Boolean.class, ServiceNowConfiguration::getIncludeAggregates),
-    SYSPARM_INCLUDE_AVAILABLE_BREAKDOWNS("sysparm_include_available_breakdowns", "CamelServiceNowIncludeAvailableBreakdowns", Boolean.class, ServiceNowConfiguration::getIncludeAvailableBreakdowns),
-    SYSPARM_INCLUDE_AVAILABLE_AGGREGATES("sysparm_include_available_aggregates", "CamelServiceNowIncludeAvailableAggregates", Boolean.class, ServiceNowConfiguration::getIncludeAvailableAggregates),
-    SYSPARM_FAVORITES("sysparm_favorites", "CamelServiceNowFavorites", Boolean.class, ServiceNowConfiguration::getFavorites),
-    SYSPARM_KEY("sysparm_key", "CamelServiceNowKey", Boolean.class, ServiceNowConfiguration::getKey),
-    SYSPARM_TARGET("sysparm_target", "CamelServiceNowTarget", Boolean.class, ServiceNowConfiguration::getTarget),
-    SYSPARM_DISPLAY("sysparm_display", "CamelServiceNowDisplay", String.class, ServiceNowConfiguration::getDisplay),
-    SYSPARM_PER_PAGE("sysparm_per_page", "CamelServiceNowPerPage", Integer.class, ServiceNowConfiguration::getPerPage),
-    SYSPARM_SORT_BY("sysparm_sortby", "CamelServiceNowSortBy", String.class, ServiceNowConfiguration::getSortBy),
-    SYSPARM_SORT_DIR("sysparm_sortdir", "CamelServiceNowSortDir", String.class, ServiceNowConfiguration::getSortDir),
-    SYSPARM_CONTAINS("sysparm_contains", "CamelServiceNowContains", String.class),
-    SYSPARM_TAGS("sysparm_tags", "CamelServiceNowTags", String.class),
-    SYSPARM_PAGE("sysparm_page", "CamelServiceNowPage", String.class),
-    SYSPARM_ELEMENTS_FILTER("sysparm_elements_filter", "CamelServiceNowElementsFilter", String.class),
-    SYSPARM_BREAKDOWN_RELATION("sysparm_breakdown_relation", "CamelServiceNowBreakdownRelation", String.class),
-    SYSPARM_DATA_SOURCE("sysparm_data_source", "CamelServiceNowDataSource", String.class),
-    SYSPARM_TOP_LEVEL_ONLY("sysparm_top_level_only", "CamelServiceNowTopLevelOnly", Boolean.class, ServiceNowConfiguration::getTopLevelOnly);
-
-    private final String id;
-    private final String header;
-    private final Class<?> type;
-    private final Function<ServiceNowConfiguration, ?> defaultValueSupplier;
-
-    ServiceNowParams(String id, String header, Class<?> type) {
-        this(id, header, type, null);
-    }
-
-    ServiceNowParams(String id, String header, Class<?> type, Function<ServiceNowConfiguration, ?> defaultValueSupplier) {
-        ObjectHelper.notNull(id, "ServiceNowSysParam (id)");
-        ObjectHelper.notNull(header, "ServiceNowSysParam (header)");
-        ObjectHelper.notNull(type, "ServiceNowSysParam (type)");
-
-        this.id = id;
-        this.header = header.startsWith(ServiceNowConstants.CAMEL_HEADER_PREFIX)
-            ? header
-            : ServiceNowConstants.CAMEL_HEADER_PREFIX + ObjectHelper.capitalize(header);
-
-        this.type = type;
-        this.defaultValueSupplier = defaultValueSupplier;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public String getHeader() {
-        return header;
-    }
-
-    public Class<?> getType() {
-        return type;
-    }
-
-    public Object getDefaultValue(ServiceNowConfiguration configuration) {
-        return defaultValueSupplier != null ? defaultValueSupplier.apply(configuration) : null;
-    }
-
-    public Object getHeaderValue(Message message) {
-        return message.getHeader(header, type);
-    }
-
-    public Object getHeaderValue(Message message, ServiceNowConfiguration configuration) {
-        return message.getHeader(header, getDefaultValue(configuration), type);
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducer.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducer.java
deleted file mode 100644
index 67e08bb..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducer.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import org.apache.camel.Producer;
-
-public interface ServiceNowProducer extends Producer {
-    ServiceNowRelease getRelease();
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducerSupplier.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducerSupplier.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducerSupplier.java
deleted file mode 100644
index d339417..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowProducerSupplier.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.camel.component.servicenow;
-
-public interface ServiceNowProducerSupplier {
-    ServiceNowProducer get(ServiceNowEndpoint endpoint) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowRelease.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowRelease.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowRelease.java
deleted file mode 100644
index d546215..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowRelease.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import org.apache.camel.component.servicenow.releases.fuji.FujiServiceNowProducer;
-import org.apache.camel.component.servicenow.releases.helsinki.HelsinkiServiceNowProducer;
-
-public enum ServiceNowRelease implements ServiceNowProducerSupplier {
-    FUJI {
-        @Override
-        public ServiceNowProducer get(ServiceNowEndpoint endpoint) throws Exception {
-            return new FujiServiceNowProducer(endpoint);
-        }
-    },
-    GENEVA {
-        @Override
-        public ServiceNowProducer get(ServiceNowEndpoint endpoint) throws Exception {
-            return null;
-        }
-    },
-    HELSINKI {
-        @Override
-        public ServiceNowProducer get(ServiceNowEndpoint endpoint) throws Exception {
-            return new HelsinkiServiceNowProducer(endpoint);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParm.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParm.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParm.java
deleted file mode 100644
index 361e741..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParm.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Repeatable;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Repeatable(ServiceNowSysParms.class)
-public @interface ServiceNowSysParm {
-    String name();
-
-    String value();
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParms.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParms.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParms.java
deleted file mode 100644
index 236ba8b..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/annotations/ServiceNowSysParms.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ServiceNowSysParms {
-    ServiceNowSysParm[] value();
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/AuthenticationRequestFilter.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/AuthenticationRequestFilter.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/AuthenticationRequestFilter.java
deleted file mode 100644
index 4689455..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/AuthenticationRequestFilter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow.auth;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.Base64;
-import javax.annotation.Priority;
-import javax.ws.rs.Priorities;
-import javax.ws.rs.client.ClientRequestContext;
-import javax.ws.rs.client.ClientRequestFilter;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.ext.Provider;
-
-import org.apache.camel.component.servicenow.ServiceNowConfiguration;
-
-
-@Provider
-@Priority(Priorities.AUTHENTICATION)
-public final class AuthenticationRequestFilter implements ClientRequestFilter {
-    private final OAuthToken authToken;
-    private final String authString;
-
-    public AuthenticationRequestFilter(ServiceNowConfiguration conf) throws IOException {
-        this.authToken = conf.hasOAuthAuthentication() ? new OAuthToken(conf) : null;
-        this.authString = conf.hasBasicAuthentication() ? getBasicAuthenticationString(conf) : null;
-    }
-
-    @Override
-    public void filter(ClientRequestContext requestContext) throws IOException {
-        if (authToken != null) {
-            requestContext.getHeaders().add(HttpHeaders.AUTHORIZATION, authToken.getAuthString());
-        } else if (authString != null) {
-            requestContext.getHeaders().add(HttpHeaders.AUTHORIZATION, authString);
-        }
-    }
-
-    private static String getBasicAuthenticationString(ServiceNowConfiguration conf) {
-        String userAndPassword = conf.getUserName() + ":" + conf.getPassword();
-        return "Basic " + Base64.getEncoder().encodeToString(userAndPassword.getBytes(StandardCharsets.UTF_8));
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/OAuthToken.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/OAuthToken.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/OAuthToken.java
deleted file mode 100644
index 880cf7f..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/auth/OAuthToken.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow.auth;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.component.servicenow.ServiceNowConfiguration;
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.rs.security.oauth2.client.Consumer;
-import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils;
-import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken;
-import org.apache.cxf.rs.security.oauth2.grants.owner.ResourceOwnerGrant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OAuthToken {
-    private static final Logger LOGGER = LoggerFactory.getLogger(OAuthToken.class);
-
-    private final ServiceNowConfiguration configuration;
-    private ClientAccessToken token;
-    private String authString;
-    private long expireAt;
-
-    public OAuthToken(ServiceNowConfiguration configuration) {
-        this.configuration = configuration;
-        this.token = null;
-        this.authString = null;
-        this.expireAt = 0;
-    }
-
-    private synchronized void getOrRefreshAccessToken() {
-        if (token == null) {
-            LOGGER.debug("Generate OAuth token");
-
-            token = OAuthClientUtils.getAccessToken(
-                WebClient.create(configuration.getOauthTokenUrl()),
-                new Consumer(
-                    configuration.getOauthClientId(),
-                    configuration.getOauthClientSecret()),
-                new ResourceOwnerGrant(
-                    configuration.getUserName(),
-                    configuration.getPassword()),
-                true
-            );
-
-            LOGGER.debug("OAuth token expires in {}s", token.getExpiresIn());
-
-            // Set expiration time related info in milliseconds
-            token.setIssuedAt(System.currentTimeMillis());
-            token.setExpiresIn(TimeUnit.MILLISECONDS.convert(token.getExpiresIn(), TimeUnit.SECONDS));
-
-            authString = token.toString();
-
-            if (token.getExpiresIn() > 0) {
-                expireAt = token.getIssuedAt() + token.getExpiresIn();
-            }
-        } else if (expireAt > 0 && System.currentTimeMillis() >= expireAt) {
-            LOGGER.debug("OAuth token is expired, refresh it");
-
-            token = OAuthClientUtils.refreshAccessToken(
-                WebClient.create(configuration.getOauthTokenUrl()),
-                new Consumer(
-                    configuration.getOauthClientId(),
-                    configuration.getOauthClientSecret()),
-                token,
-                null,
-                false
-            );
-
-            LOGGER.debug("Refreshed OAuth token expires in {}s", token.getExpiresIn());
-
-            // Set expiration time related info in milliseconds
-            token.setIssuedAt(System.currentTimeMillis());
-            token.setExpiresIn(TimeUnit.MILLISECONDS.convert(token.getExpiresIn(), TimeUnit.SECONDS));
-
-            authString = token.toString();
-
-            if (token.getExpiresIn() > 0) {
-                expireAt = token.getIssuedAt() + token.getExpiresIn();
-            }
-        }
-    }
-
-    public ClientAccessToken getClientAccess() {
-        getOrRefreshAccessToken();
-        return token;
-    }
-
-    public String getAuthString() {
-        getOrRefreshAccessToken();
-        return authString;
-    }
-}


Mime
View raw message