Skip to content

finStackHost ​

原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793816223/FIN+5.3.1+finStackHost 中文整理基于 FIN 5.3.1

导读: 本页为 finStackHost 的 API 参考文档。

以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。


目录(导读) ​

  • mixins
  • classes
  • enums
  • facets
  • errs
  • Slot Details
    • endTime
    • handle
    • make
    • progress
    • result
    • startTime
    • status
    • toDict
    • completed
    • failed
    • fromStr
    • queued
    • running
    • vals
    • env
    • extMeta
    • finMeta
    • funcLibTypeName
    • toInput
    • type
    • code
    • depends
    • extAdd
    • extRemove
    • extSpiRef
    • extType
    • proj
    • web
    • mod
    • onService
    • INSTANCE
    • clear
    • hashFile
    • hashRecord
    • date
    • hashValue
    • key
    • cur
    • expr
    • receive
    • userId
    • evalAsync
    • evalAsyncCur
    • evalAsyncDebug
    • evalAsyncDestroy
    • evalAsyncPoll
    • evalAsyncProgress
    • pool
    • stop
    • sys
    • user
    • lib
    • onStop
    • HOUSE_KEEPING_FREQ
    • POLL_EXPIRED_THRESHOLD
    • add
    • getAsyncEval
    • getFuture
    • houseKeeping
    • isEmpty
    • remove
    • _status
    • authenticate
    • usersMigrationFuture
    • defaultBrandFile
    • getBrandDis
    • getBrandFile
    • getBrandMeta
    • getBrandMetaFromFile
    • getBrandZip
    • useBackupBranding
    • subscriptionClose
    • subscriptionConfirm
    • subscriptionOpen
    • subscriptionPing
    • subscriptionPoll
    • subscriptions
    • byName
    • get
    • list
    • onExtAdded
    • onExtRemoved
    • onProjsUpdated
    • onReload
    • onStart
    • ext
    • extFragments
    • hisSyncExt
    • hisSyncExtRef
    • pointWriteExt
    • pointWriteExtRef
    • createFeature
    • createNamespace
    • FIN_EULA_USER_ID
    • FIN_EULA_VERSION
    • bootId
    • filterObject
    • finCreateProject
    • finCurrentUserExistsInDb
    • finMigrateProject
    • finProjBackup
    • finProjBackups
    • finProtectBackup
    • finReadBin
    • folioBackupRestore
    • isPermitted
    • protectedSnapshotsEnabled
    • secureEval
    • secureReadAll
    • secureReadAllInternal
    • DEFAULT_MAX_LOGIN_ATTEMPTS
    • DEFAULT_PASSWORD_EXP
    • attach
    • makeBoot
  • …(其余标题见英文正文)

API 正文(英文) ​

| FinProjTest | Boots most of the FIN framework so automated tests can be run. | | FinProjWeb | | | FinResourceMod | | | FinResourceWeb | | | FinSnapshotsLib | | | FinSnapshotsMod | | | FinSnapshotsTree | | | FinSnapshotsWeb | | | FinStackMobileProjMod | FinStackMobileProjMod is a plugin to top-level of SkySpark HTTP URI namespace. | | FinStackMobileProjWeb | | | FinStdProjMod | | | FinUploadFileMod | | | FinUploadFileWeb | | | FinUtils | Basic utility functions | | InstallDefFactory | | | LicenseProductUtil | License product utility methods. | | MInstallNamespace | | | Main | Bootstrapping main for FinStack. | | MigrateTools | Custom migration tool UI | | MigrationFunctions | | | PasswordProtect | | | RemoteSnapshot | | | ReverseProxyCertAndKeyImporter | | | SnapshotCategoryNode | | | SnapshotLocalNode | | | SnapshotObservable | | | SnapshotRemoteNode | | | SnapshotRootNode | | | SnapshotTreeNode | | | SquelchLog | A special log that allows for squelching all log events for a duration. | | SubscriptionStore | | | UserLoginToken | | | UsersMigration | User migration tools for complementing the Skyspark built-ins | | WebFileCache | | | WebFileCacheEntry | |


enums ​

AsyncEvalPollStatusFinAsyncEval states
ImportMode
UserRoleThe different user roles in the system.

facets ​

FinMeta

errs ​

ExitCode

AsyncEvalPollInfo ​

const class AsyncEvalPollInfo : Obj

Polling and status information about a FinAsyncEval.

Constructors

make

Fields

endTime
handle
progress
result
startTime
status

Methods

toDict

Slot Details ​


endTime ​

const DateTime? endTime


handle ​

const Str handle


make ​

new make(FinAsyncEval curEval, Obj? result := null)


progress ​

const Number progress


result ​

const Obj? result


startTime ​

const DateTime? startTime


status ​

const AsyncEvalPollStatus status


toDict ​

Dict toDict()


AsyncEvalPollStatus ​

@Serializable { simple=true } enum class AsyncEvalPollStatus : Enum

FinAsyncEval states

Enum

queued
running
completed
failed

Constructors

fromStrReturn the AsyncEvalPollStatus instance for the specified name.

Fields

valsList of AsyncEvalPollStatus values indexed by ordinal

Slot Details ​


completed ​

const static AsyncEvalPollStatus completed := ...


failed ​

const static AsyncEvalPollStatus failed := ...


fromStr ​

static new fromStr(Str name, Bool checked := true)

Return the AsyncEvalPollStatus instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.


queued ​

const static AsyncEvalPollStatus queued := ...


running ​

const static AsyncEvalPollStatus running := ...


vals ​

const static AsyncEvalPollStatus[] vals := ...

List of AsyncEvalPollStatus values indexed by ordinal


BFinExtLibInput ​

class BFinExtLibInput : Obj

Fields

env
extMeta
finMeta
funcLibTypeName
type

Methods

make
toInput

Slot Details ​


env ​

InstallDefEnv env


extMeta ​

ExtMeta extMeta


finMeta ​

FinMeta? finMeta


funcLibTypeName ​

Str? funcLibTypeName


make ​

static BFinExtLibInput? make(InstallDefEnv env, Str qname, Str[] axonLibs)


toInput ​

LibInput toInput()


type ​

Type type


ExitCode ​

const class ExitCode : Err

Constructors

make

Fields

code

Slot Details ​


code ​

const Int code


make ​

new make(Int code)


ExtFragment ​

const class ExtFragment : Obj

Constructors

make

Fields

depends
extSpiRef
extType
proj

Methods

extAdd
extRemove

Slot Details ​


depends ​

const Str[] depends


extAdd ​

Void extAdd()


extRemove ​

Void extRemove()


extSpiRef ​

const AtomicRef extSpiRef


extType ​

