Source

as3snapi / as3snapi-core / src / as3snapi / networks / mock / ConfigMock.as

Diff from to

File as3snapi-core/src/as3snapi/networks/mock/ConfigMock.as

  * Настройки для оффлайновой mock-сети на основе заранее подготовленных данных
  */
 public class ConfigMock extends NetworkConfigBase implements INetworkConfig {
-    private var data:Object;
-    private var dataUrl:String;
+    private var snapshot:Object;
+    private var snapshotUrl:String;
+    private var available:Boolean = true;
 
     public function ConfigMock() {
     }
 
-    public function setData(data:Object):ConfigMock {
-        this.data = data;
+    public function setSnapshot(snapshot:Object):ConfigMock {
+        this.snapshot = snapshot;
         return this;
     }
 
-    public function getData():Object {
-        return data;
+    public function getSnapshot():Object {
+        return snapshot;
     }
 
-    public function setDataUrl(dataUrl:String):ConfigMock {
-        this.dataUrl = dataUrl;
+    /**
+     * Урл JSON файла со снимком для соц сети
+     * @param snapshotUrl
+     * @return
+     */
+    public function setSnapshotUrl(snapshotUrl:String):ConfigMock {
+        this.snapshotUrl = snapshotUrl;
         return this;
     }
 
     public function getDataUrl():String {
-        return dataUrl;
+        return snapshotUrl;
     }
 
+    public function setAvailable(available:Boolean):ConfigMock {
+        this.available = available;
+        return this;
+    }
+
+    public function isAvailable():Boolean {
+        return available;
+    }
 }
 }