00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030  
00031 package org.objectweb.proactive.core.component.exceptions;
00032 
00033 import java.util.Hashtable;
00034 import java.util.Map;
00035 
00036 import org.objectweb.fractal.api.Component;
00037 import org.objectweb.fractal.api.control.IllegalContentException;
00038 import org.objectweb.fractal.api.control.IllegalLifeCycleException;
00039 
00047 public class ContentControllerExceptionListException extends Exception {
00048         
00049         Map<Component, IllegalLifeCycleException> lifeCycleExceptions = null;
00050         Map<Component, IllegalContentException> contentExceptions = null;
00051         
00052         public ContentControllerExceptionListException() {
00053         }
00054         
00055         public ContentControllerExceptionListException(Map<Component, IllegalLifeCycleException> lifeCycleExceptions, Map<Component, IllegalContentException> contentExceptions) {
00056                 this.lifeCycleExceptions = lifeCycleExceptions;
00057                 this.contentExceptions = contentExceptions;
00058         }
00059 
00060         public Map<Component, IllegalContentException> getContentExceptions() {
00061                 return contentExceptions;
00062         }
00063 
00064         public Map<Component, IllegalLifeCycleException> getLifeCycleExceptions() {
00065                 return lifeCycleExceptions;
00066         }
00067         
00068         public boolean isEmpty() {
00069                 return (((lifeCycleExceptions == null) || (lifeCycleExceptions.isEmpty()))
00070                                 &&
00071                                 ((contentExceptions == null) || (contentExceptions.isEmpty())));
00072         }
00073         
00074         
00075         public void addIllegalLifeCycleException(Component c, IllegalLifeCycleException e) {
00076                 if (lifeCycleExceptions == null) {
00077                         lifeCycleExceptions = new Hashtable<Component, IllegalLifeCycleException>();
00078                 }
00079                 lifeCycleExceptions.put(c, e);
00080         }
00081         
00082         public void addIllegalContentException(Component c, IllegalContentException e) {
00083                 if (contentExceptions == null) {
00084                         contentExceptions =  new Hashtable<Component, IllegalContentException>();
00085                 }
00086                 contentExceptions.put(c, e);
00087         }
00088         
00089         
00090 }