Skip to content

Commit

Permalink
#167: extend the API of W3CEndpointReference with getters
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Feb 23, 2022
1 parent 59027e0 commit 470f1ec
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -102,6 +102,81 @@ public W3CEndpointReference(Source source) {
}
}

/**
* Returns the {@code address} of the {@code W3CEndpointReference} instance's
* {@code wsa:Address} element.
*
* @return The {@code address} of the {@code wsa:Address}.
*/
String getAddressUri() {
return address.uri;
}

/**
* Returns a list of extension attributes of the
* {@code W3CEndpointReference} instance's
* {@code wsa:Address} element.
*
* @return The extension attributes of the {@code wsa:Address} element.
*/
Map<QName,String> getAddressAttributes() {
if (address == null) {
return null;
}
return address.attributes;
}

/**
* Returns a list of the {@code referenceParameter}s of the
* {@code W3CEndpointReference} instance's
* {@code wsa:ReferenceParameters} element.
*
* @return The {@code referenceParameter}s of the
* {@code wsa:ReferenceParameters} element.
*/
List<Element> getReferenceParameters () {
if (referenceParameters == null) {
return null;
}
return referenceParameters.elements;
}

/**
* Returns the list of {@code metadataElement}s of the
* {@code W3CEndpointReference} instance's
* of the {@code wsa:Metadata} element.
*
* @return The {@code metadataElement}s of the {@code wsa:Metadata} element.
*/
List<Element> getMetadata () {
if (metadata == null) {
return null;
}
return metadata.elements;
}

/**
* Returns a list of extension attributes of the
* {@code W3CEndpointReference} instance's
* {@code wsa:EndpointReference} element.
*
* @return The extension attributes of the {@code W3CEndpointReference}.
*/
Map<QName,String> getAttributes() {
return attributes;
}

/**
* Returns a list of an extension elements of the
* {@code W3CEndpointReference} instance's
* {@code wsa:EndpointReference} element.
*
* @return Extension {@code element}s of the {@code W3CEndpointReference} instance.
*/
List<Element> getElements() {
return elements;
}

/**
* {@inheritDoc}
*/
Expand Down
1 change: 1 addition & 0 deletions spec/src/main/asciidoc/appB-change_log.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

* Merged Jakarta Web Services Metadata specification into Jakarta Web Services specification.
* Annotated `jakarta.xml.ws.AsyncHandler` with `@FunctionalInterface`.
* Extended the API of `jakarta.xml.ws.wsaddressing.W3CEndpointReference` with getters.

=== 3.0 Changes

Expand Down

0 comments on commit 470f1ec

Please sign in to comment.