{
if (notInstalled.isEmpty() == false)
{
for (Iterator i = notInstalled.iterator(); i.hasNext();)
{
KernelControllerContext context = (KernelControllerContext) i.next();
if (context.getState().equals(context.getRequiredState()))
i.remove();
}
if (notInstalled.isEmpty() == false)
{
HashSet errors = new HashSet();
HashSet incomplete = new HashSet();
for (Iterator i = notInstalled.iterator(); i.hasNext();)
{
KernelControllerContext ctx = (KernelControllerContext) i.next();
if (ctx.getState().equals(ControllerState.ERROR))
errors.add(ctx);
else
incomplete.add(ctx);
}
JBossStringBuilder buffer = new JBossStringBuilder();
buffer.append("Incompletely deployed:\n");
if (errors.size() != 0)
{
buffer.append("\n*** DEPLOYMENTS IN ERROR:\n");
for (Iterator i = errors.iterator(); i.hasNext(); )
{
KernelControllerContext ctx = (KernelControllerContext) i.next();
buffer.append(ctx.getName()).append(" -> ").append(ctx.getError().toString()).append('\n');
}
}
if (incomplete.size() != 0)
{
buffer.append("\n*** DEPLOYMENTS MISSING DEPENDENCIES:\n");
for (Iterator i = incomplete.iterator(); i.hasNext();)
{
KernelControllerContext ctx = (KernelControllerContext) i.next();
buffer.append(ctx.getName()).append(" -> ");
DependencyInfo dependsInfo = ctx.getDependencyInfo();
Set depends = dependsInfo.getIDependOn(null);
for (Iterator j = depends.iterator(); j.hasNext();)
{
DependencyItem item = (DependencyItem) j.next();
buffer.append(item.getIDependOn()).append('{').append(item.getWhenRequired().getStateString());