| org.archive.crawler.settings.ModuleType org.archive.crawler.datamodel.credential.Credential
All known Subclasses: org.archive.crawler.datamodel.credential.HtmlFormCredential, org.archive.crawler.datamodel.credential.Rfc2617Credential,
Credential | abstract public class Credential extends ModuleType (Code) | | Credential type.
Let this be also a credential in the JAAS sense to in that this is what
gets added to a subject on successful authentication since it contains
data needed to authenticate (realm, login, password, etc.).
Settings system assumes that subclasses implement a constructor that
takes a name only.
author: stack version: $Revision: 2993 $, $Date: 2005-01-04 02:24:59 +0000 (Tue, 04 Jan 2005) $ |
Method Summary | |
public void | attach(CrawlURI curi) Attach this credentials avatar to the passed curi .
Override if credential knows internally what it wants to attach as
payload. | public void | attach(CrawlURI curi, String payload) Attach this credentials avatar to the passed curi .
Parameters: curi - CrawlURI to load with credentials. Parameters: payload - Payload to carry in avatar. | public boolean | detach(CrawlURI curi) Detach this credential from passed curi. | public boolean | detachAll(CrawlURI curi) Detach all credentials of this type from passed curi. | public String | getCredentialDomain(CrawlURI context) Parameters: context - Context to use when searching for credential domain. | abstract public String | getKey(CrawlURI context) Parameters: context - Context to use when searching for credential domain. | abstract public String | getPrerequisite(CrawlURI curi) Return the authentication URI, either absolute or relative, that serves
as prerequisite the passed curi .
Parameters: curi - CrawlURI to look at. | abstract public boolean | hasPrerequisite(CrawlURI curi) Parameters: curi - CrawlURI to look at. | abstract public boolean | isEveryTime() True if this credential is of the type that needs to be offeredon each visit to the server (e.g. | abstract public boolean | isPost(CrawlURI curi) Parameters: curi - CrawlURI to look at. | abstract public boolean | isPrerequisite(CrawlURI curi) Parameters: curi - CrawlURI to look at. | abstract public boolean | populate(CrawlURI curi, HttpClient http, HttpMethod method, String payload) Parameters: curi - CrawlURI to as for context. Parameters: http - Instance of httpclient. Parameters: method - Method to populate. Parameters: payload - Avatar payload to use populating the method. | public boolean | rootUriMatch(CrawlController controller, CrawlURI curi) Test passed curi matches this credentials rootUri.
Parameters: controller - Parameters: curi - CrawlURI to test. | public void | setCredentialDomain(CrawlerSettings context, String domain) |
Credential | public Credential(String name, String description)(Code) | | Constructor.
Parameters: name - Name of this credential. Parameters: description - Descrtiption of this particular credential. |
attach | public void attach(CrawlURI curi)(Code) | | Attach this credentials avatar to the passed curi .
Override if credential knows internally what it wants to attach as
payload. Otherwise, if payload is external, use the below
Credential.attach(CrawlURI,String) .
Parameters: curi - CrawlURI to load with credentials. |
attach | public void attach(CrawlURI curi, String payload)(Code) | | Attach this credentials avatar to the passed curi .
Parameters: curi - CrawlURI to load with credentials. Parameters: payload - Payload to carry in avatar. Usually credentials. |
detach | public boolean detach(CrawlURI curi)(Code) | | Detach this credential from passed curi.
Parameters: curi - True if we detached a Credential reference. |
detachAll | public boolean detachAll(CrawlURI curi)(Code) | | Detach all credentials of this type from passed curi.
Parameters: curi - True if we detached references. |
getPrerequisite | abstract public String getPrerequisite(CrawlURI curi)(Code) | | Return the authentication URI, either absolute or relative, that serves
as prerequisite the passed curi .
Parameters: curi - CrawlURI to look at. Prerequisite URI for the passed curi. |
hasPrerequisite | abstract public boolean hasPrerequisite(CrawlURI curi)(Code) | | Parameters: curi - CrawlURI to look at. True if this credential HAS a prerequisite for passed CrawlURI. |
isEveryTime | abstract public boolean isEveryTime()(Code) | | True if this credential is of the type that needs to be offeredon each visit to the server (e.g. Rfc2617 is such a type). |
isPost | abstract public boolean isPost(CrawlURI curi)(Code) | | Parameters: curi - CrawlURI to look at. True if this credential is to be posted. Return false if thecredential is to be GET'd or if POST'd or GET'd are not pretinent to thiscredential type. |
isPrerequisite | abstract public boolean isPrerequisite(CrawlURI curi)(Code) | | Parameters: curi - CrawlURI to look at. True if this credential IS a prerequisite for passedCrawlURI. |
populate | abstract public boolean populate(CrawlURI curi, HttpClient http, HttpMethod method, String payload)(Code) | | Parameters: curi - CrawlURI to as for context. Parameters: http - Instance of httpclient. Parameters: method - Method to populate. Parameters: payload - Avatar payload to use populating the method. True if added a credentials. |
rootUriMatch | public boolean rootUriMatch(CrawlController controller, CrawlURI curi)(Code) | | Test passed curi matches this credentials rootUri.
Parameters: controller - Parameters: curi - CrawlURI to test. True if domain for credential matches that of the passed curi. |
|
|