org.apache.manifoldcf.crawler.connectors.webcrawler
Class CredentialsDescription

java.lang.Object
  extended by org.apache.manifoldcf.crawler.connectors.webcrawler.CredentialsDescription

public class CredentialsDescription
extends java.lang.Object

This class describes credential information pulled from a configuration. The data contained is organized by regular expression performed on a url. What we store for each regular expression is a Pattern, for efficiency. This structure deals with credentials as applied to a matching set of urls. It handles sequence-based credentials as well as page-based credentials - that is, session-type authentication descriptions as well as well as basic/ntlm authentication. (The two are in fact not mutually exclusive!!) For page-based credentials, a method is provided that locates the proper credential to use based on the page's url. For sequence-based credentials, a different method is provided. This reflects the fact that the underlying functionality of sequence-based credentials differs enormously from that of page-based. Generally it is a good thing to limit the number of regexps that need to be evaluated against any given url value as much as possible. For that reason I've organized this structure accordingly.


Nested Class Summary
protected static class CredentialsDescription.BasicCredential
          Basic type credentials
protected static class CredentialsDescription.CredentialsItem
          Class representing an individual credential item.
protected static class CredentialsDescription.LoginParameterIterator
          LoginParameter iterator
protected static class CredentialsDescription.NTLMCredential
          NTLM-style credentials
protected static class CredentialsDescription.SessionCredential
          Session credentials
protected static class CredentialsDescription.SessionCredentialItem
          Session credential helper class
protected static class CredentialsDescription.SessionCredentialParameter
          Session credential parameter class
 
Field Summary
static java.lang.String _rcsid
           
protected  java.util.HashMap patternHash
          This is the hash that contains everything.
 
Constructor Summary
CredentialsDescription(org.apache.manifoldcf.core.interfaces.ConfigParams configData)
          Constructor.
 
Method Summary
 PageCredentials getPageCredential(java.lang.String url)
          Given a URL, find the right PageCredentials object to use.
 SequenceCredentials getSequenceCredential(java.lang.String url)
          Given a URL, find the right SequenceCredentials object to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values

patternHash

protected java.util.HashMap patternHash
This is the hash that contains everything. It's keyed by the regexp string itself. Values are CredentialsItem objects.

Constructor Detail

CredentialsDescription

public CredentialsDescription(org.apache.manifoldcf.core.interfaces.ConfigParams configData)
                       throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Constructor. Build the description from the ConfigParams.

Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
Method Detail

getPageCredential

public PageCredentials getPageCredential(java.lang.String url)
Given a URL, find the right PageCredentials object to use. If more than one match is found, use NEITHER object.


getSequenceCredential

public SequenceCredentials getSequenceCredential(java.lang.String url)
Given a URL, find the right SequenceCredentials object to use. If more than one match is found, use NEITHER object.