home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / security / IdentityScope.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  2.1 KB  |  65 lines

  1. package java.security;
  2.  
  3. import java.util.Enumeration;
  4.  
  5. public abstract class IdentityScope extends Identity {
  6.    private static IdentityScope scope;
  7.  
  8.    private static void initializeSystemScope() {
  9.       String var0 = Security.getProperty("system.scope");
  10.       if (var0 != null) {
  11.          try {
  12.             Class.forName(var0);
  13.          } catch (ClassNotFoundException var2) {
  14.             Security.error("unable to establish a system scope from " + var0);
  15.             ((Throwable)var2).printStackTrace();
  16.          }
  17.       }
  18.    }
  19.  
  20.    protected IdentityScope() {
  21.       this("restoring...");
  22.    }
  23.  
  24.    public IdentityScope(String var1) {
  25.       super(var1);
  26.    }
  27.  
  28.    public IdentityScope(String var1, IdentityScope var2) throws KeyManagementException {
  29.       super(var1, var2);
  30.    }
  31.  
  32.    public static IdentityScope getSystemScope() {
  33.       if (scope == null) {
  34.          initializeSystemScope();
  35.       }
  36.  
  37.       return scope;
  38.    }
  39.  
  40.    protected static void setSystemScope(IdentityScope var0) {
  41.       Identity.staticCheck("set.system.scope");
  42.       scope = var0;
  43.    }
  44.  
  45.    public abstract int size();
  46.  
  47.    public abstract Identity getIdentity(String var1);
  48.  
  49.    public Identity getIdentity(Principal var1) {
  50.       return this.getIdentity(var1.getName());
  51.    }
  52.  
  53.    public abstract Identity getIdentity(PublicKey var1);
  54.  
  55.    public abstract void addIdentity(Identity var1) throws KeyManagementException;
  56.  
  57.    public abstract void removeIdentity(Identity var1) throws KeyManagementException;
  58.  
  59.    public abstract Enumeration identities();
  60.  
  61.    public String toString() {
  62.       return super.toString() + "[" + this.size() + "]";
  63.    }
  64. }
  65.