001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.camel.model.transformer; 018 019import javax.xml.bind.annotation.XmlAccessType; 020import javax.xml.bind.annotation.XmlAccessorType; 021import javax.xml.bind.annotation.XmlAttribute; 022import javax.xml.bind.annotation.XmlType; 023 024import org.apache.camel.spi.Metadata; 025 026/** 027 * Represents an endpoint {@link org.apache.camel.spi.Transformer} which 028 * leverages camel {@link org.apache.camel.Endpoint} to perform transformation. 029 * A {@link org.apache.camel.impl.transformer.ProcessorTransformer} will be 030 * created internally with a {@link org.apache.camel.processor.SendProcessor} 031 * which forwards the message to the specified Endpoint. One of the Endpoint 032 * 'ref' or 'uri' needs to be specified. {@see TransformerDefinition} 033 * {@see ProcessorTransformer} 034 */ 035@Metadata(label = "transformation") 036@XmlType(name = "endpointTransformer") 037@XmlAccessorType(XmlAccessType.FIELD) 038public class EndpointTransformerDefinition extends TransformerDefinition { 039 040 @XmlAttribute 041 private String ref; 042 @XmlAttribute 043 private String uri; 044 045 public String getRef() { 046 return ref; 047 } 048 049 /** 050 * Set the reference of the Endpoint. 051 * 052 * @param ref reference of the Endpoint 053 */ 054 public void setRef(String ref) { 055 this.ref = ref; 056 } 057 058 public String getUri() { 059 return uri; 060 } 061 062 /** 063 * Set the URI of the Endpoint. 064 * 065 * @param uri URI of the Endpoint 066 */ 067 public void setUri(String uri) { 068 this.uri = uri; 069 } 070 071}