Skip to main content

%SYS.Portal.Resources

Class %SYS.Portal.Resources Extends (%Persistent, %XML.Adaptor, %SYSTEM.Help) [ Inheritance = right, System = 4 ]

This class will allow a user to associate resources with pages in the system management portal.

Properties

Page

Property Page As %String(MAXLEN = 256) [ Internal, Required ];

Page identifier.

Resource

Property Resource As %String(MAXLEN = 64) [ Internal, Required ];

Resource for the page.

Methods

%GetCustomResource

ClassMethod %GetCustomResource(Page As %String) As %String [ Internal ]

Return the resource for the URL-encoded page specified in Page.

%GetCustomResourceList

ClassMethod %GetCustomResourceList(ByRef Resources As %String) As %Status [ Internal ]

Return the list of custom resources used by the portal.
Parameters:

Resources (ByRef) - Array of Resources used by the portal.
Resources(Resource)=""

%RemoveCustomResource

ClassMethod %RemoveCustomResource(Page As %String) As %Status [ Internal ]

Remove the custom resource for the URL-encoded page specified in Page.

%SetCustomResource

ClassMethod %SetCustomResource(Page As %String, Resource As %String) As %Status [ Internal ]

Assign the resource specified in Resource to the URL-encoded page supplied in Resource.
Parameters:

Page - Identifier of the page to set the resource for. (Note: this should be in URL-encoded form.)
Resource - Resource associated with the page.
If Resource is passed as a null String, then the custom resource is removed.

NormalizePage

ClassMethod NormalizePage(Page As %String = "") As %String [ Internal ]

Normalize a CSP or Zen link to the underlying class name. Returns "" if the target page can't be resolved to a class, with the proviso that the method will return "" in many cases where the underlying class is not in the portal.
This method uses $zconvert(Page,"I","URL"), so Page should be supplied in URL-encoded form. In most cases, this will be the same as the classname, but in others, such as %DeepSee classes, the URL-encoded form is required.

Export

ClassMethod Export(FileName As %String = "CustomPortalResourcesExport.xml", ByRef NumExported As %Integer, Pages As %String = "*", Resources As %String = "*") As %Status

Export Custom Resource records to a file in XML format. The user must have USE permissions on the %Admin_Secure resource to perform the export.
Parameters:

  • Filename - Output file name.
  • NumExported (ByRef) - Returns the number of records exported.
  • Pages - Mask for the pages to return. See the List query for details on the format.
  • Resources - Mask for the resources to return. See the List query for details on the format.

Import

ClassMethod Import(FileName As %String = "ResourcesExport.xml", ByRef NumImported As %Integer, Flags As %Integer = 0) As %Status

Import Custom Resource records from an XML file. The user must have USE permissions on the %Admin_Secure resource to perform the import.
Parameters:

  • FileName - Filename to import Custom Resource records from.
  • NumImported (ByRef) - Returns the number of records imported. InvalidRecords
  • Flags - Control whether to import the records in the file. The supported bit flags at present are:
    • Bit 0 - Do not import records, just return the count.
    • Bit 1 - Do not require that the resource exists. Note: On failure, no records will be imported.

ListExecute

ClassMethod ListExecute(ByRef qHandle As %Binary, Pages As %String = "*", Resources As %String = "*") As %Status [ Internal ]

List pages and associated resources. Note: the Page column lists the normalized page name.
Use the Pages and Resources arguments to restrict the list. The possible inputs for each argument is a comma-separated string with the following rules:

  • "*" - match all records.
  • "String,String1" - match all records that match an element in the string
  • "String*" - match all records starting with "String"
  • "String,String1*,String2" - match any record equal to "String" or "String2", or starting with "String1" Note: This query may change in future versions.

ListFetch

ClassMethod ListFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = ListExecute ]

ListClose

ClassMethod ListClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = ListExecute ]