Commit 60879f6c authored by yannick legoc's avatar yannick legoc

Reviewed the ServerControlCommandBox hierarchy and removed thenBlock argument

parent 8b3dca65
......@@ -60,60 +60,60 @@ public class ControlCommandWrapper extends CommandWrapper {
return "";
}
public AtomicCommandWrapper addNewCommand(boolean thenBlock, String controllerName, boolean isSettings) {
return new AtomicCommandWrapper(serverControlCommandBox.addNewAtomicCommandBoxAtEnd(thenBlock, getCommandId(controllerName), isSettings));
public AtomicCommandWrapper addNewCommand(String controllerName, boolean isSettings) {
return new AtomicCommandWrapper(serverControlCommandBox.addNewAtomicCommandBoxAtEnd(getCommandId(controllerName), isSettings));
}
public AtomicCommandWrapper addNewCommand(boolean thenBlock, String controllerName, boolean isSettings, IServerCommand serverCommandToShift, boolean above) {
return new AtomicCommandWrapper(serverControlCommandBox.addNewAtomicCommandBox(thenBlock, getCommandId(controllerName), isSettings, serverCommandToShift.getServerCommandBox(), above));
public AtomicCommandWrapper addNewCommand(String controllerName, boolean isSettings, IServerCommand serverCommandToShift, boolean above) {
return new AtomicCommandWrapper(serverControlCommandBox.addNewAtomicCommandBox(getCommandId(controllerName), isSettings, serverCommandToShift.getServerCommandBox(), above));
}
public ScanCommandWrapper addNewScan(boolean thenBlock, String scanName) {
return new ScanCommandWrapper(serverControlCommandBox.addNewScanCommandBoxAtEnd(thenBlock, scanName));
public ScanCommandWrapper addNewScan(String scanName) {
return new ScanCommandWrapper(serverControlCommandBox.addNewScanCommandBoxAtEnd(scanName));
}
public ScanCommandWrapper addNewScan(boolean thenBlock, String scanName, IServerCommand serverCommandToShift, boolean above) {
return new ScanCommandWrapper(serverControlCommandBox.addNewScanCommandBox(thenBlock, scanName, serverCommandToShift.getServerCommandBox(), above));
public ScanCommandWrapper addNewScan(String scanName, IServerCommand serverCommandToShift, boolean above) {
return new ScanCommandWrapper(serverControlCommandBox.addNewScanCommandBox(scanName, serverCommandToShift.getServerCommandBox(), above));
}
public ForLoopCommandWrapper addNewForLoop(boolean thenBlock, String variableName) {
return new ForLoopCommandWrapper(serverControlCommandBox.addNewForLoopCommandBoxAtEnd(thenBlock, variableName));
public ForLoopCommandWrapper addNewForLoop(String variableName) {
return new ForLoopCommandWrapper(serverControlCommandBox.addNewForLoopCommandBoxAtEnd(variableName));
}
public ForLoopCommandWrapper addNewForLoop(boolean thenBlock, String variableName, IServerCommand serverCommandToShift, boolean above) {
return new ForLoopCommandWrapper(serverControlCommandBox.addNewForLoopCommandBox(thenBlock, variableName, serverCommandToShift.getServerCommandBox(), above));
public ForLoopCommandWrapper addNewForLoop(String variableName, IServerCommand serverCommandToShift, boolean above) {
return new ForLoopCommandWrapper(serverControlCommandBox.addNewForLoopCommandBox(variableName, serverCommandToShift.getServerCommandBox(), above));
}
public GenericCommandWrapper addNewGenericCommand(boolean thenBlock, int boxType) {
return new GenericCommandWrapper(serverControlCommandBox.addNewGenericCommandBox(thenBlock, boxType));
public GenericCommandWrapper addNewGenericCommand(int boxType) {
return new GenericCommandWrapper(serverControlCommandBox.addNewGenericCommandBox(boxType));
}
public GenericCommandWrapper addNewGenericCommand(boolean thenBlock, int boxType, IServerCommand serverCommandToShift, boolean above) {
return new GenericCommandWrapper(serverControlCommandBox.addNewGenericCommandBox(thenBlock, boxType, serverCommandToShift.getServerCommandBox(), above));
public GenericCommandWrapper addNewGenericCommand(int boxType, IServerCommand serverCommandToShift, boolean above) {
return new GenericCommandWrapper(serverControlCommandBox.addNewGenericCommandBox(boxType, serverCommandToShift.getServerCommandBox(), above));
}
public ControlCommandWrapper addNewControlCommand(boolean thenBlock, int boxType) {
return new ControlCommandWrapper(serverControlCommandBox.addNewControlCommandBox(thenBlock, boxType));
public ControlCommandWrapper addNewControlCommand(int boxType) {
return new ControlCommandWrapper(serverControlCommandBox.addNewControlCommandBox(boxType));
}
public ControlCommandWrapper addNewControlCommand(boolean thenBlock, int boxType, IServerCommand serverCommandToShift, boolean above) {
return new ControlCommandWrapper(serverControlCommandBox.addNewControlCommandBox(thenBlock, boxType, serverCommandToShift.getServerCommandBox(), above));
public ControlCommandWrapper addNewControlCommand(int boxType, IServerCommand serverCommandToShift, boolean above) {
return new ControlCommandWrapper(serverControlCommandBox.addNewControlCommandBox(boxType, serverCommandToShift.getServerCommandBox(), above));
}
public boolean moveCommand(boolean thenBlock, IServerCommand serverCommandToMove, IServerCommand serverCommandToShift, boolean above) {
return serverControlCommandBox.moveCommandBox(thenBlock, serverCommandToMove.getServerCommandBox(), serverCommandToShift.getServerCommandBox(), above);
public boolean moveCommand(IServerCommand serverCommandToMove, IServerCommand serverCommandToShift, boolean above) {
return serverControlCommandBox.moveCommandBox(serverCommandToMove.getServerCommandBox(), serverCommandToShift.getServerCommandBox(), above);
}
public boolean moveCommandToEnd(boolean thenBlock, IServerCommand serverCommandToMove) {
return serverControlCommandBox.moveCommandBoxToEnd(thenBlock, serverCommandToMove.getServerCommandBox());
public boolean moveCommandToEnd(IServerCommand serverCommandToMove) {
return serverControlCommandBox.moveCommandBoxToEnd(serverCommandToMove.getServerCommandBox());
}
public boolean deleteCommand(boolean thenBlock, IServerCommand serverCommandToDelete) {
return serverControlCommandBox.deleteCommandBox(thenBlock, serverCommandToDelete.getServerCommandBox());
public boolean deleteCommand(IServerCommand serverCommandToDelete) {
return serverControlCommandBox.deleteCommandBox(serverCommandToDelete.getServerCommandBox());
}
public CommandZoneIteratorWrapper iterator(boolean thenBlock) {
return new CommandZoneIteratorWrapper(serverControlCommandBox.getContent(thenBlock));
public CommandZoneIteratorWrapper iterator() {
return new CommandZoneIteratorWrapper(serverControlCommandBox.getContent());
}
public int getDatabaseId() {
......
......@@ -1517,13 +1517,13 @@ public class CommandZoneAccessor {
content.add(new ServerGenericCommandBox(serverId, id));
} else if (boxType == CommandZoneRequests.CommandBoxDescriptor.CommandBoxType.IFTHEN) {
content.add(new ServerControlCommandBox(serverId, id));
content.add(new ServerIfCommandBox(serverId, id));
} else if (boxType == CommandZoneRequests.CommandBoxDescriptor.CommandBoxType.BREAK) {
content.add(new ServerBreakCommandBox(serverId, id));
} else if (boxType == CommandZoneRequests.CommandBoxDescriptor.CommandBoxType.IFTHENELSE) {
content.add(new ServerControlCommandBox(serverId, id));
content.add(new ServerIfCommandBox(serverId, id));
}
}
......@@ -1843,7 +1843,15 @@ public class CommandZoneAccessor {
processError(response.getError(), commandBoxID);
}
else {
return new ServerControlCommandBox(serverId, response.getValue());
if (boxType == ServerControlCommandBox.IF_BOX) {
return new ServerIfCommandBox(serverId, response.getValue());
}
else if (boxType == ServerControlCommandBox.BREAK_BOX) {
return new ServerBreakCommandBox(serverId, response.getValue());
}
else if (boxType == ServerControlCommandBox.IF_ELSE_BOX) {
return new ServerIfCommandBox(serverId, response.getValue());
}
}
}
catch (InvalidProtocolBufferException e) {
......@@ -1880,7 +1888,15 @@ public class CommandZoneAccessor {
processError(response.getError(), commandBoxID);
}
else {
return new ServerControlCommandBox(serverId, response.getValue());
if (boxType == ServerControlCommandBox.IF_BOX) {
return new ServerIfCommandBox(serverId, response.getValue());
}
else if (boxType == ServerControlCommandBox.BREAK_BOX) {
return new ServerBreakCommandBox(serverId, response.getValue());
}
else if (boxType == ServerControlCommandBox.IF_ELSE_BOX) {
return new ServerIfCommandBox(serverId, response.getValue());
}
}
}
catch (InvalidProtocolBufferException e) {
......
......@@ -18,6 +18,7 @@
package fr.ill.ics.nscclient.command;
import java.util.LinkedHashSet;
import java.util.Set;
public class ServerBreakCommandBox extends ServerControlCommandBox {
......@@ -26,76 +27,71 @@ public class ServerBreakCommandBox extends ServerControlCommandBox {
super(serverId, commandBoxId);
}
public int getNumberOfCommandBoxes() {
return 1;
public Set<ServerCommandBox> getContent() {
return new LinkedHashSet<ServerCommandBox>();
}
public Set<ServerCommandBox> getContent(boolean thenBlock) {
// Must never be called.
return null;
}
public ServerAtomicCommandBox addNewAtomicCommandBoxAtEnd(boolean thenBlock, int commandID, boolean isSettings) {
public ServerAtomicCommandBox addNewAtomicCommandBoxAtEnd(int commandID, boolean isSettings) {
// Must never be called.
return null;
}
public ServerAtomicCommandBox addNewAtomicCommandBox(boolean thenBlock, int commandID, boolean isSettings, ServerCommandBox commandBoxToMove, boolean above) {
public ServerAtomicCommandBox addNewAtomicCommandBox(int commandID, boolean isSettings, ServerCommandBox commandBoxToMove, boolean above) {
// Must never be called.
return null;
}
public ServerScanCommandBox addNewScanCommandBoxAtEnd(boolean thenBlock, String scanName) {
public ServerScanCommandBox addNewScanCommandBoxAtEnd(String scanName) {
// Must never be called.
return null;
}
public ServerScanCommandBox addNewScanCommandBox(boolean thenBlock, String scanName, ServerCommandBox commandBoxToMove, boolean above) {
public ServerScanCommandBox addNewScanCommandBox(String scanName, ServerCommandBox commandBoxToMove, boolean above) {
// Must never be called.
return null;
}
public ServerForLoopCommandBox addNewForLoopCommandBoxAtEnd(boolean thenBlock, String variableName) {
public ServerForLoopCommandBox addNewForLoopCommandBoxAtEnd(String variableName) {
// Must never be called.
return null;
}
public ServerForLoopCommandBox addNewForLoopCommandBox(boolean thenBlock, String variableName, ServerCommandBox commandBoxToMove, boolean above) {
public ServerForLoopCommandBox addNewForLoopCommandBox(String variableName, ServerCommandBox commandBoxToMove, boolean above) {
// Must never be called.
return null;
}
public ServerGenericCommandBox addNewGenericCommandBox(boolean thenBlock, int boxType) {
public ServerGenericCommandBox addNewGenericCommandBox(int boxType) {
// Must never be called.
return null;
}
public ServerGenericCommandBox addNewGenericCommandBox(boolean thenBlock, int boxType, ServerCommandBox commandBoxToMove, boolean above) {
public ServerGenericCommandBox addNewGenericCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above) {
// Must never be called.
return null;
}
public ServerControlCommandBox addNewControlCommandBox(boolean thenBlock, int boxType) {
public ServerControlCommandBox addNewControlCommandBox(int boxType) {
// Must never be called.
return null;
}
public ServerControlCommandBox addNewControlCommandBox(boolean thenBlock, int boxType, ServerCommandBox commandBoxToMove, boolean above) {
public ServerControlCommandBox addNewControlCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above) {
// Must never be called.
return null;
}
public boolean moveCommandBox(boolean thenBlock, ServerCommandBox commandBoxToMove, ServerCommandBox commandBoxToShift, boolean above) {
public boolean moveCommandBox(ServerCommandBox commandBoxToMove, ServerCommandBox commandBoxToShift, boolean above) {
// Must never be called.
return false;
}
public boolean moveCommandBoxToEnd(boolean thenBlock, ServerCommandBox commandBoxToMove) {
public boolean moveCommandBoxToEnd(ServerCommandBox commandBoxToMove) {
// Must never be called.
return false;
}
public boolean deleteCommandBox(boolean thenBlock, ServerCommandBox commandBoxToDelete) {
public boolean deleteCommandBox(ServerCommandBox commandBoxToDelete) {
// Must never be called.
return false;
}
......
......@@ -26,7 +26,7 @@ import fr.ill.ics.nscclient.command.CommandZoneAccessor.InvalidExpressionExcepti
public class ServerControlCommandBox extends ServerCommandBox {
public abstract class ServerControlCommandBox extends ServerCommandBox {
public final static int IF_BOX = 0;
public final static int BREAK_BOX = 1;
......@@ -40,20 +40,20 @@ public class ServerControlCommandBox extends ServerCommandBox {
boxType = CommandZoneAccessor.getInstance(serverId).getBoxType(commandBoxId);
}
private CommandZoneAccessor.ContainerType getContainerType() {
switch (boxType) {
case IF_BOX:
return CommandZoneAccessor.ContainerType.IFTHEN;
case BREAK_BOX:
return CommandZoneAccessor.ContainerType.BREAK;
case IF_ELSE_BOX:
return CommandZoneAccessor.ContainerType.IFELSE;
}
return CommandZoneAccessor.ContainerType.IFTHEN;
}
// private CommandZoneAccessor.ContainerType getContainerType() {
//
// switch (boxType) {
//
// case IF_BOX:
// return CommandZoneAccessor.ContainerType.IFTHEN;
// case BREAK_BOX:
// return CommandZoneAccessor.ContainerType.BREAK;
// case IF_ELSE_BOX:
// return CommandZoneAccessor.ContainerType.IFELSE;
// }
//
// return CommandZoneAccessor.ContainerType.IFTHEN;
// }
public void setExpression(String expression) throws InvalidExpressionException {
ExpressionResult result = CommandZoneAccessor.getInstance(serverId).setExpression(commandBoxId, expression);
......@@ -67,73 +67,41 @@ public class ServerControlCommandBox extends ServerCommandBox {
return boxType;
}
public Set<ServerCommandBox> getContent(boolean thenBlock) {
return CommandZoneAccessor.getInstance(serverId).getContent(getContainerType(), commandBoxId);
}
public abstract Set<ServerCommandBox> getContent();
public ServerAtomicCommandBox addNewAtomicCommandBoxAtEnd(boolean thenBlock, int commandID, boolean isSettings) {
return CommandZoneAccessor.getInstance(serverId).addNewAtomicCommandBoxAtEnd(getContainerType(), commandBoxId, commandID, isSettings);
}
public abstract ServerAtomicCommandBox addNewAtomicCommandBoxAtEnd(int commandID, boolean isSettings);
public ServerAtomicCommandBox addNewAtomicCommandBox(boolean thenBlock, int commandID, boolean isSettings, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewAtomicCommandBox(getContainerType(), commandBoxId, commandID, isSettings, commandBoxToMove.getId(), above);
}
public abstract ServerAtomicCommandBox addNewAtomicCommandBox(int commandID, boolean isSettings, ServerCommandBox commandBoxToMove, boolean above);
public ServerScanCommandBox addNewScanCommandBoxAtEnd(boolean thenBlock, String scanName) {
return CommandZoneAccessor.getInstance(serverId).addNewScanCommandBoxAtEnd(getContainerType(), commandBoxId, scanName);
}
public abstract ServerScanCommandBox addNewScanCommandBoxAtEnd(String scanName);
public ServerScanCommandBox addNewScanCommandBox(boolean thenBlock, String scanName, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewScanCommandBox(getContainerType(), commandBoxId, scanName, commandBoxToMove.getId(), above);
}
public abstract ServerScanCommandBox addNewScanCommandBox(String scanName, ServerCommandBox commandBoxToMove, boolean above);
public ServerForLoopCommandBox addNewForLoopCommandBoxAtEnd(boolean thenBlock, String variableName) {
return CommandZoneAccessor.getInstance(serverId).addNewForLoopCommandBoxAtEnd(getContainerType(), commandBoxId, variableName);
}
public abstract ServerForLoopCommandBox addNewForLoopCommandBoxAtEnd(String variableName);
public ServerForLoopCommandBox addNewForLoopCommandBox(boolean thenBlock, String variableName, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewForLoopCommandBox(getContainerType(), commandBoxId, variableName, commandBoxToMove.getId(), above);
}
public abstract ServerForLoopCommandBox addNewForLoopCommandBox(String variableName, ServerCommandBox commandBoxToMove, boolean above);
public ServerGenericCommandBox addNewGenericCommandBox(boolean thenBlock, int boxType) {
return CommandZoneAccessor.getInstance(serverId).addNewGenericCommandBoxAtEnd(getContainerType(), commandBoxId, boxType);
}
public abstract ServerGenericCommandBox addNewGenericCommandBox(int boxType);
public ServerGenericCommandBox addNewGenericCommandBox(boolean thenBlock, int boxType, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewGenericCommandBox(getContainerType(), commandBoxId, boxType, commandBoxToMove.getId(), above);
}
public abstract ServerGenericCommandBox addNewGenericCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above);
public ServerControlCommandBox addNewControlCommandBox(boolean thenBlock, int boxType) {
return CommandZoneAccessor.getInstance(serverId).addNewControlCommandBoxAtEnd(getContainerType(), commandBoxId, boxType);
}
public abstract ServerControlCommandBox addNewControlCommandBox(int boxType);
public ServerControlCommandBox addNewControlCommandBox(boolean thenBlock, int boxType, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewControlCommandBox(getContainerType(), commandBoxId, boxType, commandBoxToMove.getId(), above);
}
public abstract ServerControlCommandBox addNewControlCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above);
public boolean moveCommandBox(boolean thenBlock, ServerCommandBox commandBoxToMove, ServerCommandBox commandBoxToShift, boolean above) {
return CommandZoneAccessor.getInstance(serverId).moveCommandBox(getContainerType(), commandBoxId, commandBoxToMove.getId(), commandBoxToShift.getId(), above);
}
public abstract boolean moveCommandBox(ServerCommandBox commandBoxToMove, ServerCommandBox commandBoxToShift, boolean above);
public boolean moveCommandBoxToEnd(boolean thenBlock, ServerCommandBox commandBoxToMove) {
return CommandZoneAccessor.getInstance(serverId).moveCommandBoxToEnd(getContainerType(), commandBoxId, commandBoxToMove.getId());
}
public abstract boolean moveCommandBoxToEnd(ServerCommandBox commandBoxToMove);
public boolean deleteCommandBox(boolean thenBlock, ServerCommandBox commandBoxToDelete) {
return CommandZoneAccessor.getInstance(serverId).deleteCommandBox(getContainerType(), commandBoxId, commandBoxToDelete.getId());
}
public abstract boolean deleteCommandBox(ServerCommandBox commandBoxToDelete);
public int getNumberOfCommandBoxes() {
int nbCommandBoxes = 0;
Iterator<ServerCommandBox> it = getContent(true).iterator();
Iterator<ServerCommandBox> it = getContent().iterator();
while (it.hasNext()) {
nbCommandBoxes = nbCommandBoxes + it.next().getNumberOfCommandBoxes();
}
it = getContent(false).iterator();
while (it.hasNext()) {
nbCommandBoxes = nbCommandBoxes + it.next().getNumberOfCommandBoxes();
}
return 1 + nbCommandBoxes;
}
......
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.command;
import java.util.Set;
public class ServerIfCommandBox extends ServerControlCommandBox {
public ServerIfCommandBox(String serverId, int commandBoxId) {
super(serverId, commandBoxId);
}
public Set<ServerCommandBox> getContent() {
return CommandZoneAccessor.getInstance(serverId).getContent(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId);
}
public ServerAtomicCommandBox addNewAtomicCommandBoxAtEnd(int commandID, boolean isSettings) {
return CommandZoneAccessor.getInstance(serverId).addNewAtomicCommandBoxAtEnd(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, commandID, isSettings);
}
public ServerAtomicCommandBox addNewAtomicCommandBox(int commandID, boolean isSettings, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewAtomicCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, commandID, isSettings, commandBoxToMove.getId(), above);
}
public ServerScanCommandBox addNewScanCommandBoxAtEnd(String scanName) {
return CommandZoneAccessor.getInstance(serverId).addNewScanCommandBoxAtEnd(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, scanName);
}
public ServerScanCommandBox addNewScanCommandBox(String scanName, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewScanCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, scanName, commandBoxToMove.getId(), above);
}
public ServerForLoopCommandBox addNewForLoopCommandBoxAtEnd(String variableName) {
return CommandZoneAccessor.getInstance(serverId).addNewForLoopCommandBoxAtEnd(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, variableName);
}
public ServerForLoopCommandBox addNewForLoopCommandBox(String variableName, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewForLoopCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, variableName, commandBoxToMove.getId(), above);
}
public ServerGenericCommandBox addNewGenericCommandBox(int boxType) {
return CommandZoneAccessor.getInstance(serverId).addNewGenericCommandBoxAtEnd(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, boxType);
}
public ServerGenericCommandBox addNewGenericCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewGenericCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, boxType, commandBoxToMove.getId(), above);
}
public ServerControlCommandBox addNewControlCommandBox(int boxType) {
return CommandZoneAccessor.getInstance(serverId).addNewControlCommandBoxAtEnd(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, boxType);
}
public ServerControlCommandBox addNewControlCommandBox(int boxType, ServerCommandBox commandBoxToMove, boolean above) {
return CommandZoneAccessor.getInstance(serverId).addNewControlCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, boxType, commandBoxToMove.getId(), above);
}
public boolean moveCommandBox(ServerCommandBox commandBoxToMove, ServerCommandBox commandBoxToShift, boolean above) {
return CommandZoneAccessor.getInstance(serverId).moveCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, commandBoxToMove.getId(), commandBoxToShift.getId(), above);
}
public boolean moveCommandBoxToEnd(ServerCommandBox commandBoxToMove) {
return CommandZoneAccessor.getInstance(serverId).moveCommandBoxToEnd(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, commandBoxToMove.getId());
}
public boolean deleteCommandBox(ServerCommandBox commandBoxToDelete) {
return CommandZoneAccessor.getInstance(serverId).deleteCommandBox(CommandZoneAccessor.ContainerType.IFTHEN, commandBoxId, commandBoxToDelete.getId());
}
}
\ No newline at end of file
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