const Type extType


make ​

new make(FinCoreMiscProj proj, Str qname, AtomicRef extSpiRef)


proj ​

const FinCoreMiscProj proj


FINStackSecureDataMod ​

const class FINStackSecureDataMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FINStackSecureDataWeb web := FINStackSecureDataWeb.<ctor>(this)


FINStackSecureDataWeb ​

const class FINStackSecureDataWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FINStackSecureDataMod mod)


mod ​

const FINStackSecureDataMod mod


onService ​

virtual override Void onService()


FileHashCache ​

const class FileHashCache : Obj

Constructors

make

Fields

INSTANCE

Methods

clear
hashFile
hashRecord

Slot Details ​


INSTANCE ​

const static FileHashCache INSTANCE := FileHashCache.<ctor>()


clear ​

Void clear()


hashFile ​

Str hashFile(File file)


hashRecord ​

Str hashRecord(Dict fileRec)


make ​

new make()


FileHashCacheEntry ​

const class FileHashCacheEntry : Obj

Constructors

make

Fields

date
hashValue
key

Slot Details ​


date ​

const DateTime date


hashValue ​

const Str hashValue


key ​

const Str key


make ​

new make(Str key, DateTime date, Str hash)


FinAPIMod ​

const class FinAPIMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinAPIWeb web := FinAPIWeb.<ctor>(this)


FinAPIWeb ​

const class FinAPIWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinAPIMod mod)


mod ​

const FinAPIMod mod


onService ​

virtual override Void onService()


FinApplicationMod ​

const class FinApplicationMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinApplicationWeb web := FinApplicationWeb.<ctor>(this)


FinApplicationWeb ​

const class FinApplicationWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinApplicationMod mod)


mod ​

const FinApplicationMod mod


onService ​

virtual override Void onService()


FinAsyncEval ​

const class FinAsyncEval : Actor

The actor that runs the evaluation asynchronously.

Constructors

make

Fields

expr
handle
userId

Methods

curGet the currently running asynchronous eval
receiveReceives the actor message and starts the eval.

Slot Details ​


cur ​

static FinAsyncEval? cur()

Get the currently running asynchronous eval


expr ​

const Expr expr


handle ​

const Str handle


make ​

new make(ActorPool pool, Expr expr, Ref userId)


receive ​

virtual override Obj? receive(Obj? msg)

Receives the actor message and starts the eval.


userId ​

const Ref userId


FinAsyncEvalLib ​

const class FinAsyncEvalLib : Obj

Library of evalAsync functions.

Constructors

make

Fields

mod
pool

Methods

evalAsyncStart an asynchronous evaluation of an expression on its own thread.
evalAsyncCurChecks if the current context is in FinAsyncEval
evalAsyncDebugReturn debug info about all current asynchronous evals or a certain eval.
evalAsyncDestroyRemoves resources assigned to the given handle.
evalAsyncPollPolls and return info about the asynchronous eval identified by the provided handle.
evalAsyncProgressAllows the progress of the async eval to be updated.
stopRun all existing handles through evalAsyncDestroy and stop the actor pool.

Slot Details ​


evalAsync ​

@Axon Str evalAsync(Expr expr)

Start an asynchronous evaluation of an expression on its own thread.

Returns a string handle tied to the eval.


evalAsyncCur ​

@Axon static FinAsyncEval? evalAsyncCur(Bool checked := true)

Checks if the current context is in FinAsyncEval


evalAsyncDebug ​

@Axon Dict? evalAsyncDebug(Str? handle := null)

Return debug info about all current asynchronous evals or a certain eval.


evalAsyncDestroy ​

@Axon Bool evalAsyncDestroy(Str handle)

Removes resources assigned to the given handle.


evalAsyncPoll ​

@Axon Obj? evalAsyncPoll(Str handle)

Polls and return info about the asynchronous eval identified by the provided handle.


evalAsyncProgress ​

@Axon static Obj? evalAsyncProgress(Number progress)

Allows the progress of the async eval to be updated.


make ​

new make(FinAsyncEvalMod mod)


mod ​

const FinAsyncEvalMod mod


pool ​

const ActorPool pool


stop ​

Void stop()

Run all existing handles through evalAsyncDestroy and stop the actor pool.


FinAsyncEvalMessage ​

const class FinAsyncEvalMessage : Obj

Message for AsyncEval actor, holds data to create context.

Constructors

make

Fields

proj
sys
user

Slot Details ​


make ​

new make(Sys sys, Proj? proj, User user)


proj ​

const Proj? proj


sys ​

const Sys sys


user ​

const User user


FinAsyncEvalMod ​

const class FinAsyncEvalMod : SysMod

This mod allows the client to execute long running processes on the server without being subject to transport and protocol's connection timeouts. Each expression is evaluted asynchronously on its own background actor thread and can be polled by the client to get the expression's status / result. The actor and future are destroyed upon final polling after the expression's completion or if the expression has not been polled for a given amount of time.

Design documentation can be found at: https://finproducts.atlassian.net/wiki/spaces/DEV/pages/8137277507/Asynchronous+Code+Evaluation

Constructors

make

Fields

lib

Methods

onStop

Slot Details ​


lib ​

const FinAsyncEvalLib lib := FinAsyncEvalLib.<ctor>(this)


make ​

new make()


onStop ​

virtual override Void onStop()


FinAsyncEvalStore ​

const class FinAsyncEvalStore : Obj

Stores information about async evals.

Constructors

make

Fields

HOUSE_KEEPING_FREQ
POLL_EXPIRED_THRESHOLD

Methods

addAdds the asyncEval and future to store.
getAsyncEvalReturns the asyncEval from the store.
getFutureReturns the future from the store.
houseKeepingRemoves async evals info that have not been polled in a while.
isEmptyReturn true if both future and actor maps are empty
removeRemoves both the asyncEval and future from the store.

Slot Details ​


HOUSE_KEEPING_FREQ ​

const Duration HOUSE_KEEPING_FREQ := 30sec


POLL_EXPIRED_THRESHOLD ​

const Duration POLL_EXPIRED_THRESHOLD := 2min


add ​

Void add(FinAsyncEval asyncEval, Future future)

Adds the asyncEval and future to store. If there were no active evaluations a house keeping message is sent.


getAsyncEval ​

FinAsyncEval? getAsyncEval(Str handle)

Returns the asyncEval from the store.


getFuture ​

Future? getFuture(Str handle)

Returns the future from the store.


houseKeeping ​

Void houseKeeping()

Removes async evals info that have not been polled in a while.


isEmpty ​

Bool isEmpty()

Return true if both future and actor maps are empty


make ​

new make(ActorPool pool)


remove ​

Void remove(Str handle)

Removes both the asyncEval and future from the store. If the future is still running it will be canceled.


FinAuthPluginMod ​

const class FinAuthPluginMod : AuthPluginMod

Constructors

make

Fields

_status
usersMigrationFuture

Methods

authenticate

Slot Details ​


_status ​

const Unsafe _status := Unsafe.<ctor>([:])


authenticate ​

virtual override WebServerSession? authenticate(AuthContext cx)


make ​

new make()


usersMigrationFuture ​

const static AtomicRef usersMigrationFuture := AtomicRef.<ctor>()


FinBrandLib ​

const class FinBrandLib : Obj

Methods

defaultBrandFile
getBrandDis
getBrandFile
getBrandMeta
getBrandMetaFromFile
getBrandZip
useBackupBranding

Slot Details ​


defaultBrandFile ​

static File defaultBrandFile()


getBrandDis ​

static Str getBrandDis(Sys? sys := null)


getBrandFile ​

static File? getBrandFile(Zip brandZip, Str fileName)


getBrandMeta ​

static Dict getBrandMeta(Sys? sys := null)


getBrandMetaFromFile ​

static Dict getBrandMetaFromFile(Zip? brandZip)


getBrandZip ​

static Zip? getBrandZip(Sys? sys := null)


useBackupBranding ​

static Bool useBackupBranding(Sys? sys := null)


FinBrandMod ​

const class FinBrandMod : SysMod

Constructors

make

Fields

lib
web

Slot Details ​


lib ​

const FinBrandLib lib := ...


make ​

new make()


web ​

virtual const override FinBrandWeb web := FinBrandWeb.<ctor>(this)


FinBrandWeb ​

const class FinBrandWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinBrandMod mod)


mod ​

const FinBrandMod mod


onService ​

virtual override Void onService()


FinCoreMiscLib ​

const class FinCoreMiscLib : Obj

Core Lib holding axon functions for modules which do not have their own home.

Constructors

make

Fields

mod
subscriptions

Methods

subscriptionClose
subscriptionConfirm
subscriptionOpen
subscriptionPing
subscriptionPoll

Slot Details ​


make ​

new make(FinCoreMiscMod mod)


mod ​

const FinCoreMiscMod mod


subscriptionClose ​

@Axon { meta=... } Void subscriptionClose(Grid req)


subscriptionConfirm ​

@Axon { meta=... } Void subscriptionConfirm(Grid req)


subscriptionOpen ​

@Axon { meta=... } Dict subscriptionOpen(Grid req)


subscriptionPing ​

@Axon { meta=... } Void subscriptionPing(Grid req)


subscriptionPoll ​

@Axon { meta=... } Grid subscriptionPoll(Grid req)


subscriptions ​

const SubscriptionStore subscriptions


FinCoreMiscMod ​

const class FinCoreMiscMod : SysMod, FinProjSysMod

Core Mod holding modules which do not have their own home.

Constructors

make

Fields

lib

Methods

byName
get
list
onExtAdded
onExtRemoved
onProjsUpdated
onReload
onStart
onStop

Slot Details ​


byName ​

Str:FinCoreMiscProj byName()


get ​

@Operator FinCoreMiscProj? get(Str name, Bool checked := true)


lib ​

const FinCoreMiscLib lib := FinCoreMiscLib.<ctor>(this)


list ​

FinCoreMiscProj[] list()


make ​

new make()


onExtAdded ​

virtual override Void onExtAdded(Proj proj, Ext ext)


onExtRemoved ​

virtual override Void onExtRemoved(Proj proj, Ext ext)


onProjsUpdated ​

virtual override Void onProjsUpdated(Proj[] projs)


onReload ​

virtual override Void onReload()


onStart ​

virtual override Void onStart()


onStop ​

virtual override Void onStop()


FinCoreMiscProj ​

const class FinCoreMiscProj : Obj

Constructors

make

Fields

extFragments
hisSyncExtRef
mod
pointWriteExtRef
proj

Methods

ext
hisSyncExt
onExtAdded
onExtRemoved
onStart
onStop
pointWriteExt

Slot Details ​


ext ​

Ext? ext(AtomicRef ref, Bool checked := true)


extFragments ​

const ExtFragment[] extFragments := ...


hisSyncExt ​

Ext? hisSyncExt(Bool checked := true)


hisSyncExtRef ​

const AtomicRef hisSyncExtRef := AtomicRef.<ctor>(null)


make ​

new make(FinCoreMiscMod mod, Proj proj)


mod ​

const FinCoreMiscMod mod


onExtAdded ​

Void onExtAdded(Ext ext)


onExtRemoved ​

Void onExtRemoved(Ext ext)


onStart ​

Void onStart()


onStop ​

Void onStop()


pointWriteExt ​

Ext? pointWriteExt(Bool checked := true)


pointWriteExtRef ​

const AtomicRef pointWriteExtRef := AtomicRef.<ctor>(null)


proj ​

const Proj proj


FinDefFactory ​

const class FinDefFactory : InstallDefFactory

The DefFactory used by FIN that includes creates its given Namespace and Features.

This class may be overriden to provide customization on the def level.

Methods

createFeature
createNamespace

Slot Details ​


createFeature ​

virtual override MFeature createFeature(BFeature b)


createNamespace ​

virtual override FinInstallNamespace createNamespace(BNamespace b)


FinFileUploadMod ​

const class FinFileUploadMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinFileUploadWeb web := FinFileUploadWeb.<ctor>(this)


FinFileUploadWeb ​

const class FinFileUploadWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinFileUploadMod mod)


mod ​

const FinFileUploadMod mod


onService ​

virtual override Void onService()


FinGetFileMod ​

const class FinGetFileMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinGetFileWeb web := FinGetFileWeb.<ctor>(this)


FinGetFileWeb ​

const class FinGetFileWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinGetFileMod mod)


mod ​

const FinGetFileMod mod


onService ​

virtual override Void onService()


FinHTTPPushMod ​

const class FinHTTPPushMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinHTTPPushWeb web := FinHTTPPushWeb.<ctor>(this)


FinHTTPPushWeb ​

const class FinHTTPPushWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinHTTPPushMod mod)


mod ​

const FinHTTPPushMod mod


onService ​

virtual override Void onService()


FinHostLib ​

const class FinHostLib : Obj

Fields

FIN_EULA_USER_IDThe tag name for the FIN EULA user id.
FIN_EULA_VERSIONThe tag name for the FIN EULA version.

Methods

bootId
filterObject
finCreateProjectCreates a new project
finCurrentUserExistsInDbReturn true if the currently logged in user exists in the database.
finMigrateProjectExecute the FIN migration scripts for the current project
finProjBackup
finProjBackupsReturns a list of backups dicts for the given project.
finProtectBackup
finReadBinReads binary tag into a base64 encoded string
folioBackupRestoreRestores a Folio project backup
isPermitted
protectedSnapshotsEnabledReturns if the password protected snapshots feature has been enabled at the host level.
secureEval
secureReadAll
secureReadAllInternal

Slot Details ​


FIN_EULA_USER_ID ​

const static Str FIN_EULA_USER_ID := "finEulaUserId"

The tag name for the FIN EULA user id.


FIN_EULA_VERSION ​

const static Str FIN_EULA_VERSION := "finEulaVersion"

The tag name for the FIN EULA version.


bootId ​

@Axon Str bootId()


filterObject ​

static Obj? filterObject(Context cx, Obj? result)


finCreateProject ​

@Axon { su=true } static Bool finCreateProject(Str projectName, Str displayName, Str description := "", Grid data := Etc.makeEmptyGrid())

Creates a new project

Parameters ​

  • projectName: the name of the project
  • displayName: a user friendly name for the project
  • description(optional): a project description.
  • data(optional): a Grid with records to be added into the new project

Returns ​

  • true if the project was created

Example ​

finCreateProject("somename", "Foo project", "This is a test")

finCurrentUserExistsInDb ​

@Axon static Bool finCurrentUserExistsInDb()

Return true if the currently logged in user exists in the database.


finMigrateProject ​

@Axon { admin=true } static Void finMigrateProject()

Execute the FIN migration scripts for the current project


finProjBackup ​

@Axon static Dict finProjBackup(Ref projRef)


finProjBackups ​

@Axon { admin=true } static Dict[] finProjBackups(Ref? projRef := null)

Returns a list of backups dicts for the given project. Each dict contains the backups size, ts, and file uri.


finProtectBackup ​

@Axon static Bool finProtectBackup(Str backupName, Str? projName := null)


finReadBin ​

@Axon static Str? finReadBin(Obj recOrRef, Str? binTagName := "file")

Reads binary tag into a base64 encoded string

Paramters ​

  • recOrRef - record ref or record
  • binTagName - Binary tag name to read (Defaults to "file")

Returns ​

base 64 encoded string of binary tag

Examples ​

readById(@recordId).finReadBin readById(@recordId).finReadBin("otherThanFileTag")


folioBackupRestore ​

@Axon { admin=true } static Bool folioBackupRestore(DateTime timeStamp, Str? projName := null, Str secret := "")

Restores a Folio project backup

Parameters ​

  • timeStamp: the timestamp of the backup
  • projName: optional project name, defaults to current eval context's project

Returns ​

true if restore was successful

Examples ​

// restores the first backup found
folioBackupRestore(folioBackups()[0])

isPermitted ​

static Bool isPermitted(Dict item, Context cx)


protectedSnapshotsEnabled ​

@Axon { admin=true } static Bool protectedSnapshotsEnabled()

Returns if the password protected snapshots feature has been enabled at the host level.


secureEval ​

@Axon static Obj? secureEval(Expr expr)


secureReadAll ​

@Axon static Obj? secureReadAll(Expr expr)


secureReadAllInternal ​

static Grid? secureReadAllInternal(Expr filter)


FinHostMod ​

const class FinHostMod : SysMod

FinHostMod is a plugin to top-level of SkySpark HTTP URI namespace.

Op     Uri           Description
----   -----------   -----------
GET    /home         Render Fin Host App

All access is within context of login to a specific project.

Constructors

make

Fields

DEFAULT_MAX_LOGIN_ATTEMPTS
DEFAULT_PASSWORD_EXP
lib
web

Methods

onStart
onStop

Slot Details ​


DEFAULT_MAX_LOGIN_ATTEMPTS ​

const Number DEFAULT_MAX_LOGIN_ATTEMPTS := Number.<ctor>(4)


DEFAULT_PASSWORD_EXP ​

const Number DEFAULT_PASSWORD_EXP := Number.<ctor>(90, Unit.fromStr("day"))


lib ​

const FinHostLib lib := ...


make ​

new make()


onStart ​

virtual override Void onStart()


onStop ​

virtual override Void onStop()


web ​

virtual const override FinHostWeb web := FinHostWeb.<ctor>(this)


FinHostWeb ​

const class FinHostWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinHostMod mod)


mod ​

const FinHostMod mod


onService ​

virtual override Void onService()


FinInstallDefCompiler ​

class FinInstallDefCompiler : InstallDefCompiler

Constructors

make
makeBoot

Methods

attach

Slot Details ​


attach ​

static Void attach(Sys sys)


make ​

static new make(Sys sys)


makeBoot ​

new makeBoot(LicRuntime lic, Str:Type modTypes, Dict bootConfig)


FinInstallNamespace ​

const class FinInstallNamespace : MInstallNamespace

The Namespace used by FIN that includes its own features not defined by skyarc.

This class may be overriden to provide customization on the def level.

Constructors

make

Slot Details ​


make ​

new make(BNamespace b)


FinLicenseUploadMod ​

const class FinLicenseUploadMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinLicenseUploadWeb web := FinLicenseUploadWeb.<ctor>(this)


FinLicenseUploadWeb ​

const class FinLicenseUploadWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinLicenseUploadMod mod)


mod ​

const FinLicenseUploadMod mod


onService ​

virtual override Void onService()


FinLocalProj ​

const class FinLocalProj : LocalProj

Constructors

make

Methods

extAdd
extRemove

Slot Details ​


extAdd ​

virtual override Ext extAdd(ExtDef def, Dict tags := Etc.emptyDict())


extRemove ​

virtual override Void extRemove(Obj ext)


make ​

new make(Sys sys, Str name, File dir, Folio folio)


FinManifest ​

const class FinManifest : FinManifestAbs

Constructors

make

Slot Details ​


make ​

new make(FinStdProjMod mod)


FinManifestAbs ​

abstract const class FinManifestAbs : LocalManifest

Constructors

make

Slot Details ​


make ​

new make(FinStdProjMod mod, |This| f)


FinMeta ​

@Serializable facet class FinMeta : Obj, Facet

Fields

extOverride

Slot Details ​


extOverride ​

const Type? extOverride


FinPodMod ​

const class FinPodMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinPodWeb web := FinPodWeb.<ctor>(this)


FinPodWeb ​

const class FinPodWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinPodMod mod)


mod ​

const FinPodMod mod


onService ​

virtual override Void onService()


FinProjBoot ​

class FinProjBoot : Obj

Constructors

make

Methods

createLocal
createReplica
folio
open
start
sys

Slot Details ​


createLocal ​

