org.openid4java.discovery.yadis
Class YadisResult

java.lang.Object
  extended by org.openid4java.discovery.yadis.YadisResult

public class YadisResult
extends java.lang.Object

The results of Yadis discovery performed on a YadisURL.

The payload is represented by the XRDS document. Along with it other meta-information is contained, which can be useful while consuming the results of Yadis discoveries.

Author:
Marius Scurtescu, Johnny Bufu

Field Summary
private  java.lang.String _contentType
          The content-type of the XRDS response.
private  java.lang.Throwable _failureCause
          The throwable or exception that caused the failure, if available.
private static org.apache.commons.logging.Log _log
           
private  java.lang.String _normalizedUrl
          The result of following redirects from the request_uri
private  boolean _success
          Flag indicating whether the discovery was successfull.
private  org.openxri.xml.XRDS _xrds
          The XRDS document obtained by performing Yadis discovery on the YadisURL.
private  java.net.URL _xrdsLocation
          The URL from where the XRDS document was retrieved.
private  YadisUrl _yadisUrl
          The YadisURL on which discovery was performed.
private static boolean DEBUG
           
 
Constructor Summary
YadisResult()
           
 
Method Summary
 java.lang.String dump()
           
 java.lang.String getContentType()
          Gets the content-type of the response from which the XRDS was extracted.
 java.lang.Throwable getFailureCause()
          Gets the throwable (or exception) that caused the failure of the Yadis discovery, if one was thrown and intercepted
 java.lang.String getNormalizedUrl()
          Gets the result of following redirects on the YadisURL
 org.openxri.xml.XRDS getXrds()
          Gets the Yadis Resource Descriptor (XRDS) document.
 java.net.URL getXrdsLocation()
          Gets the Yadis Resource Descriptor (XRDS) location
 YadisUrl getYadisUrl()
          Gets the YadisUrl on which discovery is to be performed.
 boolean isSuccess()
          Returns true if Yadis discovery succeeded.
 void setContentType(java.lang.String type)
          Sets the content-type of the response from which the XRDS was extracted.
 void setFailureCause(java.lang.Throwable e)
          Sets the throwable or exception that caused the failure of the Yadis discovery, if one was thrown and intercepted
 void setNormalizedUrl(java.lang.String _normalizedUrl)
          Sets the result of following redirects on the YadisURL
 void setSuccess(boolean status)
          Sets the Yadis discovery success flag.
 void setXrds(org.openxri.xml.XRDS xrds)
          Sets the Yadis Resource Descriptor (XRDS)
 void setXrdsLocation(java.lang.String xrdsLocation, int onFailError)
          Sets the Yadis Resource Descriptor (XRDS) location found during discovery.
 void setYadisUrl(YadisUrl url)
          Sets the YadisURL on which discovery will be performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

private static org.apache.commons.logging.Log _log

DEBUG

private static final boolean DEBUG

_xrds

private org.openxri.xml.XRDS _xrds
The XRDS document obtained by performing Yadis discovery on the YadisURL.


_contentType

private java.lang.String _contentType
The content-type of the XRDS response.


_yadisUrl

private YadisUrl _yadisUrl
The YadisURL on which discovery was performed.


_normalizedUrl

private java.lang.String _normalizedUrl
The result of following redirects from the request_uri


_xrdsLocation

private java.net.URL _xrdsLocation
The URL from where the XRDS document was retrieved.


_success

private boolean _success
Flag indicating whether the discovery was successfull.


_failureCause

private java.lang.Throwable _failureCause
The throwable or exception that caused the failure, if available.

Constructor Detail

YadisResult

public YadisResult()
Method Detail

setYadisUrl

public void setYadisUrl(YadisUrl url)
Sets the YadisURL on which discovery will be performed.


getYadisUrl

public YadisUrl getYadisUrl()
Gets the YadisUrl on which discovery is to be performed.


setXrdsLocation

public void setXrdsLocation(java.lang.String xrdsLocation,
                            int onFailError)
                     throws YadisException
Sets the Yadis Resource Descriptor (XRDS) location found during discovery.

The XRDS location can be the same as the YadisUrl, or different if redirects are followed during discovery, or if delegation is used.

Parameters:
xrdsLocation - The Resource Descriptor URL from where the XRDS is downloaded
onFailError - The error code which will be set in the result if the XRDS location is not valid
Throws:
YadisException

getXrdsLocation

public java.net.URL getXrdsLocation()
Gets the Yadis Resource Descriptor (XRDS) location


setXrds

public void setXrds(org.openxri.xml.XRDS xrds)
Sets the Yadis Resource Descriptor (XRDS)

Parameters:
xrds - The XRDS document associated with the YadisURL obtained through Yadis discovery

getXrds

public org.openxri.xml.XRDS getXrds()
Gets the Yadis Resource Descriptor (XRDS) document.

Returns:
The XRDS document associated with the YadisURL obtained through Yadis discovery

getNormalizedUrl

public java.lang.String getNormalizedUrl()
Gets the result of following redirects on the YadisURL


setNormalizedUrl

public void setNormalizedUrl(java.lang.String _normalizedUrl)
Sets the result of following redirects on the YadisURL


setContentType

public void setContentType(java.lang.String type)
Sets the content-type of the response from which the XRDS was extracted.

Parameters:
type - The content-type of the HTTP response that contained the XRDS document

getContentType

public java.lang.String getContentType()
Gets the content-type of the response from which the XRDS was extracted.

Returns:
The content-type of the HTTP response that contained the XRDS document

isSuccess

public boolean isSuccess()
Returns true if Yadis discovery succeeded.


setSuccess

public void setSuccess(boolean status)
Sets the Yadis discovery success flag.

Parameters:
status - True if Yadis succeeded, false otherwise.

setFailureCause

public void setFailureCause(java.lang.Throwable e)
Sets the throwable or exception that caused the failure of the Yadis discovery, if one was thrown and intercepted


getFailureCause

public java.lang.Throwable getFailureCause()
Gets the throwable (or exception) that caused the failure of the Yadis discovery, if one was thrown and intercepted


dump

public java.lang.String dump()


Copyright 2006-2007 Sxip Identity Corporation