WHFSType (open)
This objecttype is the base class for file and foldertypes in WHFS
Syntax
LOADLIB "mod::system/lib/internal/whfs/contenttypes.whlib";
OBJECTTYPE WHFSType
Properties
- PROPERTY allmembers
List of all members of this type, including orphans (unreferenced by siteprofile) @includecelldef #WHFSType.pvt_members
- PROPERTY capturesubpaths
Whether to capture subpaths
- PROPERTY cloneoncopy
When a copy is made of a file, whether the instance data of this type is copied too.
- PROPERTY defaultinstance
Default value for an instance
- PROPERTY filetype
True when this is a filetype
- PROPERTY foldertype
True when this is a foldertype
- PROPERTY id
Id of this type
- PROPERTY isacceptableindex
Whether files of this type can function as index
- PROPERTY isdynamicexecution
Whether files should publish as a index.shtml with systemredirection
- PROPERTY ispublishedassubdir
Whether files of this type are published as a subdirectory
- PROPERTY members
List of members of this type @includecelldef #WHFSType.pvt_members
- PROPERTY namespace
Namespace of this type
- PROPERTY needstemplate
Whether files of this type need a template
- PROPERTY orphan
True when this is type is orphaned (not referred by any content type)
- PROPERTY structure
Structure for an instance (suitable for use with EnforceStructure)
Functions
- RECORD FUNCTION CompareInstanceDataUpdates(RECORD oldinstancedata, RECORD newinstancedata)
Compare instance data and filters out instance members that won't be changed when new instance data is written
- RECORD ARRAY FUNCTION Enrich(RECORD ARRAY inrows, STRING idcellname, STRING ARRAY fields, RECORD options)
Enrich a record array with values from this type in bulk
- RECORD ARRAY FUNCTION EnrichWithBulkData(RECORD ARRAY inputrows, STRING ARRAY fields)
Enrich a record array with bulk data
- RECORD FUNCTION FilterInstanceDataUpdates(INTEGER objectid, RECORD newinstancedata)
Filters out instance members that won't be changed when new instance data is written, compared to the current data in the database.
- INTEGER ARRAY FUNCTION FindObjectsByMemberValue(STRING membername, VARIANT value, VARIANT options)
Find all whfs objects that have a particular value in a specific member. Refer to members in an array as 'arrayname.submembername'. Only works for members of type STRING and WHFSREF. Warning: this function will not return any results when searching for strings of 2048 or more characters.
- INTEGER ARRAY FUNCTION FindObjectsByMemberValueMask(STRING membername, STRING mymask, BOOLEAN case_sensitive)
Masked search, returns ids of all whfs that have a string member that matches a LIKE mask Warning: string members with a length 2048 or more bytes will not be considered for matching.
- RECORD FUNCTION GetInstanceData(INTEGER objectid, RECORD options)
Return the instance data of a specific whfs object. Warning: the link cell in published blobs/memos links to the weblink of the primary output if the site they are in.
- RECORD ARRAY FUNCTION GetSharedBlocks(INTEGER startobjectid, STRING membername)
Get the shared blocks for a file or folder
- RECORD ARRAY FUNCTION ListAllInstances()
Returns all instances of with a specific type
- INTEGER ARRAY FUNCTION MergeTypeInto(OBJECT targettype, RECORD options)
Merge objects of this type into another type
- INTEGER64 FUNCTION SetInstanceData(INTEGER objectid, RECORD newinstancedata, RECORD options)
Set the instance data for a specific whfs object