001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019: package org.netbeans.modules.xslt.project.anttasks.jbi;
020:
021: import javax.xml.namespace.QName;
022:
023: public class ServiceEntry {
024: //Member variable representing partner link name
025: private String mPartnerLinkName = null;
026: //Member variable representing port name
027: private String mPortName = null;
028: //Member variable representing partnerlink Namespace
029: private String mPartnerLinkNS = null;
030: //Member variable representing portname namespace
031: private String mPortNameNS = null;
032: //Member variable representing role name
033: private String mRoleName = null;
034: //Member variable representing Partnerlink Namespace Prefix
035: private String mPartnerLinkNSPrefix = null;
036: //Member variable representing Portname Namespace Prefix
037: private String mPortNameNSPrefix = null;
038:
039: private QName mPartnerLinkNameQname = null;
040: private QName mPortNameQname = null;
041:
042: /**
043: * Constructor
044: * @param partnerLinkName Partner link name
045: * @param portName Port name
046: * @param partnerLinkNS Namespace URI of the Partner Link
047: * @param portNameNS Namespace URI of the portname
048: * @param rolename role name
049: */
050: public ServiceEntry(String partnerLinkName, String portName,
051: String partnerLinkNS, String portNameNS, String roleName,
052: String partnerLinkNSPrefix, String portNameNSPrefix,
053: QName partnerLinkNameQname, QName portNameQname) {
054: mPartnerLinkName = partnerLinkName;
055: mPortName = portName;
056: mPartnerLinkNS = partnerLinkNS;
057: mPortNameNS = portNameNS;
058: mRoleName = roleName;
059: mPartnerLinkNSPrefix = partnerLinkNSPrefix;
060: mPortNameNSPrefix = portNameNSPrefix;
061:
062: mPartnerLinkNameQname = partnerLinkNameQname;
063: mPortNameQname = portNameQname;
064: }
065:
066: public QName getPartnerLinkNameQname() {
067: return mPartnerLinkNameQname;
068: }
069:
070: /**
071: * Get Name of the Partner Link
072: * @return Name of the Partner Link
073: */
074: public String getPartnerLinkName() {
075: return mPartnerLinkName;
076: }
077:
078: public QName getPortNameQname() {
079: return mPortNameQname;
080: }
081:
082: /**
083: * Get Name of the Port
084: * @return Name of the Port
085: */
086: public String getPortName() {
087: return mPortName;
088: }
089:
090: /**
091: * Get Namespace URI of the Partner Link
092: * @return Namespace URI of the Partner Link
093: */
094: public String getPartnerLinkNamespace() {
095: return mPartnerLinkNS;
096: }
097:
098: /**
099: * Return Namespace URI of portName
100: * @return Namespace URI of the portname
101: */
102: public String getPortNameNamespace() {
103: return mPortNameNS;
104: }
105:
106: /**
107: * Return Role name
108: * @return Role name
109: */
110: public String getRoleName() {
111: return mRoleName;
112: }
113:
114: /**
115: * Get Namespace Prefix of the Partner Link
116: * @return Namespace URI of the Partner Link
117: */
118: public String getPartnerLinkNamespacePrefix() {
119: return mPartnerLinkNSPrefix;
120: }
121:
122: /**
123: * Return Namespace Prefix of portName
124: * @return Namespace URI of the portname
125: */
126: public String getPortNameNamespacePrefix() {
127: return mPortNameNSPrefix;
128: }
129:
130: public boolean equals(Object obj) {
131: if (!(obj instanceof ServiceEntry)) {
132: return false;
133: }
134: ServiceEntry serviceEntry = (ServiceEntry) obj;
135: if (this .mPartnerLinkName.equals(serviceEntry
136: .getPartnerLinkName())
137: && this .mPortName.equals(serviceEntry.getPortName())
138: && this .mPortNameNSPrefix.equals(serviceEntry
139: .getPortNameNamespacePrefix())
140: && this .mRoleName.equals(serviceEntry.getRoleName())) {
141: return true;
142: }
143: return false;
144: }
145:
146: public int hashCode() {
147: return (this.mPartnerLinkName + this.mPortName + this.mRoleName)
148: .hashCode();
149: }
150:
151: }
|