This createLocal(Dict meta)


createReplica ​

This createReplica(RemoteProj proj, Dict? config)


folio ​

Folio folio()


make ​

new make(ProjBoot superObj)


open ​

This open(Dict? opts := null)


start ​

Proj start(Proj? cur)


sys ​

Sys sys()


FinProjMod ​

const class FinProjMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinProjWeb web := FinProjWeb.<ctor>(this)


FinProjSysMod ​

mixin FinProjSysMod

An installed SysMod implementing this mixin will be notified when the project list has changed.

Methods

onExtAdded
onExtRemoved
onProjsUpdated

Slot Details ​


onExtAdded ​

virtual Void onExtAdded(Proj proj, Ext ext)


onExtRemoved ​

virtual Void onExtRemoved(Proj proj, Ext ext)


onProjsUpdated ​

virtual Void onProjsUpdated(Proj[] projs)


FinProjTest ​

abstract class FinProjTest : ProjTest

Boots most of the FIN framework so automated tests can be run.

https://skyfoundry.com/doc/skyarcd/ProjTest

Fields

finSys

Methods

finAddExt
finDoAddExt
setup
sys

Slot Details ​


finAddExt ​

Ext finAddExt(Str extName, Str:Obj? tags := [Str:Obj?][:])


finDoAddExt ​

Ext? finDoAddExt(Proj proj, Str extName, Str:Obj? tags := [Str:Obj?][:])


finSys ​

protected Sys? finSys


setup ​

virtual override Void setup()


sys ​

virtual override Sys sys()


FinProjWeb ​

const class FinProjWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService
webContextProjGet the project from the current WebReq if possible or default to "demo" if it is the only project, or the first non "demo" project if there are more projects

Slot Details ​


make ​

new make(FinProjMod mod)


mod ​

const FinProjMod mod


onService ​

virtual override Void onService()


webContextProj ​

static Proj? webContextProj(Sys sys, WebReq req)

Get the project from the current WebReq if possible or default to "demo" if it is the only project, or the first non "demo" project if there are more projects


FinResourceMod ​

const class FinResourceMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinResourceWeb web := FinResourceWeb.<ctor>(this)


FinResourceWeb ​

const class FinResourceWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinResourceMod mod)


mod ​

const FinResourceMod mod


onService ​

virtual override Void onService()


FinSnapshotsLib ​

const class FinSnapshotsLib : Obj

Constructors

make

Fields

mod

Methods

finConvertRemoteSnapshotConvert a remote snapshot to a local snapshot
finCreateSnapshotRecordCreates a record in the database to store backups metadata
finDeleteSnapshotRecordsDelete target backup metadata if provided and any other metadata that isn't tied to a backup
finRemoteSnapshotDeleteDelete a remote snapshot by its ID
finRemoteSnapshotsShow all the remote snapshots currently in the system
finSnapshotTreeDataRetrieve the info of snapshots based on their snapshot tree node IDs
finSnapshotTreeInteractions
finSnapshotsTree

Slot Details ​


finConvertRemoteSnapshot ​

@Axon { admin=true } Bool finConvertRemoteSnapshot(Ref id, Bool force := false)

Convert a remote snapshot to a local snapshot


finCreateSnapshotRecord ​

@Axon { admin=true } static Dict? finCreateSnapshotRecord(Obj targetBackup, Dict options := Etc.emptyDict())

Creates a record in the database to store backups metadata


finDeleteSnapshotRecords ​

@Axon { admin=true } static Void finDeleteSnapshotRecords(DateTime? targetTimestamp := null)

Delete target backup metadata if provided and any other metadata that isn't tied to a backup


finRemoteSnapshotDelete ​

@Axon { admin=true } static Void finRemoteSnapshotDelete(Ref id)

Delete a remote snapshot by its ID


finRemoteSnapshots ​

@Axon { admin=true } static Grid finRemoteSnapshots()

Show all the remote snapshots currently in the system


finSnapshotTreeData ​

@Axon { admin=true } static Grid finSnapshotTreeData(Ref[] treeIds)

Retrieve the info of snapshots based on their snapshot tree node IDs


finSnapshotTreeInteractions ​

@Axon { admin=true } static Dict finSnapshotTreeInteractions(Str action, Obj? data := null)


finSnapshotsTree ​

@Axon { admin=true; meta=["finNavTree":Marker.<ctor>("")] } static Grid finSnapshotsTree(Str? node := null, Obj? data := null)


make ​

new make(FinSnapshotsMod mod)


mod ​

const FinSnapshotsMod mod


FinSnapshotsMod ​

const class FinSnapshotsMod : SysMod

Fields

api
lib
observable
observables
projDirPath
web

Methods

get

Slot Details ​


api ​

const static Str api := "finSnapshots"


get ​

@Operator Folio get(Proj proj)


lib ​

const FinSnapshotsLib lib := FinSnapshotsLib.<ctor>(this)


observable ​

const SnapshotObservable observable := SnapshotObservable.<ctor>()


observables ​

virtual const override Observable[] observables := Observable[this.observable]


projDirPath ​

const static Uri projDirPath := `backup/remotes/`


web ​

virtual const override FinSnapshotsWeb web := FinSnapshotsWeb.<ctor>(this)


FinSnapshotsTree ​

const class FinSnapshotsTree : Obj

Fields

metaLocal
metaRemote

Methods

tree

Slot Details ​


metaLocal ​

const static Str:Obj? metaLocal := ...


metaRemote ​

const static Str:Obj? metaRemote := ...


tree ​

static Grid tree(Str? node, Obj? data)


FinSnapshotsWeb ​

const class FinSnapshotsWeb : SysWeb

Constructors

make

Fields

mod

Methods

onGet
onPut
onService

Slot Details ​


make ​

new make(FinSnapshotsMod mod)


mod ​

const FinSnapshotsMod mod


onGet ​

virtual override Void onGet()


onPut ​

virtual override Void onPut()


onService ​

virtual override Void onService()


FinStackMobileProjMod ​

const class FinStackMobileProjMod : SysMod

FinStackMobileProjMod is a plugin to top-level of SkySpark HTTP URI namespace.

Op     Uri           Description
----   -----------   -----------
GET    /fin/{proj}   Render Fin Flash page

All access is within context of login to a specific project.

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinStackMobileProjWeb web := FinStackMobileProjWeb.<ctor>(this)


FinStackMobileProjWeb ​

const class FinStackMobileProjWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService
realmRealm is project name for URI "/fin/{proj}/..."
showFinProject
showLegacyFinProject

Slot Details ​


make ​

new make(FinStackMobileProjMod mod)


mod ​

const FinStackMobileProjMod mod


onService ​

virtual override Void onService()


realm ​

Str? realm()

Realm is project name for URI "/fin/{proj}/..."


showFinProject ​

Void showFinProject(Proj? proj, User user, Dict rec)


showLegacyFinProject ​

Void showLegacyFinProject(Proj? proj, User user, Dict rec)


FinStdProjMod ​

const class FinStdProjMod : StdProjMod

Constructors

make

Slot Details ​


make ​

new make()


FinUploadFileMod ​

const class FinUploadFileMod : SysMod

Constructors

make

Fields

web

Slot Details ​


make ​

new make()


web ​

virtual const override FinUploadFileWeb web := FinUploadFileWeb.<ctor>(this)


FinUploadFileWeb ​

const class FinUploadFileWeb : SysWeb

Constructors

make

Fields

mod

Methods

onService

Slot Details ​


make ​

new make(FinUploadFileMod mod)


mod ​

const FinUploadFileMod mod


onService ​

virtual override Void onService()


FinUtils ​

class FinUtils : Obj

Basic utility functions

Methods

createProject
dictenize
enableProjExts
getFinVersionReturn the current version of FIN.
initProject
mapenize

Slot Details ​


createProject ​

static Bool createProject(Sys sys, Str? projectName, Str? displayName, Str? description, Grid data := Etc.makeEmptyGrid())


dictenize ​

static Obj? dictenize(Obj? item)


enableProjExts ​

static Void enableProjExts(Proj? proj)


getFinVersion ​

static Str getFinVersion()

Return the current version of FIN.


initProject ​

static Void initProject(Proj? proj)


mapenize ​

static Obj? mapenize(Obj? item)


ImportMode ​

@Serializable { simple=true } enum class ImportMode : Enum

Enum

SkipSu
ImportAll

Constructors

fromStrReturn the ImportMode instance for the specified name.

Fields

valsList of ImportMode values indexed by ordinal

Slot Details ​


ImportAll ​

const static ImportMode ImportAll := ...


SkipSu ​

const static ImportMode SkipSu := ...


fromStr ​

static new fromStr(Str name, Bool checked := true)

Return the ImportMode instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.


vals ​

const static ImportMode[] vals := ...

List of ImportMode values indexed by ordinal


InstallDefFactory ​

const class InstallDefFactory : SysDefFactory

Methods

createNamespace

Slot Details ​


createNamespace ​

virtual override MInstallNamespace createNamespace(BNamespace b)


LicenseProductUtil ​

const class LicenseProductUtil : Obj

License product utility methods.

When the environment boots, a product id has to be selected. This utility class contains all the logic for selecting the correct product id to use.

Fields

FIN_CMD_ARGThe FIN license command line argument switch.
SKYSPARK_CMD_ARGThe SkySpark command line argument switch

Methods

getProductIdReturn the product id reference to use based upon the command line arguments and installed licenses.
getProductIdFromArgsReturn the product id reference to use based upon the command line arguments.
hasFinLicenseReturns true if a FIN license is found.
hasLicenseProductIdReturn true if the any of the licenses has the specified product id.
propToRefConvert the string property to a Ref.

Slot Details ​


FIN_CMD_ARG ​

const static Str FIN_CMD_ARG := "finframework"

The FIN license command line argument switch.


SKYSPARK_CMD_ARG ​

const static Str SKYSPARK_CMD_ARG := "skyspark"

The SkySpark command line argument switch


getProductId ​

static Ref getProductId(Str[] args, Str:Str[] licenses)

Return the product id reference to use based upon the command line arguments and installed licenses.


getProductIdFromArgs ​

static Ref? getProductIdFromArgs(Str[] args)

Return the product id reference to use based upon the command line arguments. If no matching command line argument is found then return null.


hasFinLicense ​

static Bool hasFinLicense(Str:Str[] licenses)

Returns true if a FIN license is found.


hasLicenseProductId ​

static Bool hasLicenseProductId(Ref productId, Str:Str[] licenses)

Return true if the any of the licenses has the specified product id.


propToRef ​

static Ref propToRef(Str prop)

Convert the string property to a Ref.


MInstallNamespace ​

const class MInstallNamespace : MBuiltNamespace, SysNamespace

Constructors

make

Fields

apps
commands
funcs
libs
templates
util
views

Methods

app
command
eachMisc
eachSettings
ext
func
isExtEnabled
isHost
isInstall
isProj
lib
misc
proj
settings
sysMod
template
ui
view

Slot Details ​


app ​

virtual override AppDef? app(Str name, Bool checked := true)


apps ​

virtual const override AppFeature apps


command ​

virtual override CommandDef? command(Str name, Bool checked := true)


commands ​

virtual const override CommandFeature commands


eachMisc ​

virtual override Void eachMisc(|Obj,Str| f)


eachSettings ​

virtual override Void eachSettings(|Dict,Str| f)


ext ​

virtual override ExtDef? ext(Str name, Bool checked := true)


func ​

virtual override FuncDef? func(Str name, Bool checked := true)


funcs ​

virtual const override FuncFeature funcs


isExtEnabled ​

virtual override Bool isExtEnabled(ExtDef ext)


isHost ​

virtual override Bool isHost()


isInstall ​

virtual override Bool isInstall()


isProj ​

virtual override Bool isProj()


lib ​

virtual override LibDef? lib(Str name, Bool checked := true)


libs ​

virtual const override LibFeature libs


make ​

new make(BNamespace b)


misc ​

virtual override Obj? misc(Str name, Bool checked := true)


proj ​

virtual override ProjDef? proj(Bool checked := true)


settings ​

virtual override Dict? settings(Str name, Bool checked := true)


sysMod ​

virtual override SysModDef? sysMod(Str name, Bool checked := true)


template ​

virtual override TemplateDef? template(Str name, Bool checked := true)


templates ​

virtual const override TemplateFeature templates


ui ​

virtual override UiDef ui()


util ​

virtual const override SysNamespaceUtil util


view ​

virtual override ViewDef? view(Str name, Bool checked := true)


views ​

virtual const override ViewFeature views


Main ​

class Main : Obj

Bootstrapping main for FinStack.

Constructors

make

Fields

boot
sys

Methods

factoryReturns the factory for creating the Install namespace for this host
fetchLicenseFetch a license from the license solution if required.
finHostInfo
findModsReturn a map of boot sys mods.
init
main
makeBoot
preRun
run

Slot Details ​


boot ​

Boot? boot { private set }


factory ​

virtual FinDefFactory factory()

Returns the factory for creating the Install namespace for this host

This method can be overriden to provide additional Namespace functionality


fetchLicense ​

static Void fetchLicense(Str[] args := [,])

Fetch a license from the license solution if required.


finHostInfo ​

static Dict finHostInfo(Str[] args)


findMods ​

static Str:Type findMods()

Return a map of boot sys mods.


init ​

virtual This init()


main ​

virtual Int main(Str[] args)


make ​

new make()


makeBoot ​

virtual This makeBoot(Str[] args)


preRun ​

virtual This preRun()


run ​

virtual Int run()


sys ​

Sys? sys { private set }


MigrateTools ​

const class MigrateTools : Obj

Custom migration tool UI

Fields

_buf
logger
stop

Methods

buf
button
log
main
pane
status

Slot Details ​


_buf ​

const static Unsafe _buf := Unsafe.<ctor>(StrBuf.<ctor>())


buf ​

static StrBuf buf()


button ​

static Button button(Window wnd)


log ​

static Text log(Window wnd)


logger ​

const static Log logger := Log.get("migrate")


main ​

static Void main(Str[] args)


pane ​

static EdgePane pane(Window wnd)


status ​

static Label status(Window wnd)


stop ​

const static AtomicBool stop := AtomicBool.<ctor>(false)


MigrationFunctions ​

class MigrationFunctions : Obj

Constructors

make

Fields

cx
log
projectFolder

Methods

executeMigrationFunctions
main
migrateProject

Slot Details ​


cx ​

Context? cx


executeMigrationFunctions ​

static Void executeMigrationFunctions(Context cx)


log ​

const Log log


main ​

static Void main(Str[] args)


make ​

new make(File projectFolder, Log log := Log.get("migrate"))


migrateProject ​

Void migrateProject()


projectFolder ​

const File projectFolder


PasswordProtect ​

const class PasswordProtect : Obj

Methods

extractAndReplaceSnapshotExtracts a snapshot in a password protected zip.
extractFileFromZipExtracts the first file found in a password protected zip.
extractFileToOutStream
extractReplaceAndRenameSnapshotExtracts a snapshot file from a password protected zip file.
hashPasswordHashes a password into Base64 encoded string.
isEncrypted
listFileNames
protectAndReplaceSnapshotPassword protects a snapshot by adding it to a password protected zip.
protectFileInZipPassword protects a file by adding it to a password protected zip.

Slot Details ​


extractAndReplaceSnapshot ​

static Void extractAndReplaceSnapshot(File file, Str secret)

Extracts a snapshot in a password protected zip. The original zip file is replaced by the extracted snapshot.


extractFileFromZip ​

static Void extractFileFromZip(File file, Str targetFileName, Str secret)

Extracts the first file found in a password protected zip. The extracted file is written to the same location as the zip file.


extractFileToOutStream ​

static Void extractFileToOutStream(File file, Str targetFileName, OutStream out, Str secret)


extractReplaceAndRenameSnapshot ​

static Void extractReplaceAndRenameSnapshot(File file, Str newName, Str secret)

Extracts a snapshot file from a password protected zip file. The original zip file is renamed to newName The snapshot is given the original name as the zip file.


hashPassword ​

static Str hashPassword(Str password, Str salt := "")

Hashes a password into Base64 encoded string.


isEncrypted ​

static Bool isEncrypted(File zipFile)


listFileNames ​

static Str[] listFileNames(File zipFile)


protectAndReplaceSnapshot ​

static Void protectAndReplaceSnapshot(File snapshot, Str secret)

Password protects a snapshot by adding it to a password protected zip. The original snapshot file is replaced by the protected zip file.


protectFileInZip ​

static Void protectFileInZip(File file, Str secret)

Password protects a file by adding it to a password protected zip. The protected file is written to a new zip file in the same location with the same name.


RemoteSnapshot ​

const class RemoteSnapshot : ProjBackup

Constructors

create
createChecked

Fields

file
id
origConnRef
origProjName
rec
ts

Methods

delete
in
out
projDir
readAll
readById
readCountAll
size

Slot Details ​


create ​

new create(Uri fileName, |This| f)


createChecked ​

static new createChecked(Uri fileName, Bool checked, |This| f)


delete ​

virtual override Void delete()


file ​

virtual const override File file


id ​

const Ref id


in ​

virtual override InStream in()


origConnRef ​

const Ref origConnRef


origProjName ​

const Str origProjName


out ​

OutStream out()


projDir ​

static File projDir()


readAll ​

static RemoteSnapshot[] readAll(Str filter)


readById ​

static RemoteSnapshot? readById(Ref id, Bool checked := true)


readCountAll ​

static Int readCountAll()


rec ​

const Dict rec


size ​

virtual override Int size()


ts ​

virtual const override DateTime ts


ReverseProxyCertAndKeyImporter ​

class ReverseProxyCertAndKeyImporter : Obj

Methods

createDefaultHttpsKeyStore
createHttpsKeyStore
getKeystoreName
setKeyStorePass

Slot Details ​


createDefaultHttpsKeyStore ​

static Void createDefaultHttpsKeyStore(Str host, Str fileDir)


createHttpsKeyStore ​

static Void createHttpsKeyStore(Str keyFileContents, Str certFileContents, Str fileDir)


getKeystoreName ​

static Str getKeystoreName()


setKeyStorePass ​

static Void setKeyStorePass(Str password)


SnapshotCategoryNode ​

const class SnapshotCategoryNode : SnapshotTreeNode

Constructors

make

Fields

category
count
isLocal

Methods

badge
categoryInteraction
dis
icon
id
interactions
nextNode

Slot Details ​


badge ​

virtual override [Str:Obj]? badge()


category ​

const Str category


categoryInteraction ​

static Str categoryInteraction(Str category)


count ​

const Int count


dis ​

virtual override Str dis()


icon ​

virtual override Str? icon()


id ​

virtual override Str id()


interactions ​

virtual override [Str:Str:Obj]? interactions()


isLocal ​

const Bool isLocal


make ​

new make(Bool isLocal)


nextNode ​

virtual override [Str:Obj]? nextNode()


SnapshotLocalNode ​

const class SnapshotLocalNode : SnapshotTreeNode

Constructors

make

Fields

snapshot

Methods

dis
icon
id

Slot Details ​


dis ​

virtual override Str dis()


icon ​

virtual override Str? icon()


id ​

virtual override Str id()


make ​

new make(ProjBackup snapshot)


snapshot ​

const ProjBackup snapshot


SnapshotObservable ​

const class SnapshotObservable : Observable

Methods

fireLocalNew
fireRemoteNew
name

Slot Details ​


fireLocalNew ​

Void fireLocalNew(DateTime snapshotTs, Proj proj, DateTime ts := DateTime.now())


fireRemoteNew ​

Void fireRemoteNew(Ref id, Proj proj, DateTime ts := DateTime.now())


