Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%Archive] >  [Content]
Private  Storage   

class %Archive.Content extends %RegisteredObject

An Archive Content is an object of source or target of Archive operations (cf. %Archive.Session)

Sample script that creates an Archive Content object for a (source) file or files to be archived:

	   Set ContentOref = ##class(%Archive.Content).%New() 
	   Set ContentOref.Name = "File" // description of the content 
	   Set ContentOref.RetentionSpec = 0 // a retention period or class name 
	   Set Status = ContentOref.AddSource(SourceFilePath1,"Test File 1") // path of the source file and a brief description ("tagname") 
	   // and if there are more files to store (as a single content) --
	   Set Status = ContentOref.AddSource(SourceFilePath2,"Test File 2") 
	   // and so on
Sample script that creates an Archive Content object for a file or files as the target of a retrieval:
	   Set ContentOref = ##class(%Archive.Content).%New() 
	   Set Status = ContentOref.DataSink.Insert(TargetFilePath1) 
	   // and if the content contains more than one file --
	   Set Status = ContentOref.DataSink.Insert(TargetFilePath2) 
	   // and so on

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 1


Summary

Properties
Attribute DataSink DataSource Name RetentionSpec

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AddSource


Properties

• property Attribute as array of %String;
Optional attributes of the content, in pairs of AttributeName and AttributeValue
• property DataSink as list of %String;
a list of targets (file path, %Stream, etc.) for retrieving content from server
• property DataSource as %String [ MultiDimensional ];
for storing content to server
  • DataSource = DataSourceCount
  • DataSource(DataSourceID,"TagName") = TagName
  • DataSource(DataSourceID,"Source") = Output source (file path, %Stream, etc.)
• property Name as %String;
An optional, descriptive name for the content
• property RetentionSpec as %String;
Either a retention period, specified as a number (consisting of only digits) in seconds, or a retention class name

Methods

• method AddSource(DataSource As %RegisteredObject, TagName As %String) as %Status
Specify a data source to export to server


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.