Home > Class Reference > ENSLIB namespace > %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


Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 1


Attribute DataSink DataSource Name RetentionSpec

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


• 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


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