name ​

virtual override Str name()


SnapshotRemoteNode ​

const class SnapshotRemoteNode : SnapshotTreeNode

Constructors

make

Fields

snapshot

Methods

dis
icon
id

Slot Details ​


dis ​

virtual override Str dis()


icon ​

virtual override Str? icon()


id ​

virtual override Str id()


make ​

new make(RemoteSnapshot snapshot)


snapshot ​

const RemoteSnapshot snapshot


SnapshotRootNode ​

const class SnapshotRootNode : SnapshotTreeNode

Constructors

make

Fields

remoteCount

Methods

badge
dis
finNavList
icon
interactions
nextNode

Slot Details ​


badge ​

virtual override [Str:Obj]? badge()


dis ​

virtual override Str dis()


finNavList ​

virtual override Str? finNavList()


icon ​

virtual override Str? icon()


interactions ​

virtual override [Str:Str:Obj]? interactions()


make ​

new make()


nextNode ​

virtual override [Str:Obj]? nextNode()


remoteCount ​

const Int remoteCount


SnapshotTreeNode ​

abstract const class SnapshotTreeNode : Obj

Fields

funcName
treeTagName

Methods

badge
dis
extraProps
finNavList
icon
id
interactions
nextNode
render

Slot Details ​


badge ​

virtual [Str:Obj]? badge()


dis ​

virtual Str dis()


extraProps ​

virtual [Str:Obj]? extraProps()


finNavList ​

virtual Str? finNavList()


funcName ​

const static Str funcName := treeTagName


icon ​

virtual Str? icon()


id ​

virtual Str id()


interactions ​

virtual [Str:Str:Obj]? interactions()


nextNode ​

virtual [Str:Obj]? nextNode()


render ​

Dict render()


treeTagName ​

const static Str treeTagName := "finSnapshotsTree"


SquelchLog ​

const class SquelchLog : Log

A special log that allows for squelching all log events for a duration.

Constructors

make

Fields

squelchTill

Methods

log
resume
squelchFor

Slot Details ​


log ​

virtual override Void log(LogRec rec)


make ​

new make(Str name, Bool register := false)


resume ​

This resume()


squelchFor ​

This squelchFor(Duration length)


squelchTill ​

Duration? squelchTill


SubscriptionStore ​

const class SubscriptionStore : Obj

Constructors

make

Fields

expirationPeriod
houseKeepingPeriod
mod
timeout

Methods

confirm
delete
onStart
onStop
ping
poll
store

Slot Details ​


confirm ​

Void confirm(Int id, Dict[] confirmed)


delete ​

Void delete(Int id)


expirationPeriod ​

const Duration expirationPeriod := 30min


houseKeepingPeriod ​

const Duration houseKeepingPeriod := 1min


make ​

new make(SysMod mod)


mod ​

const SysMod mod


onStart ​

Void onStart()


onStop ​

Void onStop()


ping ​

Bool ping(Int id, Bool checked := true)


poll ​

Dict[] poll(Int id)


store ​

Int store(Proj proj, User user, Dict config)


timeout ​

const Duration timeout := 15sec


UserLoginToken ​

class UserLoginToken : Obj

Constructors

make

Fields

attempts
lastLogin
username

Methods

tryReset

Slot Details ​


attempts ​

Int attempts


lastLogin ​

DateTime lastLogin


make ​

new make(Str username, DateTime? lastLogin)


tryReset ​

Void tryReset(DateTime? latestLogin)


username ​

Str username


UserRole ​

@Serializable { simple=true } enum class UserRole : Enum

The different user roles in the system.

Enum

suA super user who has access to everything,
adminAn admin user who can commit new records in a project database.
opAn operator user.

Constructors

fromStrReturn the UserRole instance for the specified name.

Fields

valsList of UserRole values indexed by ordinal

Methods

makeTempUserReturn a temporary user with the specified role.
runAsRoleRun the function as a user with the specified role.

Slot Details ​


admin ​

const static UserRole admin := ...

An admin user who can commit new records in a project database.


fromStr ​

static new fromStr(Str name, Bool checked := true)

Return the UserRole instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.


makeTempUser ​

static User makeTempUser(UserRole role)

Return a temporary user with the specified role.


op ​

const static UserRole op := ...

An operator user.


runAsRole ​

static Obj? runAsRole(UserRole role, |Context->Obj?| cb)

Run the function as a user with the specified role.

Please note, this method should be used sparingly and in special circumstances as it temporarily elevates a user's permissions.


su ​

const static UserRole su := ...

A super user who has access to everything,


vals ​

const static UserRole[] vals := ...

List of UserRole values indexed by ordinal


UsersMigration ​

class UsersMigration : Obj

User migration tools for complementing the Skyspark built-ins

Constructors

make

Fields

ctx
log
userLib

Methods

mergeImportExistingUsersMerges and older flat file Trio users DB into the existing one.

Slot Details ​


ctx ​

Context ctx


log ​

const Log log


make ​

new make(Context ctx, StdUserLib userLib, Log log := Log.get("migrate"))


mergeImportExistingUsers ​

Void mergeImportExistingUsers(ImportMode mode := ImportMode.SkipSu)

Merges and older flat file Trio users DB into the existing one. The idea is that older formats are not auto-migrated if a newer DB format is already present.


userLib ​

const StdUserLib userLib


WebFileCache ​

const class WebFileCache : Obj

Constructors

make

Fields

INSTANCE
MEMORY_THRESHOLD_PCT
instanceTag

Methods

expireEntry
getEntry
getInstance
hasEntry
isEntryExpired
putEntry

Slot Details ​


INSTANCE ​

const static WebFileCache INSTANCE := WebFileCache.<ctor>()


MEMORY_THRESHOLD_PCT ​

const static Number MEMORY_THRESHOLD_PCT := Number.<ctor>(90)


expireEntry ​

Void expireEntry(Uri uri)


getEntry ​

WebFileCacheEntry? getEntry(Uri uri)


getInstance ​

static WebFileCache getInstance()


hasEntry ​

Bool hasEntry(Uri uri)


instanceTag ​

const Str instanceTag


isEntryExpired ​

Bool isEntryExpired(Uri uri, Str? eTag, DateTime? dateModified)


make ​

new make()


putEntry ​

Void putEntry(Uri uri, WebFileCacheEntry entry)


WebFileCacheEntry ​

const class WebFileCacheEntry : Obj

Constructors

make

Fields

data
dateModified
eTag

Slot Details ​


data ​

const Buf data


dateModified ​

const DateTime dateModified


eTag ​

const Str eTag


make ​

new make(Buf data, DateTime dateModified, Str eTag)