When using the web services, nodeIDString
needs to be parsed into the correct
type to get the nodeID when it is not
one of the preset Node types.
Change-Id: Ic55b440e0a5a951f9f8c6c167e1e1bcfa8c3b107
Signed-off-by: Kalvin Hom <kahom@cisco.com>
} else if (typeStr.equals(NodeIDType.PRODUCTION)) {
this.nodeID = IDStr;
} else {
- // We need to lookup via OSGi service registry for an
- // handler for this
+ //Use plugin's method to get appropriate conversion from IDStr to nodeID
+ INodeFactory f = (INodeFactory) ServiceHelper
+ .getGlobalInstance(INodeFactory.class, new Node(), "(protocolName="+typeStr+")");
+ if(f!=null){
+ Node n = f.fromString(typeStr, IDStr);
+ this.nodeID = n.nodeID;
+ }
}
}