<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0" version="26.1.3">
  <diagram name="第 1 页" id="MwRN_WMEErkvkInclADS">
    <mxGraphModel dx="2095" dy="1873" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <UserObject label="" plantUmlData="{&#xa;  &quot;data&quot;: &quot;@startuml\nactor User\nparticipant GTaskManager\nparticipant GTaskClient\nparticipant SQLiteDB\nparticipant GoogleAPI\n\nUser -&gt; GTaskManager: 触发同步\nGTaskManager -&gt; GTaskClient: login()\nGTaskClient -&gt; GoogleAPI: 认证请求\nGoogleAPI --&gt; GTaskClient: 返回Cookie\nGTaskManager -&gt; GTaskClient: getTaskLists()\nGTaskClient -&gt; GoogleAPI: 获取任务列表\nGoogleAPI --&gt; GTaskClient: JSON数据\nGTaskManager -&gt; SQLiteDB: 查询本地数据\nSQLiteDB --&gt; GTaskManager: 返回Cursor\nGTaskManager -&gt; GTaskManager: 生成差异报告\nGTaskManager -&gt; GTaskClient: createTask()\nGTaskClient -&gt; GoogleAPI: 提交创建请求\nGoogleAPI --&gt; GTaskClient: 返回新GID\nGTaskManager -&gt; SQLiteDB: 更新本地记录\nGTaskManager -&gt; GTaskClient: commitUpdate()\nGTaskClient -&gt; GoogleAPI: 批量提交\nGoogleAPI --&gt; GTaskManager: 同步完成\n@enduml\n&quot;,&#xa;  &quot;format&quot;: &quot;svg&quot;&#xa;}" id="_DaOkrPjg9U_L7mq1ER6-1">
          <mxCell style="shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,[encoded data, 14740 characters];" vertex="1" parent="1">
            <mxGeometry x="170" y="-260" width="432" height="667" as="geometry" />
          </mxCell>
        </UserObject>
        <UserObject label="" plantUmlData="{&#xa;  &quot;data&quot;: &quot;@startuml\nclass GTaskManager {\n  - mInstance: GTaskManager\n  - mGTaskListHashMap: HashMap&lt;String,TaskList&gt;\n  - mGidToNid: HashMap&lt;String,Long&gt;\n  - mSyncing: boolean\n  \n  + getInstance(): GTaskManager\n  + sync(Context, GTaskASyncTask): int\n  - initGTaskList()\n  - syncContent()\n  - doContentSync(int,Node,Cursor)\n}\n\nclass GTaskClient {\n  - mHttpClient: DefaultHttpClient\n  - mClientVersion: long\n  \n  + getInstance(): GTaskClient\n  + createTask(Task)\n  + commitUpdate()\n}\n\nclass SqlNote {\n  - mContext: Context\n  - mContentValues: ContentValues\n  \n  + setGtaskId(String)\n  + commit(boolean)\n  + getContent(): JSONObject\n}\n\nclass TaskList {\n  - mName: String\n  - mChildren: List&lt;Task&gt;\n  \n  + addChildTask(Task)\n  + setContentByRemoteJSON(JSONObject)\n}\n\nclass Task {\n  - mGid: String\n  - mTitle: String\n  - mParent: TaskList\n  \n  + getCreateAction(int): JSONObject\n}\n\nclass MetaData {\n  - mRelatedGid: String\n  - mLastModified: long\n  \n  + setMeta(String,JSONObject)\n}\n\nGTaskManager --&gt; GTaskClient : 调用\nGTaskManager --&gt; SqlNote : 操作\nGTaskManager --&gt; TaskList : 管理\nGTaskClient --&gt; Task : 创建\nTaskList \&quot;1\&quot; *-- \&quot;many\&quot; Task : 包含\nSqlNote ..&gt; JSONObject : 序列化\nGTaskManager --&gt; MetaData : 维护\nMetaData --&gt; Task : 关联\n\nnote right of GTaskManager\n采用单例模式设计\n管理同步状态机\n维护GID-NID映射表\n处理冲突解决策略\nend note\n@enduml\n&quot;,&#xa;  &quot;format&quot;: &quot;svg&quot;&#xa;}" id="_DaOkrPjg9U_L7mq1ER6-2">
          <mxCell style="shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,[encoded data, 30496 characters];" vertex="1" parent="1">
            <mxGeometry x="-160" y="440" width="1066" height="577" as="geometry" />
          </mxCell>
        </UserObject>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
