Portal Theme Model Documentation

1 Assembly

Represents an assembly. Assemblies come in two flavors:

  • Created in the admin application, belonging to a project.
  • Created by a Portal application, belonging to the portal.
Assemblies created in the former case are presented to the Portal identically to all other Project documents. This data type does not apply to those as far as Portal Themes are concerned. In the latter case, an array of these objects can be retrieved by the <@td.assemblies> tag.
Properties
String key
The unique ID of the Assembly
Date createDate
The date the Assembly was created
Date lastModified
The last-modified date of the Assembly
String name
The title of the Assembly
String refId
The unique identifier for this node within the assembly. Used to identify which document to display when rendering the node in a portal.

2 ContentLocator

An object that encapsulates all of the information that, together, uniquely identifies a piece of content within the Titania Delivery repository.
Properties
String projectKey
The project key of the item.
String itemPath
The path to the item within the Project specified by projectKey .
String itemKey
The key of this item, unique to its containing Project.
String contextKey
The key of this document's context document, if applicable.
ItemIdentifier contextItemId
The encapsulated Project and item keys of this document's context document, if applicable.
Map queryParams
A map of additional parameters. The most common of these is "refId", which identifies the specific reference within the context identified by contextItemId .

3 ContentRelationship

Represents a relationship, such as a link or graphic reference, between two files.
Properties
ItemIdentifier source
The identifier for the source of the relationship.
ItemIdentifier target
The identifier for the target of the relationship. May be null if the referenced file does not exist, in which case the location of the missing object is identified by targetPathInProject .
RelationshipType type
The relationship type. The possible values are PARENT_CHILD , LINK , or GRAPHIC .
String targetPathInProject
The project path of the object being referenced.
String refTagInfo
Retrieves the tag name or DITA class of the reference.
boolean resolved
Whether the reference is resolved, that is, the target object exists.

4 Contextualization

Properties
ItemIdentifier childKey
The identifier for the uncontextualized object.
String description
A description of the context. Usually the title of the referencing DITA map.
boolean virtualTopic
Whether the topic is a virtual topic without a single source representation, such as a virtual topic generated from a title-only topicref, or a chunked section of a monolithic source.
String contextualizedTitle
Retrieves the title of the contextualized topic.
MetadataEntry[] metadataEntries
The metadata entries set on this document. It does not contain the metadata inherited from parent maps or the containing project.

5 FacetCount

Properties
String name
The facet field value.
long count
The number of documents with this value.

6 FacetField

Represents a piece of metadata used for faceting and its collection of values.
Properties
String name
The name of the facet field.
FacetCount[] values
The list of values for the facet, and their counts.

7 FragmentMetadata

An object holding the metadata values on a document fragment. The values array is an array of Strings.
Properties
String id
String label
Map metadata

8 HttpEntityContent

Represents an HTTP request or response entity.

The contents of the entity can be accessed using the body property. If expecting JSON-encoded content, HTML, or XML content, a parsed representation of the content can be accessed using the json , html , or xml properties. If there are errors parsing the content, they are available in the parseError property.

Introduced in version 4.2.

Properties
byte [] raw
The uninterpreted bytes of the entity.
String defaultCharset
The default charset for this entity, if any.
String defaultContentType
The default content type for this entity, if any.
String body
The entity body as a string.
String text
The entity body as a string.
Document xml
The body as a parsed XML DOM structure. If parsing fails, this property will be null and any exceptions can be read from the parseError property. The DOM structure can be interrogated using normal Freemarker XML handling; see the Freemarker documentation ( https://freemarker.apache.org/docs/xgui.html for details.
Object json
The body as a parsed JSON object. This can also be done manually in Freemarker using response.body?eval ; this property is provided as a convenience. If the parsing of the JSON fails, this property will be null and any exceptions can be read from the parseError property.
Document html
The body as a DOM structure generated by the Jsoup Java library ( https://jsoup.org/ ). If the parsing of the body fails, this property will be null and any exceptions can be read from the parseError property.
String base64
The raw entity encoded as base64 string. This can be used to handle binary data, for example to store a file that includes binary data.
String dataUrl
The bytes encoded as a data URL using the appropriate default MIME type.
Exception parseError
The Java exception caused by an attempt to parse the body content when accessed via xml , html , or json .

9 HTTPResponse

Represents the data returned by the <td.httpRequest> tag.

The contents of the response body can be accessed using the body property. If expecting JSON-encoded content, HTML, or XML content, a parsed representation of the content can be accessed using the json , html , or xml properties. If there are errors parsing the content, they are available in the parseError property. For example:

 <@td.httpRequest url="https://example.com/data.json" var="response"/>
 <#if response.status == 200>
   <#if response.contentType?contains('/json')>
     <#assign responseStruct = response.json!''/>
   <#elseif response.contentType?contains('/html')>
     <#assign responseStruct = response.html!''/>
   <#elseif response.contentType?contains('/xml')>
     <#assign responseStruct = response.xml!''/>
   </#if>
   <#if response.parseError??>
     <b>ERROR: ${response.parseError.message?html}</b>
     <pre>${response.body?html}</pre>
   </#if>
 </#if>
 

All headers are available in the headers property. The keys for the header names are represented in all lower-case, as well as in whatever case was presented in the actual response.

Introduced in version 4.2.

Properties
Map headers
Accesses a multi-valued map containing all of the headers present in the response.
long duration
The amount of time, in milliseconds, the request took to execute.
String responseUrl
Shortcut for getHeader("location") .
String contentType
Shortcut for getHeader("content-type")
int status
The HTTP status code of the response.
String statusText
The status message of the response.
byte [] raw
The uninterpreted bytes of the entity.
String defaultCharset
The default charset for this entity, if any.
String defaultContentType
The default content type for this entity, if any.
String body
The entity body as a string.
String text
The entity body as a string.
Document xml
The body as a parsed XML DOM structure. If parsing fails, this property will be null and any exceptions can be read from the parseError property. The DOM structure can be interrogated using normal Freemarker XML handling; see the Freemarker documentation ( https://freemarker.apache.org/docs/xgui.html for details.
Object json
The body as a parsed JSON object. This can also be done manually in Freemarker using response.body?eval ; this property is provided as a convenience. If the parsing of the JSON fails, this property will be null and any exceptions can be read from the parseError property.
Document html
The body as a DOM structure generated by the Jsoup Java library ( https://jsoup.org/ ). If the parsing of the body fails, this property will be null and any exceptions can be read from the parseError property.
String base64
The raw entity encoded as base64 string. This can be used to handle binary data, for example to store a file that includes binary data.
String dataUrl
The bytes encoded as a data URL using the appropriate default MIME type.
Exception parseError
The Java exception caused by an attempt to parse the body content when accessed via xml , html , or json .
Methods
String[] getHeaderValues( String name)
Retrieves all values for the header with the given name.
String getHeader( String name)
Utility method for retrieving the first value of a header.

10 ItemDataAccess

Encapsulates access to the various entities related to an item.
Properties
ItemIdentifier itemIdentifier
The ItemIdentifier for the item.
ItemProperties properties
Properties and metadata for the item.
ProjectInfo projectInfo
Information about the project containing the item.
Map propertyMap
Shortcut to properties.propertyMap
Map metadataMap
The MetadataEntries as a Map.
ContentRelationship[] outgoingRelationships
The outgoing relationships, such as links and graphics, from this object.
ContentRelationship[] incomingRelationships
The incoming relationships, such as links and graphics, to this object.
ProjectMetadata projectMetadata
The metadata collection on the project containing the item.

11 ItemIdentifier

Encapsulates the project and item keys for a given project item.
Properties
String projectKey
The key of the Project that contains the file.
String itemKey
The key of the file, unique to the Project.

12 ItemProperties

A collection of data on an item in a Titania Delivery Project.
Properties
ItemIdentifier item
The encapsulated Project key and Item key for this item.
SpecifiedItemDetails specifiedDetails
The details that can be on this item in the admin application, such as name and description. Only available if this is a non-parsable binary file.
Map embeddedMetadata
The embedded metadata from the file. This will be present for PDF, Microsoft Office, several graphics formats, and a number of other file types.
String effectiveUrlPath
The URL path by which this document can be directly addressed as a standalone document.
Map propertyMap

A hash of properties set on this document. Keys common to all files are:

  • key - The key of the document
  • name - The name of the document
  • projectKey - The key of the Project containing this document
  • size - The size of the document, in bytes
  • contentType - The MIME Type of the document
  • path - The path to this document within the Project
  • createDate - The date the document was created in Titania Delivery
  • lastModified - The date the document was last modified in Titania Delivery

Keys set on image files only are:

  • img_width - The width of the image, in pixels
  • img_height - The height of the image, in pixels

Keys set on XML files only are:

  • xml_isWellFormed
  • xml_hasDTD
  • xml_hasSchema
  • xml_hasDoctype
  • xml_doctypeExists
  • xml_isValid
  • xml_elementCount
  • xml_elementIds
  • xml_primarySchema
  • xml_publicId
  • xml_systemId
  • xml_schemas
  • xml_rootElement
  • xml_rootNamespace
  • xml_doctypeFile
  • xml_doctypeProject
  • xml_doctypeName
  • xml_title
  • dita_navtitle
  • xml_validationError
  • xml_isDita
  • dita_isTopic
  • dita_isMap
  • dita_isDitabase
  • dita_domains
Date createDate
The date that this item was created in Titania Delivery.
MetadataEntry[] metadataEntries
The metadata entries set on this document. It does not contain the metadata inherited from parent maps or the containing project.
FragmentMetadata[] allFragmentMetadata
Get all fragment metadata as a list.

13 ItemRepresentationType

These are the possible representation types for processed renditions of content items.
Enumeration constants
ORIGINAL
The original content item.
PROCESSED
The content item processed according to its content type.
FLATTENED
For DITA topics, the processed topic with external references resolved.
MONOLITH
For DITA maps, expanded map with all referenced content resolved.
PREVIEW
A browser-friendly representation of the content item.

14 MetadataEntry

An object representing a single metadata entry on a document. The values array is an array of Strings.
Properties
String name
The name of this metadata.
Object[] value
An array of Strings that are the values to this metadata

15 MetadataFilter

This object represents the metadata filters set on a Portal through the Administrative application. It is the data structure in the metadataFilters array in PortalIdentity .
Properties
MatchMode matchMode
Possible values are ANY and ALL . ANY will match documents that contain any of the values on the filter. ALL will match documents that contain all of the values on the filter.
boolean matchAbsent
If true , this metadata filter will match documents missing the given filter.
String name
The name of this metadata.
Object[] value
An array of Strings that are the values to this metadata

16 OfflinePackage

Represents the status and metadata of an offline package.

Introduced in version 4.1.

Properties
String key
The unique key.
String portalKey
The key of the portal where the package was generated.
String packager
The name of the packager that created the package.
String createdBy
The ID of the authenticated user who built the package.
OfflinePackageDocumentInfo[] documents
The documents that were included in the package.
Map params
The parameters passed to the packager.
Status status
The current status of the package. Values are QUEUED, WORKING, FINISHED, and FAILED.
String scriptOutput
The output log of the packager script.
String filename
The filename used for the package.
String mimeType
The MIME type of the package.
boolean signContents
Whether to generate SHA-512/RSA signatures for each file in the package, as well as the package itself. The default is false . Introduced in version 4.2.
String signaturePathPrefix
If signing package contents, this specifies the path prefix to apply for signature files. this can be used to place signature files in their own folder in the archive. The default is no prefix. Introduced in version 4.2.
String signaturePathSuffix
If signing package contents, this specifies the suffix to add to signature files. The default is ".signature". Introduced in version 4.2.
String signatureAlgorithm
The signing algorithm to use for both the package itself and individual files within the package, if signContents is enabled. The value must match those available in Java; see https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#Signature . The default is "SHA512withRSA" . Introduced in version 4.2.
Date createDate
The timestamp when the package was requested.
String statusMessage
The current status message for the package. The package script can update this message as it builds the package in real-time, so this message should reflect the current state of the packaging process.
String hash
The hexadecimal-encoded SHA-512 hash of the package archive. Introduced in version 4.2.
String signature
The hexadecimal-encoded SHA-512/RSA checksum for the zip itself. Introduced in version 4.2.
boolean makeXmlSignatures
Whether to make XML signatures.

17 OfflinePackageDocumentInfo

Represents a document included in an offline package.

Introduced in version 4.1.

Properties
String projectKey
The project key.
String itemKey
The item key.
String contextKey
The context key.
String refId
The reference ID within the context, for example, the topicref ID in a DITA map.
boolean rootDoc
Whether or not this document was explicitly requested for inclusion in the package, and not included by virtue of being part of another explicit document. For example, when packaging a specific DITA map, the map itself will be marked as explicitly requested, while its topics will not (assuming the package requested the inclusion of contextualized children).
boolean virtualTopic
If true, this is a 'virtual' topic generated through content processing. There are two main cases for virtual content: DITA topics generated for <topicref> elements that specify a title but no content, and chunked sections of non-DITA XML documents.

18 PortalIdentity

This object is available to every Portal Theme page via $ portal and includes data about the Portal itself.
Properties
String name
The internal name of the portal, for admin purposes.
String urlPath
The URL path of the portal.
Date createDate
The date this Portal was created.
String displayName
The name to use when displaying the Portal title through the Portal Theme.
String description
The Description of the Portal.
MetadataFilter[] metadataFilters
The Metadata Filters set on this Portal.
String ownerName
The name of this Portal's Owner.
PortalSearchFacet[] searchFacets
The search facets set on this Portal.
String commentManagerSiteKey
The unique identifier that associates comments with this Portal.
String themeName
The name of the Portal Theme associated with this Portal.
String[] enabledFeatures
The features enabled for this portal. Possible values are:
  • anonymousAccess
  • docLevelComments
  • elLevelComments
  • customAssemblies
  • helpfulVote
Map parameters
Parameters for this portal as specified in the config.xml for the portal theme
String userFilterFunction
Javascript function used for user filters
PortalRobotsTxtBehavior robotsTxtBehavior
The behavior of this portal in robots.txt. One of NONE, DISALLOW, or ALLOW.
String portalProject
The key of the project for portal-generated content. Introduced in version 4.2.
Methods
boolean hasFeature( String id)
Utility method for determining whether the portal has the specified feature. Equivalent to portal.features?seq_contains(id) .
String facetDisplayName( String facetMdName)
Utility method for determining the display name of the given search facet.

19 PortalSearchFacet

This object stores the search facets of this Portal, set in the Admin application. It is the data structure of the searchFacets array in PortalIdentity , which is available on every page in the Portal.
Properties
String metadataName
The name of the metadata item.
String displayName
The display name of the metadata item, as set in the Search Facets tab in the admin application.

20 PortalUser

This object is only available to the Portal if the Portal has security ( hasSecurity ) enabled and the current user is logged in ( isAuthenticated ). If those two conditions fail, this object will be null and any attempt to reference it will result in a Freemarker error. This can be using the following code:

 <#if hasSecurity && isAuthenticated>
   <#-- Can now safely reference ${user} -->
 </#if>
 

or:

 <#if user??>
   <#-- Can now safely reference ${user} -->
 </#if>
 
Properties
String id
A persistent, obfuscated character string based on login name, which identifies the current user.
String userName
The username of the user, as specified by the server pointed to in this Portal's security configuration.
Map properties
The user properties pulled from the authentication service. For SAML-secured and OpenID-secured portals, this will contain whatever attributes were included in the authentication response message sent by the Identity Provider. For LDAP-secured portals, this will contain the properties listed in the LDAP connection configuration. NOTE: This collection allows for multi-valued properties, so values are arrays, not single values. Properties with single values will be lists of size 1.
Methods
boolean hasProperty( String name, String value)
Tests whether there exists a property with the given name containing the given value. If the value is not specified, this method tests whether the property exists.

21 ProjectInfo

Represents details of a project.
Properties
String key
The project key.
String name
The project name.
String urlSlug
The project URL slug.
String fileUrlFormula
The template for generating file URLs in this project.
Date createDate
The date and time that a project was created.
String contentPortal
The key of the portal for which this project holds content. Introduced in version 4.2.

22 ProjectItem

This object describes the main properties of a file stored in a Titania Delivery project.
Properties
String parentKey
The parent key for the item. Will be null for root-level items.
String key
The object's unique key that can be used to retrieve it directly from the project.
String label
The label of this object.
String contentType
The content type of the object. Will be null for folders.
String projectPath
The path within the project to this object. The path will begin with a forward slash (/) and be delimited by forward slashes. The path will end in a forward slash if this is a folder.
boolean folder
Whether the object is a folder.
long size
The size, in bytes, of the object.
Date lastModified
The last-modified date of the object.
Date createDate
The creation date of the object.

23 ProjectMetadata

Properties
String projectKey
The project key.
MetadataEntry[] metadataEntries
The metadata entries set on project.

24 SearchResultDocument

This represents a single document returned from a search. It is the data type in the results array of SearchResultGroup and of the array returned by the <@td.search> tag.
Properties
String projectKey
The key of this document's containing Project.
String itemKey
This document's item Key, unique to the project. In some cases, may be of the form key:elementId for chunked content.
String path
The path to this document within its project.
String filename
This document's filename.
String urlPath
The URL path for this file.
String title
This document's title, or its filename if the title does not exist.
String searchTitle
This document's search title, or its title if the searchTitle does not exist.
String[] keywords
The keywords of the document.
String textContents
The raw text contents of the document.
String contextKey
The key of this document's context document, or xxnullxx if it is a stand-alone document.
String contextName
The name of this document's context document.
String contextRefId
If this document is present in its parent context more than once, the contextRefId identifies which version the current document represents.
Long created
The date that this document was created in Titania Delivery.
Long lastModified
The date that this document was last modified in Titania Delivery.
boolean contextualized
true if this document is present in a parent context document. Equal to contextKey != xxnullxx .
String highlight
If this document was returned as part of a search query, this field will contain the text contents surrounding the most-relevant "hit" in the document.
Map metadata
A hash representing the metadata on this document. The keys are metadata names as assigned in the TD admin application or present in the source document. The value is an array of strings representing the values of that metadata. If a key is present it is guaranteed that there will be at least one element in the values array.
Map metadataNormalized
Similar to metadata , but with _md stripped from all the keys.
boolean virtual
Describes whether this search result represents a physical file in a Titania Delivery project, or a virtual, generated document. Examples of virtual documents include topics generated for DITA <topicref> elements that specify a title but no @href or @keyref, or a chunked section of a non-DITA document.

25 SearchResultGroup

This object is the data type of the content array of groups. It represents a "group" of search results.

Search results are generally grouped by their DITA map context. That is, a DITA topic used in multiple DITA map contexts will have its matching search results grouped together. No other documents are grouped in this way.

nContexts will always be >= 1 and equal to results?size . firstResult will be the same SearchResultDocument as results[0] .

Properties
SearchResultDocument firstResult
convenience variable for results[0] .
String groupingValue
The value of the grouping field specified by the query for all of the documents in this group. For example, grouped search results are grouped by the "itemKey" property by default, so this value will be the itemKey of all of the results in this group. When grouping by another field, this will be the value for that field on all of the documents in this group. Introduced in version 4.2.1.
int nContexts
The size of the results array. The value will always be >= 1.
SearchResultDocument[] results
The search results grouped by topic. If the topic was returned by a search result, then each context in which it exists will be present in the array. If the document is stand-alone, (that is, it is not referenced by any parent document) then there will be only one entry in the array. results?size will always be equal to nContexts .

26 SearchResultsPage

Represents a list of results from the search engine. When retrieved without grouping, e.g. the <@td.search> tag, the paged items will be SearchResultDocument objects. When grouped, e.g. on the searchResults.ftl or from the <@td.groupSearch> tag, the contents will be SearchResultGroup objects.
Properties
FacetField[] facetFields
The list of facet counts for the search.
int number
The zero-based index of the current page.
int size
The maximum number of results this page could contain.
int totalPages
The total number of pages available for the current search.
int numberOfElements
The number of elements on the current page. Will be less than or equal to size .
long totalElements
The total number of elements (groups or documents) returnable by the current search.
long totalHits
The total number of documents returnable by the current search.
boolean previousPage
true if there is a previous page.
boolean previous
true if there is a previous page.
boolean firstPage
true if the current page is the first page.
boolean nextPage
true if there is a next page.
boolean next
true if there is a next page.
boolean lastPage
true if the current page is the last page.
boolean last
true if the current page is the last page.
String groupedBy
The property by which the results are grouped when applicable, such as the default search page or the results of the td.groupSearch directive. The default grouping field is "itemKey", meaning that DITA topics with multiple DITA map contexts will be grouped together. This value will be null for ungrouped searches. Introduced in version 4.2.1.
Object[] startNextAfter
Markers that can be used in a subsequent request to get the next page of results. Avoids performance and/or hard limits on the full size of all pages in the search engine.
T[] content
The contents of the current page. This will either be SearchResultGroup or SearchResultDocument objects, depending on the way the query was performed.
  • When the search is performed using the standard portal search page, and rendered with searchResults.ftl , this will be a list of SearchResultGroup .
  • When performed using the <@td.groupSearch> tag, the results will also be of type SearchResultGroup .
  • When performed using <@td.search> , the results will be lists of SearchResultDocument .

27 SiteDataStorage

An extension of UserDataStorage that is shared by all users of a portal, including anonymous users. This object exposes a number of special methods for storing data and documents in a searchable way.

Portals have an associated content project that can store documents and metadata generated by the portal. Also, each portal can have one or more searchable indexes containing arbitrary data. (Additional portal data storage capabilities for nonindexed values, counters, and lists are described under "DataStorage".)

When a portal is created, a project is automatically created and associated with the portal as the portal content project. This project may contain portal-generated content, and functions like any other content project. The siteData object provides methods for accessing portal content items.

Indexed data can be stored and searched under user-defined index names. Each index should hold similarly structured records. Methods for storing and retrieving indexed data are provided in Freemarker and javascript using the siteData object. The administration interface also provides access to view and download portal indexed data. IMPORTANT: The total number of user-defined indices on the platform cannot exceed 100 at any time (across all portals). Theme developers and platform administrators should ensure that no more than 100 indices exist at any time.

Introduced in version 4.2.

Methods
Iterable searchIndexed( String index, String query, int [] paging)
Searches the given index using the given search. Since each index can have its own record type, all indexed searches are ordered by the built-in Elasticsearch field, "_doc".
int deleteIndexed( String index, String query)
Deletes records from the given index that match the given query.
int deleteIndexed( String index, String query, boolean waitRefresh)
Deletes records from the given index that match the given query. Passing false for the waitRefresh method will cause the method to return before the deletion has been fully processed. The default is true
void deleteIndex( String index)
Deletes the index with the given name, and all data in it.
void putIndexed( String index, Object value)
Stores a data structure in such a way that its properties can be queried using normal search syntax. The index functions as a namespace for the stored data. As a best practice, radically different data structures should be stored in different indexes.
boolean putIndexed( String index, Object value, boolean waitRefresh)
Stores a data structure in such a way that its properties can be queried using normal search syntax. The index functions as a namespace for the stored data. As a best practice, radically different data structures should be stored in different indexes. Passing false for the waitRefresh method will cause the method to return before the insertion has been fully processed. The default is true
void putFile( String location, String mimeType, CharSequence contents, Map metadata)
Creates or updates a file in the portal's project. If the file already exists, its contents will be overwritten and its metadata replaced with the given hash.
boolean fileExists( String location)
Determines whether a file exists at the given path.
String getFile( String location, String representation)
Retrieve the contents of the file at the given path as a string.
String getFileLocator( String location)
Retrieves the File Locator for the file at the given path.
String getFileDownloadURL( String location, String representation)
Gets an HTTP URL at which the given file can be downloaded directly, optional with a processed representation.
String getFileUploadURL( String location, boolean folderMode, String itemName)
Get a URL to add or replace a file via POST. Any existing file at the location will be overwritten.
boolean deleteFile( String location)
Deletes the given file or folder.
boolean setFileMetadata( String location, Map metadata)
Sets the metadata on the given file. The existing non-intrinsic metadata entries for the file will be replaced with those supplied. Use updateFileMetadata(String,Map) for adding additional metadata to a file.
boolean updateFileMetadata( String location, Map metadata)
Updates the metadata on the given file. The existing non-intrinsic metadata entries for the file will be updated and merged with those supplied.
String getProcessingPhase( String location)
Gets the current processing phase of the item at the specified location.
ProjectItem[] getProjectRoots()
List the portal project root contents.
ProjectItem[] getFolderContents( String location)
List the specified folder contents.
boolean exists( String key)
Determines if data with the given key exists.
void put( String dataKey, Object data)
Stores data with a key. If the data is a string, it is stored as-is. Otherwise, it is converted to JSON and then stored.
Object get( String dataKey)
Retrieves the data with the given key. Objects are encoded as JSON for storage, so the resulting object will be whatever type was stored, unless it's an object, in which case it will be represented as a map hierarchy.
void push( String listKey, Object value, int cap)
Pushes a new value onto the list with the given key.
void pushUnique( String listKey, Object value, int cap)
Pushes a new value onto the list with the given key. If it already exists in the list, it is removed and moved to the top.
Object[] getList( String listKey)
Retrieves the list with the given key.
boolean existsInList( String listKey, Object value)
Determines whether the given value exists in the list with the given key.
void removeFromList( String listKey, Object value)
Removes the given value from the list with the given key.
long getCounter( String key)
Retrieves the counter with the given key.
void setCounter( String key, long counter)
Assigns a counter value to the given key.
void incrementCounter( String key, long by)
Increments the counter with the given key by the given amount (which may be negative). If no such counter exists, it will be created and set to the given increment value.
void delete( String key)
Deletes the data and/or list with the given key.
void deleteCategory( String category)
Deletes all entries in the given category.
Map getCategory( String category)
Retrieves all entries in a given category.

28 SpecifiedItemDetails

Contains details for non-parsable formats, such as graphic files and other binary file types, that can be specified via the UI in the Administrative application. Member of ItemProperties .
Properties
String title
The title of the document, as specified in the administrative application.
String description
The description of the document, as specified in the administrative application.
String[] keywords
The keywords of the document, as specified in the administrative application.

29 UserDataStorage

Portals can store data on the server for later retrieval. If the user is authenticated, the stored data is persisted between sessions. Otherwise, it expires when the client session expires.

There are three types of nonindexed persistent data: values, counters, and lists. Each is associated with a key. A key may have all three types of values.

Values

Values are stored via put(String, Object) and retrieved via get(String). Values can be anything that can be serialized as JSON, including strings, numbers, booleans, lists, and data structures. Data values are serialized as JSON when stored in the database, and de-serialized when retrieved. If a value is a complex non-map object when it is stored, it will be retrieved as a map.

Lists

Lists are essentially managed arrays that can be added to or removed from without needing to retrieve the full data structure. You create/add to lists via push(String, Object, int) or pushUnique(String, Object, int). The full list can be retrieved via getList(String). Elements can be removed via removeFromList(String, Object). You can check whether a value exists in a list via existsInList(key). Like values, list entries can be anything that can be serialized as JSON.

Counters

Counters are whole number values that can be easily incremented and decremented with the atomic operation incrementCounter(String, long). They can also be retrieved and stored via getCounter() and setCounter().

Important: The three values are treated independently. If you set a value via setCounter(), it must be retrieved by getCounter(); it will not be retrieved by get(). Similarly, lists stored with put() cannot be modified via push(). However, if a given key has more than one type of value - a list and a counter, for instance - calling delete() on that key will delete all the associated data.

Categories

A category is implicitly defined by keys beginning with a certain prefix and a period. For example, deleteCategory('foo') would delete any entry with a key beginning with 'foo.' ('foo.a', 'foo.b', etc.). It would not delete 'foo'. There are a number of methods that allow the interaction with whole groups of entries by their category. This allows the development of features that involve an interaction of multiple keys such that they can be deleted.

Introduced in version 4.0.

Methods
boolean exists( String key)
Determines if data with the given key exists.
void put( String dataKey, Object data)
Stores data with a key. If the data is a string, it is stored as-is. Otherwise, it is converted to JSON and then stored.
Object get( String dataKey)
Retrieves the data with the given key. Objects are encoded as JSON for storage, so the resulting object will be whatever type was stored, unless it's an object, in which case it will be represented as a map hierarchy.
void push( String listKey, Object value, int cap)
Pushes a new value onto the list with the given key.
void pushUnique( String listKey, Object value, int cap)
Pushes a new value onto the list with the given key. If it already exists in the list, it is removed and moved to the top.
Object[] getList( String listKey)
Retrieves the list with the given key.
boolean existsInList( String listKey, Object value)
Determines whether the given value exists in the list with the given key.
void removeFromList( String listKey, Object value)
Removes the given value from the list with the given key.
long getCounter( String key)
Retrieves the counter with the given key.
void setCounter( String key, long counter)
Assigns a counter value to the given key.
void incrementCounter( String key, long by)
Increments the counter with the given key by the given amount (which may be negative). If no such counter exists, it will be created and set to the given increment value.
void delete( String key)
Deletes the data and/or list with the given key.
void deleteCategory( String category)
Deletes all entries in the given category.
Map getCategory( String category)
Retrieves all entries in a given category.