Changeset 343
- Timestamp:
- 04/23/02 11:52:05 (10 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-0_71-bugfixes/Rapla/src/org/rapla/gui/ReservationController.java
r292 r343 143 143 } 144 144 145 public Allocation copyAllocation(Allocation allocation) throws RaplaException { 146 Reservation reservation = allocation.getReservation(); 147 Appointment appointment = allocation.getAppointment(); 148 Allocation copy = context.getFacade().newAllocation(appointment); 149 // copy resources 150 Resource[] resources = allocation.getResources(); 151 for (int i=0;i<resources.length;i++) 152 copy.addResource(resources[i]); 153 return copy; 154 } 155 156 145 157 public void pasteAllocation(Reservation reservation 146 158 ,Allocation allocation … … 150 162 throw new RaplaException(config.getString("error.paste_in_different_semester_not_supported")); 151 163 } 152 TimeZone timeZone = allocation.getAppointment().getTimeZone(); 153 allocation.move(adjustDate(start,semester,timeZone) 164 Allocation copy = copyAllocation(allocation); 165 TimeZone timeZone = copy.getAppointment().getTimeZone(); 166 copy.move(adjustDate(start,semester,timeZone) 154 167 ,timeZone); 155 168 Reservation mutableReservation = (Reservation)context.getFacade().editObject(reservation); 156 mutableReservation.addAllocation( allocation);169 mutableReservation.addAllocation(copy); 157 170 save(mutableReservation); 158 171 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/rapla.jpg)