ko/bck2brwsr/src/main/java/org/apidesign/bck2brwsr/ko2brwsr/BrwsrCtxImpl.java
branchNbHtml4J
changeset 1420 246ee398b411
parent 1254 2e0da2375ef5
child 1425 43bb0053f3e2
     1.1 --- a/ko/bck2brwsr/src/main/java/org/apidesign/bck2brwsr/ko2brwsr/BrwsrCtxImpl.java	Thu Aug 29 16:24:04 2013 +0000
     1.2 +++ b/ko/bck2brwsr/src/main/java/org/apidesign/bck2brwsr/ko2brwsr/BrwsrCtxImpl.java	Wed Jan 08 14:06:21 2014 +0100
     1.3 @@ -21,10 +21,7 @@
     1.4  import java.io.IOException;
     1.5  import java.io.InputStream;
     1.6  import java.io.InputStreamReader;
     1.7 -import org.apidesign.html.json.spi.FunctionBinding;
     1.8  import org.apidesign.html.json.spi.JSONCall;
     1.9 -import org.apidesign.html.json.spi.PropertyBinding;
    1.10 -import org.apidesign.html.json.spi.Technology;
    1.11  import org.apidesign.html.json.spi.Transfer;
    1.12  import org.apidesign.html.json.spi.WSTransfer;
    1.13  
    1.14 @@ -32,7 +29,7 @@
    1.15   *
    1.16   * @author Jaroslav Tulach <jtulach@netbeans.org>
    1.17   */
    1.18 -final class BrwsrCtxImpl implements Technology<Object>, Transfer, WSTransfer<LoadWS> {
    1.19 +final class BrwsrCtxImpl implements Transfer, WSTransfer<LoadWS> {
    1.20      private BrwsrCtxImpl() {}
    1.21      
    1.22      public static final BrwsrCtxImpl DEFAULT = new BrwsrCtxImpl();
    1.23 @@ -92,45 +89,6 @@
    1.24      }
    1.25  
    1.26      @Override
    1.27 -    public Object wrapModel(Object model) {
    1.28 -        return model;
    1.29 -    }
    1.30 -
    1.31 -    @Override
    1.32 -    public void bind(PropertyBinding b, Object model, Object data) {
    1.33 -        Knockout.bind(data, b, b.getPropertyName(), 
    1.34 -            "getValue__Ljava_lang_Object_2", 
    1.35 -            b.isReadOnly() ? null : "setValue__VLjava_lang_Object_2", 
    1.36 -            false, false
    1.37 -        );
    1.38 -    }
    1.39 -
    1.40 -    @Override
    1.41 -    public void valueHasMutated(Object data, String propertyName) {
    1.42 -        Knockout.valueHasMutated(data, propertyName);
    1.43 -    }
    1.44 -
    1.45 -    @Override
    1.46 -    public void expose(FunctionBinding fb, Object model, Object d) {
    1.47 -        Knockout.expose(d, fb, fb.getFunctionName(), "call__VLjava_lang_Object_2Ljava_lang_Object_2");
    1.48 -    }
    1.49 -
    1.50 -    @Override
    1.51 -    public void applyBindings(Object data) {
    1.52 -        Knockout.applyBindings(data);
    1.53 -    }
    1.54 -
    1.55 -    @Override
    1.56 -    public Object wrapArray(Object[] arr) {
    1.57 -        return arr;
    1.58 -    }
    1.59 -
    1.60 -    @Override
    1.61 -    public <M> M toModel(Class<M> modelClass, Object data) {
    1.62 -        return modelClass.cast(data);
    1.63 -    }
    1.64 -
    1.65 -    @Override
    1.66      public Object toJSON(InputStream is) throws IOException {
    1.67          StringBuilder sb = new StringBuilder();
    1.68          InputStreamReader r = new InputStreamReader(is);
    1.69 @@ -145,11 +103,6 @@
    1.70      }
    1.71  
    1.72      @Override
    1.73 -    public void runSafe(Runnable r) {
    1.74 -        r.run();
    1.75 -    }
    1.76 -
    1.77 -    @Override
    1.78      public LoadWS open(String url, JSONCall callback) {
    1.79          return new LoadWS(callback, url);
    1.80      }