home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / security / IdentityScope.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  2.1 KB  |  74 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 = (String)AccessController.doPrivileged(new 1());
  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.             var2.printStackTrace();
  16.          }
  17.  
  18.       }
  19.    }
  20.  
  21.    protected IdentityScope() {
  22.       this("restoring...");
  23.    }
  24.  
  25.    public IdentityScope(String var1) {
  26.       super(var1);
  27.    }
  28.  
  29.    public IdentityScope(String var1, IdentityScope var2) throws KeyManagementException {
  30.       super(var1, var2);
  31.    }
  32.  
  33.    public static IdentityScope getSystemScope() {
  34.       if (scope == null) {
  35.          initializeSystemScope();
  36.       }
  37.  
  38.       return scope;
  39.    }
  40.  
  41.    protected static void setSystemScope(IdentityScope var0) {
  42.       check("setSystemScope");
  43.       scope = var0;
  44.    }
  45.  
  46.    public abstract int size();
  47.  
  48.    public abstract Identity getIdentity(String var1);
  49.  
  50.    public Identity getIdentity(Principal var1) {
  51.       return this.getIdentity(var1.getName());
  52.    }
  53.  
  54.    public abstract Identity getIdentity(PublicKey var1);
  55.  
  56.    public abstract void addIdentity(Identity var1) throws KeyManagementException;
  57.  
  58.    public abstract void removeIdentity(Identity var1) throws KeyManagementException;
  59.  
  60.    public abstract Enumeration identities();
  61.  
  62.    public String toString() {
  63.       return super.toString() + "[" + this.size() + "]";
  64.    }
  65.  
  66.    private static void check(String var0) {
  67.       SecurityManager var1 = System.getSecurityManager();
  68.       if (var1 != null) {
  69.          var1.checkSecurityAccess(var0);
  70.       }
  71.  
  72.    }
  73. }
  74.