private List<ResourceTask> resourceTasks = new ArrayList<ResourceTask>();
public void addResource(Resource resource, UpdateAction action) {
switch (action) {
case INSTALL:
resourceTasks.add(new InstallTask(resource));
break;
case UPDATE:
Resource existed = registry.getResource(resource.getName());
resourceTasks.add(new UpdateTask(resource, existed));
break;