UnmarshallingContext context) {
String identifier = null;
boolean out = false;
String outIdentifier = null;
Object object = null;
SetGlobalCommand cmd = new SetGlobalCommand();
while ( reader.hasMoreChildren() ) {
reader.moveDown();
String nodeName = reader.getNodeName();
if ( "identifier".equals( nodeName ) ) {
identifier = reader.getValue();
} else if ( "out".equals( nodeName ) ) {
out = Boolean.valueOf(reader.getValue());
} else if ( "out-identifier".equals( nodeName ) ) {
outIdentifier = reader.getValue();
} else if ( "object".equals( nodeName ) ) {
cmd.setObject( readValue( reader,
context,
cmd.getObject(),
"object" ) );
}
reader.moveUp();
}
cmd.setIdentifier( identifier );
if ( outIdentifier != null ) {
cmd.setOutIdentifier( outIdentifier );
} else if (out) {
cmd.setOutIdentifier( identifier );
}
return cmd;
}