|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.Attribute org.archive.crawler.settings.Type org.archive.crawler.settings.ComplexType org.archive.crawler.settings.ModuleType org.archive.crawler.datamodel.credential.Credential
public abstract class Credential
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.archive.crawler.settings.ComplexType |
---|
ComplexType.MBeanAttributeInfoIterator |
Field Summary |
---|
Fields inherited from class org.archive.crawler.settings.ComplexType |
---|
definition, definitionMap |
Constructor Summary | |
---|---|
Credential(java.lang.String name,
java.lang.String description)
Constructor. |
Method Summary | |
---|---|
void |
attach(CrawlURI curi)
Attach this credentials avatar to the passed curi . |
void |
attach(CrawlURI curi,
java.lang.String payload)
Attach this credentials avatar to the passed curi . |
boolean |
detach(CrawlURI curi)
Detach this credential from passed curi. |
boolean |
detachAll(CrawlURI curi)
Detach all credentials of this type from passed curi. |
java.lang.String |
getCredentialDomain(CrawlURI context)
|
abstract java.lang.String |
getKey(CrawlURI context)
|
abstract java.lang.String |
getPrerequisite(CrawlURI curi)
Return the authentication URI, either absolute or relative, that serves as prerequisite the passed curi . |
abstract boolean |
hasPrerequisite(CrawlURI curi)
|
abstract boolean |
isEveryTime()
|
abstract boolean |
isPost(CrawlURI curi)
|
abstract boolean |
isPrerequisite(CrawlURI curi)
|
abstract boolean |
populate(CrawlURI curi,
org.apache.commons.httpclient.HttpClient http,
org.apache.commons.httpclient.HttpMethod method,
java.lang.String payload)
|
boolean |
rootUriMatch(CrawlController controller,
CrawlURI curi)
Test passed curi matches this credentials rootUri. |
void |
setCredentialDomain(CrawlerSettings context,
java.lang.String domain)
|
Methods inherited from class org.archive.crawler.settings.ModuleType |
---|
addElement, listUsedFiles |
Methods inherited from class org.archive.crawler.settings.Type |
---|
addConstraint, equals, getConstraints, getLegalValueType, isExpertSetting, isOverrideable, isTransient, setExpertSetting, setLegalValueType, setOverrideable, setTransient |
Methods inherited from class javax.management.Attribute |
---|
getName, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Credential(java.lang.String name, java.lang.String description)
name
- Name of this credential.description
- Descrtiption of this particular credential.Method Detail |
---|
public java.lang.String getCredentialDomain(CrawlURI context) throws javax.management.AttributeNotFoundException
context
- Context to use when searching for credential domain.
javax.management.AttributeNotFoundException
- If attribute not found.public void setCredentialDomain(CrawlerSettings context, java.lang.String domain) throws javax.management.InvalidAttributeValueException, javax.management.AttributeNotFoundException
context
- Context to use when searching for credential domain.domain
- New domain.
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
public void attach(CrawlURI curi)
curi
.
Override if credential knows internally what it wants to attach as
payload. Otherwise, if payload is external, use the below
attach(CrawlURI, String)
.
curi
- CrawlURI to load with credentials.public void attach(CrawlURI curi, java.lang.String payload)
curi
.
curi
- CrawlURI to load with credentials.payload
- Payload to carry in avatar. Usually credentials.public boolean detach(CrawlURI curi)
curi
-
public boolean detachAll(CrawlURI curi)
curi
-
public abstract boolean isPrerequisite(CrawlURI curi)
curi
- CrawlURI to look at.
public abstract boolean hasPrerequisite(CrawlURI curi)
curi
- CrawlURI to look at.
public abstract java.lang.String getPrerequisite(CrawlURI curi)
curi
.
curi
- CrawlURI to look at.
public abstract java.lang.String getKey(CrawlURI context) throws javax.management.AttributeNotFoundException
context
- Context to use when searching for credential domain.
javax.management.AttributeNotFoundException
public abstract boolean isEveryTime()
public abstract boolean populate(CrawlURI curi, org.apache.commons.httpclient.HttpClient http, org.apache.commons.httpclient.HttpMethod method, java.lang.String payload)
curi
- CrawlURI to as for context.http
- Instance of httpclient.method
- Method to populate.payload
- Avatar payload to use populating the method.
public abstract boolean isPost(CrawlURI curi)
curi
- CrawlURI to look at.
public boolean rootUriMatch(CrawlController controller, CrawlURI curi)
controller
- curi
- CrawlURI to test.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |