外观
finApp
原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793554161/FIN+5.3.1+finApp 中文整理基于 FIN 5.3.1
finApp
FIN 应用框架
classes
| CalendarServiceWeb | 日历服务 REST API 处理器。 |
| FinAppMod | finApp 的主要系统模块。 |
| FinAppWeb | FIN5 中的 FINx REST API。 |
| FinWebUtil | FIN web utilities. |
| HistoryServiceWeb | 历史服务 REST API 处理程序。 |
| HostInfoServiceWeb | 主机信息 REST API 处理程序。 |
| RecordServiceWeb | 记录服务 REST API 处理程序。 |
| RecordUtil | 记录用于与账册数据库交互的实用方法。 |
| ScheduleServiceWeb | 调度服务 REST API 处理程序。 |
CalendarServiceWeb
const class CalendarServiceWeb : Obj, Weblet
日历服务 REST API 处理器。
Constructors
--- --- 制作
Methods
--- --- 在服务上
插槽详情
make
new make(Proj proj)
onService
虚拟重写 Void onService()
FinAppMod
const 类 FinAppMod : SysMod
finApp 的主要系统模块。
Fields
--- --- api 网页 特殊网页服务处理。
插槽详情
api
const static Str api := "finApp"
web
virtual const override FinAppWeb web := FinAppWeb.<ctor (this)
特殊网页服务处理。
FinAppWeb
const 类 FinAppWeb : SysWeb
FIN5 中的 FINx REST API。
请注意,这是一个不完整的实现。目前仅为支持的应用程序实现了最基本的功能。
这些可以通过 </finApp/{pathToEndPoint} > 访问。
Constructors
--- --- 制作
Methods
--- --- 在服务上
插槽详情
make
new make(SysMod 模块)
onService
虚拟重写 Void onService()
FinWebUtil
const class FinWebUtil : Obj
FIN 网络工具。
Fields
| CACHE_CONTROL | 用于 REST API 响应的缓存控制头。 |
| HAYSON_MIME_TYPE | Hayson MIME type. |
Methods
| writeCreated | 已创建状态。 |
| writeOk | Write status ok. |
插槽详情
缓存控制
const static Str CACHE_CONTROL := "no-cache, no-store"
用于 REST API 响应的缓存控制头。
HAYSON_媒体类型
const static Str HAYSON_MIME_TYPE := "application/vnd.haystack+json"
Hayson MIME 类型。
writeCreated
静态 void writeCreated(WebRes res, Obj value, Str location)
已创建状态。
writeOk
静态 Void writeOk(WebRes res, Obj value)
写状态为ok。
HistoryServiceWeb
class HistoryServiceWeb : Obj, Weblet
历史服务 REST API 处理程序。
Constructors
| make |
Methods
| decodeQueryParamsOptions | 用于解码请求的选项查询参数。 |
| onService | |
| queryHistories | 根据提供的标准读取历史记录,并将数据以网格形式返回。 |
插槽详情
decodeQueryParamsOptions
字典?decodeQueryParamsOptions(字符串:字符串 查询)
用于解码请求的选项查询参数。
make
new make(Proj proj, Context cx)
onService
虚拟重写 Void onService()
queryHistories
网格?queryHistories(Ref[] hisRefs, Str? filter, Str? range, Str? rollup, Str? tz, Dict options)
根据提供的标准读取历史记录,并将数据以网格形式返回。
HostInfoServiceWeb
const 类 HostInfoServiceWeb : Obj, Weblet
主机信息 REST API 处理程序。
Constructors
--- --- 制作
Methods
--- --- 在服务上
插槽详情
make
new make(Sys sys)
onService
虚拟重写 Void onService()
RecordServiceWeb
const class RecordServiceWeb : Obj, Weblet
记录服务 REST API 处理程序。
Constructors
--- --- 制作
Methods
--- --- 在服务上
插槽详情
make
new make(Proj proj, Namespace ns)
onService
虚拟重写 Void onService()
RecordUtil
const class RecordUtil : Obj
记录用于与账册数据库交互的实用方法。
Constructors
| make |
Fields
| RECORD_DUPLICATION_LIMIT |
Methods
| createRecord | 创建新记录并返回它。 |
| createRecords | 创建多个记录。 |
| deleteRecordById | 通过其ID删除记录并返回其原始值。 |
| deleteRecordsByFilter | 通过查询筛选器来删除记录。 |
| deleteRecordsByIds | 按 ID 删除记录。 |
| duplicateRecord | 将指定的记录复制 N 次。 |
| updateRecords | 更新记录并返回每条记录的 id 和 mod。 |
| updateRecordsByFilter | 更新记录并返回每条记录的 id 和 mod。 |
插槽详情
记录重复限制
const static Int RECORD_DUPLICATION_LIMIT := 500
createRecord
字典?创建记录(字典 rec)
创建新记录并返回它。
createRecords
Dict[] 创建记录(Dict[] recs)
创建多个记录。
deleteRecordById
字典? deleteRecordById(引用 id)
通过其ID删除记录并返回其原始值。
deleteRecordsByFilter
Dict[] deleteRecordsByFilter(Str filter)
通过查询干草过滤器删除记录。返回被删除的记录。
deleteRecordsByIds
Dict[] deleteRecordsByIds(Ref[] ids)
按 ID 删除记录。
duplicateRecord
Ref[] duplicateRecord(Ref id, Int count, Bool includeChildren)
将指定的记录复制 N 次。
make
new make(Proj proj, Namespace ns)
updateRecords
Dict[] 更新记录(Dict[] 更新后的字典)
更新记录并返回每条记录的 id 和 mod。
updateRecordsByFilter
Dict[] updateRecordsByFilter(Dict 标签, Str 过滤器)
更新记录并返回每条记录的 id 和 mod。
ScheduleServiceWeb
const class ScheduleServiceWeb : Obj, Weblet
调度服务 REST API 处理程序。
Constructors
--- --- 制作
Methods
--- --- 在服务上
插槽详情
make
new make(Proj proj)
onService
虚拟重写 Void onService()