001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.metadata;
023:
024: import java.io.Serializable;
025: import java.util.Locale;
026:
027: /**
028: * Description group meta data
029: *
030: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
031: * @version $Revision: 57189 $
032: */
033: public class DescriptionGroupMetaData implements Serializable {
034: static final long serialVersionUID = 1324619949051028127L;
035:
036: /** The language */
037: private String lang;
038:
039: /** The description */
040: private String description;
041:
042: /** The display name */
043: private String displayName;
044:
045: /** The small icon */
046: private String smallIcon;
047:
048: /** The large icon */
049: private String largeIcon;
050:
051: /**
052: * Create a new description group meta data using the default langugage
053: */
054: public DescriptionGroupMetaData() {
055: this (null);
056: }
057:
058: /**
059: * Create a new description group meta data
060: *
061: * @param lang the language
062: */
063: public DescriptionGroupMetaData(String lang) {
064: if (lang == null)
065: this .lang = Locale.getDefault().getLanguage();
066: else
067: this .lang = lang;
068: }
069:
070: /**
071: * Get the language
072: *
073: * @return the language
074: */
075: public String getLanguage() {
076: return lang;
077: }
078:
079: /**
080: * Get the description
081: *
082: * @return the description
083: */
084: public String getDescription() {
085: return description;
086: }
087:
088: /**
089: * Set the description
090: *
091: * @param description the description
092: */
093: public void setDescription(String description) {
094: this .description = description;
095: }
096:
097: /**
098: * Get the display name
099: *
100: * @return the display name
101: */
102: public String getDisplayName() {
103: return displayName;
104: }
105:
106: /**
107: * Set the display name
108: *
109: * @param displayName the display name
110: */
111: public void setDisplayName(String displayName) {
112: this .displayName = displayName;
113: }
114:
115: /**
116: * Get the small icon
117: *
118: * @return the small icon
119: */
120: public String getSmallIcon() {
121: return smallIcon;
122: }
123:
124: /**
125: * Set the small icon
126: *
127: * @param icon the icon
128: */
129: public void setSmallIcon(String icon) {
130: this .smallIcon = icon;
131: }
132:
133: /**
134: * Get the large icon
135: *
136: * @return the large icon
137: */
138: public String getLargeIcon() {
139: return largeIcon;
140: }
141:
142: /**
143: * Set the large icon
144: *
145: * @param icon the icon
146: */
147: public void setLargeIcon(String icon) {
148: this .largeIcon = icon;
149: }
150:
151: public String toString() {
152: StringBuffer buffer = new StringBuffer();
153: buffer.append("DescriptionGroupMetaData").append('@');
154: buffer.append(Integer
155: .toHexString(System.identityHashCode(this )));
156: buffer.append("[language=").append(lang);
157: if (description != null)
158: buffer.append(" description=").append(description);
159: if (displayName != null)
160: buffer.append(" displayName=").append(displayName);
161: if (smallIcon != null)
162: buffer.append(" smallIcon=").append(smallIcon);
163: if (largeIcon != null)
164: buffer.append(" largeIcon=").append(largeIcon);
165: buffer.append(']');
166: return buffer.toString();
167: }
168: }
|