org.italiangrid.voms.request.impl
Class RESTVOMSResponse

java.lang.Object
  extended by org.italiangrid.voms.request.impl.RESTVOMSResponse
All Implemented Interfaces:
VOMSResponse

public class RESTVOMSResponse
extends Object
implements VOMSResponse

This class is used to parse and represent VOMS server responses coming from a RESTful VOMS service.

Author:
Andrea Ceccanti, Vincenzo Ciaschini, Valerio Venturi

Field Summary
protected  Document xmlResponse
           
 
Constructor Summary
RESTVOMSResponse(Document res)
           
 
Method Summary
 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.
 String getXMLAsString()
           
 boolean hasErrors()
           
 boolean hasWarnings()
           
 VOMSWarningMessage[] warningMessages()
          Extracts the warning messags from the VOMS response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlResponse

protected Document xmlResponse
Constructor Detail

RESTVOMSResponse

public RESTVOMSResponse(Document res)
Method Detail

getVersion

public int getVersion()
Description copied from interface: VOMSResponse
Extracts the version from the VOMS response.

Specified by:
getVersion in interface VOMSResponse
Returns:
an integer containing the AC.

hasErrors

public boolean hasErrors()
Specified by:
hasErrors in interface VOMSResponse
Returns:
true if this VOMSResponse has errors, false otherwise

hasWarnings

public boolean hasWarnings()
Specified by:
hasWarnings in interface VOMSResponse
Returns:
true if this VOMSResponse has warnings, false otherwise

getAC

public byte[] getAC()
Description copied from interface: VOMSResponse
Extracts the AC from the VOMS response.

Specified by:
getAC in interface VOMSResponse
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 interface VOMSResponse
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 interface VOMSResponse
Returns:
an array of VOMSWarningMessage objects.

getXMLAsString

public String getXMLAsString()
Specified by:
getXMLAsString in interface VOMSResponse
Returns:
Returns the XML representation of the response as a string.


Copyright © 2013. All Rights Reserved.