Commit d51c4b75 authored by yannick legoc's avatar yannick legoc

Reimplemented corba command zone accessor.

parent 2bbdfa5b
......@@ -193,16 +193,6 @@
<arg line="${idlFlags} ${idlCoreDir}/SessionGateway.idl" />
</exec>
<echo message="Generating CommandZoneAccessor.java" />
<exec executable="idl">
<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandZoneAccessor.idl" />
</exec>
<echo message="Generating CommandBoxDescriptor.java" />
<exec executable="idl">
<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandBoxDescriptor.idl" />
</exec>
<!-- common -->
<echo message="Generating ListIterator.java" />
<exec executable="idl">
......
......@@ -28,7 +28,7 @@ import fr.ill.ics.bridge.listeners.ServerCommandStateChangeListener;
import fr.ill.ics.bridge.listeners.ServerCommandZoneErrorListener;
import fr.ill.ics.bridge.listeners.ServerProgressChangeListener;
import fr.ill.ics.bridge.listeners.ServerResetCommandListener;
import fr.ill.ics.nscclient.command.CommandZoneAccessorProxy;
import fr.ill.ics.nscclient.command.CommandZoneAccessor;
import fr.ill.ics.nscclient.command.ServerCommandZone;
import fr.ill.ics.nscclient.dataprovider.CommandDatabase;
import fr.ill.ics.nscclient.dataprovider.ServantDatabase;
......@@ -276,7 +276,7 @@ public class CommandZoneWrapper implements ICommandZoneEventListener {
}
public int create() {
return CommandZoneAccessorProxy.getInstance(serverId).create();
return CommandZoneAccessor.getInstance(serverId).create();
}
public boolean isPaused() {
......
......@@ -93,11 +93,11 @@ public abstract class ServerCommandBox {
}
public void stop() {
CommandZoneAccessor.getInstance(serverId).stop(commandBoxId);
CommandZoneAccessor.getInstance(serverId).stopCommandBox(commandBoxId);
}
public int getProgression() {
return CommandZoneAccessor.getInstance(serverId).getProgression(commandBoxId);
return CommandZoneAccessor.getInstance(serverId).getCommandBoxProgression(commandBoxId);
}
public abstract int getNumberOfCommandBoxes();
......
......@@ -47,110 +47,110 @@ public class ServerCommandZone {
}
public Set<ServerCommandBox> getContent() {
return CommandZoneAccessorProxy.getInstance(serverId).getContent(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).getContent(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId);
}
public ServerAtomicCommandBox addNewAtomicCommandBoxAtEnd(int commandID, boolean isSettings) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewAtomicCommandBoxAtEnd(commandZoneId, commandID, isSettings);
return CommandZoneAccessor.getInstance(serverId).addNewAtomicCommandBoxAtEnd(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, commandID, isSettings);
}
public ServerAtomicCommandBox addNewAtomicCommandBox(int commandID, boolean isSettings, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewAtomicCommandBox(commandZoneId, commandID, isSettings, commandBoxToMove.getId(), above);
return CommandZoneAccessor.getInstance(serverId).addNewAtomicCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, commandID, isSettings, commandBoxToMove.getId(), above);
}
public ServerGenericCommandBox addNewGenericCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewGenericCommandBox(commandZoneId, boxType, commandBoxToMove.getId(), above);
return CommandZoneAccessor.getInstance(serverId).addNewGenericCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, boxType, commandBoxToMove.getId(), above);
}
public ServerGenericCommandBox addNewGenericCommandBoxAtEnd(int boxType) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewGenericCommandBoxAtEnd(commandZoneId, boxType);
return CommandZoneAccessor.getInstance(serverId).addNewGenericCommandBoxAtEnd(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, boxType);
}
public ServerScanCommandBox addNewScanCommandBoxAtEnd(String scanName) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewScanCommandBoxAtEnd(commandZoneId, scanName);
return CommandZoneAccessor.getInstance(serverId).addNewScanCommandBoxAtEnd(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, scanName);
}
public ServerScanCommandBox addNewScanCommandBox(String scanName, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewScanCommandBox(commandZoneId, scanName, commandBoxToMove.getId(), above);
return CommandZoneAccessor.getInstance(serverId).addNewScanCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, scanName, commandBoxToMove.getId(), above);
}
public ServerForLoopCommandBox addNewForLoopCommandBoxAtEnd(String variableName) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewForLoopCommandBoxAtEnd(commandZoneId, variableName);
return CommandZoneAccessor.getInstance(serverId).addNewForLoopCommandBoxAtEnd(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, variableName);
}
public ServerForLoopCommandBox addNewForLoopCommandBox(String variableName, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewForLoopCommandBox(commandZoneId, variableName, commandBoxToMove.getId(), above);
return CommandZoneAccessor.getInstance(serverId).addNewForLoopCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, variableName, commandBoxToMove.getId(), above);
}
public ServerControlCommandBox addNewControlCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewControlCommandBox(commandZoneId, boxType, commandBoxToMove.getId(), above);
return CommandZoneAccessor.getInstance(serverId).addNewControlCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, boxType, commandBoxToMove.getId(), above);
}
public ServerControlCommandBox addNewControlCommandBoxAtEnd(int boxType) {
return CommandZoneAccessorProxy.getInstance(serverId).addNewControlCommandBoxAtEnd(commandZoneId, boxType);
return CommandZoneAccessor.getInstance(serverId).addNewControlCommandBoxAtEnd(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, boxType);
}
public boolean moveCommandBox(ServerCommandBox commandBoxToMove, ServerCommandBox commandBoxToShift, boolean above) {
return CommandZoneAccessorProxy.getInstance(serverId).moveCommandBox(commandZoneId, commandBoxToMove.getId(), commandBoxToShift.getId(), above);
return CommandZoneAccessor.getInstance(serverId).moveCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, commandBoxToMove.getId(), commandBoxToShift.getId(), above);
}
public boolean moveCommandBoxToEnd(ServerCommandBox commandBoxToMove) {
return CommandZoneAccessorProxy.getInstance(serverId).moveCommandBoxToEnd(commandZoneId, commandBoxToMove.getId());
return CommandZoneAccessor.getInstance(serverId).moveCommandBoxToEnd(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, commandBoxToMove.getId());
}
public boolean deleteCommandBox(ServerCommandBox commandBoxToDelete) {
return CommandZoneAccessorProxy.getInstance(serverId).deleteCommandBox(commandZoneId, commandBoxToDelete.getId());
return CommandZoneAccessor.getInstance(serverId).deleteCommandBox(CommandZoneAccessor.ContainerType.COMMANDZONE, commandZoneId, commandBoxToDelete.getId());
}
public boolean reset(int databaseId) {
return CommandZoneAccessorProxy.getInstance(serverId).reset(commandZoneId, databaseId);
return CommandZoneAccessor.getInstance(serverId).reset(commandZoneId, databaseId);
}
public boolean execute(int databaseId) {
return CommandZoneAccessorProxy.getInstance(serverId).execute(commandZoneId, databaseId);
return CommandZoneAccessor.getInstance(serverId).execute(commandZoneId, databaseId);
}
public boolean stop() {
return CommandZoneAccessorProxy.getInstance(serverId).stop(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).stop(commandZoneId);
}
public boolean stopAtEnd() {
return CommandZoneAccessorProxy.getInstance(serverId).stopAtEnd(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).stopAtEnd(commandZoneId);
}
public boolean pause() {
return CommandZoneAccessorProxy.getInstance(serverId).pause(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).pause(commandZoneId);
}
public boolean restart() {
return CommandZoneAccessorProxy.getInstance(serverId).restart(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).restart(commandZoneId);
}
public boolean isRunning() {
return CommandZoneAccessorProxy.getInstance(serverId).isRunning(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).isRunning(commandZoneId);
}
public boolean isPaused() {
return CommandZoneAccessorProxy.getInstance(serverId).isPaused(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).isPaused(commandZoneId);
}
public double getProgression() {
return CommandZoneAccessorProxy.getInstance(serverId).getProgression(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).getProgression(commandZoneId);
}
public boolean commandConflicts() {
return CommandZoneAccessorProxy.getInstance(serverId).commandConflicts(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).commandConflicts(commandZoneId);
}
public String getConflictingCommands() {
return CommandZoneAccessorProxy.getInstance(serverId).getConflictingCommands(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).getConflictingCommands(commandZoneId);
}
public double getEstimatedTime() {
return CommandZoneAccessorProxy.getInstance(serverId).getEstimatedTime(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).getEstimatedTime(commandZoneId);
}
public String print() {
return CommandZoneAccessorProxy.getInstance(serverId).print(commandZoneId);
return CommandZoneAccessor.getInstance(serverId).print(commandZoneId);
}
}
\ No newline at end of file
......@@ -26,7 +26,6 @@ import fr.ill.ics.bridge.ControllerManager;
import fr.ill.ics.bridge.DriverManager;
import fr.ill.ics.bridge.ResourceManager;
import fr.ill.ics.nscclient.command.CommandZoneAccessor;
import fr.ill.ics.nscclient.command.CommandZoneAccessorProxy;
import fr.ill.ics.nscclient.commandline.CommandLineAccessor;
import fr.ill.ics.nscclient.condition.ConditionManagerAccessor;
import fr.ill.ics.nscclient.dataprovider.DataAccessor;
......@@ -68,7 +67,6 @@ public class ServerSessionManager {
DataAccessor.getInstance(serverId).init();
ServantManagerAccessor.getInstance(serverId).init();
CommandZoneAccessorProxy.getInstance(serverId).init();
CommandZoneAccessor.getInstance(serverId).init();
ServerCommandZoneEventManager.getInstance(serverId).init();
ConditionManagerAccessor.getInstance(serverId).init();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment