Wed, 27 Apr 2016 01:27:09 +0800
Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/
changeset: 657:d47a47f961ee
tag: jdk8u25-b17
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | * |
aoqi@0 | 5 | * This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | * published by the Free Software Foundation. Oracle designates this |
aoqi@0 | 8 | * particular file as subject to the "Classpath" exception as provided |
aoqi@0 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
aoqi@0 | 10 | * |
aoqi@0 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 15 | * accompanied this code). |
aoqi@0 | 16 | * |
aoqi@0 | 17 | * You should have received a copy of the GNU General Public License version |
aoqi@0 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 20 | * |
aoqi@0 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 22 | * or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 23 | * questions. |
aoqi@0 | 24 | */ |
aoqi@0 | 25 | |
aoqi@0 | 26 | package com.sun.xml.internal.ws.api.config.management.policy; |
aoqi@0 | 27 | |
aoqi@0 | 28 | import com.sun.istack.internal.logging.Logger; |
aoqi@0 | 29 | import com.sun.xml.internal.ws.api.server.WSEndpoint; |
aoqi@0 | 30 | import com.sun.xml.internal.ws.policy.PolicyAssertion; |
aoqi@0 | 31 | import com.sun.xml.internal.ws.policy.PolicyMap; |
aoqi@0 | 32 | import com.sun.xml.internal.ws.policy.PolicyConstants; |
aoqi@0 | 33 | import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData; |
aoqi@0 | 34 | import com.sun.xml.internal.ws.policy.spi.AssertionCreationException; |
aoqi@0 | 35 | import com.sun.xml.internal.ws.resources.ManagementMessages; |
aoqi@0 | 36 | |
aoqi@0 | 37 | import java.util.Collection; |
aoqi@0 | 38 | import java.util.HashMap; |
aoqi@0 | 39 | import java.util.Iterator; |
aoqi@0 | 40 | import java.util.LinkedList; |
aoqi@0 | 41 | import java.util.Map; |
aoqi@0 | 42 | import javax.xml.namespace.QName; |
aoqi@0 | 43 | import javax.xml.ws.WebServiceException; |
aoqi@0 | 44 | |
aoqi@0 | 45 | /** |
aoqi@0 | 46 | * The server-side ManagedService policy assertion. |
aoqi@0 | 47 | * |
aoqi@0 | 48 | * @author Fabian Ritzmann |
aoqi@0 | 49 | */ |
aoqi@0 | 50 | public class ManagedServiceAssertion extends ManagementAssertion { |
aoqi@0 | 51 | |
aoqi@0 | 52 | public static final QName MANAGED_SERVICE_QNAME = |
aoqi@0 | 53 | new QName(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ManagedService"); |
aoqi@0 | 54 | |
aoqi@0 | 55 | private static final QName COMMUNICATION_SERVER_IMPLEMENTATIONS_PARAMETER_QNAME = new QName( |
aoqi@0 | 56 | PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "CommunicationServerImplementations"); |
aoqi@0 | 57 | private static final QName COMMUNICATION_SERVER_IMPLEMENTATION_PARAMETER_QNAME = new QName( |
aoqi@0 | 58 | PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "CommunicationServerImplementation"); |
aoqi@0 | 59 | private static final QName CONFIGURATOR_IMPLEMENTATION_PARAMETER_QNAME = new QName( |
aoqi@0 | 60 | PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ConfiguratorImplementation"); |
aoqi@0 | 61 | private static final QName CONFIG_SAVER_IMPLEMENTATION_PARAMETER_QNAME = new QName( |
aoqi@0 | 62 | PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ConfigSaverImplementation"); |
aoqi@0 | 63 | private static final QName CONFIG_READER_IMPLEMENTATION_PARAMETER_QNAME = new QName( |
aoqi@0 | 64 | PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ConfigReaderImplementation"); |
aoqi@0 | 65 | private static final QName CLASS_NAME_ATTRIBUTE_QNAME = new QName("className"); |
aoqi@0 | 66 | /** |
aoqi@0 | 67 | * The name of the endpointDisposeDelay attribute. |
aoqi@0 | 68 | */ |
aoqi@0 | 69 | private static final QName ENDPOINT_DISPOSE_DELAY_ATTRIBUTE_QNAME = new QName("endpointDisposeDelay"); |
aoqi@0 | 70 | |
aoqi@0 | 71 | private static final Logger LOGGER = Logger.getLogger(ManagedServiceAssertion.class); |
aoqi@0 | 72 | |
aoqi@0 | 73 | /** |
aoqi@0 | 74 | * Return ManagedService assertion if there is one associated with the endpoint. |
aoqi@0 | 75 | * |
aoqi@0 | 76 | * @param endpoint The endpoint. Must not be null. |
aoqi@0 | 77 | * @return The policy assertion if found. Null otherwise. |
aoqi@0 | 78 | * @throws WebServiceException If computing the effective policy of the endpoint failed. |
aoqi@0 | 79 | */ |
aoqi@0 | 80 | public static ManagedServiceAssertion getAssertion(WSEndpoint endpoint) throws WebServiceException { |
aoqi@0 | 81 | LOGGER.entering(endpoint); |
aoqi@0 | 82 | // getPolicyMap is deprecated because it is only supposed to be used by Metro code |
aoqi@0 | 83 | // and not by other clients. |
aoqi@0 | 84 | @SuppressWarnings("deprecation") |
aoqi@0 | 85 | final PolicyMap policyMap = endpoint.getPolicyMap(); |
aoqi@0 | 86 | final ManagedServiceAssertion assertion = ManagementAssertion.getAssertion(MANAGED_SERVICE_QNAME, |
aoqi@0 | 87 | policyMap, endpoint.getServiceName(), endpoint.getPortName(), ManagedServiceAssertion.class); |
aoqi@0 | 88 | LOGGER.exiting(assertion); |
aoqi@0 | 89 | return assertion; |
aoqi@0 | 90 | } |
aoqi@0 | 91 | |
aoqi@0 | 92 | public ManagedServiceAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters) |
aoqi@0 | 93 | throws AssertionCreationException { |
aoqi@0 | 94 | super(MANAGED_SERVICE_QNAME, data, assertionParameters); |
aoqi@0 | 95 | } |
aoqi@0 | 96 | |
aoqi@0 | 97 | /** |
aoqi@0 | 98 | * Returns the value of the management attribute. True if unset or set to "true" |
aoqi@0 | 99 | * or "on". False otherwise. |
aoqi@0 | 100 | * |
aoqi@0 | 101 | * @return The value of the management attribute. |
aoqi@0 | 102 | */ |
aoqi@0 | 103 | public boolean isManagementEnabled() { |
aoqi@0 | 104 | final String management = this.getAttributeValue(MANAGEMENT_ATTRIBUTE_QNAME); |
aoqi@0 | 105 | boolean result = true; |
aoqi@0 | 106 | if (management != null) { |
aoqi@0 | 107 | if (management.trim().toLowerCase().equals("on")) { |
aoqi@0 | 108 | result = true; |
aoqi@0 | 109 | } |
aoqi@0 | 110 | else { |
aoqi@0 | 111 | result = Boolean.parseBoolean(management); |
aoqi@0 | 112 | } |
aoqi@0 | 113 | } |
aoqi@0 | 114 | return result; |
aoqi@0 | 115 | } |
aoqi@0 | 116 | |
aoqi@0 | 117 | /** |
aoqi@0 | 118 | * Returns the value of the endpointDisposeDelay attribute or the default value |
aoqi@0 | 119 | * otherwise. |
aoqi@0 | 120 | * |
aoqi@0 | 121 | * @param defaultDelay The default value that is returned if this attribute is |
aoqi@0 | 122 | * not set |
aoqi@0 | 123 | * @return The value of the endpointDisposeDelay attribute or the default value |
aoqi@0 | 124 | * otherwise. |
aoqi@0 | 125 | */ |
aoqi@0 | 126 | public long getEndpointDisposeDelay(final long defaultDelay) throws WebServiceException { |
aoqi@0 | 127 | long result = defaultDelay; |
aoqi@0 | 128 | final String delayText = getAttributeValue(ENDPOINT_DISPOSE_DELAY_ATTRIBUTE_QNAME); |
aoqi@0 | 129 | if (delayText != null) { |
aoqi@0 | 130 | try { |
aoqi@0 | 131 | result = Long.parseLong(delayText); |
aoqi@0 | 132 | } catch (NumberFormatException e) { |
aoqi@0 | 133 | throw LOGGER.logSevereException(new WebServiceException( |
aoqi@0 | 134 | ManagementMessages.WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(delayText), e)); |
aoqi@0 | 135 | } |
aoqi@0 | 136 | } |
aoqi@0 | 137 | return result; |
aoqi@0 | 138 | } |
aoqi@0 | 139 | |
aoqi@0 | 140 | /** |
aoqi@0 | 141 | * A list of CommunicationServerImplementation elements that were set as |
aoqi@0 | 142 | * parameters of this assertion. |
aoqi@0 | 143 | * |
aoqi@0 | 144 | * @return A list of CommunicationServerImplementation elements that were set as |
aoqi@0 | 145 | * parameters of this assertion. May be empty. |
aoqi@0 | 146 | */ |
aoqi@0 | 147 | public Collection<ImplementationRecord> getCommunicationServerImplementations() { |
aoqi@0 | 148 | final Collection<ImplementationRecord> result = new LinkedList<ImplementationRecord>(); |
aoqi@0 | 149 | final Iterator<PolicyAssertion> parameters = getParametersIterator(); |
aoqi@0 | 150 | while (parameters.hasNext()) { |
aoqi@0 | 151 | final PolicyAssertion parameter = parameters.next(); |
aoqi@0 | 152 | if (COMMUNICATION_SERVER_IMPLEMENTATIONS_PARAMETER_QNAME.equals(parameter.getName())) { |
aoqi@0 | 153 | final Iterator<PolicyAssertion> implementations = parameter.getParametersIterator(); |
aoqi@0 | 154 | if (!implementations.hasNext()) { |
aoqi@0 | 155 | throw LOGGER.logSevereException(new WebServiceException( |
aoqi@0 | 156 | ManagementMessages.WSM_1005_EXPECTED_COMMUNICATION_CHILD())); |
aoqi@0 | 157 | } |
aoqi@0 | 158 | while (implementations.hasNext()) { |
aoqi@0 | 159 | final PolicyAssertion implementation = implementations.next(); |
aoqi@0 | 160 | if (COMMUNICATION_SERVER_IMPLEMENTATION_PARAMETER_QNAME.equals(implementation.getName())) { |
aoqi@0 | 161 | result.add(getImplementation(implementation)); |
aoqi@0 | 162 | } |
aoqi@0 | 163 | else { |
aoqi@0 | 164 | throw LOGGER.logSevereException(new WebServiceException( |
aoqi@0 | 165 | ManagementMessages.WSM_1004_EXPECTED_XML_TAG( |
aoqi@0 | 166 | COMMUNICATION_SERVER_IMPLEMENTATION_PARAMETER_QNAME, implementation.getName()))); |
aoqi@0 | 167 | } |
aoqi@0 | 168 | } |
aoqi@0 | 169 | } |
aoqi@0 | 170 | } |
aoqi@0 | 171 | return result; |
aoqi@0 | 172 | } |
aoqi@0 | 173 | |
aoqi@0 | 174 | /** |
aoqi@0 | 175 | * The ConfiguratorImplementation that was set as parameter of this assertion. |
aoqi@0 | 176 | * |
aoqi@0 | 177 | * @return The ConfiguratorImplementation that was set as parameter of this assertion. |
aoqi@0 | 178 | * May be null. |
aoqi@0 | 179 | */ |
aoqi@0 | 180 | public ImplementationRecord getConfiguratorImplementation() { |
aoqi@0 | 181 | return findImplementation(CONFIGURATOR_IMPLEMENTATION_PARAMETER_QNAME); |
aoqi@0 | 182 | } |
aoqi@0 | 183 | |
aoqi@0 | 184 | /** |
aoqi@0 | 185 | * The ConfigSaverImplementation that was set as parameter of this assertion. |
aoqi@0 | 186 | * |
aoqi@0 | 187 | * @return The ConfigSaverImplementation that was set as parameter of this assertion. |
aoqi@0 | 188 | * May be null. |
aoqi@0 | 189 | */ |
aoqi@0 | 190 | public ImplementationRecord getConfigSaverImplementation() { |
aoqi@0 | 191 | return findImplementation(CONFIG_SAVER_IMPLEMENTATION_PARAMETER_QNAME); |
aoqi@0 | 192 | } |
aoqi@0 | 193 | |
aoqi@0 | 194 | /** |
aoqi@0 | 195 | * The ConfigReaderImplementation that was set as parameter of this assertion. |
aoqi@0 | 196 | * |
aoqi@0 | 197 | * @return The ConfigReaderImplementation that was set as parameter of this assertion. |
aoqi@0 | 198 | * May be null. |
aoqi@0 | 199 | */ |
aoqi@0 | 200 | public ImplementationRecord getConfigReaderImplementation() { |
aoqi@0 | 201 | return findImplementation(CONFIG_READER_IMPLEMENTATION_PARAMETER_QNAME); |
aoqi@0 | 202 | } |
aoqi@0 | 203 | |
aoqi@0 | 204 | private ImplementationRecord findImplementation(QName implementationName) { |
aoqi@0 | 205 | final Iterator<PolicyAssertion> parameters = getParametersIterator(); |
aoqi@0 | 206 | while (parameters.hasNext()) { |
aoqi@0 | 207 | final PolicyAssertion parameter = parameters.next(); |
aoqi@0 | 208 | if (implementationName.equals(parameter.getName())) { |
aoqi@0 | 209 | return getImplementation(parameter); |
aoqi@0 | 210 | } |
aoqi@0 | 211 | } |
aoqi@0 | 212 | return null; |
aoqi@0 | 213 | } |
aoqi@0 | 214 | |
aoqi@0 | 215 | private ImplementationRecord getImplementation(PolicyAssertion rootParameter) { |
aoqi@0 | 216 | final String className = rootParameter.getAttributeValue(CLASS_NAME_ATTRIBUTE_QNAME); |
aoqi@0 | 217 | final HashMap<QName, String> parameterMap = new HashMap<QName, String>(); |
aoqi@0 | 218 | final Iterator<PolicyAssertion> implementationParameters = rootParameter.getParametersIterator(); |
aoqi@0 | 219 | final Collection<NestedParameters> nestedParameters = new LinkedList<NestedParameters>(); |
aoqi@0 | 220 | while (implementationParameters.hasNext()) { |
aoqi@0 | 221 | final PolicyAssertion parameterAssertion = implementationParameters.next(); |
aoqi@0 | 222 | final QName parameterName = parameterAssertion.getName(); |
aoqi@0 | 223 | if (parameterAssertion.hasParameters()) { |
aoqi@0 | 224 | final Map<QName, String> nestedParameterMap = new HashMap<QName, String>(); |
aoqi@0 | 225 | final Iterator<PolicyAssertion> parameters = parameterAssertion.getParametersIterator(); |
aoqi@0 | 226 | while (parameters.hasNext()) { |
aoqi@0 | 227 | final PolicyAssertion parameter = parameters.next(); |
aoqi@0 | 228 | String value = parameter.getValue(); |
aoqi@0 | 229 | if (value != null) { |
aoqi@0 | 230 | value = value.trim(); |
aoqi@0 | 231 | } |
aoqi@0 | 232 | nestedParameterMap.put(parameter.getName(), value); |
aoqi@0 | 233 | } |
aoqi@0 | 234 | nestedParameters.add(new NestedParameters(parameterName, nestedParameterMap)); |
aoqi@0 | 235 | } |
aoqi@0 | 236 | else { |
aoqi@0 | 237 | String value = parameterAssertion.getValue(); |
aoqi@0 | 238 | if (value != null) { |
aoqi@0 | 239 | value = value.trim(); |
aoqi@0 | 240 | } |
aoqi@0 | 241 | parameterMap.put(parameterName, value); |
aoqi@0 | 242 | } |
aoqi@0 | 243 | } |
aoqi@0 | 244 | return new ImplementationRecord(className, parameterMap, nestedParameters); |
aoqi@0 | 245 | } |
aoqi@0 | 246 | |
aoqi@0 | 247 | |
aoqi@0 | 248 | /** |
aoqi@0 | 249 | * Return the implementation class name along with all parameters for the |
aoqi@0 | 250 | * implementation. |
aoqi@0 | 251 | */ |
aoqi@0 | 252 | public static class ImplementationRecord { |
aoqi@0 | 253 | |
aoqi@0 | 254 | private final String implementation; |
aoqi@0 | 255 | private final Map<QName, String> parameters; |
aoqi@0 | 256 | private final Collection<NestedParameters> nestedParameters; |
aoqi@0 | 257 | |
aoqi@0 | 258 | protected ImplementationRecord(String implementation, Map<QName, String> parameters, |
aoqi@0 | 259 | Collection<NestedParameters> nestedParameters) { |
aoqi@0 | 260 | this.implementation = implementation; |
aoqi@0 | 261 | this.parameters = parameters; |
aoqi@0 | 262 | this.nestedParameters = nestedParameters; |
aoqi@0 | 263 | } |
aoqi@0 | 264 | |
aoqi@0 | 265 | public String getImplementation() { |
aoqi@0 | 266 | return this.implementation; |
aoqi@0 | 267 | } |
aoqi@0 | 268 | |
aoqi@0 | 269 | /** |
aoqi@0 | 270 | * The parameters that were set for this implementation element. |
aoqi@0 | 271 | * |
aoqi@0 | 272 | * @return The parameters that were set for this implementation element. |
aoqi@0 | 273 | * May be null. |
aoqi@0 | 274 | */ |
aoqi@0 | 275 | public Map<QName, String> getParameters() { |
aoqi@0 | 276 | return this.parameters; |
aoqi@0 | 277 | } |
aoqi@0 | 278 | |
aoqi@0 | 279 | /** |
aoqi@0 | 280 | * Implementation elements may contain element parameters that contain |
aoqi@0 | 281 | * further parameters. |
aoqi@0 | 282 | * |
aoqi@0 | 283 | * @return The nested parameters that were set for this implementation element. |
aoqi@0 | 284 | * May be null. |
aoqi@0 | 285 | */ |
aoqi@0 | 286 | public Collection<NestedParameters> getNestedParameters() { |
aoqi@0 | 287 | return this.nestedParameters; |
aoqi@0 | 288 | } |
aoqi@0 | 289 | |
aoqi@0 | 290 | @Override |
aoqi@0 | 291 | public boolean equals(Object obj) { |
aoqi@0 | 292 | if (obj == null) { |
aoqi@0 | 293 | return false; |
aoqi@0 | 294 | } |
aoqi@0 | 295 | if (getClass() != obj.getClass()) { |
aoqi@0 | 296 | return false; |
aoqi@0 | 297 | } |
aoqi@0 | 298 | final ImplementationRecord other = (ImplementationRecord) obj; |
aoqi@0 | 299 | if ((this.implementation == null) ? |
aoqi@0 | 300 | (other.implementation != null) : !this.implementation.equals(other.implementation)) { |
aoqi@0 | 301 | return false; |
aoqi@0 | 302 | } |
aoqi@0 | 303 | if (this.parameters != other.parameters && (this.parameters == null || !this.parameters.equals(other.parameters))) { |
aoqi@0 | 304 | return false; |
aoqi@0 | 305 | } |
aoqi@0 | 306 | if (this.nestedParameters != other.nestedParameters && |
aoqi@0 | 307 | (this.nestedParameters == null || !this.nestedParameters.equals(other.nestedParameters))) { |
aoqi@0 | 308 | return false; |
aoqi@0 | 309 | } |
aoqi@0 | 310 | return true; |
aoqi@0 | 311 | } |
aoqi@0 | 312 | |
aoqi@0 | 313 | @Override |
aoqi@0 | 314 | public int hashCode() { |
aoqi@0 | 315 | int hash = 3; |
aoqi@0 | 316 | hash = 53 * hash + (this.implementation != null ? this.implementation.hashCode() : 0); |
aoqi@0 | 317 | hash = 53 * hash + (this.parameters != null ? this.parameters.hashCode() : 0); |
aoqi@0 | 318 | hash = 53 * hash + (this.nestedParameters != null ? this.nestedParameters.hashCode() : 0); |
aoqi@0 | 319 | return hash; |
aoqi@0 | 320 | } |
aoqi@0 | 321 | |
aoqi@0 | 322 | @Override |
aoqi@0 | 323 | public String toString() { |
aoqi@0 | 324 | final StringBuilder text = new StringBuilder("ImplementationRecord: "); |
aoqi@0 | 325 | text.append("implementation = \"").append(this.implementation).append("\", "); |
aoqi@0 | 326 | text.append("parameters = \"").append(this.parameters).append("\", "); |
aoqi@0 | 327 | text.append("nested parameters = \"").append(this.nestedParameters).append("\""); |
aoqi@0 | 328 | return text.toString(); |
aoqi@0 | 329 | } |
aoqi@0 | 330 | |
aoqi@0 | 331 | } |
aoqi@0 | 332 | |
aoqi@0 | 333 | |
aoqi@0 | 334 | /** |
aoqi@0 | 335 | * The nested parameters that may be set as part of an implementation element. |
aoqi@0 | 336 | */ |
aoqi@0 | 337 | public static class NestedParameters { |
aoqi@0 | 338 | |
aoqi@0 | 339 | private final QName name; |
aoqi@0 | 340 | private final Map<QName, String> parameters; |
aoqi@0 | 341 | |
aoqi@0 | 342 | private NestedParameters(QName name, Map<QName, String> parameters) { |
aoqi@0 | 343 | this.name = name; |
aoqi@0 | 344 | this.parameters = parameters; |
aoqi@0 | 345 | } |
aoqi@0 | 346 | |
aoqi@0 | 347 | public QName getName() { |
aoqi@0 | 348 | return this.name; |
aoqi@0 | 349 | } |
aoqi@0 | 350 | |
aoqi@0 | 351 | public Map<QName, String> getParameters() { |
aoqi@0 | 352 | return this.parameters; |
aoqi@0 | 353 | } |
aoqi@0 | 354 | |
aoqi@0 | 355 | @Override |
aoqi@0 | 356 | public boolean equals(Object obj) { |
aoqi@0 | 357 | if (obj == null) { |
aoqi@0 | 358 | return false; |
aoqi@0 | 359 | } |
aoqi@0 | 360 | if (getClass() != obj.getClass()) { |
aoqi@0 | 361 | return false; |
aoqi@0 | 362 | } |
aoqi@0 | 363 | final NestedParameters other = (NestedParameters) obj; |
aoqi@0 | 364 | if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) { |
aoqi@0 | 365 | return false; |
aoqi@0 | 366 | } |
aoqi@0 | 367 | if (this.parameters != other.parameters && (this.parameters == null || !this.parameters.equals(other.parameters))) { |
aoqi@0 | 368 | return false; |
aoqi@0 | 369 | } |
aoqi@0 | 370 | return true; |
aoqi@0 | 371 | } |
aoqi@0 | 372 | |
aoqi@0 | 373 | @Override |
aoqi@0 | 374 | public int hashCode() { |
aoqi@0 | 375 | int hash = 5; |
aoqi@0 | 376 | hash = 59 * hash + (this.name != null ? this.name.hashCode() : 0); |
aoqi@0 | 377 | hash = 59 * hash + (this.parameters != null ? this.parameters.hashCode() : 0); |
aoqi@0 | 378 | return hash; |
aoqi@0 | 379 | } |
aoqi@0 | 380 | |
aoqi@0 | 381 | @Override |
aoqi@0 | 382 | public String toString() { |
aoqi@0 | 383 | final StringBuilder text = new StringBuilder("NestedParameters: "); |
aoqi@0 | 384 | text.append("name = \"").append(this.name).append("\", "); |
aoqi@0 | 385 | text.append("parameters = \"").append(this.parameters).append("\""); |
aoqi@0 | 386 | return text.toString(); |
aoqi@0 | 387 | } |
aoqi@0 | 388 | |
aoqi@0 | 389 | } |
aoqi@0 | 390 | |
aoqi@0 | 391 | } |