001: /*
002: * ========================================================================
003: *
004: * Copyright 2003-2005 The Apache Software Foundation.
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License");
007: * you may not use this file except in compliance with the License.
008: * 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: *
018: * ========================================================================
019: */
020: package org.apache.cactus.integration.ant.deployment.application;
021:
022: /**
023: * Represents the various top-level tags in a enterprise application deployment
024: * descriptor as a typesafe enumeration.
025: *
026: * @since Cactus 1.5
027: * @version $Id: ApplicationXmlTag.java 239141 2005-02-15 10:31:44Z vmassol $
028: */
029: public final class ApplicationXmlTag {
030:
031: // Public Constants --------------------------------------------------------
032:
033: /**
034: * Element name 'icon'.
035: */
036: public static final ApplicationXmlTag ICON = new ApplicationXmlTag(
037: "icon");
038:
039: /**
040: * Element name 'display-name'.
041: */
042: public static final ApplicationXmlTag DISPLAY_NAME = new ApplicationXmlTag(
043: "display-name");
044:
045: /**
046: * Element name 'description'.
047: */
048: public static final ApplicationXmlTag DESCRIPTION = new ApplicationXmlTag(
049: "description");
050:
051: /**
052: * Element name 'module'.
053: */
054: public static final ApplicationXmlTag MODULE = new ApplicationXmlTag(
055: "module");
056:
057: /**
058: * Element name 'web',
059: */
060: public static final ApplicationXmlTag WEB = new ApplicationXmlTag(
061: "web");
062:
063: /**
064: * Element name 'web-uri',
065: */
066: public static final ApplicationXmlTag WEB_URI = new ApplicationXmlTag(
067: "web-uri");
068:
069: /**
070: * Element name 'context-root',
071: */
072: public static final ApplicationXmlTag CONTEXT_ROOT = new ApplicationXmlTag(
073: "context-root");
074:
075: /**
076: * Element name 'security-role',
077: */
078: public static final ApplicationXmlTag SECURITY_ROLE = new ApplicationXmlTag(
079: "security-role");
080:
081: // Instance Variables ------------------------------------------------------
082:
083: /**
084: * The tag name,
085: */
086: private String tagName;
087:
088: // Constructors ------------------------------------------------------------
089:
090: /**
091: * Constructor.
092: *
093: * @param theTagName The tag name of the element
094: */
095: private ApplicationXmlTag(String theTagName) {
096: this .tagName = theTagName;
097: }
098:
099: // Public Methods ----------------------------------------------------------
100:
101: /**
102: * @see java.lang.Object#toString
103: */
104: public boolean equals(Object theOther) {
105: return super .equals(theOther);
106: }
107:
108: /**
109: * @see java.lang.Object#hashCode
110: */
111: public int hashCode() {
112: return super .hashCode();
113: }
114:
115: /**
116: * Returns the tag name.
117: *
118: * @return The tag name
119: */
120: public String getTagName() {
121: return this .tagName;
122: }
123:
124: /**
125: * @see java.lang.Object#toString
126: */
127: public String toString() {
128: return getTagName();
129: }
130:
131: }
|