|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.sharp.Claim
public class Claim
| Field Summary | |
|---|---|
protected ID |
claimID
The globally unique idenitifier of this claim |
protected ID |
holder
The globally unique identifier of the holder of the claim |
protected java.security.PublicKey |
holderKey
The public key of the holder of this claim |
protected ID |
issuer
The globally unique identifier of the issuer of the claim |
protected ID |
parentID
The globally unique idenitifer of the parent claim |
protected ResourceClaim |
rset
The resources represented by this claim |
protected boolean |
signed
Whether this is a signed claim |
protected Term |
term
Duration of the term. |
protected java.lang.String |
xml
The XML representation of this claim |
| Constructor Summary | |
|---|---|
protected |
Claim()
Creates an empty claim. |
|
Claim(ID parentID,
ID issuer,
ID holder,
ResourceClaim rset,
Term term,
java.security.PublicKey holderKey)
Creates a new unsigned claim |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
|
Claim |
extract(int count,
Term term,
ID newHolderID,
java.security.PublicKey holderKey)
Creates a non-signed subclaim |
void |
fromXML(org.w3c.dom.Element node)
Extracts the claim from a DOM tree |
ID |
getClaimID()
Returns the identifier of the claim |
ID |
getHolder()
Gets the identifier of the holder of the claim |
java.security.PublicKey |
getHolderKey()
Returns the public key of the holder of the claim |
ID |
getIssuer()
Returns the identifier of the issuer of the claim |
ID |
getParentID()
Returns the identifier of the parent claim |
ResourceClaim |
getResources()
Returns the ResourceClaim associated with this claim |
Term |
getTerm()
Returns the term of the claim |
java.lang.String |
getXML()
Returns the xml representation of the signed claim. |
boolean |
isSigned()
Checks if the claim is signed |
boolean |
isSubClaim(Claim claim)
Checks if the given Claim is a subclaim of this
Claim. |
void |
setClaimID(ID claimID)
Sets the identifier of the claim |
void |
setHolder(ID holder)
Sets the identifier of the holder of the claim |
void |
setHolderKey(java.security.PublicKey holderKey)
Sets the public key of the holder of the claim |
void |
setIssuer(ID issuer)
Sets the identifier of the issuer of the claim |
void |
setParentID(ID parentID)
Sets the identifier of the parent claim |
void |
setResources(ResourceClaim rset)
Sets the ResourceClaim associated with this claim |
void |
setXML(java.lang.String xml)
Sets the xml representation of the claim |
org.w3c.dom.Element |
toXML()
Converts this claim to XML |
void |
validateClaim()
Examines the claim fields for consistency Note: Does not verify the signature. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ID claimID
protected ID parentID
protected ID issuer
protected ID holder
protected ResourceClaim rset
protected Term term
protected java.security.PublicKey holderKey
protected java.lang.String xml
protected boolean signed
| Constructor Detail |
|---|
protected Claim()
public Claim(ID parentID,
ID issuer,
ID holder,
ResourceClaim rset,
Term term,
java.security.PublicKey holderKey)
parentID - issuer - holder - rset - term - holderKey - | Method Detail |
|---|
public boolean isSubClaim(Claim claim)
throws java.lang.IllegalArgumentException
Claim is a subclaim of this
Claim.
claim - the Claim to check
Claim contains the given
Claim; false otherwise
java.lang.IllegalArgumentException - if the given Claim is nullpublic java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
public Claim extract(int count,
Term term,
ID newHolderID,
java.security.PublicKey holderKey)
count - resource unitsterm - duration of the claim
public org.w3c.dom.Element toXML()
throws java.lang.Exception
java.lang.Exception
public void fromXML(org.w3c.dom.Element node)
throws java.lang.Exception
node -
java.lang.Exception
public void validateClaim()
throws java.lang.Exception
java.lang.Exceptionpublic ID getClaimID()
public void setClaimID(ID claimID)
public ID getParentID()
public void setParentID(ID parentID)
public ID getIssuer()
public void setIssuer(ID issuer)
public ID getHolder()
public void setHolder(ID holder)
public ResourceClaim getResources()
ResourceClaim associated with this claim
public void setResources(ResourceClaim rset)
ResourceClaim associated with this claim
public java.security.PublicKey getHolderKey()
public void setHolderKey(java.security.PublicKey holderKey)
public Term getTerm()
public boolean isSigned()
public java.lang.String getXML()
public void setXML(java.lang.String xml)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||