public class JaxbAssertionMarshaller<T> extends java.lang.Object implements AssertionMarshaller
Constructor and Description |
---|
JaxbAssertionMarshaller() |
Modifier and Type | Method and Description |
---|---|
protected JavaAssertion<T> |
getAssertion(javax.xml.namespace.QName assertionQName) |
javax.xml.namespace.QName[] |
getSupportedAssertions()
Returns an array of QNames, each representing the name of an assertion
that this AssertionMarshaller can marshal and unmarshal.
|
void |
init()
This method needs to be invoked prior to using this assertion marshaller.
|
void |
marshal(Assertion assertion,
org.w3c.dom.Element element)
Marshals the given assertion to the given element.
|
void |
setAssertionQName(javax.xml.namespace.QName assertionQName)
The name of the policy assertion this jaxb marshaller supports.
|
void |
setAssertionQNames(java.util.List<javax.xml.namespace.QName> assertionQNames)
Changes the list of policy assertions this marshaller supports.
|
void |
setJaxbPaths(java.util.List<java.lang.String> jaxbPaths)
List of java packages containing jaxb model objects
|
JavaAssertion<T> |
unmarshal(org.w3c.dom.Element element)
Unmarshals the given element to a new assertion instance created by this
class.
|
JavaAssertion<T> |
unmarshal(org.w3c.dom.Element element,
Policy subPolicy)
JaxbAssertionMarshaller can be used only for assertions which do not have sub policies.
|
public void init()
public void setAssertionQName(javax.xml.namespace.QName assertionQName)
public void setAssertionQNames(java.util.List<javax.xml.namespace.QName> assertionQNames)
public void setJaxbPaths(java.util.List<java.lang.String> jaxbPaths)
public javax.xml.namespace.QName[] getSupportedAssertions()
AssertionMarshaller
getSupportedAssertions
in interface AssertionMarshaller
public void marshal(Assertion assertion, org.w3c.dom.Element element) throws GException
AssertionMarshaller
Note that assertion sub-policy will be handled by the policy framework only if the assertion is of type SubPolicyAssertion.
marshal
in interface AssertionMarshaller
assertion
- -
the assertion to be marshaled.element
- -
the already created element representing the assertion. The
element should be filled by this class with domain specific
data.GException
public JavaAssertion<T> unmarshal(org.w3c.dom.Element element, Policy subPolicy) throws GException
unmarshal
in interface AssertionMarshaller
element
- representing the assertion to be unmarshaled.subPolicy
- the sub-policy found as a child of the given element.GException
public JavaAssertion<T> unmarshal(org.w3c.dom.Element element) throws GException
AssertionMarshaller
This method implies that the given element contains no sub-policy, and implementors should not search for sub-policy. If an implementor cannot unmarshal their assertion without sub-policy, they should not implement this method. Instead, throw GException(PolicyErrorCode.SUB_POLICY_REQUIRED)
unmarshal
in interface AssertionMarshaller
element
- representing the assertion to be unmarshaled.GException
protected JavaAssertion<T> getAssertion(javax.xml.namespace.QName assertionQName)
?? 2022 Perforce Software, All rights reserved
This software is the confidential and proprietary information of Perforce, Inc. and is subject to copyright protection under laws of the United States of America and other countries. The use of this software should be in accordance with the license agreement terms you entered into with Perforce, Inc.