Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
2aaa816d
Commit
2aaa816d
authored
Feb 28, 2017
by
yannick legoc
Browse files
Replaced corba control command box accessor.
parent
6fab618d
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
2aaa816d
...
...
@@ -208,11 +208,6 @@
<arg
line=
"${idlFlags} ${idlCoreDir}/commandzone/ForLoopCommandBoxAccessor.idl"
/>
</exec>
<echo
message=
"Generating ControlCommandBoxAccessor.java"
/>
<exec
executable=
"idl"
>
<arg
line=
"${idlFlags} ${idlCoreDir}/commandzone/ControlCommandBoxAccessor.idl"
/>
</exec>
<echo
message=
"Generating CommandBoxDescriptor.java"
/>
<exec
executable=
"idl"
>
<arg
line=
"${idlFlags} ${idlCoreDir}/commandzone/CommandBoxDescriptor.idl"
/>
...
...
src/main/java/fr/ill/ics/bridge/command/ControlCommandWrapper.java
View file @
2aaa816d
...
...
@@ -18,7 +18,7 @@
package
fr.ill.ics.bridge.command
;
import
fr.ill.ics.nscclient.command.
Control
Command
Box
Accessor
Proxy
.InvalidExpressionException
;
import
fr.ill.ics.nscclient.command.Command
Zone
Accessor.InvalidExpressionException
;
import
fr.ill.ics.nscclient.command.ServerControlCommandBox
;
import
fr.ill.ics.nscclient.dataprovider.CommandDatabase
;
import
fr.ill.ics.nscclient.dataprovider.ServantDatabase
;
...
...
src/main/java/fr/ill/ics/nscclient/command/CommandZoneAccessor.java
View file @
2aaa816d
This diff is collapsed.
Click to expand it.
src/main/java/fr/ill/ics/nscclient/command/ControlCommandBoxAccessorProxy.java
deleted
100644 → 0
View file @
6fab618d
/*
* 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.HashMap
;
import
java.util.LinkedHashSet
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
fr.ill.ics.nomadserver.common.ListItem
;
import
fr.ill.ics.nomadserver.common.ListIterator
;
import
fr.ill.ics.nomadserver.core.commandzone.CommandBoxDescriptor
;
import
fr.ill.ics.nomadserver.core.commandzone.CommandBoxDescriptorHelper
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessor
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessorHelper
;
import
fr.ill.ics.nomadserver.core.commandzone.CommandBoxDescriptorPackage.CommandBoxType
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessorPackage.BadCommandBoxTypeException
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessorPackage.CommandBoxForbiddenException
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessorPackage.CommandBoxNotFoundException
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessorPackage.CommandListCreationException
;
import
fr.ill.ics.nomadserver.core.commandzone.ControlCommandBoxAccessorPackage.NoSuchCommandException
;
import
fr.ill.ics.nscclient.corbabase.CorbaNamingService
;
public
class
ControlCommandBoxAccessorProxy
{
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
ControlCommandBoxAccessorProxy
.
class
.
getName
());
private
String
serverId
;
private
ControlCommandBoxAccessor
controlCommandBoxAccessor
;
private
static
Map
<
String
,
ControlCommandBoxAccessorProxy
>
instances
=
new
HashMap
<
String
,
ControlCommandBoxAccessorProxy
>();
public
class
InvalidExpressionException
extends
Exception
{
private
String
message
;
public
InvalidExpressionException
(
String
message
)
{
this
.
message
=
message
;
}
public
String
getMessage
()
{
return
message
;
}
};
private
ControlCommandBoxAccessorProxy
(
String
serverId
)
{
this
.
serverId
=
serverId
;
}
public
static
ControlCommandBoxAccessorProxy
getInstance
(
String
serverId
)
{
if
(!
instances
.
containsKey
(
serverId
))
{
ControlCommandBoxAccessorProxy
instance
=
new
ControlCommandBoxAccessorProxy
(
serverId
);
instances
.
put
(
serverId
,
instance
);
}
return
instances
.
get
(
serverId
);
}
public
void
init
()
{
try
{
String
contextName
=
"NomadServer"
;
if
(!
serverId
.
equals
(
"real"
))
{
contextName
+=
serverId
;
}
org
.
omg
.
CORBA
.
Object
corbaObj
=
CorbaNamingService
.
getInstance
().
resolveObject
(
contextName
,
"Core"
,
"controlCommandBoxAccessor"
);
controlCommandBoxAccessor
=
ControlCommandBoxAccessorHelper
.
narrow
(
corbaObj
);
}
catch
(
CorbaNamingService
.
CORBAResolveFailureException
rfe
)
{
System
.
err
.
println
(
"Unable to obtain ControlCommandBoxAccessor from Naming Service"
);
}
catch
(
org
.
omg
.
CORBA
.
SystemException
e
)
{
System
.
err
.
println
(
"Unable to obtain ControlCommandBoxAccessor from Naming Service"
);
}
}
public
void
verifyExpression
(
String
expression
)
throws
InvalidExpressionException
{
try
{
controlCommandBoxAccessor
.
verifyExpression
(
expression
);
}
catch
(
fr
.
ill
.
ics
.
nomadserver
.
core
.
commandzone
.
ControlCommandBoxAccessorPackage
.
InvalidExpressionException
e
)
{
throw
new
InvalidExpressionException
(
e
.
message
);
}
}
public
void
setExpression
(
int
commandBoxID
,
String
expression
)
throws
InvalidExpressionException
{
try
{
controlCommandBoxAccessor
.
setExpression
(
commandBoxID
,
expression
);
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
fr
.
ill
.
ics
.
nomadserver
.
core
.
commandzone
.
ControlCommandBoxAccessorPackage
.
InvalidExpressionException
e
)
{
throw
new
InvalidExpressionException
(
e
.
message
);
}
}
public
String
getExpression
(
int
commandBoxID
)
{
try
{
return
controlCommandBoxAccessor
.
getExpression
(
commandBoxID
);
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
int
getBoxType
(
int
commandBoxID
)
{
try
{
return
controlCommandBoxAccessor
.
getBoxType
(
commandBoxID
);
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
0
;
}
public
Set
<
ServerCommandBox
>
getContent
(
boolean
thenBlock
,
int
commandBoxId
)
{
Set
<
ServerCommandBox
>
content
=
new
LinkedHashSet
<
ServerCommandBox
>();
try
{
ListIterator
iterator
=
controlCommandBoxAccessor
.
getCommandListIterator
(
thenBlock
,
commandBoxId
);
// iterate over the list and create a new non-corba ServantDescriptor for each item
while
(
iterator
.
hasNext
())
{
ListItem
item
=
iterator
.
next
();
CommandBoxDescriptor
commandBoxDescriptor
=
CommandBoxDescriptorHelper
.
narrow
(
item
);
int
id
=
commandBoxDescriptor
.
getCommandBoxID
();
CommandBoxType
type
=
commandBoxDescriptor
.
getType
();
if
(
type
==
CommandBoxType
.
ATOMIC
)
{
content
.
add
(
new
ServerAtomicCommandBox
(
serverId
,
id
));
}
else
if
(
type
==
CommandBoxType
.
SCAN
)
{
content
.
add
(
new
ServerScanCommandBox
(
serverId
,
id
));
}
else
if
(
type
==
CommandBoxType
.
FOR_LOOP
)
{
content
.
add
(
new
ServerForLoopCommandBox
(
serverId
,
id
));
}
else
if
(
type
==
CommandBoxType
.
GENERIC
)
{
content
.
add
(
new
ServerGenericCommandBox
(
serverId
,
id
));
}
else
if
(
type
==
CommandBoxType
.
CONTROL
)
{
content
.
add
(
new
ServerControlCommandBox
(
serverId
,
id
));
}
}
// release the corba object
iterator
.
releaseIterator
();
}
catch
(
CommandListCreationException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandListCreationException occured while getting command box descriptors for ForLoopCommandBox "
+
commandBoxId
);
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured while getting command box descriptors for ForLoopCommandBox "
+
commandBoxId
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured while getting command box descriptors for ForLoopCommandBox "
+
commandBoxId
);
}
return
content
;
}
public
ServerAtomicCommandBox
addNewAtomicCommandBoxAtEnd
(
boolean
thenBlock
,
int
commandBoxID
,
int
commandID
,
boolean
isSettings
)
{
try
{
return
new
ServerAtomicCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewAtomicCommandBoxAtEnd
(
thenBlock
,
commandBoxID
,
commandID
,
isSettings
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
NoSuchCommandException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"NoSuchCommandException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerAtomicCommandBox
addNewAtomicCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
int
commandID
,
boolean
isSettings
,
int
commandBoxIDToMove
,
boolean
above
)
{
try
{
return
new
ServerAtomicCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewAtomicCommandBox
(
thenBlock
,
commandBoxID
,
commandID
,
isSettings
,
commandBoxIDToMove
,
above
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
NoSuchCommandException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"NoSuchCommandException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerScanCommandBox
addNewScanCommandBoxAtEnd
(
boolean
thenBlock
,
int
commandBoxID
,
String
scanName
)
{
try
{
return
new
ServerScanCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewScanCommandBoxAtEnd
(
thenBlock
,
commandBoxID
,
scanName
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ForLoopCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ForLoopCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerScanCommandBox
addNewScanCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
String
scanName
,
int
commandBoxIDToMove
,
boolean
above
)
{
try
{
return
new
ServerScanCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewScanCommandBox
(
thenBlock
,
commandBoxID
,
scanName
,
commandBoxIDToMove
,
above
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerForLoopCommandBox
addNewForLoopCommandBoxAtEnd
(
boolean
thenBlock
,
int
commandBoxID
,
String
variableName
)
{
try
{
return
new
ServerForLoopCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewForLoopCommandBoxAtEnd
(
thenBlock
,
commandBoxID
,
variableName
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerForLoopCommandBox
addNewForLoopCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
String
variableName
,
int
commandBoxIDToMove
,
boolean
above
)
{
try
{
return
new
ServerForLoopCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewForLoopCommandBox
(
thenBlock
,
commandBoxID
,
variableName
,
commandBoxIDToMove
,
above
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerGenericCommandBox
addNewGenericCommandBox
(
boolean
thenBlock
,
int
commandBoxId
,
int
boxType
)
{
try
{
return
new
ServerGenericCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewGenericCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
boxType
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxId
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxId
);
}
return
null
;
}
public
ServerGenericCommandBox
addNewGenericCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
int
boxType
,
int
commandBoxIDToMove
,
boolean
above
)
{
try
{
return
new
ServerGenericCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewGenericCommandBox
(
thenBlock
,
commandBoxID
,
boxType
,
commandBoxIDToMove
,
above
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
null
;
}
public
ServerControlCommandBox
addNewControlCommandBox
(
boolean
thenBlock
,
int
commandBoxId
,
int
boxType
)
{
try
{
return
new
ServerControlCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewControlCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
boxType
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxId
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxId
);
}
catch
(
CommandBoxForbiddenException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
public
ServerControlCommandBox
addNewControlCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
int
boxType
,
int
commandBoxIDToMove
,
boolean
above
)
{
try
{
return
new
ServerControlCommandBox
(
serverId
,
controlCommandBoxAccessor
.
addNewControlCommandBox
(
thenBlock
,
commandBoxID
,
boxType
,
commandBoxIDToMove
,
above
));
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxForbiddenException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
public
boolean
moveCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
int
commandBoxIDToMove
,
int
commandBoxIDToShift
,
boolean
above
)
{
try
{
controlCommandBoxAccessor
.
moveCommandBox
(
thenBlock
,
commandBoxID
,
commandBoxIDToMove
,
commandBoxIDToShift
,
above
);
return
true
;
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxForbiddenException
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
public
boolean
moveCommandBoxToEnd
(
boolean
thenBlock
,
int
commandBoxID
,
int
commandBoxIDToMove
)
{
try
{
controlCommandBoxAccessor
.
moveCommandBoxToEnd
(
thenBlock
,
commandBoxID
,
commandBoxIDToMove
);
return
true
;
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxForbiddenException
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
public
boolean
deleteCommandBox
(
boolean
thenBlock
,
int
commandBoxID
,
int
commandBoxIDToDelete
)
{
try
{
controlCommandBoxAccessor
.
deleteCommandBox
(
thenBlock
,
commandBoxID
,
commandBoxIDToDelete
);
return
true
;
}
catch
(
BadCommandBoxTypeException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"BadCommandBoxTypeException occured for ControlCommandBox "
+
commandBoxID
);
}
catch
(
CommandBoxNotFoundException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"CommandBoxNotFoundException occured for ControlCommandBox "
+
commandBoxID
);
}
return
false
;
}
}
\ No newline at end of file
src/main/java/fr/ill/ics/nscclient/command/ServerControlCommandBox.java
View file @
2aaa816d
...
...
@@ -21,7 +21,7 @@ package fr.ill.ics.nscclient.command;
import
java.util.Iterator
;
import
java.util.Set
;
import
fr.ill.ics.nscclient.command.
Control
Command
Box
Accessor
Proxy
.InvalidExpressionException
;
import
fr.ill.ics.nscclient.command.Command
Zone
Accessor.InvalidExpressionException
;
...
...
@@ -32,71 +32,71 @@ public class ServerControlCommandBox extends ServerCommandBox {
}
public
void
setExpression
(
String
expression
)
throws
InvalidExpressionException
{
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
setExpression
(
commandBoxId
,
expression
);
Command
Zone
Accessor
.
getInstance
(
serverId
).
setExpression
(
commandBoxId
,
expression
);
}
public
String
getExpression
()
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
getExpression
(
commandBoxId
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
getExpression
(
commandBoxId
);
}
public
int
getBoxType
()
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
getBoxType
(
commandBoxId
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
getBoxType
(
commandBoxId
);
}
public
Set
<
ServerCommandBox
>
getContent
(
boolean
thenBlock
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
getContent
(
thenBlock
,
commandBoxId
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
getContent
(
thenBlock
,
commandBoxId
);
}
public
ServerAtomicCommandBox
addNewAtomicCommandBoxAtEnd
(
boolean
thenBlock
,
int
commandID
,
boolean
isSettings
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewAtomicCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
commandID
,
isSettings
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewAtomicCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
commandID
,
isSettings
);
}
public
ServerAtomicCommandBox
addNewAtomicCommandBox
(
boolean
thenBlock
,
int
commandID
,
boolean
isSettings
,
ServerCommandBox
commandBoxToMove
,
boolean
above
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewAtomicCommandBox
(
thenBlock
,
commandBoxId
,
commandID
,
isSettings
,
commandBoxToMove
.
getId
(),
above
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewAtomicCommandBox
(
thenBlock
,
commandBoxId
,
commandID
,
isSettings
,
commandBoxToMove
.
getId
(),
above
);
}
public
ServerScanCommandBox
addNewScanCommandBoxAtEnd
(
boolean
thenBlock
,
String
scanName
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewScanCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
scanName
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewScanCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
scanName
);
}
public
ServerScanCommandBox
addNewScanCommandBox
(
boolean
thenBlock
,
String
scanName
,
ServerCommandBox
commandBoxToMove
,
boolean
above
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewScanCommandBox
(
thenBlock
,
commandBoxId
,
scanName
,
commandBoxToMove
.
getId
(),
above
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewScanCommandBox
(
thenBlock
,
commandBoxId
,
scanName
,
commandBoxToMove
.
getId
(),
above
);
}
public
ServerForLoopCommandBox
addNewForLoopCommandBoxAtEnd
(
boolean
thenBlock
,
String
variableName
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewForLoopCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
variableName
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewForLoopCommandBoxAtEnd
(
thenBlock
,
commandBoxId
,
variableName
);
}
public
ServerForLoopCommandBox
addNewForLoopCommandBox
(
boolean
thenBlock
,
String
variableName
,
ServerCommandBox
commandBoxToMove
,
boolean
above
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewForLoopCommandBox
(
thenBlock
,
commandBoxId
,
variableName
,
commandBoxToMove
.
getId
(),
above
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewForLoopCommandBox
(
thenBlock
,
commandBoxId
,
variableName
,
commandBoxToMove
.
getId
(),
above
);
}
public
ServerGenericCommandBox
addNewGenericCommandBox
(
boolean
thenBlock
,
int
boxType
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewGenericCommandBox
(
thenBlock
,
commandBoxId
,
boxType
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewGenericCommandBox
(
thenBlock
,
commandBoxId
,
boxType
);
}
public
ServerGenericCommandBox
addNewGenericCommandBox
(
boolean
thenBlock
,
int
boxType
,
ServerCommandBox
commandBoxToMove
,
boolean
above
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewGenericCommandBox
(
thenBlock
,
commandBoxId
,
boxType
,
commandBoxToMove
.
getId
(),
above
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewGenericCommandBox
(
thenBlock
,
commandBoxId
,
boxType
,
commandBoxToMove
.
getId
(),
above
);
}
public
ServerControlCommandBox
addNewControlCommandBox
(
boolean
thenBlock
,
int
boxType
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewControlCommandBox
(
thenBlock
,
commandBoxId
,
boxType
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewControlCommandBox
(
thenBlock
,
commandBoxId
,
boxType
);
}
public
ServerControlCommandBox
addNewControlCommandBox
(
boolean
thenBlock
,
int
boxType
,
ServerCommandBox
commandBoxToMove
,
boolean
above
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
addNewControlCommandBox
(
thenBlock
,
commandBoxId
,
boxType
,
commandBoxToMove
.
getId
(),
above
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
addNewControlCommandBox
(
thenBlock
,
commandBoxId
,
boxType
,
commandBoxToMove
.
getId
(),
above
);
}
public
boolean
moveCommandBox
(
boolean
thenBlock
,
ServerCommandBox
commandBoxToMove
,
ServerCommandBox
commandBoxToShift
,
boolean
above
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
moveCommandBox
(
thenBlock
,
commandBoxId
,
commandBoxToMove
.
getId
(),
commandBoxToShift
.
getId
(),
above
);
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
moveCommandBox
(
thenBlock
,
commandBoxId
,
commandBoxToMove
.
getId
(),
commandBoxToShift
.
getId
(),
above
);
}
public
boolean
moveCommandBoxToEnd
(
boolean
thenBlock
,
ServerCommandBox
commandBoxToMove
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
moveCommandBoxToEnd
(
thenBlock
,
commandBoxId
,
commandBoxToMove
.
getId
());
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
moveCommandBoxToEnd
(
thenBlock
,
commandBoxId
,
commandBoxToMove
.
getId
());
}
public
boolean
deleteCommandBox
(
boolean
thenBlock
,
ServerCommandBox
commandBoxToDelete
)
{
return
Control
Command
Box
Accessor
Proxy
.
getInstance
(
serverId
).
deleteCommandBox
(
thenBlock
,
commandBoxId
,
commandBoxToDelete
.
getId
());
return
Command
Zone
Accessor
.
getInstance
(
serverId
).
deleteCommandBox
(
thenBlock
,
commandBoxId
,
commandBoxToDelete
.
getId
());
}
public
int
getNumberOfCommandBoxes
()
{
...
...
src/main/java/fr/ill/ics/nscclient/sessionmanagement/ServerSessionManager.java
View file @
2aaa816d
...
...
@@ -27,7 +27,6 @@ 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.command.ControlCommandBoxAccessorProxy
;
import
fr.ill.ics.nscclient.command.ForLoopCommandBoxAccessorProxy
;
import
fr.ill.ics.nscclient.command.ScanCommandBoxAccessorProxy
;
import
fr.ill.ics.nscclient.commandline.CommandLineAccessor
;
...
...
@@ -75,7 +74,6 @@ public class ServerSessionManager {
CommandZoneAccessor
.
getInstance
(
serverId
).
init
();
ScanCommandBoxAccessorProxy
.
getInstance
(
serverId
).
init
();
ForLoopCommandBoxAccessorProxy
.
getInstance
(
serverId
).
init
();
ControlCommandBoxAccessorProxy
.
getInstance
(
serverId
).
init
();
ServerCommandZoneEventManager
.
getInstance
(
serverId
).
init
();
ConditionManagerAccessor
.
getInstance
(
serverId
).
init
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment