You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

315 lines
8.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* 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, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* 文件: GTaskStringUtils.java
* 描述: Google Tasks同步功能相关的字符串常量定义类
* 作用: 定义Google Tasks API交互所需的JSON字段名称和常量值便于同步功能的实现
*/
package net.micode.notes.tool;
/**
* Google Tasks字符串工具类
*
* 该类定义了与Google Tasks同步功能相关的所有字符串常量包括
* - JSON字段名称
* - 操作类型常量
* - 实体类型常量
* - 文件夹名称前缀
* - 元数据标识符
*
* 这些常量用于构建和解析与Google Tasks API交互的JSON数据
*/
public class GTaskStringUtils {
/**
* JSON字段名: 操作ID
* 用于标识同步操作的唯一ID
*/
public final static String GTASK_JSON_ACTION_ID = "action_id";
/**
* JSON字段名: 操作列表
* 包含多个操作的数组
*/
public final static String GTASK_JSON_ACTION_LIST = "action_list";
/**
* JSON字段名: 操作类型
* 指定要执行的操作类型
*/
public final static String GTASK_JSON_ACTION_TYPE = "action_type";
/**
* 操作类型常量: 创建
* 用于创建新的任务或列表
*/
public final static String GTASK_JSON_ACTION_TYPE_CREATE = "create";
/**
* 操作类型常量: 获取全部
* 用于获取所有任务或列表
*/
public final static String GTASK_JSON_ACTION_TYPE_GETALL = "get_all";
/**
* 操作类型常量: 移动
* 用于移动任务位置或更改任务所属列表
*/
public final static String GTASK_JSON_ACTION_TYPE_MOVE = "move";
/**
* 操作类型常量: 更新
* 用于更新现有任务或列表的内容
*/
public final static String GTASK_JSON_ACTION_TYPE_UPDATE = "update";
/**
* JSON字段名: 创建者ID
* 任务或列表的创建者标识
*/
public final static String GTASK_JSON_CREATOR_ID = "creator_id";
/**
* JSON字段名: 子实体
* 包含子任务或子列表的数组
*/
public final static String GTASK_JSON_CHILD_ENTITY = "child_entity";
/**
* JSON字段名: 客户端版本
* 客户端应用的版本号
*/
public final static String GTASK_JSON_CLIENT_VERSION = "client_version";
/**
* JSON字段名: 已完成
* 表示任务是否已完成
*/
public final static String GTASK_JSON_COMPLETED = "completed";
/**
* JSON字段名: 当前列表ID
* 当前操作的列表ID
*/
public final static String GTASK_JSON_CURRENT_LIST_ID = "current_list_id";
/**
* JSON字段名: 默认列表ID
* 用户的默认列表ID
*/
public final static String GTASK_JSON_DEFAULT_LIST_ID = "default_list_id";
/**
* JSON字段名: 已删除
* 表示任务或列表是否已被删除
*/
public final static String GTASK_JSON_DELETED = "deleted";
/**
* JSON字段名: 目标列表
* 移动操作的目标列表
*/
public final static String GTASK_JSON_DEST_LIST = "dest_list";
/**
* JSON字段名: 目标父级
* 移动操作的目标父级任务
*/
public final static String GTASK_JSON_DEST_PARENT = "dest_parent";
/**
* JSON字段名: 目标父级类型
* 移动操作的目标父级类型
*/
public final static String GTASK_JSON_DEST_PARENT_TYPE = "dest_parent_type";
/**
* JSON字段名: 实体变更
* 描述实体变更的数据
*/
public final static String GTASK_JSON_ENTITY_DELTA = "entity_delta";
/**
* JSON字段名: 实体类型
* 指定实体的类型(任务或列表)
*/
public final static String GTASK_JSON_ENTITY_TYPE = "entity_type";
/**
* JSON字段名: 获取已删除
* 是否获取已删除的任务或列表
*/
public final static String GTASK_JSON_GET_DELETED = "get_deleted";
/**
* JSON字段名: ID
* 任务或列表的唯一标识符
*/
public final static String GTASK_JSON_ID = "id";
/**
* JSON字段名: 索引
* 任务在列表中的位置索引
*/
public final static String GTASK_JSON_INDEX = "index";
/**
* JSON字段名: 最后修改时间
* 任务或列表的最后修改时间戳
*/
public final static String GTASK_JSON_LAST_MODIFIED = "last_modified";
/**
* JSON字段名: 最新同步点
* 最近一次同步的时间点
*/
public final static String GTASK_JSON_LATEST_SYNC_POINT = "latest_sync_point";
/**
* JSON字段名: 列表ID
* 任务所属的列表ID
*/
public final static String GTASK_JSON_LIST_ID = "list_id";
/**
* JSON字段名: 列表
* 包含多个列表的数组
*/
public final static String GTASK_JSON_LISTS = "lists";
/**
* JSON字段名: 名称
* 任务或列表的名称
*/
public final static String GTASK_JSON_NAME = "name";
/**
* JSON字段名: 新ID
* 创建操作后分配的新ID
*/
public final static String GTASK_JSON_NEW_ID = "new_id";
/**
* JSON字段名: 便签
* 包含多个便签的数组
*/
public final static String GTASK_JSON_NOTES = "notes";
/**
* JSON字段名: 父级ID
* 子任务的父任务ID
*/
public final static String GTASK_JSON_PARENT_ID = "parent_id";
/**
* JSON字段名: 前一个兄弟ID
* 列表中当前任务前一个任务的ID
*/
public final static String GTASK_JSON_PRIOR_SIBLING_ID = "prior_sibling_id";
/**
* JSON字段名: 结果
* API操作的结果数据
*/
public final static String GTASK_JSON_RESULTS = "results";
/**
* JSON字段名: 源列表
* 移动操作的源列表
*/
public final static String GTASK_JSON_SOURCE_LIST = "source_list";
/**
* JSON字段名: 任务
* 包含多个任务的数组
*/
public final static String GTASK_JSON_TASKS = "tasks";
/**
* JSON字段名: 类型
* 实体的类型标识
*/
public final static String GTASK_JSON_TYPE = "type";
/**
* 实体类型常量: 组/文件夹
* 表示实体是一个组或文件夹
*/
public final static String GTASK_JSON_TYPE_GROUP = "GROUP";
/**
* 实体类型常量: 任务
* 表示实体是一个任务
*/
public final static String GTASK_JSON_TYPE_TASK = "TASK";
/**
* JSON字段名: 用户
* 用户标识信息
*/
public final static String GTASK_JSON_USER = "user";
/**
* 文件夹名称前缀
* 用于标识MIUI便签创建的文件夹
*/
public final static String MIUI_FOLDER_PREFFIX = "[MIUI_Notes]";
/**
* 默认文件夹名称
* 用于存储默认便签
*/
public final static String FOLDER_DEFAULT = "Default";
/**
* 通话记录文件夹名称
* 用于存储通话记录便签
*/
public final static String FOLDER_CALL_NOTE = "Call_Note";
/**
* 元数据文件夹名称
* 用于存储同步元数据
*/
public final static String FOLDER_META = "METADATA";
/**
* 元数据头部: Google Task ID
* 用于存储便签对应的Google Task ID
*/
public final static String META_HEAD_GTASK_ID = "meta_gid";
/**
* 元数据头部: 便签
* 用于标识便签元数据
*/
public final static String META_HEAD_NOTE = "meta_note";
/**
* 元数据头部: 数据
* 用于标识便签数据元数据
*/
public final static String META_HEAD_DATA = "meta_data";
/**
* 元数据便签名称
* 用于标识元数据便签,提示用户不要更新或删除
*/
public final static String META_NOTE_NAME = "[META INFO] DON'T UPDATE AND DELETE";
}