eu.xtreemos.xosd.localallocmgr.migrations
Class TimeTableState4Add

java.lang.Object
  extended by eu.xtreemos.xosd.localallocmgr.migrations.TimeMachineItem
      extended by eu.xtreemos.xosd.localallocmgr.migrations.TimeTableState4Add

public class TimeTableState4Add
extends TimeMachineItem

stores the state of the timetable's elements that can be affected by the new element. TODO: this is mainly for the addition of the element, but does not work good for delay or something like that

Author:
urosjovanovic

Field Summary
(package private)  java.util.GregorianCalendar end
           
(package private)  java.util.GregorianCalendar start
           
(package private)  SimpleTransaction states
           
 
Fields inherited from class eu.xtreemos.xosd.localallocmgr.migrations.TimeMachineItem
origTT
 
Constructor Summary
TimeTableState4Add(TimeTable tt, TTElm newelm)
           
 
Method Summary
private  void addelement(TTElm original)
           
private  void determineAffectedTTelms(TTElm newelm)
           
private  boolean isBetweeen(java.util.GregorianCalendar start, java.util.GregorianCalendar end, java.util.GregorianCalendar time)
          check if time is between
 void restore()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

java.util.GregorianCalendar start

end

java.util.GregorianCalendar end

states

SimpleTransaction states
Constructor Detail

TimeTableState4Add

public TimeTableState4Add(TimeTable tt,
                          TTElm newelm)
Method Detail

restore

public void restore()
             throws AttributeConformanceException
Specified by:
restore in class TimeMachineItem
Throws:
AttributeConformanceException

determineAffectedTTelms

private void determineAffectedTTelms(TTElm newelm)
                              throws AttributeConformanceException
Throws:
AttributeConformanceException

addelement

private void addelement(TTElm original)
                 throws AttributeConformanceException
Throws:
AttributeConformanceException

isBetweeen

private boolean isBetweeen(java.util.GregorianCalendar start,
                           java.util.GregorianCalendar end,
                           java.util.GregorianCalendar time)
check if time is between

Parameters:
start -
end -
time -
Returns: