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
4c8a7824
Commit
4c8a7824
authored
Jun 18, 2015
by
helene ortiz
Browse files
Changes for NomadServerGUI
parent
2c6e94e2
Changes
2
Show whitespace changes
Inline
Side-by-side
src/fr/ill/ics/core/property/PropertyManager.java
View file @
4c8a7824
...
...
@@ -792,8 +792,8 @@ public class PropertyManager {
/**
* Returns a sorted set containing all property names for given controller.
* @param controller
Typ
e controller
typ
e
* @return a set containing all property names for given controller
typ
e
* @param controller
Nam
e controller
nam
e
* @return a set containing all property names for given controller
nam
e
*/
public
Set
<
String
>
getPropertiesForController
(
String
controllerName
)
{
int
servantId
=
ServantDatabase
.
getInstance
().
getServantId
(
controllerName
);
...
...
@@ -809,6 +809,25 @@ public class PropertyManager {
return
properties
;
}
/**
* Returns a sorted set containing all dynamic property names for given controller.
* @param controllerName controller name
* @return a set containing all dynamic property names for given controller name
*/
public
Set
<
String
>
getDynamicPropertiesForController
(
String
controllerName
)
{
int
servantId
=
ServantDatabase
.
getInstance
().
getServantId
(
controllerName
);
SortedSet
<
String
>
properties
=
new
TreeSet
<
String
>();
Map
<
String
,
String
>
namesAndTypes
=
PropertyDatabase
.
getInstance
().
getDynamicPropertyNamesAndTypes
(
servantId
);
if
(
namesAndTypes
!=
null
)
{
properties
.
addAll
(
namesAndTypes
.
keySet
());
}
else
{
System
.
out
.
println
(
"property map has no entries for "
+
controllerName
);
}
return
properties
;
}
/**
*
* @param controller
...
...
src/fr/ill/ics/nscclient/dataprovider/PropertyDatabase.java
View file @
4c8a7824
...
...
@@ -113,8 +113,8 @@ public class PropertyDatabase {
spyPropertiesByServant
.
get
(
servantId
).
add
(
descriptor
);
// System.out.println("spy property for servant " + servantId);
// System.out.println(descriptor);
// System.out.println("spy property for servant " + servantId);
// System.out.println(descriptor);
}
/**
...
...
@@ -168,6 +168,26 @@ public class PropertyDatabase {
}
/**
*
* @param servantId
* @return
*/
public
Map
<
String
,
String
>
getDynamicPropertyNamesAndTypes
(
int
servantId
)
{
Map
<
String
,
String
>
namesAndTypes
=
new
HashMap
<
String
,
String
>();
Set
<
DynamicPropertyDescriptor
>
propertyDescriptors
=
dynamicPropertiesByServant
.
get
(
servantId
);
if
(
propertyDescriptors
!=
null
)
{
Iterator
<
DynamicPropertyDescriptor
>
it
=
propertyDescriptors
.
iterator
();
while
(
it
.
hasNext
())
{
DynamicPropertyDescriptor
descriptor
=
it
.
next
();
namesAndTypes
.
put
(
descriptor
.
getName
(),
descriptor
.
getType
());
}
}
return
namesAndTypes
;
}
/**
*
* @param id
...
...
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