You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2017/01/16 17:30:01 UTC
[03/52] [partial] camel git commit: CAMEL-10622: Move spring-boot
components starter to platforms/spring-boot/
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
deleted file mode 100644
index 5cc29b7..0000000
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
+++ /dev/null
@@ -1,565 +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.mail.springboot;
-
-import java.util.Properties;
-import javax.mail.Session;
-import org.apache.camel.component.mail.AttachmentsContentTransferEncodingResolver;
-import org.apache.camel.component.mail.ContentTypeResolver;
-import org.apache.camel.component.mail.JavaMailSender;
-import org.apache.camel.util.jsse.SSLContextParameters;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.NestedConfigurationProperty;
-
-/**
- * To send or receive emails using imap/pop3 or stmp protocols.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@ConfigurationProperties(prefix = "camel.component.mail")
-public class MailComponentConfiguration {
-
- /**
- * Sets the Mail configuration
- */
- private MailConfigurationNestedConfiguration configuration;
- /**
- * Resolver to determine Content-Type for file attachments.
- */
- @NestedConfigurationProperty
- private ContentTypeResolver contentTypeResolver;
-
- public MailConfigurationNestedConfiguration getConfiguration() {
- return configuration;
- }
-
- public void setConfiguration(
- MailConfigurationNestedConfiguration configuration) {
- this.configuration = configuration;
- }
-
- public ContentTypeResolver getContentTypeResolver() {
- return contentTypeResolver;
- }
-
- public void setContentTypeResolver(ContentTypeResolver contentTypeResolver) {
- this.contentTypeResolver = contentTypeResolver;
- }
-
- public static class MailConfigurationNestedConfiguration {
- public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.mail.MailConfiguration.class;
- /**
- * To use a custom
- * {@link org.apache.camel.component.mail.JavaMailSender} for sending
- * emails.
- */
- private JavaMailSender javaMailSender;
- /**
- * The mail server host name
- */
- private String host;
- /**
- * Sets the java mail options. Will clear any default properties and
- * only use the properties provided for this method.
- */
- private Properties javaMailProperties;
- /**
- * Sets additional java mail properties, that will append/override any
- * default properties that is set based on all the other options. This
- * is useful if you need to add some special options but want to keep
- * the others as is.
- */
- private Properties additionalJavaMailProperties;
- /**
- * The password for login
- */
- private String password;
- /**
- * The Subject of the message being sent. Note: Setting the subject in
- * the header takes precedence over this option.
- */
- private String subject;
- /**
- * The port number of the mail server
- */
- private Integer port;
- /**
- * The protocol for communicating with the mail server
- */
- private String protocol;
- /**
- * Specifies the mail session that camel should use for all mail
- * interactions. Useful in scenarios where mail sessions are created and
- * managed by some other resource, such as a JavaEE container. If this
- * is not specified, Camel automatically creates the mail session for
- * you.
- */
- private Session session;
- /**
- * The username for login
- */
- private String username;
- /**
- * The from email address
- */
- private String from = "MailConstants.MAIL_DEFAULT_FROM";
- /**
- * Deletes the messages after they have been processed. This is done by
- * setting the DELETED flag on the mail message. If false, the SEEN flag
- * is set instead. As of Camel 2.10 you can override this configuration
- * option by setting a header with the key delete to determine if the
- * mail should be deleted or not.
- */
- private Boolean delete;
- /**
- * Specifies whether Camel should map the received mail message to Camel
- * body/headers. If set to true, the body of the mail message is mapped
- * to the body of the Camel IN message and the mail headers are mapped
- * to IN headers. If this option is set to false then the IN message
- * contains a raw javax.mail.Message. You can retrieve this raw message
- * by calling exchange.getIn().getBody(javax.mail.Message.class).
- */
- private Boolean mapMailMessage;
- /**
- * The folder to poll.
- */
- private String folderName = "MailConstants.MAIL_DEFAULT_FOLDER";
- /**
- * Option to let Camel ignore unsupported charset in the local JVM when
- * sending mails. If the charset is unsupported then charset=XXX (where
- * XXX represents the unsupported charset) is removed from the
- * content-type and it relies on the platform default instead.
- */
- private Boolean ignoreUriScheme;
- /**
- * Whether to limit by unseen mails only.
- */
- private Boolean unseen;
- /**
- * Sets the <tt>To</tt> email address. Separate multiple email addresses
- * with comma.
- */
- private String to;
- /**
- * Sets the <tt>CC</tt> email address. Separate multiple email addresses
- * with comma.
- */
- private String cc;
- /**
- * Sets the <tt>BCC</tt> email address. Separate multiple email
- * addresses with comma.
- */
- private String bcc;
- /**
- * The Reply-To recipients (the receivers of the response mail).
- * Separate multiple email addresses with a comma.
- */
- private String replyTo;
- /**
- * Sets the maximum number of messages to consume during a poll. This
- * can be used to avoid overloading a mail server, if a mailbox folder
- * contains a lot of messages. Default value of -1 means no fetch size
- * and all messages will be consumed. Setting the value to 0 is a
- * special corner case, where Camel will not consume any messages at
- * all.
- */
- private Integer fetchSize;
- /**
- * Enable debug mode on the underlying mail framework. The SUN Mail
- * framework logs the debug messages to System.out by default.
- */
- private Boolean debugMode;
- /**
- * The connection timeout in milliseconds.
- */
- private Long connectionTimeout;
- /**
- * To use a dummy security setting for trusting all certificates. Should
- * only be used for development mode, and not production.
- */
- private Boolean dummyTrustManager;
- /**
- * The mail message content type. Use text/html for HTML mails.
- */
- private String contentType = "text/plain";
- /**
- * Specifies the key to an IN message header that contains an
- * alternative email body. For example, if you send emails in text/html
- * format and want to provide an alternative mail body for non-HTML
- * email clients, set the alternative mail body with this key as a
- * header.
- */
- private String alternativeBodyHeader = "MailConstants.MAIL_ALTERNATIVE_BODY";
- /**
- * Whether to use disposition inline or attachment.
- */
- private Boolean useInlineAttachments;
- /**
- * Option to let Camel ignore unsupported charset in the local JVM when
- * sending mails. If the charset is unsupported then charset=XXX (where
- * XXX represents the unsupported charset) is removed from the
- * content-type and it relies on the platform default instead.
- */
- private Boolean ignoreUnsupportedCharset;
- /**
- * Whether the consumer should disconnect after polling. If enabled this
- * forces Camel to connect on each poll.
- */
- private Boolean disconnect;
- /**
- * Whether the consumer should close the folder after polling. Setting
- * this option to false and having disconnect=false as well, then the
- * consumer keep the folder open between polls.
- */
- private Boolean closeFolder;
- /**
- * To configure security using SSLContextParameters.
- */
- @NestedConfigurationProperty
- private SSLContextParameters sslContextParameters;
- /**
- * After processing a mail message, it can be copied to a mail folder
- * with the given name. You can override this configuration value, with
- * a header with the key copyTo, allowing you to copy messages to folder
- * names configured at runtime.
- */
- private String copyTo;
- /**
- * Will mark the javax.mail.Message as peeked before processing the mail
- * message. This applies to IMAPMessage messages types only. By using
- * peek the mail will not be eager marked as SEEN on the mail server,
- * which allows us to rollback the mail message if there is an error
- * processing in Camel.
- */
- private Boolean peek;
- /**
- * If the mail consumer cannot retrieve a given mail message, then this
- * option allows to skip the message and move on to retrieve the next
- * mail message.
- * <p/>
- * The default behavior would be the consumer throws an exception and no
- * mails from the batch would be able to be routed by Camel.
- */
- private Boolean skipFailedMessage;
- /**
- * If the mail consumer cannot retrieve a given mail message, then this
- * option allows to handle the caused exception by the consumer's error
- * handler. By enable the bridge error handler on the consumer, then the
- * Camel routing error handler can handle the exception instead.
- * <p/>
- * The default behavior would be the consumer throws an exception and no
- * mails from the batch would be able to be routed by Camel.
- */
- private Boolean handleFailedMessage;
- /**
- * To use a custom AttachmentsContentTransferEncodingResolver to resolve
- * what content-type-encoding to use for attachments.
- */
- private AttachmentsContentTransferEncodingResolver attachmentsContentTransferEncodingResolver;
-
- public JavaMailSender getJavaMailSender() {
- return javaMailSender;
- }
-
- public void setJavaMailSender(JavaMailSender javaMailSender) {
- this.javaMailSender = javaMailSender;
- }
-
- public String getHost() {
- return host;
- }
-
- public void setHost(String host) {
- this.host = host;
- }
-
- public Properties getJavaMailProperties() {
- return javaMailProperties;
- }
-
- public void setJavaMailProperties(Properties javaMailProperties) {
- this.javaMailProperties = javaMailProperties;
- }
-
- public Properties getAdditionalJavaMailProperties() {
- return additionalJavaMailProperties;
- }
-
- public void setAdditionalJavaMailProperties(
- Properties additionalJavaMailProperties) {
- this.additionalJavaMailProperties = additionalJavaMailProperties;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getSubject() {
- return subject;
- }
-
- public void setSubject(String subject) {
- this.subject = subject;
- }
-
- public Integer getPort() {
- return port;
- }
-
- public void setPort(Integer port) {
- this.port = port;
- }
-
- public String getProtocol() {
- return protocol;
- }
-
- public void setProtocol(String protocol) {
- this.protocol = protocol;
- }
-
- public Session getSession() {
- return session;
- }
-
- public void setSession(Session session) {
- this.session = session;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getFrom() {
- return from;
- }
-
- public void setFrom(String from) {
- this.from = from;
- }
-
- public Boolean getDelete() {
- return delete;
- }
-
- public void setDelete(Boolean delete) {
- this.delete = delete;
- }
-
- public Boolean getMapMailMessage() {
- return mapMailMessage;
- }
-
- public void setMapMailMessage(Boolean mapMailMessage) {
- this.mapMailMessage = mapMailMessage;
- }
-
- public String getFolderName() {
- return folderName;
- }
-
- public void setFolderName(String folderName) {
- this.folderName = folderName;
- }
-
- public Boolean getIgnoreUriScheme() {
- return ignoreUriScheme;
- }
-
- public void setIgnoreUriScheme(Boolean ignoreUriScheme) {
- this.ignoreUriScheme = ignoreUriScheme;
- }
-
- public Boolean getUnseen() {
- return unseen;
- }
-
- public void setUnseen(Boolean unseen) {
- this.unseen = unseen;
- }
-
- public String getTo() {
- return to;
- }
-
- public void setTo(String to) {
- this.to = to;
- }
-
- public String getCc() {
- return cc;
- }
-
- public void setCc(String cc) {
- this.cc = cc;
- }
-
- public String getBcc() {
- return bcc;
- }
-
- public void setBcc(String bcc) {
- this.bcc = bcc;
- }
-
- public String getReplyTo() {
- return replyTo;
- }
-
- public void setReplyTo(String replyTo) {
- this.replyTo = replyTo;
- }
-
- public Integer getFetchSize() {
- return fetchSize;
- }
-
- public void setFetchSize(Integer fetchSize) {
- this.fetchSize = fetchSize;
- }
-
- public Boolean getDebugMode() {
- return debugMode;
- }
-
- public void setDebugMode(Boolean debugMode) {
- this.debugMode = debugMode;
- }
-
- public Long getConnectionTimeout() {
- return connectionTimeout;
- }
-
- public void setConnectionTimeout(Long connectionTimeout) {
- this.connectionTimeout = connectionTimeout;
- }
-
- public Boolean getDummyTrustManager() {
- return dummyTrustManager;
- }
-
- public void setDummyTrustManager(Boolean dummyTrustManager) {
- this.dummyTrustManager = dummyTrustManager;
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public String getAlternativeBodyHeader() {
- return alternativeBodyHeader;
- }
-
- public void setAlternativeBodyHeader(String alternativeBodyHeader) {
- this.alternativeBodyHeader = alternativeBodyHeader;
- }
-
- public Boolean getUseInlineAttachments() {
- return useInlineAttachments;
- }
-
- public void setUseInlineAttachments(Boolean useInlineAttachments) {
- this.useInlineAttachments = useInlineAttachments;
- }
-
- public Boolean getIgnoreUnsupportedCharset() {
- return ignoreUnsupportedCharset;
- }
-
- public void setIgnoreUnsupportedCharset(Boolean ignoreUnsupportedCharset) {
- this.ignoreUnsupportedCharset = ignoreUnsupportedCharset;
- }
-
- public Boolean getDisconnect() {
- return disconnect;
- }
-
- public void setDisconnect(Boolean disconnect) {
- this.disconnect = disconnect;
- }
-
- public Boolean getCloseFolder() {
- return closeFolder;
- }
-
- public void setCloseFolder(Boolean closeFolder) {
- this.closeFolder = closeFolder;
- }
-
- public SSLContextParameters getSslContextParameters() {
- return sslContextParameters;
- }
-
- public void setSslContextParameters(
- SSLContextParameters sslContextParameters) {
- this.sslContextParameters = sslContextParameters;
- }
-
- public String getCopyTo() {
- return copyTo;
- }
-
- public void setCopyTo(String copyTo) {
- this.copyTo = copyTo;
- }
-
- public Boolean getPeek() {
- return peek;
- }
-
- public void setPeek(Boolean peek) {
- this.peek = peek;
- }
-
- public Boolean getSkipFailedMessage() {
- return skipFailedMessage;
- }
-
- public void setSkipFailedMessage(Boolean skipFailedMessage) {
- this.skipFailedMessage = skipFailedMessage;
- }
-
- public Boolean getHandleFailedMessage() {
- return handleFailedMessage;
- }
-
- public void setHandleFailedMessage(Boolean handleFailedMessage) {
- this.handleFailedMessage = handleFailedMessage;
- }
-
- public AttachmentsContentTransferEncodingResolver getAttachmentsContentTransferEncodingResolver() {
- return attachmentsContentTransferEncodingResolver;
- }
-
- public void setAttachmentsContentTransferEncodingResolver(
- AttachmentsContentTransferEncodingResolver attachmentsContentTransferEncodingResolver) {
- this.attachmentsContentTransferEncodingResolver = attachmentsContentTransferEncodingResolver;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
deleted file mode 100644
index a1e1197..0000000
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
+++ /dev/null
@@ -1,100 +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.dataformat.mime.multipart.springboot;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.dataformat.mime.multipart.MimeMultipartDataFormat;
-import org.apache.camel.util.IntrospectionSupport;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@Conditional(MimeMultipartDataFormatAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(MimeMultipartDataFormatConfiguration.class)
-public class MimeMultipartDataFormatAutoConfiguration {
-
- @Bean(name = "mime-multipart-dataformat")
- @Scope("prototype")
- @ConditionalOnClass(CamelContext.class)
- @ConditionalOnMissingBean(MimeMultipartDataFormat.class)
- public MimeMultipartDataFormat configureMimeMultipartDataFormat(
- CamelContext camelContext,
- MimeMultipartDataFormatConfiguration configuration)
- throws Exception {
- MimeMultipartDataFormat dataformat = new MimeMultipartDataFormat();
- if (CamelContextAware.class
- .isAssignableFrom(MimeMultipartDataFormat.class)) {
- CamelContextAware contextAware = CamelContextAware.class
- .cast(dataformat);
- if (contextAware != null) {
- contextAware.setCamelContext(camelContext);
- }
- }
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration, parameters, null,
- false);
- IntrospectionSupport.setProperties(camelContext,
- camelContext.getTypeConverter(), dataformat, parameters);
- return dataformat;
- }
-
- public static class Condition extends SpringBootCondition {
- @Override
- public ConditionOutcome getMatchOutcome(
- ConditionContext conditionContext,
- AnnotatedTypeMetadata annotatedTypeMetadata) {
- boolean groupEnabled = isEnabled(conditionContext,
- "camel.dataformat.", true);
- ConditionMessage.Builder message = ConditionMessage
- .forCondition("camel.dataformat.mime-multipart");
- if (isEnabled(conditionContext, "camel.dataformat.mime-multipart.",
- groupEnabled)) {
- return ConditionOutcome.match(message.because("enabled"));
- }
- return ConditionOutcome.noMatch(message.because("not enabled"));
- }
-
- private boolean isEnabled(
- org.springframework.context.annotation.ConditionContext context,
- java.lang.String prefix, boolean defaultValue) {
- RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
- context.getEnvironment(), prefix);
- return resolver.getProperty("enabled", Boolean.class, defaultValue);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatConfiguration.java
deleted file mode 100644
index 9c2202a..0000000
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatConfiguration.java
+++ /dev/null
@@ -1,109 +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.dataformat.mime.multipart.springboot;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * Camel Mail support
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@ConfigurationProperties(prefix = "camel.dataformat.mime-multipart")
-public class MimeMultipartDataFormatConfiguration {
-
- /**
- * Specify the subtype of the MIME Multipart. Default is mixed.
- */
- private String multipartSubType;
- /**
- * Defines whether a message without attachment is also marshaled into a
- * MIME Multipart (with only one body part). Default is false.
- */
- private Boolean multipartWithoutAttachment = false;
- /**
- * Defines whether the MIME-Multipart headers are part of the message body
- * (true) or are set as Camel headers (false). Default is false.
- */
- private Boolean headersInline = false;
- /**
- * A regex that defines which Camel headers are also included as MIME
- * headers into the MIME multipart. This will only work if headersInline is
- * set to true. Default is to include no headers
- */
- private String includeHeaders;
- /**
- * Defines whether the content of binary parts in the MIME multipart is
- * binary (true) or Base-64 encoded (false) Default is false.
- */
- private Boolean binaryContent = false;
- /**
- * Whether the data format should set the Content-Type header with the type
- * from the data format if the data format is capable of doing so. For
- * example application/xml for data formats marshalling to XML or
- * application/json for data formats marshalling to JSon etc.
- */
- private Boolean contentTypeHeader = false;
-
- public String getMultipartSubType() {
- return multipartSubType;
- }
-
- public void setMultipartSubType(String multipartSubType) {
- this.multipartSubType = multipartSubType;
- }
-
- public Boolean getMultipartWithoutAttachment() {
- return multipartWithoutAttachment;
- }
-
- public void setMultipartWithoutAttachment(Boolean multipartWithoutAttachment) {
- this.multipartWithoutAttachment = multipartWithoutAttachment;
- }
-
- public Boolean getHeadersInline() {
- return headersInline;
- }
-
- public void setHeadersInline(Boolean headersInline) {
- this.headersInline = headersInline;
- }
-
- public String getIncludeHeaders() {
- return includeHeaders;
- }
-
- public void setIncludeHeaders(String includeHeaders) {
- this.includeHeaders = includeHeaders;
- }
-
- public Boolean getBinaryContent() {
- return binaryContent;
- }
-
- public void setBinaryContent(Boolean binaryContent) {
- this.binaryContent = binaryContent;
- }
-
- public Boolean getContentTypeHeader() {
- return contentTypeHeader;
- }
-
- public void setContentTypeHeader(Boolean contentTypeHeader) {
- this.contentTypeHeader = contentTypeHeader;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/resources/META-INF/LICENSE.txt b/components-starter/camel-mail-starter/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/components-starter/camel-mail-starter/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/resources/META-INF/NOTICE.txt b/components-starter/camel-mail-starter/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/components-starter/camel-mail-starter/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
deleted file mode 100644
index 4061c78..0000000
--- a/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "properties": [
- {
- "defaultValue": true,
- "name": "camel.component.mail.enabled",
- "description": "Enable mail component",
- "type": "java.lang.Boolean"
- },
- {
- "defaultValue": true,
- "name": "camel.dataformat.mime-multipart.enabled",
- "description": "Enable mime-multipart dataformat",
- "type": "java.lang.Boolean"
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 71927c3..0000000
--- a/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,21 +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.
-#
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.dataformat.mime.multipart.springboot.MimeMultipartDataFormatAutoConfiguration,\
-org.apache.camel.component.mail.springboot.MailComponentAutoConfiguration
-
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.provides
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.provides b/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.provides
deleted file mode 100644
index 94ec26f..0000000
--- a/components-starter/camel-mail-starter/src/main/resources/META-INF/spring.provides
+++ /dev/null
@@ -1,18 +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.
-#
-
-provides: camel-mail
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/pom.xml b/components-starter/camel-metrics-starter/pom.xml
deleted file mode 100644
index 0b89e8d..0000000
--- a/components-starter/camel-metrics-starter/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components-starter</artifactId>
- <version>2.19.0-SNAPSHOT</version>
- </parent>
- <artifactId>camel-metrics-starter</artifactId>
- <packaging>jar</packaging>
- <name>Spring-Boot Starter :: Camel :: Metrics</name>
- <description>Spring-Boot Starter for Camel Metrics based monitoring component</description>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- <version>${spring-boot-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-metrics</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--START OF GENERATED CODE-->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-boot-starter</artifactId>
- </dependency>
- <!--END OF GENERATED CODE-->
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java b/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
deleted file mode 100644
index e3f2e87..0000000
--- a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
+++ /dev/null
@@ -1,111 +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.metrics.springboot;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.metrics.MetricsComponent;
-import org.apache.camel.util.IntrospectionSupport;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@Conditional(MetricsComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(MetricsComponentConfiguration.class)
-public class MetricsComponentAutoConfiguration {
-
- @Lazy
- @Bean(name = "metrics-component")
- @ConditionalOnClass(CamelContext.class)
- @ConditionalOnMissingBean(MetricsComponent.class)
- public MetricsComponent configureMetricsComponent(
- CamelContext camelContext,
- MetricsComponentConfiguration configuration) throws Exception {
- MetricsComponent component = new MetricsComponent();
- component.setCamelContext(camelContext);
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration, parameters, null,
- false);
- for (Map.Entry<String, Object> entry : parameters.entrySet()) {
- Object value = entry.getValue();
- Class<?> paramClass = value.getClass();
- if (paramClass.getName().endsWith("NestedConfiguration")) {
- Class nestedClass = null;
- try {
- nestedClass = (Class) paramClass.getDeclaredField(
- "CAMEL_NESTED_CLASS").get(null);
- HashMap<String, Object> nestedParameters = new HashMap<>();
- IntrospectionSupport.getProperties(value, nestedParameters,
- null, false);
- Object nestedProperty = nestedClass.newInstance();
- IntrospectionSupport.setProperties(camelContext,
- camelContext.getTypeConverter(), nestedProperty,
- nestedParameters);
- entry.setValue(nestedProperty);
- } catch (NoSuchFieldException e) {
- }
- }
- }
- IntrospectionSupport.setProperties(camelContext,
- camelContext.getTypeConverter(), component, parameters);
- return component;
- }
-
- public static class Condition extends SpringBootCondition {
- @Override
- public ConditionOutcome getMatchOutcome(
- ConditionContext conditionContext,
- AnnotatedTypeMetadata annotatedTypeMetadata) {
- boolean groupEnabled = isEnabled(conditionContext,
- "camel.component.", true);
- ConditionMessage.Builder message = ConditionMessage
- .forCondition("camel.component.metrics");
- if (isEnabled(conditionContext, "camel.component.metrics.",
- groupEnabled)) {
- return ConditionOutcome.match(message.because("enabled"));
- }
- return ConditionOutcome.noMatch(message.because("not enabled"));
- }
-
- private boolean isEnabled(
- org.springframework.context.annotation.ConditionContext context,
- java.lang.String prefix, boolean defaultValue) {
- RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
- context.getEnvironment(), prefix);
- return resolver.getProperty("enabled", Boolean.class, defaultValue);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java b/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java
deleted file mode 100644
index a8ef666..0000000
--- a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java
+++ /dev/null
@@ -1,45 +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.metrics.springboot;
-
-import com.codahale.metrics.MetricRegistry;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.NestedConfigurationProperty;
-
-/**
- * To collect various metrics directly from Camel routes using the DropWizard
- * metrics library.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@ConfigurationProperties(prefix = "camel.component.metrics")
-public class MetricsComponentConfiguration {
-
- /**
- * To use a custom configured MetricRegistry.
- */
- @NestedConfigurationProperty
- private MetricRegistry metricRegistry;
-
- public MetricRegistry getMetricRegistry() {
- return metricRegistry;
- }
-
- public void setMetricRegistry(MetricRegistry metricRegistry) {
- this.metricRegistry = metricRegistry;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/resources/META-INF/LICENSE.txt b/components-starter/camel-metrics-starter/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/components-starter/camel-metrics-starter/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/resources/META-INF/NOTICE.txt b/components-starter/camel-metrics-starter/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/components-starter/camel-metrics-starter/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
deleted file mode 100644
index ed3fb2c..0000000
--- a/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "properties": [
- {
- "defaultValue": true,
- "name": "camel.component.metrics.enabled",
- "description": "Enable metrics component",
- "type": "java.lang.Boolean"
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index dd83a8b..0000000
--- a/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,19 +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.
-#
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.metrics.springboot.MetricsComponentAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.provides
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.provides b/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.provides
deleted file mode 100644
index 0583075..0000000
--- a/components-starter/camel-metrics-starter/src/main/resources/META-INF/spring.provides
+++ /dev/null
@@ -1,18 +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.
-#
-
-provides: camel-metrics
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mina2-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/camel-mina2-starter/pom.xml b/components-starter/camel-mina2-starter/pom.xml
deleted file mode 100644
index 2df0689..0000000
--- a/components-starter/camel-mina2-starter/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components-starter</artifactId>
- <version>2.19.0-SNAPSHOT</version>
- </parent>
- <artifactId>camel-mina2-starter</artifactId>
- <packaging>jar</packaging>
- <name>Spring-Boot Starter :: Camel :: MINA-2</name>
- <description>Spring-Boot Starter for Camel MINA 2.x support</description>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- <version>${spring-boot-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-mina2</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--START OF GENERATED CODE-->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-boot-starter</artifactId>
- </dependency>
- <!--END OF GENERATED CODE-->
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/3b20e362/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java b/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
deleted file mode 100644
index d8a22a2..0000000
--- a/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
+++ /dev/null
@@ -1,110 +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.mina2.springboot;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.mina2.Mina2Component;
-import org.apache.camel.util.IntrospectionSupport;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@Conditional(Mina2ComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(Mina2ComponentConfiguration.class)
-public class Mina2ComponentAutoConfiguration {
-
- @Lazy
- @Bean(name = "mina2-component")
- @ConditionalOnClass(CamelContext.class)
- @ConditionalOnMissingBean(Mina2Component.class)
- public Mina2Component configureMina2Component(CamelContext camelContext,
- Mina2ComponentConfiguration configuration) throws Exception {
- Mina2Component component = new Mina2Component();
- component.setCamelContext(camelContext);
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration, parameters, null,
- false);
- for (Map.Entry<String, Object> entry : parameters.entrySet()) {
- Object value = entry.getValue();
- Class<?> paramClass = value.getClass();
- if (paramClass.getName().endsWith("NestedConfiguration")) {
- Class nestedClass = null;
- try {
- nestedClass = (Class) paramClass.getDeclaredField(
- "CAMEL_NESTED_CLASS").get(null);
- HashMap<String, Object> nestedParameters = new HashMap<>();
- IntrospectionSupport.getProperties(value, nestedParameters,
- null, false);
- Object nestedProperty = nestedClass.newInstance();
- IntrospectionSupport.setProperties(camelContext,
- camelContext.getTypeConverter(), nestedProperty,
- nestedParameters);
- entry.setValue(nestedProperty);
- } catch (NoSuchFieldException e) {
- }
- }
- }
- IntrospectionSupport.setProperties(camelContext,
- camelContext.getTypeConverter(), component, parameters);
- return component;
- }
-
- public static class Condition extends SpringBootCondition {
- @Override
- public ConditionOutcome getMatchOutcome(
- ConditionContext conditionContext,
- AnnotatedTypeMetadata annotatedTypeMetadata) {
- boolean groupEnabled = isEnabled(conditionContext,
- "camel.component.", true);
- ConditionMessage.Builder message = ConditionMessage
- .forCondition("camel.component.mina2");
- if (isEnabled(conditionContext, "camel.component.mina2.",
- groupEnabled)) {
- return ConditionOutcome.match(message.because("enabled"));
- }
- return ConditionOutcome.noMatch(message.because("not enabled"));
- }
-
- private boolean isEnabled(
- org.springframework.context.annotation.ConditionContext context,
- java.lang.String prefix, boolean defaultValue) {
- RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
- context.getEnvironment(), prefix);
- return resolver.getProperty("enabled", Boolean.class, defaultValue);
- }
- }
-}
\ No newline at end of file