Ens.VDoc.Interface
abstract class Ens.VDoc.Interface
Common interface used as a base class for all Virtual Document typesProperty Inventory
- DocType
- DocTypeCategory
- DocTypeName
- Identifier
- IsMutable
- Name
- OriginalDocId
- Source
- TimeCreated
- TypeVersion
- UserValues
Method Inventory
- CopyValues()
- DrawFormButtons()
- DrawHTMLContentsForm()
- DrawHTMLForm()
- EnumerateDocTypesClose()
- EnumerateDocTypesExecute()
- EnumerateDocTypesFetch()
- EnumerateTypeCategoriesClose()
- EnumerateTypeCategoriesExecute()
- EnumerateTypeCategoriesFetch()
- EnumerateVDocsClose()
- EnumerateVDocsExecute()
- EnumerateVDocsFetch()
- GetAlias()
- GetContentArray()
- GetManagerLinks()
- GetNewManagerLinks()
- GetNextIndex()
- GetValueAt()
- IsMutableSet()
- PokeDocType()
- SetValueAt()
- TypeVersionGet()
- Validate()
- getTestNewArg()
Parameters
parameter DOCCLASSFULLNAME;
Full descriptive name for this subclass of document
parameter DOCCLASSNAME;
Compact descriptive name for this subclass of document
parameter DOCTYPES;
If provided, this parameter defines a comma-delimited, default list of
document types for a document class.
This provides an alternate mechanism to overriding the EnumerateDocTypes query
This provides an alternate mechanism to overriding the EnumerateDocTypes query
parameter DOMAIN = Ensemble;
Use our own domain for localization
Properties
property DocType as %String (MAXLEN = 128);
Reference to associated Schema Id
Property methods: DocTypeDisplayToLogical(), DocTypeGet(), DocTypeIsValid(), DocTypeLogicalToDisplay(), DocTypeLogicalToOdbc(), DocTypeNormalize(), DocTypeSet()
property DocTypeCategory as %String [ Transient ];
the category portion of the DocType
Property methods: DocTypeCategoryDisplayToLogical(), DocTypeCategoryGet(), DocTypeCategoryIsValid(), DocTypeCategoryLogicalToDisplay(), DocTypeCategoryLogicalToOdbc(), DocTypeCategoryNormalize(), DocTypeCategorySet()
property DocTypeName as %String (MAXLEN = 50) [ Transient , ReadOnly ];
Stored raw document type name ; the secondary type name portion of the DocType
Property methods: DocTypeNameDisplayToLogical(), DocTypeNameGet(), DocTypeNameIsValid(), DocTypeNameLogicalToDisplay(), DocTypeNameLogicalToOdbc(), DocTypeNameNormalize()
property Identifier as %String [ Calculated , Transient , ReadOnly ];
Unique document identification string found in document content
Property methods: IdentifierCompute(), IdentifierDisplayToLogical(), IdentifierGet(), IdentifierIsValid(), IdentifierLogicalToDisplay(), IdentifierLogicalToOdbc(), IdentifierNormalize(), IdentifierSQLCompute()
property IsMutable as %Boolean [ InitialExpression = 1 ];
We clear this property to prevent saving or modifying of already-saved document objects
Property methods: IsMutableDisplayToLogical(), IsMutableGet(), IsMutableIsValid(), IsMutableLogicalToDisplay(), IsMutableNormalize()
property Name as %String [ Calculated , Transient , ReadOnly ];
Raw type name of document as declared in document content
Property methods: NameCompute(), NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSQLCompute()
property OriginalDocId as %String (COLLATION = "EXACT");
If this document is a response to another document of the same type, this property contains the Id of the original document
Property methods: OriginalDocIdDisplayToLogical(), OriginalDocIdGet(), OriginalDocIdIsValid(), OriginalDocIdLogicalToDisplay(), OriginalDocIdLogicalToOdbc(), OriginalDocIdNormalize(), OriginalDocIdSet()
property Source as %String (MAXLEN = 250, TRUNCATE = 1);
Source of document (e.g. filename)
Property methods: SourceDisplayToLogical(), SourceGet(), SourceIsValid(), SourceLogicalToDisplay(), SourceLogicalToOdbc(), SourceNormalize(), SourceSet()
property TimeCreated as Ens.DataType.UTC [ InitialExpression = $$$timeUTC ];
The timestamp of when this Document object was first instantiated
Property methods: TimeCreatedDisplayToLogical(), TimeCreatedGet(), TimeCreatedIsValid(), TimeCreatedLogicalToDisplay(), TimeCreatedLogicalToOdbc(), TimeCreatedNormalize(), TimeCreatedOdbcToLogical(), TimeCreatedSet(), TimeCreatedStorageToLogical(), TimeCreatedtimeCmp(), TimeCreatedtimeDiff(), TimeCreatedtimeLocal(), TimeCreatedtimeLocaltoUTC(), TimeCreatedtimeUTC(), TimeCreatedtimeUTCH(), TimeCreatedtimeUTCHtoUTC(), TimeCreatedtimeUTCtoLocal(), TimeCreatedtimeUTCtoUTCH()
property TypeVersion as %String [ Calculated , Transient , ReadOnly ];
Raw type version of document if declared in document content
Property methods: TypeVersionCompute(), TypeVersionDisplayToLogical(), TypeVersionIsValid(), TypeVersionLogicalToDisplay(), TypeVersionLogicalToOdbc(), TypeVersionNormalize(), TypeVersionSQLCompute()
property UserValues as array of %String);
An array of strings for storing user defined attribute values. Value key names beginning with % are reserved for InterSystems IRIS use.
Property methods: UserValuesBuildValueArray(), UserValuesCollectionToDisplay(), UserValuesCollectionToOdbc(), UserValuesDisplayToCollection(), UserValuesDisplayToLogical(), UserValuesGet(), UserValuesGetObject(), UserValuesGetObjectId(), UserValuesGetSwizzled(), UserValuesIsValid(), UserValuesLogicalToDisplay(), UserValuesLogicalToOdbc(), UserValuesNormalize(), UserValuesOdbcToCollection(), UserValuesSet(), UserValuesSetObject(), UserValuesSetObjectId()
Methods
method CopyValues(pSource As Ens.VDoc.Interface, pSourcePath As %String, pTargetPath As %String, pAction As %String, pKey As %String) as %Status
Copy a whole set of values from source to target when iteration is implied between 2 VDocs
pSourcePath contains the property path to the source set
pTargetPath contains the property path to the target set
pAction contains an action code: "set", etc..
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
pTargetPath contains the property path to the target set
pAction contains an action code: "set", etc..
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
classmethod DrawFormButtons(ByRef pButtons As %CSP.Util.FormButton) as %Status
classmethod DrawHTMLContentsForm(pObj As %RegisteredObject, ByRef pID As %String) as %Status
Specialized HTML generation method to display the body of a form
to display/edit a document-style message.
classmethod DrawHTMLForm(pObj As %RegisteredObject, ByRef pID As %String, pActionURL As %String = "", ByRef pButtons As %CSP.Util.FormButton, pTarget As %String = "") as %Status
Override standard DrawHTMLForm method
Draw an HTML form for this form object.
pObj is an instance of the form object that provides the initial values for the form.
pActionURL is the URL to submit this form to.
pButtons is an array of submit buttons to display for the form. If not provided, the default Save and Cancel buttons are shown. pButtons is an integer-subscripted array of FormButton objects.
pObj is an instance of the form object that provides the initial values for the form.
pActionURL is the URL to submit this form to.
pButtons is an array of submit buttons to display for the form. If not provided, the default Save and Cancel buttons are shown. pButtons is an integer-subscripted array of FormButton objects.
classmethod EnumerateDocTypesExecute(ByRef qHandle As %Binary, Category As %String, IncludeBase As %Boolean) as %Status
classmethod EnumerateDocTypesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod EnumerateTypeCategoriesExecute(ByRef qHandle As %Binary, Standard As %String = "") as %Status
classmethod EnumerateTypeCategoriesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod EnumerateVDocsExecute(ByRef qHandle As %Binary, Persistent As %Boolean = 1, Abstract As %Boolean = 0) as %Status
classmethod EnumerateVDocsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
This method computes the Alias string for a property name, given the property's node in the Content Array.
abstract classmethod GetContentArray(Output pContents, pMode As %String, pDocType As %String, pLevel As %Integer, pIncludeBase As %Boolean = 0) as %Status
Returns array of properties that make up the contents
of this object.
This method in implemented within the document class.
The content array is in the form:
pContents(n,"type")="%String"
pContents(n,"name")="Field"
pContents(n,"alias")=alias code
If pContents(n) is non-zero then the property is a composite type with
sub-properties. The sub-properties are indexed with a similar structure under
pContents(n,m) where m is the index of the subtype property.
This method in implemented within the document class.
The content array is in the form:
pContents(n,"type")="%String"
pContents(n,"name")="Field"
pContents(n,"alias")=alias code
If pContents(n) is non-zero then the property is a composite type with
sub-properties. The sub-properties are indexed with a similar structure under
pContents(n,m) where m is the index of the subtype property.
classmethod GetManagerLinks(Output pColumns) as %Boolean
Returns an array of links to manager pages for this type of VDoc; item 0 is the family description
The output array is subscripted first by item number, and below that by "name","page" and "desc"
classmethod GetNewManagerLinks(Output pColumns) as %Boolean
Returns an array of links to manager pages for this type of VDoc; item 0 is the family description
The output array is subscripted first by item number, and below that by "name","page" and "desc"
method GetNextIndex(pPath As %String, pIndex As %String = "", ByRef pStatus As %Status = $$$OK) as %String
Return the next
abstract method GetValueAt(pPropertyPath As %String, pFormat As %String, Output pStatus As %Status, pTreatEmptyFieldAsNull As %Boolean = 0) as %String
Return the value of the designated virtual property.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
pFormat contains additional context that may be used to influence the form of the result value
If no value can be found matching pPropertyPath in the current document an empty string is returned and output argument pStatus returns status information explaining the failure
pTreatEmptyFieldAsNull indicates whether repeating fields which have a separator but are empty should be considered to have a count of 1 (if false) or 0 (if true) This is implemented by the document subclass.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
pFormat contains additional context that may be used to influence the form of the result value
If no value can be found matching pPropertyPath in the current document an empty string is returned and output argument pStatus returns status information explaining the failure
pTreatEmptyFieldAsNull indicates whether repeating fields which have a separator but are empty should be considered to have a count of 1 (if false) or 0 (if true) This is implemented by the document subclass.
abstract method SetValueAt(pValue As %String, pPropertyPath As %String, pAction As %String = "set", pKey As %String = "") as %Status
Set the value of the designated virtual property.
pValue contains the value to set.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
pAction contains an action code: "set", "clear", "append", etc.
pValue contains the value to set.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
pAction contains an action code: "set", "clear", "append", etc.
method TypeVersionGet() as %String
Subclasses should override this if the version can be gotten from the document content
classmethod getTestNewArg(pTestContext As %String, pTestOption As %String, pTestName As %String) as %String
Return a suitable argument to pass to %New() to create a test object for the test described by the arguments.
Example: getTestNewArg("DTL","existing","Test.DTL.DTLExisting") as passed from the DTL test wizard.
Queries
Selects Type As %String
Returns a list of available DocTypes for the document class.
The DocType is returned as the first column in the result set.
The Category parameter can be used to restrict the list.
If Category is:
0 - return only DocTypes in standard categories
+ - return only DocTypes in user-defined categories
empty - return DocTypes from all categories
a category name - return only DocTypes in the named category
a partial name suffixed with '%' - return only DocTypes in categories matching the partial category name
other - return nothing
If IncludeBase is:
0 - return only DocTypes defined in the current schema category itself
1 - return all DocTypes in the current schema category's base category in addition to those defined in the current category itself
This query can be overridden in a subclass.
This default implementation returns the type list specified by the DOCTYPES parameter (or a dummy result containing 1 empty row).
The DocType is returned as the first column in the result set.
The Category parameter can be used to restrict the list.
If Category is:
0 - return only DocTypes in standard categories
+ - return only DocTypes in user-defined categories
empty - return DocTypes from all categories
a category name - return only DocTypes in the named category
a partial name suffixed with '%' - return only DocTypes in categories matching the partial category name
other - return nothing
If IncludeBase is:
0 - return only DocTypes defined in the current schema category itself
1 - return all DocTypes in the current schema category's base category in addition to those defined in the current category itself
This query can be overridden in a subclass.
This default implementation returns the type list specified by the DOCTYPES parameter (or a dummy result containing 1 empty row).
query EnumerateTypeCategories(Standard As %String = "")
Returns a list of document type schema categories for the document class.
The Standard parameter can be used to restrict the list.
If Standard is:
0 - return only standard categories
+ - return only user-defined categories
empty - return all categories
a partial category name - return only categories starting with the given category name part
other - return nothing
This query can be overridden in a subclass.
This default implementation returns no rows.
The Standard parameter can be used to restrict the list.
If Standard is:
0 - return only standard categories
+ - return only user-defined categories
empty - return all categories
a partial category name - return only categories starting with the given category name part
other - return nothing
This query can be overridden in a subclass.
This default implementation returns no rows.
Returns a list of VDoc classes that extend Ens.VDoc.Interface.
The Persistent and Abstract parameters can be used to restrict the list.
If Persistent is:
0 - return persistent and non-persistent subclasses
1 - return only persistent subclasses
If Abstract is:
0 - return only non-abstract subclasses
1 - return both abstract and non-abstract subclasses
Note that the default value for Persistent is 1.
The Persistent and Abstract parameters can be used to restrict the list.
If Persistent is:
0 - return persistent and non-persistent subclasses
1 - return only persistent subclasses
If Abstract is:
0 - return only non-abstract subclasses
1 - return both abstract and non-abstract subclasses
Note that the default value for Persistent is 1.