001: /**
002: *
003: * Licensed to the Apache Software Foundation (ASF) under one or more
004: * contributor license agreements. See the NOTICE file distributed with
005: * this work for additional information regarding copyright ownership.
006: * The ASF licenses this file to You under the Apache License, Version 2.0
007: * (the "License"); you may not use this file except in compliance with
008: * the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */package org.apache.openejb.jee;
018:
019: import javax.xml.bind.annotation.XmlAccessType;
020: import javax.xml.bind.annotation.XmlAccessorType;
021: import javax.xml.bind.annotation.XmlAttribute;
022: import javax.xml.bind.annotation.XmlElement;
023: import javax.xml.bind.annotation.XmlID;
024: import javax.xml.bind.annotation.XmlType;
025: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
026: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
027: import java.util.ArrayList;
028: import java.util.List;
029:
030: /**
031: * The message-destinationType specifies a message
032: * destination. The logical destination described by this
033: * element is mapped to a physical destination by the Deployer.
034: * <p/>
035: * The message destination element contains:
036: * <p/>
037: * - an optional description
038: * - an optional display-name
039: * - an optional icon
040: * - a message destination name which must be unique
041: * among message destination names within the same
042: * Deployment File.
043: * - an optional mapped name
044: * <p/>
045: * Example:
046: * <p/>
047: * <message-destination>
048: * <message-destination-name>CorporateStocks
049: * </message-destination-name>
050: * </message-destination>
051: */
052: @XmlAccessorType(XmlAccessType.FIELD)
053: @XmlType(name="message-destinationType",propOrder={"description","displayName","icon","messageDestinationName","mappedName"})
054: public class MessageDestination implements Keyable<String> {
055:
056: @XmlElement(required=true)
057: protected List<Text> description;
058: @XmlElement(name="display-name",required=true)
059: protected List<Text> displayName;
060: @XmlElement(required=true)
061: protected List<Icon> icon;
062: @XmlElement(name="message-destination-name",required=true)
063: protected String messageDestinationName;
064: @XmlElement(name="mapped-name")
065: protected String mappedName;
066: @XmlAttribute
067: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
068: @XmlID
069: protected String id;
070:
071: public List<Text> getDescription() {
072: if (description == null) {
073: description = new ArrayList<Text>();
074: }
075: return this .description;
076: }
077:
078: public List<Text> getDisplayName() {
079: if (displayName == null) {
080: displayName = new ArrayList<Text>();
081: }
082: return this .displayName;
083: }
084:
085: public List<Icon> getIcon() {
086: if (icon == null) {
087: icon = new ArrayList<Icon>();
088: }
089: return this .icon;
090: }
091:
092: public String getMessageDestinationName() {
093: return messageDestinationName;
094: }
095:
096: public void setMessageDestinationName(String value) {
097: this .messageDestinationName = value;
098: }
099:
100: public String getKey() {
101: return getMessageDestinationName();
102: }
103:
104: public String getMappedName() {
105: return mappedName;
106: }
107:
108: public void setMappedName(String value) {
109: this .mappedName = value;
110: }
111:
112: public String getId() {
113: return id;
114: }
115:
116: public void setId(String value) {
117: this.id = value;
118: }
119:
120: }
|