All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sencha.gxt.data.shared.writer.DataWriter Maven / Gradle / Ivy

There is a newer version: 3.1.1
Show newest version
package com.sencha.gxt.data.shared.writer;

/**
 * Data writers are a simple abstraction to turn logical objects into a format
 * that can more easily be sent over the wire. In many cases, such as saving
 * user changes, this simply means turning objects back into JSON or XML, the
 * format they were loaded in from the server (effectively the reverse of
 * {@link com.sencha.gxt.data.shared.loader.DataReader} ). In other cases, this
 * can mean copying properties from load configs into an object format which can
 * be sent over RPC of RequestFactory.
 * 
 * In contrast with DataReader, this is not expected to have access to any other
 * context such as a load config, it operates directly on the data as-is. Custom
 * implementations can provide other context, but none is available by default.
 * 
 * @param  the starting data format for the model to be inputed
 * @param  the data format to be used, usually to send the initial data over
 *          the wire
 */
public interface DataWriter {
  D write(M model);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy