public final class ParserUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASE64BINARY
Base-64 identifier.
|
static org.dom4j.Namespace |
DSML_NAMESPACE
The DSML namespace
|
static GrammarAction |
READ_SOAP_HEADER
GrammarAction that reads the SOAP header data
|
static String |
XML_SCHEMA_INSTANCE_URI
W3C XML Schema Instance URI.
|
static String |
XML_SCHEMA_URI
W3C XML Schema URI.
|
static String |
XSD
XSD namespace prefix.
|
static org.dom4j.Namespace |
XSD_NAMESPACE
The XSD namespace
|
static String |
XSI
XSI namespace prefix.
|
static org.dom4j.Namespace |
XSI_NAMESPACE
The XSI namespace
|
Modifier and Type | Method and Description |
---|---|
static void |
addControls(LdapApiService codec,
org.dom4j.Element element,
Collection<Control> controls,
boolean isRequest)
Adds Controls to the given Element.
|
static String |
base64Encode(Object value)
Encodes the value as a Base64 String
|
static String |
getXsiTypeAttributeValue(org.xmlpull.v1.XmlPullParser xpp)
Returns the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
|
static boolean |
isBase64BinaryValue(org.xmlpull.v1.XmlPullParser parser,
String attrValue)
Tells is the given value is a Base64 binary value
|
static boolean |
isRequestIdNeeded(Dsmlv2Container container)
Indicates if a request ID is needed.
|
static boolean |
needsBase64Encoding(Object value)
Indicates if the value needs to be encoded as Base64
|
static int |
parseAndVerifyRequestID(String attributeValue,
org.xmlpull.v1.XmlPullParser xpp)
Parses and verify the parsed value of the requestID
|
static org.dom4j.Document |
styleDocument(org.dom4j.Document document)
XML Pretty Printer XSLT Transformation
|
public static final String XML_SCHEMA_URI
public static final String XML_SCHEMA_INSTANCE_URI
public static final String BASE64BINARY
public static final String XSI
public static final String XSD
public static final org.dom4j.Namespace DSML_NAMESPACE
public static final org.dom4j.Namespace XSD_NAMESPACE
public static final org.dom4j.Namespace XSI_NAMESPACE
public static final GrammarAction READ_SOAP_HEADER
public static String getXsiTypeAttributeValue(org.xmlpull.v1.XmlPullParser xpp)
xpp
- the XPP parser to usepublic static boolean isBase64BinaryValue(org.xmlpull.v1.XmlPullParser parser, String attrValue)
parser
- the XPP parser to useattrValue
- the attribute valuepublic static boolean needsBase64Encoding(Object value)
value
- the value to checkpublic static String base64Encode(Object value)
value
- the value to encodepublic static int parseAndVerifyRequestID(String attributeValue, org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException
attributeValue
- the value of the attributexpp
- the XmlPullParserorg.xmlpull.v1.XmlPullParserException
- if RequestID isn't an Integer and if requestID is below 0public static void addControls(LdapApiService codec, org.dom4j.Element element, Collection<Control> controls, boolean isRequest)
codec
- The LDAP Service to useelement
- the element to add the Controls tocontrols
- a List of ControlsisRequest
- A flag set to true if teh LDapMessage is a requestpublic static boolean isRequestIdNeeded(Dsmlv2Container container) throws org.xmlpull.v1.XmlPullParserException
container
- the associated containerorg.xmlpull.v1.XmlPullParserException
- if the batch request has not been parsed yetpublic static org.dom4j.Document styleDocument(org.dom4j.Document document)
document
- the Dom4j DocumentCopyright © 2003–2021 The Apache Software Foundation. All rights reserved.