ItEr42S20CUImportarTraballoRealizadoPorSubcontrataItEr41S23: Renaming EditTaskCommand and EditTaskController to TaskPropertiesCommand and TaskPropertiesController.

This commit is contained in:
Manuel Rego Casasnovas 2010-01-07 17:08:54 +01:00 committed by Javier Moran Rua
parent 4b728792e7
commit 2030a16e9a
8 changed files with 32 additions and 29 deletions

View file

@ -27,7 +27,7 @@ import org.navalplanner.business.planner.entities.TaskElement;
import org.navalplanner.web.common.ViewSwitcher;
import org.navalplanner.web.planner.allocation.ResourceAllocationController;
import org.navalplanner.web.planner.calendar.CalendarAllocationController;
import org.navalplanner.web.planner.taskedition.EditTaskController;
import org.navalplanner.web.planner.taskedition.TaskPropertiesController;
import org.zkoss.ganttz.Planner;
import org.zkoss.ganttz.extensions.ICommand;
@ -39,7 +39,7 @@ public interface IOrderPlanningModel {
void setConfigurationToPlanner(Planner planner, Order order,
ViewSwitcher viewSwitcher,
ResourceAllocationController resourceAllocationController,
EditTaskController editTaskController,
TaskPropertiesController taskPropertiesController,
CalendarAllocationController calendarAllocationController,
List<ICommand<TaskElement>> additional);

View file

@ -30,7 +30,7 @@ import org.navalplanner.business.planner.entities.TaskElement;
import org.navalplanner.web.common.ViewSwitcher;
import org.navalplanner.web.planner.allocation.ResourceAllocationController;
import org.navalplanner.web.planner.calendar.CalendarAllocationController;
import org.navalplanner.web.planner.taskedition.EditTaskController;
import org.navalplanner.web.planner.taskedition.TaskPropertiesController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
@ -61,10 +61,10 @@ public class OrderPlanningController implements Composer {
@Autowired
private EditTaskController editTaskController;
private TaskPropertiesController taskPropertiesController;
public EditTaskController getEditTaskController() {
return editTaskController;
public TaskPropertiesController getTaskPropertiesController() {
return taskPropertiesController;
}
@Autowired
@ -119,7 +119,7 @@ public class OrderPlanningController implements Composer {
private void updateConfiguration() {
model.setConfigurationToPlanner(planner, order, viewSwitcher,
resourceAllocationController, editTaskController,
resourceAllocationController, taskPropertiesController,
calendarAllocationController, additional);
}

View file

@ -73,8 +73,8 @@ import org.navalplanner.web.planner.chart.EarnedValueChartFiller.EarnedValueType
import org.navalplanner.web.planner.milestone.IAddMilestoneCommand;
import org.navalplanner.web.planner.milestone.IDeleteMilestoneCommand;
import org.navalplanner.web.planner.order.ISaveCommand.IAfterSaveListener;
import org.navalplanner.web.planner.taskedition.EditTaskController;
import org.navalplanner.web.planner.taskedition.IEditTaskCommand;
import org.navalplanner.web.planner.taskedition.ITaskPropertiesCommand;
import org.navalplanner.web.planner.taskedition.TaskPropertiesController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
@ -178,7 +178,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
public void setConfigurationToPlanner(Planner planner, Order order,
ViewSwitcher switcher,
ResourceAllocationController resourceAllocationController,
EditTaskController editTaskController,
TaskPropertiesController taskPropertiesController,
CalendarAllocationController calendarAllocationController,
List<ICommand<TaskElement>> additional) {
Order orderReloaded = reload(order);
@ -198,7 +198,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
configuration
.addCommandOnTask(buildCalendarAllocationCommand(calendarAllocationController));
configuration
.addCommandOnTask(buildEditTaskCommand(editTaskController));
.addCommandOnTask(buildTaskPropertiesCommand(taskPropertiesController));
configuration.setDoubleClickCommand(resourceAllocationCommand);
Tabbox chartComponent = new Tabbox();
chartComponent.setOrient("vertical");
@ -498,11 +498,12 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
return calendarAllocationCommand;
}
private IEditTaskCommand buildEditTaskCommand(
EditTaskController editTaskController) {
IEditTaskCommand editTaskCommand = getEditTaskCommand();
editTaskCommand.setEditTaskController(editTaskController);
return editTaskCommand;
private ITaskPropertiesCommand buildTaskPropertiesCommand(
TaskPropertiesController taskPropertiesController) {
ITaskPropertiesCommand taskPropertiesCommand = getTaskPropertiesCommand();
taskPropertiesCommand
.setTaskPropertiesController(taskPropertiesController);
return taskPropertiesCommand;
}
private IAddMilestoneCommand buildMilestoneCommand() {
@ -680,7 +681,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
protected abstract IDeleteMilestoneCommand getDeleteMilestoneCommand();
protected abstract IEditTaskCommand getEditTaskCommand();
protected abstract ITaskPropertiesCommand getTaskPropertiesCommand();
protected abstract ICalendarAllocationCommand getCalendarAllocationCommand();

View file

@ -24,12 +24,13 @@ import org.navalplanner.business.planner.entities.TaskElement;
import org.zkoss.ganttz.extensions.ICommandOnTask;
/**
* Contract for {@link EditTaskCommand} <br />
* Contract for {@link TaskPropertiesCommand} <br />
*
* @author Manuel Rego Casasnovas <mrego@igalia.com>
*/
public interface IEditTaskCommand extends ICommandOnTask<TaskElement> {
public interface ITaskPropertiesCommand extends ICommandOnTask<TaskElement> {
void setEditTaskController(EditTaskController editTaskController);
void setTaskPropertiesController(
TaskPropertiesController taskPropertiesController);
}

View file

@ -40,7 +40,7 @@ import org.zkoss.ganttz.extensions.IContextWithPlannerTask;
*/
@Component
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class EditTaskCommand implements IEditTaskCommand {
public class TaskPropertiesCommand implements ITaskPropertiesCommand {
@Autowired
private ITaskElementDAO taskElementDAO;
@ -48,7 +48,7 @@ public class EditTaskCommand implements IEditTaskCommand {
@Autowired
private ITaskSourceDAO taskSourceDAO;
private EditTaskController editTaskController;
private TaskPropertiesController taskPropertiesController;
@Override
@Transactional(readOnly = true)
@ -62,7 +62,7 @@ public class EditTaskCommand implements IEditTaskCommand {
forceLoadHoursGroup((Task) taskElement);
}
editTaskController.showEditFormFor(context, taskElement);
taskPropertiesController.showEditFormFor(context, taskElement);
}
private void forceLoadHoursGroup(Task task) {
@ -75,8 +75,9 @@ public class EditTaskCommand implements IEditTaskCommand {
}
@Override
public void setEditTaskController(EditTaskController editTaskController) {
this.editTaskController = editTaskController;
public void setTaskPropertiesController(
TaskPropertiesController taskPropertiesController) {
this.taskPropertiesController = taskPropertiesController;
}
@Override

View file

@ -47,9 +47,9 @@ import org.zkoss.zul.api.Row;
*
* @author Manuel Rego Casasnovas <mrego@igalia.com>
*/
@org.springframework.stereotype.Component("editTaskController")
@org.springframework.stereotype.Component("taskPropertiesController")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class EditTaskController extends GenericForwardComposer {
public class TaskPropertiesController extends GenericForwardComposer {
// This is a workaround, because in business we don't have access to
// I18nHelper

View file

@ -27,7 +27,7 @@
<lookup-method name="getTaskElementAdapter" bean="taskElementAdapter"/>
<lookup-method name="getSaveCommand" bean="saveCommand"/>
<lookup-method name="getResourceAllocationCommand" bean="resourceAllocationCommand"/>
<lookup-method name="getEditTaskCommand" bean="editTaskCommand"/>
<lookup-method name="getTaskPropertiesCommand" bean="taskPropertiesCommand"/>
<lookup-method name="getCalendarAllocationCommand" bean="calendarAllocationCommand"/>
<lookup-method name="getAddMilestoneCommand" bean="addMilestoneCommand"/>
<lookup-method name="getDeleteMilestoneCommand" bean="deleteMilestoneCommand"/>

View file

@ -41,7 +41,7 @@
</div>
<window id="taskPropertiesWindow"
apply="${planningController.editTaskController}" closable="true"
apply="${planningController.taskPropertiesController}" closable="true"
title="${i18n:_('Task properties')}" width="650px" visible="false"
border="normal">