public class TermsAndConditionsRequest extends java.lang.Object implements IXMLEncodable
Modifier and Type | Class and Description |
---|---|
private static class |
TermsAndConditionsRequest.TCRequestKey
simple class to build a key with language and
the operator subject key identifier.
|
private static class |
TermsAndConditionsRequest.TCRequestValue
a corresponding value wrapper class for the resource items hashtable
|
Modifier and Type | Field and Description |
---|---|
private java.util.Hashtable |
requestedItems
stores the requested T&C resources. the key that maps to the entries
is built by the operator subject key identifier and the language.
|
private java.util.Vector |
requestedTemplates
to remember which templates are already requested.
|
private java.util.Hashtable |
resourceRootElements
stores the resource root elements for the operators.
|
static java.lang.String |
XML_ATTR_LOCALE |
static java.lang.String |
XML_ELEMENT_CONTAINER_NAME |
static java.lang.String |
XML_ELEMENT_NAME |
static java.lang.String |
XML_ELEMENT_REQ_TRANSLATION |
static java.lang.String |
XML_ELEMENT_RESOURCE_CUSTOMIZED_SECT |
static java.lang.String |
XML_ELEMENT_RESOURCE_TEMPLATE |
static java.lang.String |
XML_MSG_TC_CONFIRM |
static java.lang.String |
XML_MSG_TC_INTERRUPT |
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
Constructor and Description |
---|
TermsAndConditionsRequest() |
Modifier and Type | Method and Description |
---|---|
void |
addCustomizedSectionsRequest(ServiceOperator operator,
java.lang.String langCode)
adds a request for the individual T&C sections of the given operator in the
the specified language.
|
private void |
addResourceRequest(java.lang.String resourceType,
ServiceOperator operator,
java.lang.String langCode)
private util function for adding a generic resource request.
|
void |
addTemplateRequest(ServiceOperator operator,
java.lang.String langCode,
java.lang.String templateRefID)
adds a template request for the given operator and language
the templateRefid needs to be specified to avoid
multiple requests of the same template.
|
void |
checkRequestPostCondition()
To be called after the mix response was handled.
|
boolean |
hasResourceRequests() |
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.
|
public static final java.lang.String XML_ELEMENT_NAME
public static final java.lang.String XML_ELEMENT_CONTAINER_NAME
public static final java.lang.String XML_ATTR_LOCALE
public static final java.lang.String XML_ELEMENT_REQ_TRANSLATION
public static final java.lang.String XML_ELEMENT_RESOURCE_TEMPLATE
public static final java.lang.String XML_ELEMENT_RESOURCE_CUSTOMIZED_SECT
public static final java.lang.String XML_MSG_TC_INTERRUPT
public static final java.lang.String XML_MSG_TC_CONFIRM
private java.util.Vector requestedTemplates
private java.util.Hashtable requestedItems
private java.util.Hashtable resourceRootElements
public void addTemplateRequest(ServiceOperator operator, java.lang.String langCode, java.lang.String templateRefID)
public void addCustomizedSectionsRequest(ServiceOperator operator, java.lang.String langCode)
private void addResourceRequest(java.lang.String resourceType, ServiceOperator operator, java.lang.String langCode)
public boolean hasResourceRequests()
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a documentpublic void checkRequestPostCondition() throws IllegalTCRequestPostConditionException
IllegalRequestPostConditionException
- if not all resources were sent
or the container are in an inconsistent state (e.g because of invalid signatures)IllegalTCRequestPostConditionException
Copyright © 2023. All rights reserved.