FileDocCategorySizeDatePackage
XYZIdentity.javaAPI DocExample2437Sun Oct 25 18:13:36 GMT 1998None

XYZIdentity

public class XYZIdentity extends Identity implements XYZTrust

Fields Summary
private int
trustLevel
Constructors Summary
protected XYZIdentity()

	
public XYZIdentity(String name, IdentityScope scope)

		super(name, scope);
		scope.addIdentity(this);
		trustLevel = 0;
	
Methods Summary
public voidaddCertificate(java.security.Certificate cert)

		Identity i = getScope().getIdentity(cert.getPublicKey());
		if (i != null && !equals(i))
			throw new KeyManagementException("Duplicate public key");
		super.addCertificate(cert);
	
public intgetTrust()

		return trustLevel;
	
public voidsetPublicKey(java.security.PublicKey key)

		IdentityScope is = getScope();
		Identity i = is.getIdentity(key);
		if (i != null && !equals(i))
			throw new KeyManagementException("Duplicate public key");
		super.setPublicKey(key);
	
voidsetTrust(int x)

		if (x < 0 || x > 10)
			throw new IllegalArgumentException("Invalid trust level");
		trustLevel = x;
	
public java.lang.StringtoString()

		return super.toString() + " trust level: " + trustLevel;