public ProxyImpl (Signet                 signet, PrivilegedSubjectImpl  grantor, PrivilegedSubject 	    grantee, Subsystem              subsystem, boolean                canUse, boolean                canExtend, Date                   effectiveDate, Date                   expirationDate) throws SignetAuthorityException { super (signet, grantor, grantee, effectiveDate, expirationDate);  if (!grantor.equals(grantor.getEffectiveEditor())) {                  Reason[] reasonArray = new Reason[1]; if (!grantor.hasExtensibleProxy (grantor.getEffectiveEditor(), subsystem, reasonArray)) { Decision decision = new DecisionImpl(false, reasonArray[0], null); throw new SignetAuthorityException(decision); } }  if ((canUse == false) && (canExtend == false)) { throw new IllegalArgumentException ("It is illegal to create a new Proxy with both its canUse" + " and canExtend attributes set false."); }  this.subsystem = (SubsystemImpl)subsystem; this.canUse = canUse; this.canExtend = canExtend;  Decision decision = this.getGrantor().canEdit(this);  if (decision.getAnswer() == false) { throw new SignetAuthorityException(decision); }  ProxyHistory historyRecord = new ProxyHistoryImpl(this);  Set historySet = new HashSet(1); historySet.add(historyRecord); this.setHistory(historySet);
public ProxyImpl() { super();
  public ProxyImpl  	(Signet                 signet,     PrivilegedSubjectImpl  grantor,      PrivilegedSubject 	    grantee,     Subsystem              subsystem,     boolean                canUse,     boolean                canExtend,     Date                   effectiveDate,     Date                   expirationDate)  throws  	SignetAuthorityException  {      super      (signet,       grantor,       grantee,       effectiveDate,       expirationDate);        if (!grantor.equals(grantor.getEffectiveEditor()))    {      // At this point, we know the following things:      //      //   1) This grantor is "acting as" some other PrivilegedSubject.      //      //   2) This grantor does indeed hold at least one currently active Proxy      //      from the PrivilegedSubject that he/she is "acting as". That was      //      confirmed when PrivilegedSubject.setActingFor() was executed.      //      // We still need to confirm the following points:      //      //   3) At least one of those Proxies described in (2) above must have its      //      "can extend" flag set, thereby allowing this grantor to use that      //      Proxy to grant some new Proxy.      //      //   4) At least one of the Proxies described in (3) above must encompass      //      the Subsystem of this Assignment.      Reason[] reasonArray = new Reason[1];      if (!grantor.hasExtensibleProxy            (grantor.getEffectiveEditor(),             subsystem,             reasonArray))      {        Decision decision = new DecisionImpl(false, reasonArray[0], null);        throw new SignetAuthorityException(decision);      }    }        if ((canUse == false) && (canExtend == false))    {      throw new IllegalArgumentException        ("It is illegal to create a new Proxy with both its canUse"         + " and canExtend attributes set false.");    }        this.subsystem = (SubsystemImpl)subsystem;    this.canUse = canUse;    this.canExtend = canExtend;        Decision decision = this.getGrantor().canEdit(this);        if (decision.getAnswer() == false)    {      throw new SignetAuthorityException(decision);    }    ProxyHistory historyRecord = new ProxyHistoryImpl(this);      Set historySet = new HashSet(1);    historySet.add(historyRecord);    this.setHistory(historySet);  }