* @param socket Socket
* @return The new parameter
*/
private NodeParam createNodeParam(String name, String displayName, String description, String systemTypeName, boolean visible, boolean optional, NodeSocket socket)
{
NodeParam param = new NodeParamImpl();
param.setName(name);
param.setDisplayName(displayName);
param.setDescription(description);
ModelQualifier typeQualifier = new ModelQualifier(CoreConstants.SYSTEM_MODEL_NAME, systemTypeName, ItemTypes.TYPE, null);
DataTypeItem dataType = null;
try
{
dataType = (DataTypeItem) ModelConnector.getInstance().getItemByQualifier(typeQualifier, true);
}
catch (ModelException e)
{
ExceptionUtil.printTrace(e);
return null;
}
param.setDataType(dataType);
param.setTypeName(systemTypeName);
param.setVisible(visible);
param.setOptional(optional);
if (socket != null)
{
socket.addParam(param);
}