com.day.cq.rewriter.linkchecker
Class LinkInfo

java.lang.Object
  extended by com.day.cq.rewriter.linkchecker.LinkInfo

public class LinkInfo
extends Object

Stores information about the validity of an external link.


Field Summary
static int X_STATUS_CONNECT_ERROR
           
static int X_STATUS_IO_ERROR
           
static int X_STATUS_NO_ROUTE_TO_HOST
           
static int X_STATUS_NOT_CHECKED
           
static int X_STATUS_UNKOWN_HOST
           
static int X_STATUS_UNSUPPORTED
           
static int X_STATUS_URI_SYNTAX_ERROR
           
 
Constructor Summary
LinkInfo(LinkInfo base)
          Initializes a new instance based on the given one.
LinkInfo(String url)
          Initializes a new instance.
 
Method Summary
 boolean equals(Object o)
           
 Calendar getLastAccessed()
          Returns the date a check for validity of the URL has last been requested.
 Calendar getLastAvailable()
          Returns the date the resource described by the URL has last been available.
 Calendar getLastChecked()
          Returns the date the URL has last been checked by the asynchronous LinkCheckerTask.
 int getLastStatus()
          Returns the last status
 String getLastStatusAsString()
           
 String getUrl()
          Returns the URL about which validity information is stored.
 int hashCode()
           
 boolean isSame(LinkInfo linkInfo)
           
 boolean isValid()
          Returns whether the resource described by the URL is currently available.
 void setLastAccessed(Calendar lastAccessed)
          Sets the date a check for validity of the URL has last been requested.
 void setLastAvailable(Calendar lastAvailable)
          Sets the date the resource described by the URL has last been available.
 void setLastChecked(Calendar lastChecked)
          Sets the date the URL has last been checked by the asynchronous LinkCheckerTask.
 void setLastStatus(int lastStatus)
          Sets the last status
 void setValid(boolean valid)
          Sets whether the resource described by the URL is currently available.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X_STATUS_NOT_CHECKED

public static final int X_STATUS_NOT_CHECKED
See Also:
Constant Field Values

X_STATUS_UNSUPPORTED

public static final int X_STATUS_UNSUPPORTED
See Also:
Constant Field Values

X_STATUS_URI_SYNTAX_ERROR

public static final int X_STATUS_URI_SYNTAX_ERROR
See Also:
Constant Field Values

X_STATUS_CONNECT_ERROR

public static final int X_STATUS_CONNECT_ERROR
See Also:
Constant Field Values

X_STATUS_NO_ROUTE_TO_HOST

public static final int X_STATUS_NO_ROUTE_TO_HOST
See Also:
Constant Field Values

X_STATUS_UNKOWN_HOST

public static final int X_STATUS_UNKOWN_HOST
See Also:
Constant Field Values

X_STATUS_IO_ERROR

public static final int X_STATUS_IO_ERROR
See Also:
Constant Field Values
Constructor Detail

LinkInfo

public LinkInfo(String url)
Initializes a new instance.

Parameters:
url - The URL to store validity information about

LinkInfo

public LinkInfo(LinkInfo base)
Initializes a new instance based on the given one.

Parameters:
base - info to copy from
Method Detail

getLastAccessed

public Calendar getLastAccessed()
Returns the date a check for validity of the URL has last been requested.

Returns:
The date the check for validity of the URL has last been requested

setLastAccessed

public void setLastAccessed(Calendar lastAccessed)
Sets the date a check for validity of the URL has last been requested.

Parameters:
lastAccessed - The date the check for validity of the URL has last been requested

getLastChecked

public Calendar getLastChecked()
Returns the date the URL has last been checked by the asynchronous LinkCheckerTask.

Returns:
The date the URL has last been checked

setLastChecked

public void setLastChecked(Calendar lastChecked)
Sets the date the URL has last been checked by the asynchronous LinkCheckerTask.

Parameters:
lastChecked - The date the URL has last been checked

getLastAvailable

public Calendar getLastAvailable()
Returns the date the resource described by the URL has last been available.

Returns:
The date the resource described by the URL has last been available.

setLastAvailable

public void setLastAvailable(Calendar lastAvailable)
Sets the date the resource described by the URL has last been available.

Parameters:
lastAvailable - The date the resource described by the URL has last been available.

getUrl

public String getUrl()
Returns the URL about which validity information is stored.

Returns:
The URL about which validity information is stored

isValid

public boolean isValid()
Returns whether the resource described by the URL is currently available.

Returns:
true, if the resource described by the URL is currently available

setValid

public void setValid(boolean valid)
Sets whether the resource described by the URL is currently available.

Parameters:
valid - Whether the resource described by the URL is currently available

getLastStatus

public int getLastStatus()
Returns the last status

Returns:
the last status

getLastStatusAsString

public String getLastStatusAsString()

setLastStatus

public void setLastStatus(int lastStatus)
Sets the last status

Parameters:
lastStatus - the last status

equals

public boolean equals(Object o)
Overrides:
equals in class Object

isSame

public boolean isSame(LinkInfo linkInfo)

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009 Day Management AG. All Rights Reserved.