repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableCursor.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // // Path: traction/src/main/java/traction/mvc/inte...
import android.content.Loader; import android.database.Cursor; import android.database.CursorWrapper; import android.database.DataSetObserver; import android.os.Bundle; import android.util.Property; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; imp...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // // Path: traction/src/main/java/traction/mvc/inte...
implements IObservableCursor
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableCursor.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // // Path: traction/src/main/java/traction/mvc/inte...
import android.content.Loader; import android.database.Cursor; import android.database.CursorWrapper; import android.database.DataSetObserver; import android.os.Bundle; import android.util.Property; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; imp...
@Override public void setLayoutId(int layoutId) { this.templateId = layoutId; if (internalCursorAdapter != null) internalCursorAdapter.setLayoutId(layoutId); } @Override public int indexOf(Object obj) { if (internalCursorAdapter !=null) return interna...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // // Path: traction/src/main/java/traction/mvc/inte...
protected IPropertyStore getPropertyStore()
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableCursor.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // // Path: traction/src/main/java/traction/mvc/inte...
import android.content.Loader; import android.database.Cursor; import android.database.CursorWrapper; import android.database.DataSetObserver; import android.os.Bundle; import android.util.Property; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; imp...
Cursor internalCursor = (Cursor)obj; if (index == -1) { //if (cursorExtension == null) // return null; //return cursorExtension.getCursorExtendedProperty(internalCursor, getName()); } Class<Object> c = curso...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // // Path: traction/src/main/java/traction/mvc/inte...
implements IPOJO, IPropertyStore
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/models/IUserInfo.java
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
import android.text.format.Time; import java.util.List; import traction.mvc.observables.Command;
type = t; } private String type; @Override public String toString() { return type; } public String getType() { return type; } } List<Gender> getGenders(); Gender getUserGender(); void setUserG...
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
Command getSave();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/models/IBridgeOfDeathModel.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // }
import traction.mvc.interfaces.IObservableCursor;
package ni3po42.android.tractiondemo.models; public interface IBridgeOfDeathModel {
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCursor.java // public interface IObservableCursor // extends LoaderManager.LoaderCallbacks<Cursor>,IProxyObservableObject, ITemplateAdapter // { // void setLoader(Loader<Cursor> loader); // } // Path: Demo/src/main/java/ni3po42/android/tractio...
IObservableCursor getAnswers();
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/ui/viewbinding/ListViewBinding.java
// Path: traction/src/main/java/traction/mvc/implementations/ui/UIProperty.java // public class UIProperty<T> // implements IUIElement<T> // { // protected String path; // protected T tempValue; // // private IUIElement.IUIUpdateListener<T> updateListener; // // private boolean _isUpdating; // // pro...
import traction.mvc.implementations.ui.UIProperty; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/ui/UIProperty.java // public class UIProperty<T> // implements IUIElement<T> // { // protected String path; // protected T tempValue; // // private IUIElement.IUIUpdateListener<T> updateListener; // // private boolean _isUpdating; // // pro...
public final UIProperty<Integer> SelectedItemIndex = new UIProperty<Integer>(this, "SelectedItemIndex");
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/models/IUIWireModel.java
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
import traction.mvc.observables.Command; import traction.mvc.observables.IProxyObservableObject;
package ni3po42.android.tractiondemo.models; public interface IUIWireModel extends IProxyObservableObject { int getImage(); void setImage(int image); boolean isMainFlagOn(); void setMainFlagOn(boolean mainFlag); int getUpperBound(); void setUpperBound(int upperBound); int getCurrent...
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
Command getMyEvent();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/ActualDialogController.java
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java // public abstract class DialogController // extends DialogFragment // { // private Dialog tempDialog; // // /** // * Helper // */ // protected final ControllerHelper View = new ControllerHelper(this) // { // @Override //...
import android.os.Bundle; import traction.mvc.controllers.DialogController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.DialogModel;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java // public abstract class DialogController // extends DialogFragment // { // private Dialog tempDialog; // // /** // * Helper // */ // protected final ControllerHelper View = new ControllerHelper(this) // { // @Override //...
DialogModel model = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/ActualDialogController.java
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java // public abstract class DialogController // extends DialogFragment // { // private Dialog tempDialog; // // /** // * Helper // */ // protected final ControllerHelper View = new ControllerHelper(this) // { // @Override //...
import android.os.Bundle; import traction.mvc.controllers.DialogController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.DialogModel;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java // public abstract class DialogController // extends DialogFragment // { // private Dialog tempDialog; // // /** // * Helper // */ // protected final ControllerHelper View = new ControllerHelper(this) // { // @Override //...
model.getClose().setExecuteListener(new IOnExecuteListener() {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/ActualDialogController.java
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java // public abstract class DialogController // extends DialogFragment // { // private Dialog tempDialog; // // /** // * Helper // */ // protected final ControllerHelper View = new ControllerHelper(this) // { // @Override //...
import android.os.Bundle; import traction.mvc.controllers.DialogController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.DialogModel;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java // public abstract class DialogController // extends DialogFragment // { // private Dialog tempDialog; // // /** // * Helper // */ // protected final ControllerHelper View = new ControllerHelper(this) // { // @Override //...
public void onExecuted(CommandArgument argument) {
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ScopeBuilder.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java // public interface IObservableCommand // extends IObservableObject // { // /** // * call to execute command // * @param arg // */ // void execute(CommandArgument arg); // // void setExecuteListener(IOnExecuteLis...
import android.util.Property; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Collection; import java.util.Hashtable; import java.util.LinkedList; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IObservableCu...
package traction.mvc.observables; public class ScopeBuilder { public static Object CreateScope(Class<?> scopeInterface) { return Proxy .newProxyInstance( scopeInterface.getClassLoader(),
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java // public interface IObservableCommand // extends IObservableObject // { // /** // * call to execute command // * @param arg // */ // void execute(CommandArgument arg); // // void setExecuteListener(IOnExecuteLis...
new Class[]{scopeInterface, IProxyObservableObject.class, IPOJO.class},
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ScopeBuilder.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java // public interface IObservableCommand // extends IObservableObject // { // /** // * call to execute command // * @param arg // */ // void execute(CommandArgument arg); // // void setExecuteListener(IOnExecuteLis...
import android.util.Property; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Collection; import java.util.Hashtable; import java.util.LinkedList; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IObservableCu...
{ if (!name.equals("getProxyObservableObject")) throw new IllegalStateException("only 'getProxyObservableObject' may be called on 'IProxyObservableObject'."); return map.getProxyObservableObject(); } else if (IPOJO.class == method.g...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java // public interface IObservableCommand // extends IObservableObject // { // /** // * call to execute command // * @param arg // */ // void execute(CommandArgument arg); // // void setExecuteListener(IOnExecuteLis...
else if (IObservableCursor.class.isAssignableFrom(method.getReturnType()))
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ScopeBuilder.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java // public interface IObservableCommand // extends IObservableObject // { // /** // * call to execute command // * @param arg // */ // void execute(CommandArgument arg); // // void setExecuteListener(IOnExecuteLis...
import android.util.Property; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Collection; import java.util.Hashtable; import java.util.LinkedList; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IObservableCu...
} else if (IPOJO.class == method.getDeclaringClass()) { if (!name.equals("getProperty")) throw new IllegalStateException("only 'getProperty' may be called on 'IPOJO'."); return map.getProperty((String)args[1]); } ...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java // public interface IObservableCommand // extends IObservableObject // { // /** // * call to execute command // * @param arg // */ // void execute(CommandArgument arg); // // void setExecuteListener(IOnExecuteLis...
else if (IObservableCommand.class.isAssignableFrom(method.getReturnType()))
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/activities/MainActivity.java
// Path: Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MainController.java // public class MainController extends FragmentController // { // public final static String NoMultiViewModelSupport = "multiViewModelSupport"; // // @Override // public void onCreate(Bundle savedInstanceState) // { // s...
import android.app.FragmentTransaction; import android.os.Bundle; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.controllers.MainController; import ni3po42.android.tractiondemo.models.IHomeModel; import traction.mvc.controllers.ActivityController;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MainController.java // public class MainController extends FragmentController // { // public final static String NoMultiViewModelSupport = "multiViewModelSupport"; // // @Override // public void onCreate(Bundle savedInstanceState) // { // s...
IHomeModel model = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/activities/MainActivity.java
// Path: Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MainController.java // public class MainController extends FragmentController // { // public final static String NoMultiViewModelSupport = "multiViewModelSupport"; // // @Override // public void onCreate(Bundle savedInstanceState) // { // s...
import android.app.FragmentTransaction; import android.os.Bundle; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.controllers.MainController; import ni3po42.android.tractiondemo.models.IHomeModel; import traction.mvc.controllers.ActivityController;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MainController.java // public class MainController extends FragmentController // { // public final static String NoMultiViewModelSupport = "multiViewModelSupport"; // // @Override // public void onCreate(Bundle savedInstanceState) // { // s...
MainController mvm = new MainController();
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/ui/viewbinding/NumberPickerBinding.java
// Path: traction/src/main/java/traction/mvc/implementations/ui/UIProperty.java // public class UIProperty<T> // implements IUIElement<T> // { // protected String path; // protected T tempValue; // // private IUIElement.IUIUpdateListener<T> updateListener; // // private boolean _isUpdating; // // pro...
import traction.mvc.implementations.ui.UIProperty; import traction.mvc.interfaces.IUIElement.IUIUpdateListener; import android.widget.NumberPicker;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/ui/UIProperty.java // public class UIProperty<T> // implements IUIElement<T> // { // protected String path; // protected T tempValue; // // private IUIElement.IUIUpdateListener<T> updateListener; // // private boolean _isUpdating; // // pro...
public final UIProperty<Integer> MinValue = new UIProperty<Integer>(this,"MinValue");
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/interfaces/IObservableCommand.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.implementations.CommandArgument;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
void execute(CommandArgument arg);
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/models/DialogModel.java
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
import traction.mvc.observables.Command;
package ni3po42.android.tractiondemo.models; public interface DialogModel { String getSomeText(); void setSomeText(String t);
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
Command getClose();
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/IObservable.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObjectListener.java // public interface IObjectListener // { // public static class Utility // { // public static String generatePropagationId(String currentPropagationId, String currentSource) // { // if (currentSource == null...
import traction.mvc.interfaces.IObjectListener;
package traction.mvc.observables; //package visibility interface IObservable { /** * Registers a listener to the IObservable * @param sourceName : name of source property to track changes and bubble up to inventory */
// Path: traction/src/main/java/traction/mvc/interfaces/IObjectListener.java // public interface IObjectListener // { // public static class Utility // { // public static String generatePropagationId(String currentPropagationId, String currentSource) // { // if (currentSource == null...
void registerListener(String sourceName, IObjectListener listener);
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableMap.java
// Path: traction/src/main/java/traction/mvc/interfaces/IPropertyStore.java // public interface IPropertyStore // { // Property<?,?> getProperty(String name); // }
import android.util.Property; import java.util.Collection; import java.util.Iterator; import java.util.Map; import java.util.Set; import traction.mvc.interfaces.IPropertyStore;
store.removeKey(current); } internalMap.putAll(map); notifyListener(); } @Override public Object remove(Object key) { Object obj = internalMap.remove(key); store.removeKey(String.valueOf(key)); notifyListener(String.valueOf(key), obj, null); ...
// Path: traction/src/main/java/traction/mvc/interfaces/IPropertyStore.java // public interface IPropertyStore // { // Property<?,?> getProperty(String name); // } // Path: traction/src/main/java/traction/mvc/observables/ObservableMap.java import android.util.Property; import java.util.Collection; import java.uti...
protected IPropertyStore getPropertyStore()
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableList.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableList.java // public interface IObservableList<T> // extends IProxyObservableObject, List<T> // { // /** // * A read-only property 'Count'. Should return the number of elements in the list // * @return size of list // */ // public int getCount()...
import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import traction.mvc.interfaces.IObservableList; import traction.mvc.interfaces.IPropertyStore; import android.util.Property;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableList.java // public interface IObservableList<T> // extends IProxyObservableObject, List<T> // { // /** // * A read-only property 'Count'. Should return the number of elements in the list // * @return size of list // */ // public int getCount()...
implements IObservableList<T>
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableList.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableList.java // public interface IObservableList<T> // extends IProxyObservableObject, List<T> // { // /** // * A read-only property 'Count'. Should return the number of elements in the list // * @return size of list // */ // public int getCount()...
import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import traction.mvc.interfaces.IObservableList; import traction.mvc.interfaces.IPropertyStore; import android.util.Property;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/interfaces/IObservableList.java // public interface IObservableList<T> // extends IProxyObservableObject, List<T> // { // /** // * A read-only property 'Count'. Should return the number of elements in the list // * @return size of list // */ // public int getCount()...
protected IPropertyStore getPropertyStore() {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MultiSelectController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IMultiSelectionModel; impor...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
final IMultiSelectionModel model = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MultiSelectController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IMultiSelectionModel; impor...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
model.getItems().add(new SelectableItem());
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/MultiSelectController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IMultiSelectionModel; impor...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
model.getCountSelected().setExecuteListener(new IOnExecuteListener() {
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/Command.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import android.util.Property; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IOnExecuteListener; import traction.mvc.interfaces.IPropertyStore;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
implements IObservableCommand
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/Command.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import android.util.Property; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IOnExecuteListener; import traction.mvc.interfaces.IPropertyStore;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
private IOnExecuteListener executeListener;
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/Command.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import android.util.Property; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IOnExecuteListener; import traction.mvc.interfaces.IPropertyStore;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
protected IPropertyStore getPropertyStore()
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/Command.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import android.util.Property; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IObservableCommand; import traction.mvc.interfaces.IOnExecuteListener; import traction.mvc.interfaces.IPropertyStore;
@SuppressWarnings("unchecked") @Override public Property<Object, Object> getProperty(String name) { Class<?> c = boolean.class; //The only supported property on a command will be 'CanExecute', for now... if (name.equals("CanExecute") && getSource() != null) return (Property<Object, Object>) Property.of(g...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
protected void onExecuted(CommandArgument arg)
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/PathBinding.java
// Path: traction/src/main/java/traction/mvc/interfaces/IUIElement.java // public interface IUIElement<T> // { // /** // * sets a handler for when the ui recieves data from the model/view-model // * @param listener // */ // public void setUIUpdateListener(IUIUpdateListener<T> listener); // // /** // * Sends...
import java.util.ArrayList; import traction.mvc.interfaces.IUIElement;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/interfaces/IUIElement.java // public interface IUIElement<T> // { // /** // * sets a handler for when the ui recieves data from the model/view-model // * @param listener // */ // public void setUIUpdateListener(IUIUpdateListener<T> listener); // // /** // * Sends...
private final ArrayList<IUIElement<?>> uiElements = new ArrayList<IUIElement<?>>();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/UIWiringController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IUIWireModel; import tracti...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
final IUIWireModel model = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/UIWiringController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IUIWireModel; import tracti...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
model.getMyEvent().setExecuteListener(new IOnExecuteListener() {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/UIWiringController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IUIWireModel; import tracti...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
public void onExecuted(CommandArgument argument) {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/UIWiringController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import android.widget.Toast; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IUIWireModel; import tracti...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
model.getProxyObservableObject().addOnChange(new OnPropertyChangedEvent() {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/models/ICalculatorModel.java
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
import traction.mvc.observables.Command;
package ni3po42.android.tractiondemo.models; public interface ICalculatorModel { String getDisplay(); void setDisplay(String str);
// Path: traction/src/main/java/traction/mvc/observables/Command.java // public class Command // extends ObservableObject // implements IObservableCommand // { // private IOnExecuteListener executeListener; // // public Command() // { // setCanExecute(true); // } // // public Command(boole...
Command getNumberUpdate();
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/interfaces/IOnExecuteListener.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.implementations.CommandArgument;
package traction.mvc.interfaces; public interface IOnExecuteListener {
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
void onExecuted(CommandArgument arg);
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/ui/viewbinding/ProgressBarBinding.java
// Path: traction/src/main/java/traction/mvc/implementations/ui/UIProperty.java // public class UIProperty<T> // implements IUIElement<T> // { // protected String path; // protected T tempValue; // // private IUIElement.IUIUpdateListener<T> updateListener; // // private boolean _isUpdating; // // pro...
import traction.mvc.implementations.ui.UIProperty; import traction.mvc.interfaces.IUIElement.IUIUpdateListener; import android.widget.ProgressBar;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/ui/UIProperty.java // public class UIProperty<T> // implements IUIElement<T> // { // protected String path; // protected T tempValue; // // private IUIElement.IUIUpdateListener<T> updateListener; // // private boolean _isUpdating; // // pro...
public final UIProperty<Integer> MaxValue = new UIProperty<Integer>(this, "MaxValue");
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/SimpleFormController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.text.format.Time; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.traction...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
final IUserInfo userInfo = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/SimpleFormController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.text.format.Time; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.traction...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
userInfo.getSave().setExecuteListener(new IOnExecuteListener() {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/SimpleFormController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.text.format.Time; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.traction...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
public void onExecuted(CommandArgument argument) {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/EntryController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import traction.mvc.controllers.FragmentController; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.EntryItem; import ni3po42.android.tractiondemo.models.IEntryModel;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
IEntryModel model = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/EntryController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import traction.mvc.controllers.FragmentController; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.EntryItem; import ni3po42.android.tractiondemo.models.IEntryModel;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
model.getEntries().add(new EntryItem(1,"Something", true));
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/BindingInventory.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.interfaces.IUIElement; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Iterator; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.util.Property; i...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
private final TreeMap<String, PathBinding> map = new TreeMap<String, PathBinding>();
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/BindingInventory.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.interfaces.IUIElement; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Iterator; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.util.Property; i...
private final TreeMap<String, PathBinding> map = new TreeMap<String, PathBinding>(); @Override public void onEvent(String propagationId) { onContextSignaled(propagationId); } private String[] tempStringArray = new String[0]; public void onContextSignaled(String path) { Object value ...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
ArrayList<IUIElement<?>> elements = subMap.get(subPath).getUIElements();
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/BindingInventory.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.interfaces.IUIElement; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Iterator; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.util.Property; i...
} public BindingInventory getParentInventory() { return parentInventory; } public void merge(BindingInventory inventoryToMerge) { Iterator<PathBinding> collection = inventoryToMerge.map.values().iterator(); while(collection.hasNext()) { PathBinding current = collect...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
public void fireCommand(String commandPath, CommandArgument commandArg)
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/BindingInventory.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.interfaces.IUIElement; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Iterator; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.util.Property; i...
{ return parentInventory; } public void merge(BindingInventory inventoryToMerge) { Iterator<PathBinding> collection = inventoryToMerge.map.values().iterator(); while(collection.hasNext()) { PathBinding current = collection.next(); ArrayList<IUIElement<?>> el...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
if (command instanceof IObservableCommand)
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/BindingInventory.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.interfaces.IUIElement; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Iterator; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.util.Property; i...
if (!map.containsKey(path)) { map.put(path, new PathBinding()); } PathBinding p = map.get(path); p.addUIElement(element); } @SuppressWarnings("unchecked") public void sendUpdate(String path, Object value) { if (path == null || path.equals(".")) return; Matcher matches = pathPattern.matcher(p...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
if (currentContext instanceof IPOJO)
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/BindingInventory.java
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
import traction.mvc.interfaces.IUIElement; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Iterator; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.util.Property; i...
for(int i=0;i<chains.length;i++) { if (currentContext == null) return null; String member = chains[i]; if (currentContext instanceof IPOJO) prop = ((IPOJO)currentContext).getProperty(member); else prop = (Property<Object, Object>) PropertyStore.fi...
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java // public class CommandArgument // { // private String commandName; // private boolean eventCancelled; // private JSONObject tagProperties; // // public boolean isEventCancelled() // { // return eventCancelled...
protected IPropertyStore getPropertyStore() {
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/observables/ObservableObject.java
// Path: traction/src/main/java/traction/mvc/interfaces/IObjectListener.java // public interface IObjectListener // { // public static class Utility // { // public static String generatePropagationId(String currentPropagationId, String currentSource) // { // if (currentSource == null...
import java.util.ArrayList; import java.util.HashMap; import traction.mvc.interfaces.IObjectListener; import traction.mvc.interfaces.IPOJO; import traction.mvc.interfaces.IPropertyStore; import android.util.Property;
} } } } public void notifyListener() { notifyListenerInternal(null, null, null); } // @SuppressWarnings("unchecked") // @Override // public <T extends IProxyObservableObject> T registerAs(String propertyName, IProxyObservableObject parentObj) // { // if (getProxyObservableObject() == null || par...
// Path: traction/src/main/java/traction/mvc/interfaces/IObjectListener.java // public interface IObjectListener // { // public static class Utility // { // public static String generatePropagationId(String currentPropagationId, String currentSource) // { // if (currentSource == null...
protected abstract IPropertyStore getPropertyStore();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/ScopeExampleController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import traction.mvc.controllers.FragmentController; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.TestScope;
package ni3po42.android.tractiondemo.controllers; public class ScopeExampleController extends FragmentController { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); View.setContentView(R.layout.scopedview); } @Override publi...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
TestScope scope = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/CalculatorController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.mode...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
ICalculatorModel model = View.getScope();
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/CalculatorController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.mode...
currentAction = action; pushStack(); } totalDigits = 0; } public void pushStack() { stackSize++; stack = currentValue; decimalPlace = 0; currentValue = 0; } public void popStack() { if (stackSize != 0) ...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
public void updateCurrentNumber(CommandArgument argument)
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/CalculatorController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.controllers.FragmentController; import traction.mvc.implementations.CommandArgument; import traction.mvc.interfaces.IOnExecuteListener; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.mode...
currentValue = currentValue * 10 + (currentValue > 0 ? nextInput : -nextInput); } else { currentValue = currentValue + ((currentValue > 0 ? nextInput : -nextInput) * Math.pow(10, -decimalPlace)); decimalPlace++; } totalDigits++; ICalcu...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
model.getNumberUpdate().setExecuteListener(new IOnExecuteListener() {
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/controllers/RelativeContextFragmentController.java
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
import android.os.Bundle; import traction.mvc.controllers.FragmentController; import ni3po42.android.tractiondemo.R; import ni3po42.android.tractiondemo.models.IRelativeRootModel;
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java // public class FragmentController // extends Fragment // { // /** // * Helper to implement Controller logic. // */ // protected final ControllerHelper View = new ControllerHelper(this); // // @Override // public void onCreate(Bun...
IRelativeRootModel model = View.getScope();
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/PaletteActivity2.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/PaletteGridAdapter.java // public class PaletteGridAdapter extends RecyclerView.Adapter<PaletteGridAdapter.PaletteGridViewHolder> { // // final int[] picResId = new int[]{R.mipmap.p1, R.mipmap.p2, R.mipmap.p3, R.mipmap.p4, R.mipmap.p5, // R....
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import com.lqr.materialdesigndemo.R; import com.lqr.materialdesigndemo.adapter.PaletteGridAdapter;
package com.lqr.materialdesigndemo.activity; public class PaletteActivity2 extends AppCompatActivity { private RecyclerView mRvPalette; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_palette2...
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/PaletteGridAdapter.java // public class PaletteGridAdapter extends RecyclerView.Adapter<PaletteGridAdapter.PaletteGridViewHolder> { // // final int[] picResId = new int[]{R.mipmap.p1, R.mipmap.p2, R.mipmap.p3, R.mipmap.p4, R.mipmap.p5, // R....
mRvPalette.setAdapter(new PaletteGridAdapter());
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/decoration/MyDecorationThree.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/utils/PinyinUtils.java // public class PinyinUtils { // // /** // * 根据传入的字符串(包含汉字),得到拼音 // * 沧晓 -> CANGXIAO // * 沧 晓*& -> CANGXIAO // * 沧晓f5 -> CANGXIAO // * // * @param str 字符串 // * @return // */ // public static St...
import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.TypedValue; import android.view.View; impor...
public MyDecorationThree(Context context, List<String> data) { mContext = context; mData = data; paint.setTextSize(sp2px(16)); paint.setColor(Color.RED); } @Override public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { super.onDraw(c, pa...
// Path: app/src/main/java/com/lqr/materialdesigndemo/utils/PinyinUtils.java // public class PinyinUtils { // // /** // * 根据传入的字符串(包含汉字),得到拼音 // * 沧晓 -> CANGXIAO // * 沧 晓*& -> CANGXIAO // * 沧晓f5 -> CANGXIAO // * // * @param str 字符串 // * @return // */ // public static St...
String letter = PinyinUtils.getPinyin(mData.get(position)).charAt(0) + "";
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/TabLayoutActivity.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/fragment/TextFragment.java // public class TextFragment extends Fragment { // @Nullable // @Override // public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { // TextView textView =...
import android.content.res.Resources; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4...
e.printStackTrace(); } int left = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, leftDip, Resources.getSystem().getDisplayMetrics()); int right = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, rightDip, Resources.getSystem().getDisplayMetrics()); ...
// Path: app/src/main/java/com/lqr/materialdesigndemo/fragment/TextFragment.java // public class TextFragment extends Fragment { // @Nullable // @Override // public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { // TextView textView =...
Fragment fragment = new TextFragment();
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/RecyclerVIewDecorationActivityTwo.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import com.lqr.materialdesigndemo.R; import com.lqr.materialdesigndemo.adapter.MyAdapter; import com.l...
package com.lqr.materialdesigndemo.activity; /** * @创建者 CSDN_LQR * @描述 RecyclerView的表格样式 */ public class RecyclerVIewDecorationActivityTwo extends AppCompatActivity { private List<String> mData = new ArrayList<>(); private RecyclerView mRv;
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
private MyAdapter mMyAdapter;
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/RecyclerViewActivity.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLa...
package com.lqr.materialdesigndemo.activity; public class RecyclerViewActivity extends AppCompatActivity { private List<String> mData = new ArrayList<>(); private RecyclerView mRv;
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
private MyAdapter mMyAdapter;
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/RecyclerViewActivity.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLa...
mRv.setAdapter(mMyAdapter); } @Override public boolean onCreateOptionsMenu(Menu menu) { new MenuInflater(this).inflate(R.menu.recycler_view, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { ...
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
mRv.setAdapter(new MyStaggeredAdapter(mData));
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/adapter/ItemTouchHelperAdapter.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/listener/ItemDragListener.java // public interface ItemDragListener { // void onStartDrags(RecyclerView.ViewHolder viewHolder); // } // // Path: app/src/main/java/com/lqr/materialdesigndemo/listener/ItemMoveListener.java // public interface ItemMoveListener { /...
import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.lqr.materialdesigndemo.R; import com.lqr.materialdesigndemo.listener.It...
package com.lqr.materialdesigndemo.adapter; public class ItemTouchHelperAdapter extends RecyclerView.Adapter<ItemTouchHelperAdapter.ItemTouchHelperViewHolder> implements ItemMoveListener { private List<String> mData;
// Path: app/src/main/java/com/lqr/materialdesigndemo/listener/ItemDragListener.java // public interface ItemDragListener { // void onStartDrags(RecyclerView.ViewHolder viewHolder); // } // // Path: app/src/main/java/com/lqr/materialdesigndemo/listener/ItemMoveListener.java // public interface ItemMoveListener { /...
private ItemDragListener mItemDragListener;
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/RecyclerVIewDecorationActivityOne.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.lqr.materialdesigndemo.R; import com.lqr.materialdesigndemo.adapter.MyAdapter; import com...
package com.lqr.materialdesigndemo.activity; /** * @创建者 CSDN_LQR * @描述 RecyclerView的分割线 */ public class RecyclerVIewDecorationActivityOne extends AppCompatActivity { private List<String> mData = new ArrayList<>(); private RecyclerView mRv;
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
private MyAdapter mMyAdapter;
GitLqr/MaterialDesignDemo
app/src/main/java/com/lqr/materialdesigndemo/activity/RecyclerVIewDecorationActivityOne.java
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.lqr.materialdesigndemo.R; import com.lqr.materialdesigndemo.adapter.MyAdapter; import com...
package com.lqr.materialdesigndemo.activity; /** * @创建者 CSDN_LQR * @描述 RecyclerView的分割线 */ public class RecyclerVIewDecorationActivityOne extends AppCompatActivity { private List<String> mData = new ArrayList<>(); private RecyclerView mRv; private MyAdapter mMyAdapter; @Override protected v...
// Path: app/src/main/java/com/lqr/materialdesigndemo/adapter/MyAdapter.java // public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { // // private List<String> mData; // // public MyAdapter(List<String> data) { // mData = data; // } // // @Override // public MyVie...
MyDecorationOne decorationOne = new MyDecorationOne(this, LinearLayoutManager.VERTICAL);
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Term.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap;
} public void setSentimentModifier(String val) { sentimentModifier = val; } public boolean hasSentimentMarker() { return sentimentMarker != null; } public String getSentimentMarker() { return sentimentMarker; } public void setSentimentMarker(String val) { sentimentMarker = val; } publ...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Predicate.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.ArrayList; import java.util.HashMap; import java.util.Map;
} public String getSemRole() { return this.semRole; } public void setSemRole(String semRole) { this.semRole = semRole; } public Span<Term> getSpan() { return this.span; } public void setSpan(Span<Term> span) { this.span = span; } public List<Term> getTerms() { return this.span.ge...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/TLink.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap;
} public void setFrom(TLinkReferable from) { this.from = from; } public TLinkReferable getTo() { return this.to; } public void setTo(TLinkReferable to) { this.to = to; } public String getFromType() { return (this.from instanceof Predicate) ? "event" : "timex"; } public S...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Factvalue.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
package ixa.kaflib; /** * Factuality layer */ public class Factvalue extends Annotation implements SentenceLevelAnnotation { private WF word; private String prediction; private Double confidence; //ArrayList<FactualityPart> factualityParts = new ArrayList<FactualityPart>(); Factvalue(WF word...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Entity.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.ArrayList; import java.util.HashMap; import java.util.Map;
package ixa.kaflib; /** A named entity is a term (or a multiword) that clearly identifies one item. The optional Named Entity layer is used to reference terms that are named entities. */ public class Entity extends IdentifiableAnnotation implements Relational, SentenceLevelAnnotation { /** Type of the named en...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Statement.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.Map; import java.util.ArrayList; import java.util.HashMap;
} public void setTarget(StatementTarget target) { this.target = target; } public Boolean hasSource() { return this.source != null; } public StatementSource getSource() { return this.source; } public void setSource(StatementSource source) { this.source = source; ...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
public Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Topic.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import java.util.HashMap; import java.util.Map; import java.util.List; import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import ixa.kaflib.Statement.StatementSource;
} public void setConfidence(Float val) { confidence = val; } public boolean hasConfidence() { return this.confidence != null; } public String getURI() { return this.URI; } public void setURI(String val) { URI = val; } public boolean hasURI() { return this.URI != null; ...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
public Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Mark.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap;
} public void setSpan(Span<WF> span) { this.span = span; } public boolean hasSentiment() { return this.sentiment != null; } public Term.Sentiment getSentiment() { return this.sentiment; } public void setSentiment(Term.Sentiment sentiment) { this.sentiment = sentiment;...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/CLink.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.HashMap; import java.util.List; import java.util.ArrayList; import java.util.Map;
} public Predicate getFrom() { return this.from; } public void setFrom(Predicate from) { this.from = from; } public Predicate getTo() { return this.to; } public void setTo(Predicate to) { this.to = to; } public boolean hasRelType() { return this.relType != null; } ...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Factuality.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.HashMap; import java.util.Map; import java.util.ArrayList; import java.util.List;
package ixa.kaflib; public class Factuality extends IdentifiableAnnotation implements SentenceLevelAnnotation { private Span<Term> span; private List<FactVal> factVals; Factuality(String id, Span<Term> span) { super(id); this.span = span; this.factVals = new ArrayList<FactVal>(); } ...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/Timex3.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap;
} public Integer getPara() { return this.span.getFirstTarget().getPara(); } */ public boolean hasSpan() { return this.span != null; } public Span<WF> getSpan() { return this.span; } public void setSpan(Span<WF> span) { this.span = span; } public String getSpanStr...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/LinkedEntity.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import ixa.kaflib.KAFDocument.AnnotationType; import ixa.kaflib.KAFDocument.Utils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
return reference; } public void setReference(String reference) { this.reference = reference; } public double getConfidence() { return confidence; } public void setConfidence(double confidence) { this.confidence = confidence; } public Span<WF> getSpan() { return this.mentions; } public Strin...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() {
ixa-ehu/kaflib
src/main/java/ixa/kaflib/ReadWriteManager.java
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.Namespace; import org.jdom2.CDATA; import org.jdom2.output.XMLOutputter; import org.jdom2.output.Format; import org.jdom2.output.LineSeparator; import org.jdom2.input.SAXBuilder; import org.jdom2.JDOMException; import org.jdom2.xpath.XPathExpression;...
Element roleElem = new Element("role"); roleElem.setAttribute("id", role.getId()); roleElem.setAttribute("semRole", role.getSemRole()); Span<Term> roleSpan = role.getSpan(); if (roleSpan.getTargets().size() > 0) { Comment spanComment = new Comment(StringEscapeUtils.escapeXml11(role.getS...
// Path: src/main/java/ixa/kaflib/KAFDocument.java // public enum AnnotationType { // WF, // TERM, // MW, // COMPONENT, // SENTIMENT, // ENTITY, // CHUNK, // DEP, // TREE, // NON_TERMINAL, // TERMINAL, // EDGE, // COREF, // OPINION, /* DOC_LVL */ // OPINION_HOLDER, // OPINION_TARGET, // OPINION_EXPRESSION, // CLIN...
List<String> treeTypes = annotationContainer.getGroupIDs(AnnotationType.TREE);
pivotal-bank/web-ui
src/main/java/io/pivotal/web/service/AccountService.java
// Path: src/main/java/io/pivotal/web/domain/Account.java // @JsonIgnoreProperties(ignoreUnknown = true) // @Data // public class Account { // // @JsonProperty("id") // private Integer id; // // @JsonProperty("name") // private String name; // // @JsonProperty("creationdate") // @JsonFormat(shape=JsonFormat.S...
import com.newrelic.api.agent.Trace; import io.pivotal.web.domain.Account; import org.reactivestreams.Publisher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.c...
package io.pivotal.web.service; @Service @RefreshScope public class AccountService { private static final Logger logger = LoggerFactory .getLogger(AccountService.class); @Autowired private WebClient webClient; @Value("${pivotal.accountsService.name}") private String accountsService...
// Path: src/main/java/io/pivotal/web/domain/Account.java // @JsonIgnoreProperties(ignoreUnknown = true) // @Data // public class Account { // // @JsonProperty("id") // private Integer id; // // @JsonProperty("name") // private String name; // // @JsonProperty("creationdate") // @JsonFormat(shape=JsonFormat.S...
public void createAccount(Account account, OAuth2AuthorizedClient oAuth2AuthorizedClient ) {
pivotal-bank/web-ui
src/main/java/io/pivotal/web/controller/UserController.java
// Path: src/main/java/io/pivotal/web/domain/RegistrationRequest.java // @Data // public class RegistrationRequest { // // @NotNull // @NotEmpty // private String givenNames; // // private String surname; // // @NotNull // @NotEmpty // @Email // private String email; // // @NotEm...
import io.pivotal.web.domain.RegistrationRequest; import io.pivotal.web.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.oauth2.client.OAuth2Authori...
@Autowired private PortfolioService portfolioService; @Autowired private MarketSummaryService summaryService; @RequestMapping(value = "/", method = RequestMethod.GET) public String showHome(Model model,Principal princ, @AuthenticationPrincipal OAuth2User principal){ //check if user is logged in! if (prin...
// Path: src/main/java/io/pivotal/web/domain/RegistrationRequest.java // @Data // public class RegistrationRequest { // // @NotNull // @NotEmpty // private String givenNames; // // private String surname; // // @NotNull // @NotEmpty // @Email // private String email; // // @NotEm...
model.addAttribute("registration", new RegistrationRequest());
pivotal-bank/web-ui
src/main/java/io/pivotal/web/controller/AccountsController.java
// Path: src/main/java/io/pivotal/web/domain/Account.java // @JsonIgnoreProperties(ignoreUnknown = true) // @Data // public class Account { // // @JsonProperty("id") // private Integer id; // // @JsonProperty("name") // private String name; // // @JsonProperty("creationdate") // @JsonFormat(shape=JsonFormat.S...
import java.math.BigDecimal; import java.security.Principal; import java.util.Date; import javax.servlet.http.HttpServletRequest; import io.pivotal.web.domain.Account; import io.pivotal.web.domain.Order; import io.pivotal.web.domain.Search; import io.pivotal.web.service.*; import org.slf4j.Logger; import org.slf4j.Logg...
package io.pivotal.web.controller; @Controller @PreAuthorize("hasAuthority('ROLE_ACCOUNT')") public class AccountsController { private static final Logger logger = LoggerFactory .getLogger(AccountsController.class); @Autowired private AccountService accountService; @Autowired private MarketSummaryServi...
// Path: src/main/java/io/pivotal/web/domain/Account.java // @JsonIgnoreProperties(ignoreUnknown = true) // @Data // public class Account { // // @JsonProperty("id") // private Integer id; // // @JsonProperty("name") // private String name; // // @JsonProperty("creationdate") // @JsonFormat(shape=JsonFormat.S...
Account account = new Account();
pivotal-bank/web-ui
src/main/java/io/pivotal/web/service/PortfolioService.java
// Path: src/main/java/io/pivotal/web/domain/Order.java // @Data // public class Order { // // private Integer orderId; // // private Integer accountId; // // private String symbol; // // private BigDecimal orderFee; // // private Date completionDate; // // private OrderType orderType; // // private BigD...
import com.newrelic.api.agent.Trace; import io.pivotal.web.domain.Order; import io.pivotal.web.domain.Portfolio; import org.reactivestreams.Publisher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotati...
package io.pivotal.web.service; @Service @RefreshScope public class PortfolioService { private static final Logger logger = LoggerFactory .getLogger(PortfolioService.class); @Autowired private WebClient webClient; @Value("${pivotal.portfolioService.name}") private String portfolioService; @Trace(asy...
// Path: src/main/java/io/pivotal/web/domain/Order.java // @Data // public class Order { // // private Integer orderId; // // private Integer accountId; // // private String symbol; // // private BigDecimal orderFee; // // private Date completionDate; // // private OrderType orderType; // // private BigD...
public Order sendOrder(Order order, OAuth2AuthorizedClient oAuth2AuthorizedClient ) {
pivotal-bank/web-ui
src/main/java/io/pivotal/web/service/UserService.java
// Path: src/main/java/io/pivotal/web/domain/RegistrationRequest.java // @Data // public class RegistrationRequest { // // @NotNull // @NotEmpty // private String givenNames; // // private String surname; // // @NotNull // @NotEmpty // @Email // private String email; // // @NotEm...
import com.newrelic.api.agent.Trace; import io.pivotal.web.domain.RegistrationRequest; import io.pivotal.web.domain.User; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.context.c...
package io.pivotal.web.service; @Service @RefreshScope @Slf4j public class UserService { @Autowired(required = false) private WebClient webClient; @Value("${pivotal.userService.name}") private String userService; @Trace(async = true)
// Path: src/main/java/io/pivotal/web/domain/RegistrationRequest.java // @Data // public class RegistrationRequest { // // @NotNull // @NotEmpty // private String givenNames; // // private String surname; // // @NotNull // @NotEmpty // @Email // private String email; // // @NotEm...
public void registerUser(RegistrationRequest registrationRequest) {
pivotal-bank/web-ui
src/main/java/io/pivotal/web/service/UserService.java
// Path: src/main/java/io/pivotal/web/domain/RegistrationRequest.java // @Data // public class RegistrationRequest { // // @NotNull // @NotEmpty // private String givenNames; // // private String surname; // // @NotNull // @NotEmpty // @Email // private String email; // // @NotEm...
import com.newrelic.api.agent.Trace; import io.pivotal.web.domain.RegistrationRequest; import io.pivotal.web.domain.User; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.context.c...
package io.pivotal.web.service; @Service @RefreshScope @Slf4j public class UserService { @Autowired(required = false) private WebClient webClient; @Value("${pivotal.userService.name}") private String userService; @Trace(async = true) public void registerUser(RegistrationRequest registrati...
// Path: src/main/java/io/pivotal/web/domain/RegistrationRequest.java // @Data // public class RegistrationRequest { // // @NotNull // @NotEmpty // private String givenNames; // // private String surname; // // @NotNull // @NotEmpty // @Email // private String email; // // @NotEm...
User user = webClient
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/utils/Utils.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
import android.util.Log; import com.wootric.androidsdk.Constants; import java.util.Date;
/* * Copyright (c) 2016 Wootric (https://wootric.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modi...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
Log.d(Constants.TAG, "WARNING: The created date exceeds the maximum 10 characters allowed. " +
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/CreateDeclineTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/OfflineDataHandler.java // public class OfflineDataHandler { // // private static final String LOG_TAG = OfflineDataHandler.class.getName(); // // private static final String KEY_ORIGIN_URL = "origin_url"; // private static final String KEY_END_USER...
import com.wootric.androidsdk.OfflineDataHandler; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static org.assertj.core.api.Assertions.assertThat;
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class CreateDeclineTaskTest { private static final String ACCESS_TOKEN = "accessToken"; private static final String UNIQUE_LINK = "12345qwerty"; private static final String ORIGIN_URL = "com.test.app"; private s...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/OfflineDataHandler.java // public class OfflineDataHandler { // // private static final String LOG_TAG = OfflineDataHandler.class.getName(); // // private static final String KEY_ORIGIN_URL = "origin_url"; // private static final String KEY_END_USER...
@Mock OfflineDataHandler offlineDataHandler;
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/network/tasks/WootricRemoteRequestTask.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; import java.util.HashMap; import java.util.Map; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.util.Log; import com.w...
/* * Copyright (c) 2016 Wootric (https://wootric.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modi...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
protected final WootricApiCallback wootricApiCallback;
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/network/tasks/WootricRemoteRequestTask.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; import java.util.HashMap; import java.util.Map; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.util.Log; import com.w...
return builder.build().getEncodedQuery(); } public String readInput(InputStream stream) throws IOException { int ch; StringBuilder sb = new StringBuilder(); while((ch = stream.read())!= -1) sb.append((char)ch); return sb.toString(); } public void add...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
return Utils.startsWithEU(this.accountToken) ? EU_API_ENDPOINT : API_ENDPOINT;
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/CreateEndUserTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static org.assertj.core.api.Assertions.assertThat;
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class CreateEndUserTaskTest { private static final String ACCESS_TOKEN = "accessToken";
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
@Mock WootricApiCallback wootricApiCallback;
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/network/tasks/GetAccessTokenTask.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import org.json.JSONException; import org.json.JSONObject;
/* * Copyright (c) 2016 Wootric (https://wootric.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modi...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
public GetAccessTokenTask(String clientId, String accountToken, WootricApiCallback wootricApiCallback) {
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/objects/SettingsTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
import android.net.Uri; import android.util.Log; import com.wootric.androidsdk.Constants; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.robolectric.Robolectri...
package com.wootric.androidsdk.objects; @RunWith(RobolectricTestRunner.class) public class SettingsTest { public static final String LOCALIZED_FINAL_THANK_YOU = "Localized final thank you!"; public static final String LOCALIZED_THANK_YOU_SETUP = "Localized thank you setup"; public static final Strin...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
assertThat(settings.firstSurveyDelayPassed(Constants.NOT_SET)).isTrue();
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/network/tasks/GetEndUserByEmailTask.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener;
/* * Copyright (c) 2016 Wootric (https://wootric.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modi...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
public GetEndUserByEmailTask(String email, String accessToken, String accountToken, WootricApiCallback wootricApiCallback) {
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/GetEndUserByEmailTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static org.assertj.core.api.Assertions.assertThat;
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class GetEndUserByEmailTaskTest { private static final String ACCESS_TOKEN = "accessToken";
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
@Mock WootricApiCallback wootricApiCallback;
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/UpdateEndUserTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import com.wootric.androidsdk.objects.EndUser; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static com.wootric.androidsdk.TestHelper.testEndUser; import static org.assertj.c...
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class UpdateEndUserTaskTest { private static final String ACCESS_TOKEN = "accessToken"; @Mock
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
WootricApiCallback wootricApiCallback;
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/UpdateEndUserTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import com.wootric.androidsdk.objects.EndUser; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static com.wootric.androidsdk.TestHelper.testEndUser; import static org.assertj.c...
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class UpdateEndUserTaskTest { private static final String ACCESS_TOKEN = "accessToken"; @Mock WootricApiCallback wootricApiCallback; @Test public void testGet_RequestWithEuToken() throws Exception {
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
EndUser endUser = testEndUser();
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/UpdateEndUserTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import com.wootric.androidsdk.objects.EndUser; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static com.wootric.androidsdk.TestHelper.testEndUser; import static org.assertj.c...
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class UpdateEndUserTaskTest { private static final String ACCESS_TOKEN = "accessToken"; @Mock WootricApiCallback wootricApiCallback; @Test public void testGet_RequestWithEuToken() throws Exception {
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
EndUser endUser = testEndUser();
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/objects/WootricCustomThankYou.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/utils/Utils.java // public final class Utils { // // private Utils(){} // // public static <T> T checkNotNull(T object, String objectDescription) { // if(object == null) { // throw new IllegalArgumentException(objectDescription + " m...
import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; import com.wootric.androidsdk.utils.Utils; import org.json.JSONException; import org.json.JSONObject;
this.detractorCommentInUrl = detractorCommentInUrl; } public void setPassiveCommentInUrl(boolean passiveCommentInUrl) { this.passiveCommentInUrl = passiveCommentInUrl; } public void setPromoterCommentInUrl(boolean promoterCommentInUrl) { this.promoterCommentInUrl = promoterComm...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/utils/Utils.java // public final class Utils { // // private Utils(){} // // public static <T> T checkNotNull(T object, String objectDescription) { // if(object == null) { // throw new IllegalArgumentException(objectDescription + " m...
dest.writeByte(Utils.getByteValue(this.emailInUrl));
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/objects/LocalizedTexts.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
import java.util.HashMap; import android.os.Parcel; import android.os.Parcelable; import com.wootric.androidsdk.Constants; import org.json.JSONException; import org.json.JSONObject;
dest.writeString(this.editScore); dest.writeString(this.optOut); dest.writeSerializable(this.socialShare); } private LocalizedTexts(Parcel in) { this.surveyQuestion = in.readString(); this.anchors = (HashMap<String, String>) in.readSerializable(); this.followupQu...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
if (surveyType.equals(Constants.CES) || surveyType.equals(Constants.CSAT)) {
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/objects/WootricSocial.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/utils/Utils.java // public final class Utils { // // private Utils(){} // // public static <T> T checkNotNull(T object, String objectDescription) { // if(object == null) { // throw new IllegalArgumentException(objectDescription + " m...
import android.os.Parcel; import android.os.Parcelable; import com.wootric.androidsdk.utils.Utils; import org.json.JSONException; import org.json.JSONObject;
this.twitterPage = wootricSocial.twitterPage; this.facebookEnabled = wootricSocial.facebookEnabled; this.twitterEnabled = wootricSocial.twitterEnabled; } public void setFacebookPageId(String facebookPageId) { this.facebookPageId = facebookPageId; } public String getFacebookPageId()...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/utils/Utils.java // public final class Utils { // // private Utils(){} // // public static <T> T checkNotNull(T object, String objectDescription) { // if(object == null) { // throw new IllegalArgumentException(objectDescription + " m...
dest.writeByte(Utils.getByteValue(facebookEnabled));
Wootric/WootricSDK-Android
androidsdk/src/main/java/com/wootric/androidsdk/utils/PreferencesUtils.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import com.wootric.androidsdk.Constants; import java.lang.ref.WeakReference; import java.util.Date;
} public void touchLastSurveyed(boolean responseSent, Integer resurvey_days) { final SharedPreferences prefs = prefs(); if(prefs == null) return; SharedPreferences.Editor editor = prefs.edit(); if(editor == null) return; editor.putLong(KEY_LAST_SURVEYED, new Date().get...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
days = (int) Constants.DEFAULT_DECLINE_RESURVEY_DAYS;
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/utils/PreferencesUtilsTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
import android.content.Context; import android.content.SharedPreferences; import com.wootric.androidsdk.Constants; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner;...
@Before public void before() throws Exception { this.context = Mockito.mock(Context.class); this.weakReference = Mockito.mock(WeakReference.class); this.prefs = Mockito.mock(SharedPreferences.class); preferencesUtils = new PreferencesUtils(weakReference); Mockito.when(wea...
// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java // public class Constants { // // public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L; // // public static final int NOT_SET = -1; // // public static final long DEFAULT_RESURVEY_DAYS = 90L; // // public static final l...
Mockito.when(prefs.getLong(Mockito.eq("surveyed"), Mockito.anyLong())).thenReturn(now - Constants.DAY_IN_MILLIS * 32L);
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/GetAccessTokenTaskTest.java
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
import com.wootric.androidsdk.network.WootricApiCallback; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.robolectric.RobolectricTestRunner; import static org.assertj.core.api.Assertions.assertThat;
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class GetAccessTokenTaskTest {
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/WootricApiCallback.java // public interface WootricApiCallback { // void onAuthenticateSuccess(String accessToken); // void onGetEndUserIdSuccess(long endUserId); // void onEndUserNotFound(); // void onCreateEndUserSuccess(long endUserId);...
@Mock WootricApiCallback wootricApiCallback;