else { if (((SubsystemImpl)(proxy.getSubsystem())).isPopulatedForGranting()) { grantableSubsystems.add(proxy.getSubsystem()); } }
else if (((SubsystemImpl)proxySubsys).isPopulatedForGranting()) grantableSubsystems.add(proxySubsys);
	public Set getGrantableSubsystemsForAssignment()	{		Set grantableSubsystems = new HashSet();		if (getEffectiveEditor().equals(this))		{			// We are acting for no one but ourselves.			Collection grantableAssignments = this.getGrantableAssignments((Subsystem)null);			Iterator grantableAssignmentsIterator = grantableAssignments.iterator();			while (grantableAssignmentsIterator.hasNext())			{				Assignment grantableAssignment = (Assignment)(grantableAssignmentsIterator.next());				grantableSubsystems.add(grantableAssignment.getFunction().getSubsystem());			}			return grantableSubsystems;		}		else if (getEffectiveEditor().equals(signetSource.getSignet().getSignetSubject()))		{			// We are acting for the Signet subject.			Set proxies = this.getProxiesReceived();			proxies = filterProxies(proxies, Status.ACTIVE);			proxies = filterProxiesByGrantor(proxies, signetSource.getSignet().getSignetSubject());			Iterator proxiesIterator = proxies.iterator();			while (proxiesIterator.hasNext())			{				Proxy proxy = (Proxy)(proxiesIterator.next());				if (proxy.canUse())				{					if (proxy.getSubsystem() == null)					{						Set subsyss = signetSource.getSignet().getSubsystems();						for (Iterator candidates = subsyss.iterator(); candidates.hasNext(); )						{							Subsystem candidate = (Subsystem)(candidates.next());							if (((SubsystemImpl)candidate).isPopulatedForGranting())							{								grantableSubsystems.add(candidate);							}						}						grantableSubsystems.addAll(subsyss);					}					else					{						if (((SubsystemImpl)(proxy.getSubsystem())).isPopulatedForGranting())						{							grantableSubsystems.add(proxy.getSubsystem());						}					}				}			}			return grantableSubsystems;		}		else		{			// We are acting for some other subject who is not the Signet subject.			Set proxies = this.getProxiesReceived();			proxies = filterProxies(proxies, Status.ACTIVE);			proxies = filterProxiesByGrantor(proxies, this.getEffectiveEditor());			Set proxiedSubsystems = new HashSet();			Iterator proxiesIterator = proxies.iterator();			while (proxiesIterator.hasNext())			{				Proxy proxy = (Proxy)(proxiesIterator.next());				if (proxy.canUse())				{					if (proxy.getSubsystem() == null)					{						// We can grant every subsystem that's grantable by the subject						// we're "acting for".						return this.getEffectiveEditor().getGrantableSubsystemsForAssignment();					}					proxiedSubsystems.add(proxy.getSubsystem());				}			}			// Now that we have the set of Proxied Subsystems, let's get the set of			// our Proxy-grantor's grantable subsystems, and return the intersection			// of those sets.			proxiedSubsystems.retainAll(this.getEffectiveEditor().getGrantableSubsystemsForAssignment());			return proxiedSubsystems;		}	}