//
// FlowStepPropDel.java - Delete message property, or all properties
//

package nyangau.jmsadapter;

//...simports:0:
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
import javax.jms.JMSException;
//...e

public class FlowStepPropDel extends FlowStep
  {
  protected String prop;
//...sFlowStepPropDel:2:
public FlowStepPropDel(Node eStep)
  throws FlowProcessorException
  {
  super(eStep);
  NamedNodeMap nnmStep = eStep.getAttributes();
  Node aProp = nnmStep.getNamedItem("prop");
  prop = ( aProp != null ) ? aProp.getNodeValue() : null;
  }
//...e
//...sprocess:2:
public void process(FlowContext c)
  throws FlowProcessorException, JMSException
  {
  JmsaMessage m = c.getMessage();
  if ( prop != null )
    m.clearProperty(prop);
  else
    m.clearProperties();
  }
//...e
  }
