Class LegacyVOMSResponse
- java.lang.Object
-
- org.italiangrid.voms.request.impl.LegacyVOMSResponse
-
- All Implemented Interfaces:
VOMSResponse
public class LegacyVOMSResponse extends java.lang.Object implements VOMSResponse
-
-
Field Summary
Fields Modifier and Type Field Description private static int
ERROR_OFFSET
protected org.w3c.dom.Document
xmlResponse
-
Constructor Summary
Constructors Constructor Description LegacyVOMSResponse(org.w3c.dom.Document res)
Builds a VOMSResponse starting from a DOM an XML document (seeDocument
).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VOMSErrorMessage[]
errorMessages()
Extracts the error messages from the VOMS response.byte[]
getAC()
Extracts the AC from the VOMS response.int
getVersion()
Extracts the version from the VOMS response.java.lang.String
getXMLAsString()
boolean
hasErrors()
boolean
hasWarnings()
VOMSWarningMessage[]
warningMessages()
Extracts the warning messags from the VOMS response.
-
-
-
Method Detail
-
getVersion
public int getVersion()
Description copied from interface:VOMSResponse
Extracts the version from the VOMS response.- Specified by:
getVersion
in interfaceVOMSResponse
- Returns:
- an integer containing the AC.
-
hasErrors
public boolean hasErrors()
- Specified by:
hasErrors
in interfaceVOMSResponse
- Returns:
true
if thisVOMSResponse
has errors,false
otherwise
-
hasWarnings
public boolean hasWarnings()
- Specified by:
hasWarnings
in interfaceVOMSResponse
- Returns:
true
if thisVOMSResponse
has warnings,false
otherwise
-
getAC
public byte[] getAC()
Description copied from interface:VOMSResponse
Extracts the AC from the VOMS response.- Specified by:
getAC
in interfaceVOMSResponse
- Returns:
- an array of bytes containing the AC.
-
errorMessages
public VOMSErrorMessage[] errorMessages()
Description copied from interface:VOMSResponse
Extracts the error messages from the VOMS response.- Specified by:
errorMessages
in interfaceVOMSResponse
- Returns:
- an array of
VOMSErrorMessage
objects.
-
warningMessages
public VOMSWarningMessage[] warningMessages()
Description copied from interface:VOMSResponse
Extracts the warning messags from the VOMS response.- Specified by:
warningMessages
in interfaceVOMSResponse
- Returns:
- an array of
VOMSWarningMessage
objects.
-
getXMLAsString
public java.lang.String getXMLAsString()
- Specified by:
getXMLAsString
in interfaceVOMSResponse
- Returns:
- Returns the XML representation of the response as a string.
-
-