Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/global/GlobalManagementSystem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/global/GlobalManagementSystem.java	(revision 1415)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/global/GlobalManagementSystem.java	(revision 1440)
@@ -60,10 +60,9 @@
 
 		case DCWormsTags.TIMER:
-			if (pluginSupportsEvent(DCWormsTags.TIMER)) {
-				TimerEvent event = new  TimerEvent();
-				SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event, 
-						queues,  jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
+			TimerEvent event = new  TimerEvent();
+			SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event, 
+					queues,  jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+
 			sendTimerEvent();
 			break;
@@ -72,12 +71,5 @@
 	
 	public void notifySubmittedWorkloadUnit(WorkloadUnit wu) {
-		if (!pluginSupportsEvent(GridSimTags.GRIDLET_SUBMIT)) {
-			log.error("Plugin " + schedulingPlugin.getClass()
-					+ " does not provide support for TASK_ARRIVED event.\n"
-					+ "Check plugin configuration or use default one.");
-			return;
-		}
 		registerWorkloadUnit(wu);
-
 	}
 	
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java	(revision 1396)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java	(revision 1440)
@@ -124,8 +124,4 @@
 	}
 
-	public boolean pluginSupportsEvent(int eventType){
-		return true;
-	}
-
 	public TaskQueueList getQueues(){
 		return queues;
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 1430)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 1440)
@@ -95,13 +95,14 @@
 
 		int tag = ev.get_tag();
+		SchedulingEvent event;
+		SchedulingPlanInterface<?> decision;
 		switch (tag) {
-
 		case DCWormsTags.TIMER:
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new SchedulingEvent(SchedulingEventType.TIMER);
-				SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event, 
-						queues, jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
+
+			event = new SchedulingEvent(SchedulingEventType.TIMER);
+			decision =  schedulingPlugin.schedule(event, 
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+
 			sendTimerEvent();
 			break;
@@ -111,10 +112,10 @@
 			try {
 				execTask.setStatus(DCWormsTags.READY);
-				if (pluginSupportsEvent(tag)) {
-					SchedulingEvent event = new StartTaskExecutionEvent(execTask.getJobId(), execTask.getId());
-					SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event,
-							queues, jobRegistry, getResourceManager(), moduleList);
-					executeSchedulingPlan(decision);
-				}
+
+				event = new StartTaskExecutionEvent(execTask.getJobId(), execTask.getId());
+				decision =  schedulingPlugin.schedule(event,
+						queues, jobRegistry, getResourceManager(), moduleList);
+				executeSchedulingPlan(decision);
+
 			} catch (Exception e) {
 				e.printStackTrace();
@@ -128,10 +129,8 @@
 				finalizeExecutable(execTask);
 				sendFinishedWorkloadUnit(execTask);
-				if (pluginSupportsEvent(tag)) {
-					SchedulingEvent event = new TaskFinishedEvent(execTask.getJobId(), execTask.getId());
-					SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
-							queues, jobRegistry, getResourceManager(), moduleList);
-					executeSchedulingPlan(decision);
-				}
+				event = new TaskFinishedEvent(execTask.getJobId(), execTask.getId());
+				decision = schedulingPlugin.schedule(event,
+						queues, jobRegistry, getResourceManager(), moduleList);
+				executeSchedulingPlan(decision);
 			}
 
