You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dh...@apache.org on 2016/09/20 19:57:19 UTC
[07/26] camel git commit: Revert "CAMEL-10197: Added plain get/set to
components for spring-boot configuration"
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxComponent.java b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxComponent.java
index 65b8b5a..c770d8f 100644
--- a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxComponent.java
+++ b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxComponent.java
@@ -16,13 +16,6 @@
*/
package org.apache.camel.component.box;
-import java.util.Map;
-
-import com.box.boxjavalibv2.BoxConnectionManagerBuilder;
-import com.box.boxjavalibv2.IBoxConfig;
-import com.box.boxjavalibv2.authorization.IAuthSecureStorage;
-import com.box.boxjavalibv2.authorization.OAuthRefreshListener;
-
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.component.box.internal.BoxApiCollection;
@@ -30,7 +23,6 @@ import org.apache.camel.component.box.internal.BoxApiName;
import org.apache.camel.component.box.internal.BoxClientHelper;
import org.apache.camel.component.box.internal.CachedBoxClient;
import org.apache.camel.util.component.AbstractApiComponent;
-import org.apache.camel.util.jsse.SSLContextParameters;
/**
* Represents the component that manages {@link BoxEndpoint}.
@@ -65,7 +57,7 @@ public class BoxComponent extends AbstractApiComponent<BoxApiName, BoxConfigurat
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
@Override
public void setConfiguration(BoxConfiguration configuration) {
@@ -113,208 +105,4 @@ public class BoxComponent extends AbstractApiComponent<BoxApiName, BoxConfigurat
super.doShutdown();
}
}
-
- private BoxConfiguration getConfigurationOrCreate() {
- if (this.getConfiguration() == null) {
- this.setConfiguration(new BoxConfiguration());
- }
- return this.getConfiguration();
- }
-
- public BoxApiName getApiName() {
- return getConfigurationOrCreate().getApiName();
- }
-
- /**
- * What kind of operation to perform
- * @param apiName
- */
- public void setApiName(BoxApiName apiName) {
- getConfigurationOrCreate().setApiName(apiName);
- }
-
- public String getMethodName() {
- return getConfigurationOrCreate().getMethodName();
- }
-
- /**
- * What sub operation to use for the selected operation
- * @param methodName
- */
- public void setMethodName(String methodName) {
- getConfigurationOrCreate().setMethodName(methodName);
- }
-
- public String getClientId() {
- return getConfigurationOrCreate().getClientId();
- }
-
- /**
- * Box application client ID
- * @param clientId
- */
- public void setClientId(String clientId) {
- getConfigurationOrCreate().setClientId(clientId);
- }
-
- public String getClientSecret() {
- return getConfigurationOrCreate().getClientSecret();
- }
-
- /**
- * Box application client secret
- * @param clientSecret
- */
- public void setClientSecret(String clientSecret) {
- getConfigurationOrCreate().setClientSecret(clientSecret);
- }
-
- public IAuthSecureStorage getAuthSecureStorage() {
- return getConfigurationOrCreate().getAuthSecureStorage();
- }
-
- /**
- * OAuth Secure Storage callback, can be used to provide and or save OAuth tokens.
- * The callback may return null on first call to allow the component to login and authorize application
- * and obtain an OAuth token, which can then be saved in the secure storage.
- * For the component to be able to create a token automatically a user password must be provided.
- * @param authSecureStorage
- */
- public void setAuthSecureStorage(IAuthSecureStorage authSecureStorage) {
- getConfigurationOrCreate().setAuthSecureStorage(authSecureStorage);
- }
-
- public String getUserName() {
- return getConfigurationOrCreate().getUserName();
- }
-
- /**
- * Box user name, MUST be provided
- * @param userName
- */
- public void setUserName(String userName) {
- getConfigurationOrCreate().setUserName(userName);
- }
-
- public String getUserPassword() {
- return getConfigurationOrCreate().getUserPassword();
- }
-
- /**
- * Box user password, MUST be provided if authSecureStorage is not set, or returns null on first call
- * @param userPassword
- */
- public void setUserPassword(String userPassword) {
- getConfigurationOrCreate().setUserPassword(userPassword);
- }
-
- public OAuthRefreshListener getRefreshListener() {
- return getConfigurationOrCreate().getRefreshListener();
- }
-
- /**
- * OAuth listener for token updates, if the Camel application needs to use the access token outside the route
- * @param refreshListener
- */
- public void setRefreshListener(OAuthRefreshListener refreshListener) {
- getConfigurationOrCreate().setRefreshListener(refreshListener);
- }
-
- public boolean isRevokeOnShutdown() {
- return getConfigurationOrCreate().isRevokeOnShutdown();
- }
-
- /**
- * Flag to revoke OAuth refresh token on route shutdown, default false.
- * Will require a fresh refresh token on restart using either a custom IAuthSecureStorage
- * or automatic component login by providing a user password
- * @param revokeOnShutdown
- */
- public void setRevokeOnShutdown(boolean revokeOnShutdown) {
- getConfigurationOrCreate().setRevokeOnShutdown(revokeOnShutdown);
- }
-
- public String getSharedLink() {
- return getConfigurationOrCreate().getSharedLink();
- }
-
- /**
- * Box shared link for shared endpoints, can be a link for a shared comment, file or folder
- * @param sharedLink
- */
- public void setSharedLink(String sharedLink) {
- getConfigurationOrCreate().setSharedLink(sharedLink);
- }
-
- public String getSharedPassword() {
- return getConfigurationOrCreate().getSharedPassword();
- }
-
- /**
- * Password associated with the shared link, MUST be provided with sharedLink
- * @param sharedPassword
- */
- public void setSharedPassword(String sharedPassword) {
- getConfigurationOrCreate().setSharedPassword(sharedPassword);
- }
-
- public IBoxConfig getBoxConfig() {
- return getConfigurationOrCreate().getBoxConfig();
- }
-
- /**
- * Custom Box SDK configuration, not required normally
- * @param boxConfig
- */
- public void setBoxConfig(IBoxConfig boxConfig) {
- getConfigurationOrCreate().setBoxConfig(boxConfig);
- }
-
- public BoxConnectionManagerBuilder getConnectionManagerBuilder() {
- return getConfigurationOrCreate().getConnectionManagerBuilder();
- }
-
- /**
- * Custom Box connection manager builder, used to override default settings like max connections for underlying HttpClient.
- * @param connectionManagerBuilder
- */
- public void setConnectionManagerBuilder(BoxConnectionManagerBuilder connectionManagerBuilder) {
- getConfigurationOrCreate().setConnectionManagerBuilder(connectionManagerBuilder);
- }
-
- public Map<String, Object> getHttpParams() {
- return getConfigurationOrCreate().getHttpParams();
- }
-
- /**
- * Custom HTTP params for settings like proxy host
- * @param httpParams
- */
- public void setHttpParams(Map<String, Object> httpParams) {
- getConfigurationOrCreate().setHttpParams(httpParams);
- }
-
- public SSLContextParameters getSslContextParameters() {
- return getConfigurationOrCreate().getSslContextParameters();
- }
-
- /**
- * To configure security using SSLContextParameters.
- * @param sslContextParameters
- */
- public void setSslContextParameters(SSLContextParameters sslContextParameters) {
- getConfigurationOrCreate().setSslContextParameters(sslContextParameters);
- }
-
- public int getLoginTimeout() {
- return getConfigurationOrCreate().getLoginTimeout();
- }
-
- /**
- * Amount of time the component will wait for a response from Box.com, default is 30 seconds
- * @param loginTimeout
- */
- public void setLoginTimeout(int loginTimeout) {
- getConfigurationOrCreate().setLoginTimeout(loginTimeout);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
index 3f65ae4..8918771 100644
--- a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
+++ b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
@@ -18,7 +18,6 @@ package org.apache.camel.component.braintree;
import java.util.HashMap;
import java.util.Map;
-import java.util.logging.Level;
import com.braintreegateway.BraintreeGateway;
import org.apache.camel.CamelContext;
@@ -56,7 +55,7 @@ public class BraintreeComponent extends AbstractApiComponent<BraintreeApiName, B
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
@Override
public void setConfiguration(BraintreeConfiguration configuration) {
@@ -77,151 +76,4 @@ public class BraintreeComponent extends AbstractApiComponent<BraintreeApiName, B
return gateway;
}
-
- private BraintreeConfiguration getConfigurationOrCreate() {
- if (this.getConfiguration() == null) {
- this.setConfiguration(new BraintreeConfiguration());
- }
- return this.getConfiguration();
- }
-
- public BraintreeApiName getApiName() {
- return getConfigurationOrCreate().getApiName();
- }
-
- /**
- * What kind of operation to perform
- * @param apiName
- */
- public void setApiName(BraintreeApiName apiName) {
- getConfigurationOrCreate().setApiName(apiName);
- }
-
- public String getMethodName() {
- return getConfigurationOrCreate().getMethodName();
- }
-
- /**
- * What sub operation to use for the selected operation
- * @param methodName
- */
- public void setMethodName(String methodName) {
- getConfigurationOrCreate().setMethodName(methodName);
- }
-
- public String getEnvironment() {
- return getConfigurationOrCreate().getEnvironment();
- }
-
- /**
- * The environment Either SANDBOX or PRODUCTION
- * @param environment
- */
- public void setEnvironment(String environment) {
- getConfigurationOrCreate().setEnvironment(environment);
- }
-
- public String getMerchantId() {
- return getConfigurationOrCreate().getMerchantId();
- }
-
- /**
- * The merchant id provided by Braintree.
- * @param merchantId
- */
- public void setMerchantId(String merchantId) {
- getConfigurationOrCreate().setMerchantId(merchantId);
- }
-
- public String getPublicKey() {
- return getConfigurationOrCreate().getPublicKey();
- }
-
- /**
- * The public key provided by Braintree.
- * @param publicKey
- */
- public void setPublicKey(String publicKey) {
- getConfigurationOrCreate().setPublicKey(publicKey);
- }
-
- public String getPrivateKey() {
- return getConfigurationOrCreate().getPrivateKey();
- }
-
- /**
- * The private key provided by Braintree.
- * @param privateKey
- */
- public void setPrivateKey(String privateKey) {
- getConfigurationOrCreate().setPrivateKey(privateKey);
- }
-
- public String getProxyHost() {
- return getConfigurationOrCreate().getProxyHost();
- }
-
- /**
- * The proxy host
- * @param proxyHost
- */
- public void setProxyHost(String proxyHost) {
- getConfigurationOrCreate().setProxyHost(proxyHost);
- }
-
- public Integer getProxyPort() {
- return getConfigurationOrCreate().getProxyPort();
- }
-
- /**
- * The proxy port
- * @param proxyPort
- */
- public void setProxyPort(Integer proxyPort) {
- getConfigurationOrCreate().setProxyPort(proxyPort);
- }
-
- public Level getHttpLogLevel() {
- return getConfigurationOrCreate().getHttpLogLevel();
- }
-
- /**
- * Set logging level for http calls, @see java.util.logging.Level
- * @param httpLogLevel
- */
- public void setHttpLogLevel(String httpLogLevel) {
- getConfigurationOrCreate().setHttpLogLevel(httpLogLevel);
- }
-
- /**
- * Set logging level for http calls, @see java.util.logging.Level
- * @param httpLogLevel
- */
- public void setHttpLogLevel(Level httpLogLevel) {
- getConfigurationOrCreate().setHttpLogLevel(httpLogLevel);
- }
-
- public String getHttpLogName() {
- return getConfigurationOrCreate().getHttpLogName();
- }
-
- /**
- * Set log category to use to log http calls, default "Braintree"
- * @param httpLogName
- */
- public void setHttpLogName(String httpLogName) {
- getConfigurationOrCreate().setHttpLogName(httpLogName);
- }
-
- public Integer getHttpReadTimeout() {
- return getConfigurationOrCreate().getHttpReadTimeout();
- }
-
- /**
- * Set read timeout for http calls.
- * @param httpReadTimeout
- */
- public void setHttpReadTimeout(Integer httpReadTimeout) {
- getConfigurationOrCreate().setHttpReadTimeout(httpReadTimeout);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
index 06d5808..e482162 100755
--- a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
+++ b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
@@ -76,7 +76,7 @@ public class CacheComponent extends UriEndpointComponent {
}
/**
- * Sets the Cache configuration. Properties of the shared configuration can also be set individually.
+ * Sets the Cache configuration
*
* @param configuration the configuration to use by default for endpoints
*/
@@ -116,155 +116,4 @@ public class CacheComponent extends UriEndpointComponent {
ServiceHelper.stopService(cacheManagerFactory);
super.doStop();
}
-
- public String getCacheName() {
- return configuration.getCacheName();
- }
-
- /**
- * Name of the cache
- * @param cacheName
- */
- public void setCacheName(String cacheName) {
- configuration.setCacheName(cacheName);
- }
-
- public int getMaxElementsInMemory() {
- return configuration.getMaxElementsInMemory();
- }
-
- /**
- * The number of elements that may be stored in the defined cache in memory.
- * @param maxElementsInMemory
- */
- public void setMaxElementsInMemory(int maxElementsInMemory) {
- configuration.setMaxElementsInMemory(maxElementsInMemory);
- }
-
- public MemoryStoreEvictionPolicy getMemoryStoreEvictionPolicy() {
- return configuration.getMemoryStoreEvictionPolicy();
- }
-
- /**
- * Which eviction strategy to use when maximum number of elements in memory is reached. The strategy defines
- * which elements to be removed.
- * <ul>
- * <li>LRU - Lest Recently Used</li>
- * <li>LFU - Lest Frequently Used</li>
- * <li>FIFO - First In First Out</li>
- * </ul>
- * @param memoryStoreEvictionPolicy
- */
- public void setMemoryStoreEvictionPolicy(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy) {
- configuration.setMemoryStoreEvictionPolicy(memoryStoreEvictionPolicy);
- }
-
- public boolean isOverflowToDisk() {
- return configuration.isOverflowToDisk();
- }
-
- /**
- * Specifies whether cache may overflow to disk
- * @param overflowToDisk
- */
- public void setOverflowToDisk(boolean overflowToDisk) {
- configuration.setOverflowToDisk(overflowToDisk);
- }
-
- public boolean isEternal() {
- return configuration.isEternal();
- }
-
- /**
- * Sets whether elements are eternal. If eternal, timeouts are ignored and the element never expires.
- * @param eternal
- */
- public void setEternal(boolean eternal) {
- configuration.setEternal(eternal);
- }
-
- public long getTimeToLiveSeconds() {
- return configuration.getTimeToLiveSeconds();
- }
-
- /**
- * The maximum time between creation time and when an element expires. Is used only if the element is not eternal
- * @param timeToLiveSeconds
- */
- public void setTimeToLiveSeconds(long timeToLiveSeconds) {
- configuration.setTimeToLiveSeconds(timeToLiveSeconds);
- }
-
- public long getTimeToIdleSeconds() {
- return configuration.getTimeToIdleSeconds();
- }
-
- /**
- * The maximum amount of time between accesses before an element expires
- * @param timeToIdleSeconds
- */
- public void setTimeToIdleSeconds(long timeToIdleSeconds) {
- configuration.setTimeToIdleSeconds(timeToIdleSeconds);
- }
-
- public boolean isDiskPersistent() {
- return configuration.isDiskPersistent();
- }
-
- /**
- * Whether the disk store persists between restarts of the application.
- * @param diskPersistent
- */
- public void setDiskPersistent(boolean diskPersistent) {
- configuration.setDiskPersistent(diskPersistent);
- }
-
- public long getDiskExpiryThreadIntervalSeconds() {
- return configuration.getDiskExpiryThreadIntervalSeconds();
- }
-
- /**
- * The number of seconds between runs of the disk expiry thread.
- * @param diskExpiryThreadIntervalSeconds
- */
- public void setDiskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds) {
- configuration.setDiskExpiryThreadIntervalSeconds(diskExpiryThreadIntervalSeconds);
- }
-
- /**
- * To configure event listeners using the CacheEventListenerRegistry
- * @param eventListenerRegistry
- */
- public void setEventListenerRegistry(CacheEventListenerRegistry eventListenerRegistry) {
- configuration.setEventListenerRegistry(eventListenerRegistry);
- }
-
- public CacheEventListenerRegistry getEventListenerRegistry() {
- return configuration.getEventListenerRegistry();
- }
-
- /**
- * To configure cache loader using the CacheLoaderRegistry
- * @param cacheLoaderRegistry
- */
- public void setCacheLoaderRegistry(CacheLoaderRegistry cacheLoaderRegistry) {
- configuration.setCacheLoaderRegistry(cacheLoaderRegistry);
- }
-
- public CacheLoaderRegistry getCacheLoaderRegistry() {
- return configuration.getCacheLoaderRegistry();
- }
-
- public boolean isObjectCache() {
- return configuration.isObjectCache();
- }
-
- /**
- * Whether to turn on allowing to store non serializable objects in the cache.
- * If this option is enabled then overflow to disk cannot be enabled as well.
- * @param objectCache
- */
- public void setObjectCache(boolean objectCache) {
- configuration.setObjectCache(objectCache);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java
index a5f53b2..72a14e8 100644
--- a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java
+++ b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java
@@ -18,18 +18,12 @@ package org.apache.camel.component.crypto;
import java.net.MalformedURLException;
import java.net.URI;
-import java.security.KeyStore;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.SecureRandom;
-import java.security.cert.Certificate;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.impl.UriEndpointComponent;
import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.jsse.KeyStoreParameters;
public class DigitalSignatureComponent extends UriEndpointComponent {
@@ -67,345 +61,9 @@ public class DigitalSignatureComponent extends UriEndpointComponent {
}
/**
- * To use the shared DigitalSignatureConfiguration as configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared DigitalSignatureConfiguration as configuration
*/
public void setConfiguration(DigitalSignatureConfiguration configuration) {
this.configuration = configuration;
}
-
- public String getName() {
- return getConfiguration().getName();
- }
-
- /**
- * The logical name of this operation.
- * @param name
- */
- public void setName(String name) {
- getConfiguration().setName(name);
- }
-
- /**
- * Gets the JCE name of the Algorithm that should be used for the signer.
- */
- public String getAlgorithm() {
- return getConfiguration().getAlgorithm();
- }
-
- /**
- * Sets the JCE name of the Algorithm that should be used for the signer.
- * @param algorithm
- */
- public void setAlgorithm(String algorithm) {
- getConfiguration().setAlgorithm(algorithm);
- }
-
- /**
- * Gets the alias used to query the KeyStore for keys and {@link Certificate Certificates}
- * to be used in signing and verifying exchanges. This value can be provided at runtime via the message header
- * {@link DigitalSignatureConstants#KEYSTORE_ALIAS}
- */
- public String getAlias() {
- return getConfiguration().getAlias();
- }
-
- /**
- * Sets the alias used to query the KeyStore for keys and {@link Certificate Certificates}
- * to be used in signing and verifying exchanges. This value can be provided at runtime via the message header
- * {@link DigitalSignatureConstants#KEYSTORE_ALIAS}
- * @param alias
- */
- public void setAlias(String alias) {
- getConfiguration().setAlias(alias);
- }
-
- /**
- * Get the PrivateKey that should be used to sign the exchange
- */
- public PrivateKey getPrivateKey() throws Exception {
- return getConfiguration().getPrivateKey();
- }
-
- /**
- * Get the PrivateKey that should be used to sign the signature in the
- * exchange using the supplied alias.
- *
- * @param alias the alias used to retrieve the Certificate from the keystore.
- */
- public PrivateKey getPrivateKey(String alias) throws Exception {
- return getConfiguration().getPrivateKey(alias);
- }
-
- /**
- * Get the PrivateKey that should be used to sign the signature in the
- * exchange using the supplied alias.
- *
- * @param alias the alias used to retrieve the Certificate from the keystore.
- * @param password
- */
- public PrivateKey getPrivateKey(String alias, char[] password) throws Exception {
- return getConfiguration().getPrivateKey(alias, password);
- }
-
- /**
- * Set the PrivateKey that should be used to sign the exchange
- *
- * @param privateKey the key with with to sign the exchange.
- */
- public void setPrivateKey(PrivateKey privateKey) {
- getConfiguration().setPrivateKey(privateKey);
- }
-
- /**
- * Sets the reference name for a PrivateKey that can be fond in the registry.
- * @param privateKeyName
- */
- public void setPrivateKeyName(String privateKeyName) {
- getConfiguration().setPrivateKeyName(privateKeyName);
- }
-
- /**
- * Set the PublicKey that should be used to verify the signature in the exchange.
- * @param publicKey
- */
- public void setPublicKey(PublicKey publicKey) {
- getConfiguration().setPublicKey(publicKey);
- }
-
- /**
- * Sets the reference name for a publicKey that can be fond in the registry.
- * @param publicKeyName
- */
- public void setPublicKeyName(String publicKeyName) {
- getConfiguration().setPublicKeyName(publicKeyName);
- }
-
- /**
- * get the PublicKey that should be used to verify the signature in the exchange.
- */
- public PublicKey getPublicKey() {
- return getConfiguration().getPublicKey();
- }
-
- /**
- * Set the Certificate that should be used to verify the signature in the
- * exchange. If a {@link KeyStore} has been configured then this will
- * attempt to retrieve the {@link Certificate}from it using hte supplied
- * alias. If either the alias or the Keystore is invalid then the configured
- * certificate will be returned
- *
- * @param alias the alias used to retrieve the Certificate from the keystore.
- */
- public Certificate getCertificate(String alias) throws Exception {
- return getConfiguration().getCertificate(alias);
- }
-
- /**
- * Get the explicitly configured {@link Certificate} that should be used to
- * verify the signature in the exchange.
- */
- public Certificate getCertificate() throws Exception {
- return getConfiguration().getCertificate();
- }
-
- /**
- * Set the Certificate that should be used to verify the signature in the
- * exchange based on its payload.
- * @param certificate
- */
- public void setCertificate(Certificate certificate) {
- getConfiguration().setCertificate(certificate);
- }
-
- /**
- * Sets the reference name for a PrivateKey that can be fond in the registry.
- * @param certificateName
- */
- public void setCertificateName(String certificateName) {
- getConfiguration().setCertificateName(certificateName);
- }
-
- /**
- * Gets the KeyStore that can contain keys and Certficates for use in
- * signing and verifying exchanges. A {@link KeyStore} is typically used
- * with an alias, either one supplied in the Route definition or dynamically
- * via the message header "CamelSignatureKeyStoreAlias". If no alias is
- * supplied and there is only a single entry in the Keystore, then this
- * single entry will be used.
- */
- public KeyStore getKeystore() {
- return getConfiguration().getKeystore();
- }
-
- /**
- * Sets the KeyStore that can contain keys and Certficates for use in
- * signing and verifying exchanges. A {@link KeyStore} is typically used
- * with an alias, either one supplied in the Route definition or dynamically
- * via the message header "CamelSignatureKeyStoreAlias". If no alias is
- * supplied and there is only a single entry in the Keystore, then this
- * single entry will be used.
- * @param keystore
- */
- public void setKeystore(KeyStore keystore) {
- getConfiguration().setKeystore(keystore);
- }
-
- /**
- * Sets the reference name for a Keystore that can be fond in the registry.
- * @param keystoreName
- */
- public void setKeystoreName(String keystoreName) {
- getConfiguration().setKeystoreName(keystoreName);
- }
-
- /**
- * Gets the password used to access an aliased {@link PrivateKey} in the KeyStore.
- */
- public char[] getPassword() {
- return getConfiguration().getPassword();
- }
-
- /**
- * Sets the password used to access an aliased {@link PrivateKey} in the KeyStore.
- * @param password
- */
- public void setPassword(char[] password) {
- getConfiguration().setPassword(password);
- }
-
- public KeyStoreParameters getKeyStoreParameters() {
- return getConfiguration().getKeyStoreParameters();
- }
-
- /**
- * Sets the KeyStore that can contain keys and Certficates for use in
- * signing and verifying exchanges based on the given KeyStoreParameters.
- * A {@link KeyStore} is typically used
- * with an alias, either one supplied in the Route definition or dynamically
- * via the message header "CamelSignatureKeyStoreAlias". If no alias is
- * supplied and there is only a single entry in the Keystore, then this
- * single entry will be used.
- * @param keyStoreParameters
- */
- public void setKeyStoreParameters(KeyStoreParameters keyStoreParameters) throws Exception {
- getConfiguration().setKeyStoreParameters(keyStoreParameters);
- }
-
- /**
- * Get the SecureRandom used to initialize the Signature service
- */
- public SecureRandom getSecureRandom() {
- return getConfiguration().getSecureRandom();
- }
-
- /**
- * Sets the reference name for a SecureRandom that can be fond in the registry.
- * @param randomName
- */
- public void setSecureRandomName(String randomName) {
- getConfiguration().setSecureRandomName(randomName);
- }
-
- /**
- * Set the SecureRandom used to initialize the Signature service
- *
- * @param secureRandom the random used to init the Signature service
- */
- public void setSecureRandom(SecureRandom secureRandom) {
- getConfiguration().setSecureRandom(secureRandom);
- }
-
- /**
- * Get the size of the buffer used to read in the Exchange payload data.
- */
- public Integer getBufferSize() {
- return getConfiguration().getBufferSize();
- }
-
- /**
- * Set the size of the buffer used to read in the Exchange payload data.
- * @param bufferSize
- */
- public void setBufferSize(Integer bufferSize) {
- getConfiguration().setBufferSize(bufferSize);
- }
-
- /**
- * Get the id of the security provider that provides the configured
- * {@link Signature} algorithm.
- */
- public String getProvider() {
- return getConfiguration().getProvider();
- }
-
- /**
- * Set the id of the security provider that provides the configured
- * {@link Signature} algorithm.
- *
- * @param provider the id of the security provider
- */
- public void setProvider(String provider) {
- getConfiguration().setProvider(provider);
- }
-
- /**
- * Get the name of the message header that should be used to store the
- * base64 encoded signature. This defaults to 'CamelDigitalSignature'
- */
- public String getSignatureHeaderName() {
- return getConfiguration().getSignatureHeaderName();
- }
-
- /**
- * Set the name of the message header that should be used to store the
- * base64 encoded signature. This defaults to 'CamelDigitalSignature'
- * @param signatureHeaderName
- */
- public void setSignatureHeaderName(String signatureHeaderName) {
- getConfiguration().setSignatureHeaderName(signatureHeaderName);
- }
-
- /**
- * Determines if the Signature specific headers be cleared after signing and
- * verification. Defaults to true, and should only be made otherwise at your
- * extreme peril as vital private information such as Keys and passwords may
- * escape if unset.
- *
- * @return true if the Signature headers should be unset, false otherwise
- */
- public boolean isClearHeaders() {
- return getConfiguration().isClearHeaders();
- }
-
- /**
- * Determines if the Signature specific headers be cleared after signing and
- * verification. Defaults to true, and should only be made otherwise at your
- * extreme peril as vital private information such as Keys and passwords may
- * escape if unset.
- * @param clearHeaders
- */
- public void setClearHeaders(boolean clearHeaders) {
- getConfiguration().setClearHeaders(clearHeaders);
- }
-
- /**
- * Set the Crypto operation from that supplied after the crypto scheme in the
- * endpoint uri e.g. crypto:sign sets sign as the operation.
- *
- * @param operation the operation supplied after the crypto scheme
- */
- public void setCryptoOperation(String operation) {
- getConfiguration().setCryptoOperation(operation);
- }
-
- public void setCryptoOperation(CryptoOperation operation) {
- getConfiguration().setCryptoOperation(operation);
- }
-
- /**
- * Gets the Crypto operation that was supplied in the the crypto scheme in the endpoint uri
- */
- public CryptoOperation getCryptoOperation() {
- return getConfiguration().getCryptoOperation();
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
index 5a44784..ffc74a1 100644
--- a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
+++ b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
@@ -74,7 +74,7 @@ public class DockerComponent extends DefaultComponent {
}
/**
- * To use the shared docker configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared docker configuration
*/
protected DockerConfiguration getConfiguration() {
return configuration;
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/FacebookComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/FacebookComponent.java b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/FacebookComponent.java
index b2b4588..84094d8 100644
--- a/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/FacebookComponent.java
+++ b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/FacebookComponent.java
@@ -81,334 +81,10 @@ public class FacebookComponent extends UriEndpointComponent {
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
public void setConfiguration(FacebookConfiguration configuration) {
this.configuration = configuration;
}
- public String getOAuthAccessToken() {
- return configuration.getOAuthAccessToken();
- }
-
- /**
- * The user access token
- * @param oAuthAccessToken
- */
- public void setOAuthAccessToken(String oAuthAccessToken) {
- configuration.setOAuthAccessToken(oAuthAccessToken);
- }
-
- public String getOAuthAccessTokenURL() {
- return configuration.getOAuthAccessTokenURL();
- }
-
- /**
- * OAuth access token URL
- * @param oAuthAccessTokenURL
- */
- public void setOAuthAccessTokenURL(String oAuthAccessTokenURL) {
- configuration.setOAuthAccessTokenURL(oAuthAccessTokenURL);
- }
-
- public String getOAuthAppId() {
- return configuration.getOAuthAppId();
- }
-
- /**
- * The application Id
- * @param oAuthAppId
- */
- public void setOAuthAppId(String oAuthAppId) {
- configuration.setOAuthAppId(oAuthAppId);
- }
-
- public String getOAuthAppSecret() {
- return configuration.getOAuthAppSecret();
- }
-
- /**
- * The application Secret
- * @param oAuthAppSecret
- */
- public void setOAuthAppSecret(String oAuthAppSecret) {
- configuration.setOAuthAppSecret(oAuthAppSecret);
- }
-
- public String getOAuthAuthorizationURL() {
- return configuration.getOAuthAuthorizationURL();
- }
-
- /**
- * OAuth authorization URL
- * @param oAuthAuthorizationURL
- */
- public void setOAuthAuthorizationURL(String oAuthAuthorizationURL) {
- configuration.setOAuthAuthorizationURL(oAuthAuthorizationURL);
- }
-
- public String getClientURL() {
- return configuration.getClientURL();
- }
-
- /**
- * Facebook4J API client URL
- * @param clientURL
- */
- public void setClientURL(String clientURL) {
- configuration.setClientURL(clientURL);
- }
-
- public String getClientVersion() {
- return configuration.getClientVersion();
- }
-
- /**
- * Facebook4J client API version
- * @param clientVersion
- */
- public void setClientVersion(String clientVersion) {
- configuration.setClientVersion(clientVersion);
- }
-
- public Boolean getDebugEnabled() {
- return configuration.getDebugEnabled();
- }
-
- /**
- * Enables deubg output. Effective only with the embedded logger
- * @param debugEnabled
- */
- public void setDebugEnabled(Boolean debugEnabled) {
- configuration.setDebugEnabled(debugEnabled);
- }
-
- public Boolean getGzipEnabled() {
- return configuration.getGzipEnabled();
- }
-
- /**
- * Use Facebook GZIP encoding
- * @param gzipEnabled
- */
- public void setGzipEnabled(Boolean gzipEnabled) {
- configuration.setGzipEnabled(gzipEnabled);
- }
-
- public Integer getHttpConnectionTimeout() {
- return configuration.getHttpConnectionTimeout();
- }
-
- /**
- * Http connection timeout in milliseconds
- * @param httpConnectionTimeout
- */
- public void setHttpConnectionTimeout(Integer httpConnectionTimeout) {
- configuration.setHttpConnectionTimeout(httpConnectionTimeout);
- }
-
- public Integer getHttpDefaultMaxPerRoute() {
- return configuration.getHttpDefaultMaxPerRoute();
- }
-
- /**
- * HTTP maximum connections per route
- * @param httpDefaultMaxPerRoute
- */
- public void setHttpDefaultMaxPerRoute(Integer httpDefaultMaxPerRoute) {
- configuration.setHttpDefaultMaxPerRoute(httpDefaultMaxPerRoute);
- }
-
- public Integer getHttpMaxTotalConnections() {
- return configuration.getHttpMaxTotalConnections();
- }
-
- /**
- * HTTP maximum total connections
- * @param httpMaxTotalConnections
- */
- public void setHttpMaxTotalConnections(Integer httpMaxTotalConnections) {
- configuration.setHttpMaxTotalConnections(httpMaxTotalConnections);
- }
-
- public String getHttpProxyHost() {
- return configuration.getHttpProxyHost();
- }
-
- /**
- * HTTP proxy server host name
- * @param httpProxyHost
- */
- public void setHttpProxyHost(String httpProxyHost) {
- configuration.setHttpProxyHost(httpProxyHost);
- }
-
- public String getHttpProxyPassword() {
- return configuration.getHttpProxyPassword();
- }
-
- /**
- * HTTP proxy server password
- * @param httpProxyPassword
- */
- public void setHttpProxyPassword(String httpProxyPassword) {
- configuration.setHttpProxyPassword(httpProxyPassword);
- }
-
- public Integer getHttpProxyPort() {
- return configuration.getHttpProxyPort();
- }
-
- /**
- * HTTP proxy server port
- * @param httpProxyPort
- */
- public void setHttpProxyPort(Integer httpProxyPort) {
- configuration.setHttpProxyPort(httpProxyPort);
- }
-
- public String getHttpProxyUser() {
- return configuration.getHttpProxyUser();
- }
-
- /**
- * HTTP proxy server user name
- * @param httpProxyUser
- */
- public void setHttpProxyUser(String httpProxyUser) {
- configuration.setHttpProxyUser(httpProxyUser);
- }
-
- public Integer getHttpReadTimeout() {
- return configuration.getHttpReadTimeout();
- }
-
- /**
- * Http read timeout in milliseconds
- * @param httpReadTimeout
- */
- public void setHttpReadTimeout(Integer httpReadTimeout) {
- configuration.setHttpReadTimeout(httpReadTimeout);
- }
-
- public Integer getHttpRetryCount() {
- return configuration.getHttpRetryCount();
- }
-
- /**
- * Number of HTTP retries
- * @param httpRetryCount
- */
- public void setHttpRetryCount(Integer httpRetryCount) {
- configuration.setHttpRetryCount(httpRetryCount);
- }
-
- public Integer getHttpRetryIntervalSeconds() {
- return configuration.getHttpRetryIntervalSeconds();
- }
-
- /**
- * HTTP retry interval in seconds
- * @param httpRetryIntervalSeconds
- */
- public void setHttpRetryIntervalSeconds(Integer httpRetryIntervalSeconds) {
- configuration.setHttpRetryIntervalSeconds(httpRetryIntervalSeconds);
- }
-
- public Integer getHttpStreamingReadTimeout() {
- return configuration.getHttpStreamingReadTimeout();
- }
-
- /**
- * HTTP streaming read timeout in milliseconds
- * @param httpStreamingReadTimeout
- */
- public void setHttpStreamingReadTimeout(Integer httpStreamingReadTimeout) {
- configuration.setHttpStreamingReadTimeout(httpStreamingReadTimeout);
- }
-
- public Boolean getJsonStoreEnabled() {
- return configuration.getJsonStoreEnabled();
- }
-
- /**
- * If set to true, raw JSON forms will be stored in DataObjectFactory
- * @param jsonStoreEnabled
- */
- public void setJsonStoreEnabled(Boolean jsonStoreEnabled) {
- configuration.setJsonStoreEnabled(jsonStoreEnabled);
- }
-
- public Boolean getMbeanEnabled() {
- return configuration.getMbeanEnabled();
- }
-
- /**
- * If set to true, Facebook4J mbean will be registerd
- * @param mbeanEnabled
- */
- public void setMbeanEnabled(Boolean mbeanEnabled) {
- configuration.setMbeanEnabled(mbeanEnabled);
- }
-
- public String getOAuthPermissions() {
- return configuration.getOAuthPermissions();
- }
-
- /**
- * Default OAuth permissions. Comma separated permission names.
- * See https://developers.facebook.com/docs/reference/login/#permissions for the detail
- * @param oAuthPermissions
- */
- public void setOAuthPermissions(String oAuthPermissions) {
- configuration.setOAuthPermissions(oAuthPermissions);
- }
-
- public Boolean getPrettyDebugEnabled() {
- return configuration.getPrettyDebugEnabled();
- }
-
- /**
- * Prettify JSON debug output if set to true
- * @param prettyDebugEnabled
- */
- public void setPrettyDebugEnabled(Boolean prettyDebugEnabled) {
- configuration.setPrettyDebugEnabled(prettyDebugEnabled);
- }
-
- public String getRestBaseURL() {
- return configuration.getRestBaseURL();
- }
-
- /**
- * API base URL
- * @param restBaseURL
- */
- public void setRestBaseURL(String restBaseURL) {
- configuration.setRestBaseURL(restBaseURL);
- }
-
- public Boolean getUseSSL() {
- return configuration.getUseSSL();
- }
-
- /**
- * Use SSL
- * @param useSSL
- */
- public void setUseSSL(Boolean useSSL) {
- configuration.setUseSSL(useSSL);
- }
-
- public String getVideoBaseURL() {
- return configuration.getVideoBaseURL();
- }
-
- /**
- * Video API base URL
- * @param videoBaseURL
- */
- public void setVideoBaseURL(String videoBaseURL) {
- configuration.setVideoBaseURL(videoBaseURL);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
index 59bb626..fb2562f 100644
--- a/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
+++ b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
@@ -19,10 +19,6 @@ package org.apache.camel.component.ganglia;
import java.net.URI;
import java.util.Map;
-import info.ganglia.gmetric4j.gmetric.GMetric;
-import info.ganglia.gmetric4j.gmetric.GMetricSlope;
-import info.ganglia.gmetric4j.gmetric.GMetricType;
-
import org.apache.camel.Endpoint;
import org.apache.camel.impl.UriEndpointComponent;
import org.apache.camel.util.ObjectHelper;
@@ -58,185 +54,9 @@ public class GangliaComponent extends UriEndpointComponent {
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
public void setConfiguration(GangliaConfiguration configuration) {
this.configuration = configuration;
}
-
- public String getHost() {
- return configuration.getHost();
- }
-
- /**
- * Host name for Ganglia server
- * @param host
- */
- public void setHost(String host) {
- configuration.setHost(host);
- }
-
- public int getPort() {
- return configuration.getPort();
- }
-
- /**
- * Port for Ganglia server
- * @param port
- */
- public void setPort(int port) {
- configuration.setPort(port);
- }
-
- public GMetric.UDPAddressingMode getMode() {
- return configuration.getMode();
- }
-
- /**
- * Send the UDP metric packets using MULTICAST or UNICAST
- * @param mode
- */
- public void setMode(GMetric.UDPAddressingMode mode) {
- configuration.setMode(mode);
- }
-
- public int getTtl() {
- return configuration.getTtl();
- }
-
- /**
- * If using multicast, set the TTL of the packets
- * @param ttl
- */
- public void setTtl(int ttl) {
- configuration.setTtl(ttl);
- }
-
- public boolean getWireFormat31x() {
- return configuration.getWireFormat31x();
- }
-
- /**
- * Use the wire format of Ganglia 3.1.0 and later versions. Set this to false to use Ganglia 3.0.x or earlier.
- * @param wireFormat31x
- */
- public void setWireFormat31x(boolean wireFormat31x) {
- configuration.setWireFormat31x(wireFormat31x);
- }
-
- public String getSpoofHostname() {
- return configuration.getSpoofHostname();
- }
-
- /**
- * Spoofing information IP:hostname
- * @param spoofHostname
- */
- public void setSpoofHostname(String spoofHostname) {
- configuration.setSpoofHostname(spoofHostname);
- }
-
- public String getGroupName() {
- return configuration.getGroupName();
- }
-
- /**
- * The group that the metric belongs to.
- * @param groupName
- */
- public void setGroupName(String groupName) {
- configuration.setGroupName(groupName);
- }
-
- public String getPrefix() {
- return configuration.getPrefix();
- }
-
- /**
- * Prefix the metric name with this string and an underscore.
- * @param prefix
- */
- public void setPrefix(String prefix) {
- configuration.setPrefix(prefix);
- }
-
- public String getMetricName() {
- return configuration.getMetricName();
- }
-
- /**
- * The name to use for the metric.
- * @param metricName
- */
- public void setMetricName(String metricName) {
- configuration.setMetricName(metricName);
- }
-
- public GMetricType getType() {
- return configuration.getType();
- }
-
- /**
- * The type of value
- * @param type
- */
- public void setType(GMetricType type) {
- configuration.setType(type);
- }
-
- public GMetricSlope getSlope() {
- return configuration.getSlope();
- }
-
- /**
- * The slope
- * @param slope
- */
- public void setSlope(GMetricSlope slope) {
- configuration.setSlope(slope);
- }
-
- public String getUnits() {
- return configuration.getUnits();
- }
-
- /**
- * Any unit of measurement that qualifies the metric, e.g. widgets, litres, bytes.
- * Do not include a prefix such as k (kilo) or m (milli), other tools may scale the units later.
- * The value should be unscaled.
- * @param units
- */
- public void setUnits(String units) {
- configuration.setUnits(units);
- }
-
- public boolean isWireFormat31x() {
- return configuration.isWireFormat31x();
- }
-
- public int getTmax() {
- return configuration.getTmax();
- }
-
- /**
- * Maximum time in seconds that the value can be considered current.
- * After this, Ganglia considers the value to have expired.
- * @param tmax
- */
- public void setTmax(int tmax) {
- configuration.setTmax(tmax);
- }
-
- public int getDmax() {
- return configuration.getDmax();
- }
-
- /**
- * Minumum time in seconds before Ganglia will purge the metric value if it expires.
- * Set to 0 and the value will remain in Ganglia indefinitely until a gmond agent restart.
- * @param dmax
- */
- public void setDmax(int dmax) {
- configuration.setDmax(dmax);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
index cab3576..d140ee4 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.google.calendar;
-import java.util.List;
-
import com.google.api.services.calendar.Calendar;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
@@ -70,7 +68,7 @@ public class GoogleCalendarComponent extends AbstractApiComponent<GoogleCalendar
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
@Override
public void setConfiguration(GoogleCalendarConfiguration configuration) {
@@ -92,144 +90,4 @@ public class GoogleCalendarComponent extends AbstractApiComponent<GoogleCalendar
endpointConfiguration.setMethodName(methodName);
return new GoogleCalendarEndpoint(uri, this, apiName, methodName, endpointConfiguration);
}
-
-
- private GoogleCalendarConfiguration getConfigurationOrCreate() {
- if (this.getConfiguration() == null) {
- this.setConfiguration(new GoogleCalendarConfiguration());
- }
- return this.getConfiguration();
- }
-
- public GoogleCalendarApiName getApiName() {
- return getConfigurationOrCreate().getApiName();
- }
-
- /**
- * What kind of operation to perform
- * @param apiName
- */
- public void setApiName(GoogleCalendarApiName apiName) {
- getConfigurationOrCreate().setApiName(apiName);
- }
-
- public String getMethodName() {
- return getConfigurationOrCreate().getMethodName();
- }
-
- /**
- * What sub operation to use for the selected operation
- * @param methodName
- */
- public void setMethodName(String methodName) {
- getConfigurationOrCreate().setMethodName(methodName);
- }
-
- public String getClientId() {
- return getConfigurationOrCreate().getClientId();
- }
-
- /**
- * Client ID of the calendar application
- * @param clientId
- */
- public void setClientId(String clientId) {
- getConfigurationOrCreate().setClientId(clientId);
- }
-
- public String getEmailAddress() {
- return getConfigurationOrCreate().getEmailAddress();
- }
-
- /**
- * The emailAddress of the Google Service Account.
- * @param emailAddress
- */
- public void setEmailAddress(String emailAddress) {
- getConfigurationOrCreate().setEmailAddress(emailAddress);
- }
-
- public String getClientSecret() {
- return getConfigurationOrCreate().getClientSecret();
- }
-
- /**
- * Client secret of the calendar application
- * @param clientSecret
- */
- public void setClientSecret(String clientSecret) {
- getConfigurationOrCreate().setClientSecret(clientSecret);
- }
-
- public String getAccessToken() {
- return getConfigurationOrCreate().getAccessToken();
- }
-
- /**
- * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage.
- * @param accessToken
- */
- public void setAccessToken(String accessToken) {
- getConfigurationOrCreate().setAccessToken(accessToken);
- }
-
- public String getRefreshToken() {
- return getConfigurationOrCreate().getRefreshToken();
- }
-
- /**
- * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.
- * @param refreshToken
- */
- public void setRefreshToken(String refreshToken) {
- getConfigurationOrCreate().setRefreshToken(refreshToken);
- }
-
- public String getApplicationName() {
- return getConfigurationOrCreate().getApplicationName();
- }
-
- /**
- * Google calendar application name. Example would be "camel-google-calendar/1.0"
- * @param applicationName
- */
- public void setApplicationName(String applicationName) {
- getConfigurationOrCreate().setApplicationName(applicationName);
- }
-
- public List<String> getScopes() {
- return getConfigurationOrCreate().getScopes();
- }
-
- /**
- * Specifies the level of permissions you want a calendar application to have to a user account. See https://developers.google.com/google-apps/calendar/auth for more info.
- * @param scopes
- */
- public void setScopes(List<String> scopes) {
- getConfigurationOrCreate().setScopes(scopes);
- }
-
- public String getP12FileName() {
- return getConfigurationOrCreate().getP12FileName();
- }
-
- /**
- * The name of the p12 file which has the private key to use with the Google Service Account.
- * @param p12FileName
- */
- public void setP12FileName(String p12FileName) {
- getConfigurationOrCreate().setP12FileName(p12FileName);
- }
-
- public String getUser() {
- return getConfigurationOrCreate().getUser();
- }
-
- /**
- * The email address of the user the application is trying to impersonate in the service account flow
- * @param user
- */
- public void setUser(String user) {
- getConfigurationOrCreate().setUser(user);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
index 021456c..2554d0e 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.google.drive;
-import java.util.List;
-
import com.google.api.services.drive.Drive;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
@@ -62,7 +60,7 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
@Override
public void setConfiguration(GoogleDriveConfiguration configuration) {
@@ -91,108 +89,4 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
endpoint.setClientFactory(clientFactory);
return endpoint;
}
-
-
- private GoogleDriveConfiguration getConfigurationOrCreate() {
- if (this.getConfiguration() == null) {
- this.setConfiguration(new GoogleDriveConfiguration());
- }
- return this.getConfiguration();
- }
-
- public GoogleDriveApiName getApiName() {
- return getConfigurationOrCreate().getApiName();
- }
-
- /**
- * What kind of operation to perform
- * @param apiName
- */
- public void setApiName(GoogleDriveApiName apiName) {
- getConfigurationOrCreate().setApiName(apiName);
- }
-
- public String getMethodName() {
- return getConfigurationOrCreate().getMethodName();
- }
-
- /**
- * What sub operation to use for the selected operation
- * @param methodName
- */
- public void setMethodName(String methodName) {
- getConfigurationOrCreate().setMethodName(methodName);
- }
-
- public String getClientId() {
- return getConfigurationOrCreate().getClientId();
- }
-
- /**
- * Client ID of the drive application
- * @param clientId
- */
- public void setClientId(String clientId) {
- getConfigurationOrCreate().setClientId(clientId);
- }
-
- public String getClientSecret() {
- return getConfigurationOrCreate().getClientSecret();
- }
-
- /**
- * Client secret of the drive application
- * @param clientSecret
- */
- public void setClientSecret(String clientSecret) {
- getConfigurationOrCreate().setClientSecret(clientSecret);
- }
-
- public String getAccessToken() {
- return getConfigurationOrCreate().getAccessToken();
- }
-
- /**
- * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage.
- * @param accessToken
- */
- public void setAccessToken(String accessToken) {
- getConfigurationOrCreate().setAccessToken(accessToken);
- }
-
- public String getRefreshToken() {
- return getConfigurationOrCreate().getRefreshToken();
- }
-
- /**
- * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.
- * @param refreshToken
- */
- public void setRefreshToken(String refreshToken) {
- getConfigurationOrCreate().setRefreshToken(refreshToken);
- }
-
- public String getApplicationName() {
- return getConfigurationOrCreate().getApplicationName();
- }
-
- /**
- * Google drive application name. Example would be "camel-google-drive/1.0"
- * @param applicationName
- */
- public void setApplicationName(String applicationName) {
- getConfigurationOrCreate().setApplicationName(applicationName);
- }
-
- public List<String> getScopes() {
- return getConfigurationOrCreate().getScopes();
- }
-
- /**
- * Specifies the level of permissions you want a drive application to have to a user account. See https://developers.google.com/drive/web/scopes for more info.
- * @param scopes
- */
- public void setScopes(List<String> scopes) {
- getConfigurationOrCreate().setScopes(scopes);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
index 2ca471d..b6896d6 100644
--- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
+++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.google.mail;
-import java.util.List;
-
import com.google.api.services.gmail.Gmail;
import org.apache.camel.CamelContext;
@@ -63,7 +61,7 @@ public class GoogleMailComponent extends AbstractApiComponent<GoogleMailApiName,
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
@Override
public void setConfiguration(GoogleMailConfiguration configuration) {
@@ -89,108 +87,4 @@ public class GoogleMailComponent extends AbstractApiComponent<GoogleMailApiName,
endpointConfiguration.setMethodName(methodName);
return new GoogleMailEndpoint(uri, this, apiName, methodName, endpointConfiguration);
}
-
-
- private GoogleMailConfiguration getConfigurationOrCreate() {
- if (this.getConfiguration() == null) {
- this.setConfiguration(new GoogleMailConfiguration());
- }
- return this.getConfiguration();
- }
-
- public GoogleMailApiName getApiName() {
- return getConfigurationOrCreate().getApiName();
- }
-
- /**
- * What kind of operation to perform
- * @param apiName
- */
- public void setApiName(GoogleMailApiName apiName) {
- getConfigurationOrCreate().setApiName(apiName);
- }
-
- public String getMethodName() {
- return getConfigurationOrCreate().getMethodName();
- }
-
- /**
- * What sub operation to use for the selected operation
- * @param methodName
- */
- public void setMethodName(String methodName) {
- getConfigurationOrCreate().setMethodName(methodName);
- }
-
- public String getClientId() {
- return getConfigurationOrCreate().getClientId();
- }
-
- /**
- * Client ID of the mail application
- * @param clientId
- */
- public void setClientId(String clientId) {
- getConfigurationOrCreate().setClientId(clientId);
- }
-
- public String getClientSecret() {
- return getConfigurationOrCreate().getClientSecret();
- }
-
- /**
- * Client secret of the mail application
- * @param clientSecret
- */
- public void setClientSecret(String clientSecret) {
- getConfigurationOrCreate().setClientSecret(clientSecret);
- }
-
- public String getAccessToken() {
- return getConfigurationOrCreate().getAccessToken();
- }
-
- /**
- * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage.
- * @param accessToken
- */
- public void setAccessToken(String accessToken) {
- getConfigurationOrCreate().setAccessToken(accessToken);
- }
-
- public String getRefreshToken() {
- return getConfigurationOrCreate().getRefreshToken();
- }
-
- /**
- * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.
- * @param refreshToken
- */
- public void setRefreshToken(String refreshToken) {
- getConfigurationOrCreate().setRefreshToken(refreshToken);
- }
-
- public String getApplicationName() {
- return getConfigurationOrCreate().getApplicationName();
- }
-
- /**
- * Google mail application name. Example would be "camel-google-mail/1.0"
- * @param applicationName
- */
- public void setApplicationName(String applicationName) {
- getConfigurationOrCreate().setApplicationName(applicationName);
- }
-
- public List<String> getScopes() {
- return getConfigurationOrCreate().getScopes();
- }
-
- /**
- * Specifies the level of permissions you want a mail application to have to a user account. See https://developers.google.com/gmail/api/auth/scopes for more info.
- * @param scopes
- */
- public void setScopes(List<String> scopes) {
- getConfigurationOrCreate().setScopes(scopes);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
index b208950..3430af9 100644
--- a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
+++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
@@ -16,10 +16,8 @@
*/
package org.apache.camel.component.kestrel;
-import java.net.InetSocketAddress;
import java.net.URI;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import net.spy.memcached.ConnectionFactory;
@@ -205,40 +203,4 @@ public class KestrelComponent extends UriEndpointComponent {
super.doStop();
}
-
- public String[] getAddresses() {
- return configuration.getAddresses();
- }
-
- /**
- * The addresses
- * @param addresses
- */
- public void setAddresses(String[] addresses) {
- configuration.setAddresses(addresses);
- }
-
- public int getWaitTimeMs() {
- return configuration.getWaitTimeMs();
- }
-
- /**
- * The wait time in milliseconds
- * @param waitTimeMs
- */
- public void setWaitTimeMs(int waitTimeMs) {
- configuration.setWaitTimeMs(waitTimeMs);
- }
-
- public int getConcurrentConsumers() {
- return configuration.getConcurrentConsumers();
- }
-
- /**
- * The number of concurrent consumers
- * @param concurrentConsumers
- */
- public void setConcurrentConsumers(int concurrentConsumers) {
- configuration.setConcurrentConsumers(concurrentConsumers);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
index 576aed1..b697eaa 100644
--- a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
+++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
@@ -57,9 +57,6 @@ public class KestrelConfiguration implements Cloneable {
return addresses;
}
- /**
- * The addresses
- */
public void setAddresses(String[] addresses) {
this.addresses = addresses;
}
@@ -68,9 +65,6 @@ public class KestrelConfiguration implements Cloneable {
return waitTimeMs;
}
- /**
- * The wait time in milliseconds
- */
public void setWaitTimeMs(int waitTimeMs) {
this.waitTimeMs = waitTimeMs;
}
@@ -79,9 +73,6 @@ public class KestrelConfiguration implements Cloneable {
return concurrentConsumers;
}
- /**
- * The number of concurrent consumers
- */
public void setConcurrentConsumers(int concurrentConsumers) {
if (concurrentConsumers <= 0) {
throw new IllegalArgumentException("Invalid value for concurrentConsumers: " + concurrentConsumers);
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
index 7e357df..db00018 100644
--- a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
+++ b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
@@ -18,15 +18,12 @@ package org.apache.camel.component.linkedin;
import java.io.IOException;
import java.security.GeneralSecurityException;
-import java.util.Map;
import javax.net.ssl.SSLContext;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter;
import org.apache.camel.component.linkedin.api.OAuthParams;
-import org.apache.camel.component.linkedin.api.OAuthScope;
-import org.apache.camel.component.linkedin.api.OAuthSecureStorage;
import org.apache.camel.component.linkedin.internal.CachingOAuthSecureStorage;
import org.apache.camel.component.linkedin.internal.LinkedInApiCollection;
import org.apache.camel.component.linkedin.internal.LinkedInApiName;
@@ -67,13 +64,13 @@ public class LinkedInComponent extends AbstractApiComponent<LinkedInApiName, Lin
}
/**
- * To use the shared configuration. Properties of the shared configuration can also be set individually.
+ * To use the shared configuration
*/
@Override
public LinkedInConfiguration getConfiguration() {
return super.getConfiguration();
}
-
+
@Override
protected Endpoint createEndpoint(String uri, String methodName, LinkedInApiName apiName,
LinkedInConfiguration endpointConfiguration) {
@@ -108,13 +105,13 @@ public class LinkedInComponent extends AbstractApiComponent<LinkedInApiName, Lin
throw ObjectHelper.wrapRuntimeCamelException(e);
}
return new LinkedInOAuthRequestFilter(getOAuthParams(configuration),
- configuration.getHttpParams(), configuration.isLazyAuth(), enabledProtocols);
+ configuration.getHttpParams(), configuration.isLazyAuth(), enabledProtocols);
}
private static OAuthParams getOAuthParams(LinkedInConfiguration configuration) {
return new OAuthParams(configuration.getUserName(), configuration.getUserPassword(),
- new CachingOAuthSecureStorage(configuration.getSecureStorage()), configuration.getClientId(), configuration.getClientSecret(),
- configuration.getRedirectUri(), configuration.getScopes());
+ new CachingOAuthSecureStorage(configuration.getSecureStorage()), configuration.getClientId(), configuration.getClientSecret(),
+ configuration.getRedirectUri(), configuration.getScopes());
}
@Override
@@ -138,146 +135,4 @@ public class LinkedInComponent extends AbstractApiComponent<LinkedInApiName, Lin
LOG.warn("Error closing OAuth2 request filter: " + e.getMessage(), e);
}
}
-
- private LinkedInConfiguration getConfigurationOrCreate() {
- if (this.getConfiguration() == null) {
- this.setConfiguration(new LinkedInConfiguration());
- }
- return this.getConfiguration();
- }
-
- public LinkedInApiName getApiName() {
- return getConfigurationOrCreate().getApiName();
- }
-
- /**
- * What kind of operation to perform
- * @param apiName
- */
- public void setApiName(LinkedInApiName apiName) {
- getConfigurationOrCreate().setApiName(apiName);
- }
-
- public String getMethodName() {
- return getConfigurationOrCreate().getMethodName();
- }
-
- /**
- * What sub operation to use for the selected operation
- * @param methodName
- */
- public void setMethodName(String methodName) {
- getConfigurationOrCreate().setMethodName(methodName);
- }
-
- public String getUserName() {
- return getConfigurationOrCreate().getUserName();
- }
-
- /**
- * LinkedIn user account name, MUST be provided
- * @param userName
- */
- public void setUserName(String userName) {
- getConfigurationOrCreate().setUserName(userName);
- }
-
- public String getUserPassword() {
- return getConfigurationOrCreate().getUserPassword();
- }
-
- /**
- * LinkedIn account password
- * @param userPassword
- */
- public void setUserPassword(String userPassword) {
- getConfigurationOrCreate().setUserPassword(userPassword);
- }
-
- public OAuthSecureStorage getSecureStorage() {
- return getConfigurationOrCreate().getSecureStorage();
- }
-
- /**
- * Callback interface for providing an OAuth token or to store the token generated by the component.
- * The callback should return null on the first call and then save the created token in the saveToken() callback.
- * If the callback returns null the first time, a userPassword MUST be provided
- * @param secureStorage
- */
- public void setSecureStorage(OAuthSecureStorage secureStorage) {
- getConfigurationOrCreate().setSecureStorage(secureStorage);
- }
-
- public String getClientId() {
- return getConfigurationOrCreate().getClientId();
- }
-
- /**
- * LinkedIn application client ID
- * @param clientId
- */
- public void setClientId(String clientId) {
- getConfigurationOrCreate().setClientId(clientId);
- }
-
- public String getClientSecret() {
- return getConfigurationOrCreate().getClientSecret();
- }
-
- /**
- * LinkedIn application client secret
- * @param clientSecret
- */
- public void setClientSecret(String clientSecret) {
- getConfigurationOrCreate().setClientSecret(clientSecret);
- }
-
- public OAuthScope[] getScopes() {
- return getConfigurationOrCreate().getScopes();
- }
-
- /**
- * List of LinkedIn scopes as specified at https://developer.linkedin.com/documents/authentication#granting
- * @param scopes
- */
- public void setScopes(OAuthScope[] scopes) {
- getConfigurationOrCreate().setScopes(scopes);
- }
-
- public String getRedirectUri() {
- return getConfigurationOrCreate().getRedirectUri();
- }
-
- /**
- * Application redirect URI, although the component never redirects to this page to avoid having to have a functioning redirect server.
- * So for testing one could use https://localhost
- * @param redirectUri
- */
- public void setRedirectUri(String redirectUri) {
- getConfigurationOrCreate().setRedirectUri(redirectUri);
- }
-
- public Map<String, Object> getHttpParams() {
- return getConfigurationOrCreate().getHttpParams();
- }
-
- /**
- * Custom HTTP params, for example proxy host and port, use constants from AllClientPNames
- * @param httpParams
- */
- public void setHttpParams(Map<String, Object> httpParams) {
- getConfigurationOrCreate().setHttpParams(httpParams);
- }
-
- public boolean isLazyAuth() {
- return getConfigurationOrCreate().isLazyAuth();
- }
-
- /**
- * Flag to enable/disable lazy OAuth, default is true. when enabled, OAuth token retrieval or generation is not done until the first REST call
- * @param lazyAuth
- */
- public void setLazyAuth(boolean lazyAuth) {
- getConfigurationOrCreate().setLazyAuth(lazyAuth);
- }
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a04fb15b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneComponent.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneComponent.java
index 997f22e..805d6da 100644
--- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneComponent.java
+++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneComponent.java
@@ -16,18 +16,16 @@
*/
package org.apache.camel.component.lucene;
-import java.io.File;
import java.net.URI;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.impl.UriEndpointComponent;
-import org.apache.lucene.analysis.Analyzer;
public class LuceneComponent extends UriEndpointComponent {
private LuceneConfiguration config;
-
+
public LuceneComponent() {
super(LuceneEndpoint.class);
config = new LuceneConfiguration();
@@ -37,10 +35,10 @@ public class LuceneComponent extends UriEndpointComponent {
super(context, LuceneEndpoint.class);
config = new LuceneConfiguration();
}
-
+
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters)
- throws Exception {
+ throws Exception {
config.parseURI(new URI(uri), parameters, this);
LuceneEndpoint luceneEndpoint = new LuceneEndpoint(uri, this, config);
setProperties(luceneEndpoint.getConfig(), parameters);
@@ -52,84 +50,9 @@ public class LuceneComponent extends UriEndpointComponent {
}
/**
- * To use a shared lucene configuration. Properties of the shared configuration can also be set individually.
+ * To use a shared lucene configuration
*/
public void setConfig(LuceneConfiguration config) {
this.config = config;
}
-
- public String getHost() {
- return config.getHost();
- }
-
- /**
- * The URL to the lucene server
- * @param host
- */
- public void setHost(String host) {
- config.setHost(host);
- }
-
- public LuceneOperation getOperation() {
- return config.getOperation();
- }
-
- /**
- * Operation to do such as insert or query.
- * @param operation
- */
- public void setOperation(LuceneOperation operation) {
- config.setOperation(operation);
- }
-
- public File getSourceDirectory() {
- return config.getSourceDirectory();
- }
-
- /**
- * An optional directory containing files to be used to be analyzed and added to the index at producer startup.
- * @param sourceDirectory
- */
- public void setSourceDirectory(File sourceDirectory) {
- config.setSourceDirectory(sourceDirectory);
- }
-
- public File getIndexDirectory() {
- return config.getIndexDirectory();
- }
-
- /**
- * A file system directory in which index files are created upon analysis of the document by the specified analyzer
- * @param indexDirectory
- */
- public void setIndexDirectory(File indexDirectory) {
- config.setIndexDirectory(indexDirectory);
- }
-
- public Analyzer getAnalyzer() {
- return config.getAnalyzer();
- }
-
- /**
- * An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index terms from text.
- * The value for analyzer can be any class that extends the abstract class org.apache.lucene.analysis.Analyzer.
- * Lucene also offers a rich set of analyzers out of the box
- * @param analyzer
- */
- public void setAnalyzer(Analyzer analyzer) {
- config.setAnalyzer(analyzer);
- }
-
- public int getMaxHits() {
- return config.getMaxHits();
- }
-
- /**
- * An integer value that limits the result set of the search operation
- * @param maxHits
- */
- public void setMaxHits(int maxHits) {
- config.setMaxHits(maxHits);
- }
-
}