| 1 | |
package org.webslinger.types; |
| 2 | |
|
| 3 | |
import java.io.IOException; |
| 4 | |
import javax.servlet.ServletException; |
| 5 | |
|
| 6 | |
import org.webslinger.ReadObjectFilterCreator; |
| 7 | |
import org.webslinger.TypeHandler; |
| 8 | |
import org.webslinger.Webslinger; |
| 9 | |
|
| 10 | 0 | public class data extends TypeHandler { |
| 11 | |
public static final String DEFAULT_TYPE = "json"; |
| 12 | 0 | public static final ReadObjectFilterCreator CREATOR = new ReadObjectFilterCreator("data-type", "json", "data-filter"); |
| 13 | |
|
| 14 | |
public Object run(Webslinger webslinger) throws IOException, ServletException { |
| 15 | |
|
| 16 | |
|
| 17 | 0 | return webslinger.getPathContext().getInfo().getCachedItem(data.class, null, CREATOR); |
| 18 | |
} |
| 19 | |
} |