@@ -155,10 +154,8 @@
 		case DCWormsTags.TASK_REQUESTED_TIME_EXPIRED:
 			execTask = (Executable) ev.get_data();
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new TaskRequestedTimeExpiredEvent(execTask.getJobId(), execTask.getId());
-				SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
-						queues, jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
+			event = new TaskRequestedTimeExpiredEvent(execTask.getJobId(), execTask.getId());
+			decision = schedulingPlugin.schedule(event,
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
 			break;
 			
@@ -167,12 +164,11 @@
 			execTask = jobRegistry.getTask(ids[0], ids[1]);
 			pauseTask(execTask);
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new TaskPausedEvent(ids[0], ids[1]);
-				SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
-						queues, jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
-		}
-		break;
+	
+			event = new TaskPausedEvent(ids[0], ids[1]);
+			decision = schedulingPlugin.schedule(event,
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+			}
+			break;
 		
 		case DCWormsTags.TASK_RESUME:{
@@ -180,12 +176,10 @@
 			execTask = jobRegistry.getTask(ids[0], ids[1]);
 			resumeTask(execTask, execTask.getAllocatedResources().getLast().getResourceUnits(), true);
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new TaskResumedEvent(ids[0], ids[1]);
-				SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
-						queues, jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
-		}
-		break;
+			event = new TaskResumedEvent(ids[0], ids[1]);
+			decision = schedulingPlugin.schedule(event,
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+			}
+			break;
 		
 		case DCWormsTags.TASK_MIGRATE:{
@@ -195,6 +189,6 @@
 					(String)data[1]), execTask, execTask.getAllocatedResources().getLast().getResourceUnits(), (Map<ResourceUnitName, ResourceUnit>)data[2]);
 			scheduler.sendInternal(migrationTime, DCWormsTags.TASK_MOVE, data);
-		}
-		break;
+			}
+			break;
 		
 		case DCWormsTags.TASK_MOVE:{
@@ -202,39 +196,41 @@
 			execTask = jobRegistry.getTask((String)data[0], (String)data[1]);
 			moveTask(execTask, (Map<ResourceUnitName, ResourceUnit>)data[2]);
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new StartTaskExecutionEvent((String)data[0], (String)data[1]);
-				SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
-						queues, jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
-		}
-		break;
-			
+
+			event = new StartTaskExecutionEvent((String)data[0], (String)data[1]);
+			decision = schedulingPlugin.schedule(event,
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+			}
+			break;
+			
+		case DCWormsTags.RESOURCE_POWER_STATE_CHANGED:
+			event = new SchedulingEvent(SchedulingEventType.RESOURCE_POWER_STATE_CHANGED);
+			decision =  schedulingPlugin.schedule(event, 
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+			break;
+
+		case DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED:
+			event = new SchedulingEvent(SchedulingEventType.RESOURCE_POWER_LIMIT_EXCEEDED);
+			String source;
+			try{
+				source = ev.get_data().toString();
+			} catch(Exception e){
+				source = null;
+			}
+			event.setSource(source);
+			decision = schedulingPlugin.schedule(event,
+					queues, jobRegistry, getResourceManager(), moduleList);
+			executeSchedulingPlan(decision);
+			break;
 		case DCWormsTags.TASK_EXECUTION_CHANGED:
 			execTask = (ExecTask) ev.get_data();
 			updateTaskExecutionPhase(execTask);
 			break;
-
 		case DCWormsTags.UPDATE_PROCESSING:
 			updateProcessingTimes();
 			break;
 			
-		case DCWormsTags.POWER_LIMIT_EXCEEDED:
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new SchedulingEvent(SchedulingEventType.POWER_LIMIT_EXCEEDED);
-				String source;
-				try{
-					source = ev.get_data().toString();
-				} catch(Exception e){
-					source = null;
-				}
-				event.setSource(source);
-				SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
-						queues, jobRegistry, getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
-			break;
 		default: 		
-			
 			break;
 		}
@@ -301,13 +297,13 @@
 	
 	public void notifyReturnedWorkloadUnit(WorkloadUnit wu) {
-		if (pluginSupportsEvent(DCWormsTags.TASK_EXECUTION_FINISHED)) {
-			SchedulingEvent event = new SchedulingEvent(SchedulingEventType.TASK_FINISHED);
-			SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event,
-					queues, jobRegistry, getResourceManager(), moduleList);
-			executeSchedulingPlan(decision);
-		}
-		//if(scheduler.getParent() != null){
-			sendFinishedWorkloadUnit(wu);
-		//}
+
+		SchedulingEvent event = new SchedulingEvent(SchedulingEventType.TASK_FINISHED);
+		SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event,
+				queues, jobRegistry, getResourceManager(), moduleList);
+		executeSchedulingPlan(decision);
+
+	//if(scheduler.getParent() != null){
+		sendFinishedWorkloadUnit(wu);
+	//}
 	}
 	
