Package er.rest.format

Source Code of er.rest.format.ERXFormRestParser

package er.rest.format;

import er.rest.ERXRestContext;
import er.rest.ERXRestRequestNode;
import er.rest.format.ERXRestFormat.Delegate;

/**
* ERXFormRestParser is a rest parser that reads data from form values.
*
* @author mschrag
*/
public class ERXFormRestParser implements IERXRestParser {
  public ERXRestRequestNode parseRestRequest(IERXRestRequest request, Delegate delegate, ERXRestContext context) {
    ERXRestRequestNode rootNode = new ERXRestRequestNode();
    for (String keyPath : request.keyNames()) {
      rootNode.takeValueForKeyPath(request.objectForKey(keyPath), keyPath);
    }
    return rootNode;
  }

}
TOP

Related Classes of er.rest.format.ERXFormRestParser

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.