com.sun.xml.ws.policy.jaxws
Class SafePolicyReader
java.lang.Object
com.sun.xml.ws.policy.jaxws.SafePolicyReader
public class SafePolicyReader
- extends java.lang.Object
Provides methods to unmarshal policies from a XMLStreamReader safely
|
Method Summary |
java.util.Set<java.lang.String> |
getUrlsRead()
|
SafePolicyReader.PolicyRecord |
readPolicyElement(javax.xml.stream.XMLStreamReader reader,
java.lang.String baseUrl)
Reads a policy expression from the XML stream. |
java.lang.String |
readPolicyReferenceElement(javax.xml.stream.XMLStreamReader reader)
Reads policy reference element and returns referenced policy URI as String |
static java.lang.String |
relativeToAbsoluteUrl(java.lang.String relativeUri,
java.lang.String baseUri)
Utility method to construct an absolute URL from a relative URI and a base URL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SafePolicyReader
public SafePolicyReader()
readPolicyElement
public SafePolicyReader.PolicyRecord readPolicyElement(javax.xml.stream.XMLStreamReader reader,
java.lang.String baseUrl)
- Reads a policy expression from the XML stream.
The XMLStreamReader should be in START_ELEMENT state and point to the policy element.
The content of the stream is copied and then the copy is unmarshalled. The result
is returned as a PolicyRecord.
- Parameters:
reader - The XMLStreamReader should be in START_ELEMENT state and point to the policy element.baseUrl - The system id of the document read by the reader.
- Returns:
- The policy that was read from the XML stream.
getUrlsRead
public java.util.Set<java.lang.String> getUrlsRead()
readPolicyReferenceElement
public java.lang.String readPolicyReferenceElement(javax.xml.stream.XMLStreamReader reader)
- Reads policy reference element and returns referenced policy URI as String
- Parameters:
reader - The XMLStreamReader should be in START_ELEMENT state and point to the PolicyReference element.
- Returns:
- The URI contained in the PolicyReference
relativeToAbsoluteUrl
public static java.lang.String relativeToAbsoluteUrl(java.lang.String relativeUri,
java.lang.String baseUri)
- Utility method to construct an absolute URL from a relative URI and a base URL.
If the relativeUri already is an absolute URL, the method returns the relativeUri.
- Parameters:
relativeUri - The relative URIbaseUri - The base URL
- Returns:
- The relative URI appended to the base URL. If relativeUri already is
an absolute URL, the method returns the relativeUri.
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.