• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Estrelica
    • Core
    • CoreConfig
    • CoreConfig.Settings
  • Estrelica.Archer.AccessControl
    • AccessControlEdit
    • AccountStatus
    • ContactSubType
    • ContactType
    • IArcherGroup
    • IArcherGroupEdit
    • IArcherRole
    • IArcherRoleEdit
    • IArcherUser
    • IArcherUserEdit
    • ISecurityParameter
    • IUserContact
    • IUserProvider
    • UserType
  • Estrelica.Archer.Content
    • ArcherContentExtensions
    • ContentFilterHelper
    • ContentReportOptions
    • ContentSearchOptions
    • ContentSource
    • ContentType
    • CurrentDateOperator
    • DatafeedHistoryStatus
    • DatafeedStatus
    • DatafeedType
    • DateOffsetOperator
    • DateValueOperator
    • DisplayFieldExtensions
    • EqualityOperator
    • FieldHistoryAuditType
    • HistoryAuditType
    • IAdvancedWorkflowAudit
    • IArcherContent
    • IArcherContentAccess
    • IArcherContentEdit
    • IArcherContentIdQuery
    • IArcherDateFieldQuery
    • IArcherDocument
    • IArcherMembershipQuery<T>
    • IArcherNumericFieldQuery
    • IArcherRecord
    • IArcherRecordQuery
    • IArcherReport
    • IArcherTextFieldQuery
    • IArcherUserGroupFieldQuery
    • IArcherValuesListQuery
    • IContentHistory
    • IContentInformation
    • IContentReport
    • IContentReportOptions
    • IContentUpdateInformation
    • ICrossReferencedRecordsSelectionEdit
    • IDatafeed
    • IDatafeedHistory
    • IDatafeedHistoryMessage
    • IDatafeedRecordCount
    • IDateValueEdit
    • IDisplayField
    • IDocumentSelectionEdit
    • IEditableField
    • IExternalLink
    • IExternalLinkEdit
    • IExternalLinksSelectionEdit
    • IFieldAudit
    • IFieldHistory
    • IFieldHistoryEx
    • IFieldQuery
    • IFieldValueEdit<T>
    • IHistoryAudit
    • INumericValueEdit
    • IObjectValue
    • IReferencedRecordsSelection
    • IReferencedRecordsSelectionEdit
    • ISearchDisplayFieldOptions
    • ISearchOptions
    • ISignatureAudit
    • IStatisticsReport
    • ISubEditableField
    • ISystemUpdateInformation
    • ITextValueEdit
    • IUserGroupListSelection
    • IUserGroupListSelectionEdit
    • IValuesListBaseSelection
    • IValuesListBaseSelectionEdit
    • IValuesListSelection
    • IValuesListSelectionEdit
    • IValuesListSingleSelection
    • IValuesListSingleSelectionEdit
    • IWorkflowAction
    • IWorkflowNode
    • LastUpdatedPreference
    • NumericRangeOperator
    • RecordCountType
    • RecordStatus
    • ReportSource
    • SortField
    • SortType
    • ValueOperator
    • ValuesOperator
    • WorkflowAuditActionType
  • Estrelica.Archer.Entity
    • ArcherEntityExtensions
    • ASOStatus
    • EntityType
    • IArcherAliasableEntity
    • IArcherAliasedEntity
    • IArcherASOEntity
    • IArcherASONamedEntity
    • IArcherBase
    • IArcherContentUpdateInfoEntity
    • IArcherDescribableEntity
    • IArcherDescribedEntity
    • IArcherEntity
    • IArcherEntityBase
    • IArcherGuidEntity
    • IArcherNameableEntity
    • IArcherNamedEntity
    • IArcherUpdateInfoEntity
    • IEditableArcherEntity
    • IUpdateInformation
    • SourceAttribute
    • UpstreamPropertyAttribute
  • Estrelica.Archer.Events
    • EventActionLayoutType
    • EventActionType
    • EventDateActionType
    • EventItemActionType
    • EventSectionActionType
    • IEventAction
    • IEventRule
    • ISetDateOption
  • Estrelica.Archer.Layouts
    • ILayout
    • ILayoutEntity
    • ILayoutItem
    • ILayoutSection
    • ILayoutTab
    • LayoutItemType
    • LayoutMemberType
    • LayoutSectionType
    • LayoutTabType
  • Estrelica.Archer.Metadata
    • ArcherMetadataExtensions
    • FilterConditionType
    • FilterCriteriaOperatorType
    • IArcherApplication
    • IArcherLevel
    • IArcherModule
    • IArcherQuestionnaire
    • IArcherSolution
    • IArcherSubForm
    • IArcherValuesList
    • IArcherValuesListValue
    • IFilterCondition
    • IFilterCriteria
    • ILevelFilter
    • ILevelFilterValue
    • IModuleOwner
    • IModuleOwnerGroup
    • IModuleOwnerUser
    • IModuleReference
    • INumericRange
    • INumericRangeValue
    • IQuestionnaireRule
    • ModuleClass
    • ModuleStatus
    • ModuleType
    • QuestionnaireRuleType
    • ReportType
    • Timezone
    • ValuesListType
    • ValueSortType
  • Estrelica.Archer.Metadata.Field
    • ArcherFieldExtensions
    • DefaultDateType
    • ExternalLinkProtocol
    • FieldEncryptionState
    • FieldType
    • IArcherField
    • IAssetResponsibilitiesField
    • IAttachmentField
    • IAvailableUserGroupSelections
    • IBaseDateField
    • ICalculatedValuesListField
    • IContentAccessHistoryField
    • ICrossApplicationStatusTrackingField
    • ICrossModuleStatusTrackingField
    • ICrossReferenceField
    • IDateField
    • IDiscussionField
    • IDocumentField
    • IExternalLinksField
    • IFirstPublishedField
    • IGroupPermission
    • IHistoryLogField
    • IImageField
    • IIPAddressField
    • ILastUpdatedField
    • IMatrixField
    • ImplementsAPIKey
    • ImplementsFieldTypeAttribute
    • IMultipleReferenceDisplayField
    • INumericField
    • IPermissionInheritance
    • IQuestionnaireReferenceField
    • IRecordStatusField
    • IReferenceField
    • IRelatedRecordsField
    • IRiskAssessmentField
    • ISchedulerField
    • ISubformField
    • ITechnologiesListField
    • ITechnologyVersionsListField
    • ITextField
    • ITrackingIDField
    • IUserGroupListField
    • IUserPermission
    • IValuesListField
    • IVotingField
    • SystemFieldType
    • UserGroupType
    • VotingType
  • Estrelica.Archer.Metadata.Field.Properties
    • DisplayControl
    • FieldLayoutFormat
    • IAdvancedDisplayOption
    • IAdvancedDisplayProperty
    • IAllowLookupProperty
    • IAllowSortingProperty
    • IColumnCountProperty
    • IDisplayControlProperty
    • IDisplayInHeaderProperty
    • IEncryptionStateProperty
    • IFieldValidationTypeProperty
    • IHeightWidthProperty
    • IIncludeTimeInformationProperty
    • IIncludeUserInformationProperty
    • IIsAuditEnabledProperty
    • IIsBulkCreateEnabledProperty
    • IIsBulkUpdateEnabledProperty
    • IIsCalculatedProperty
    • IIsEditableGridDisplayProperty
    • IIsEditableInSearchProperty
    • IIsEncryptedProperty
    • IIsFindEnabledProperty
    • IIsKeyProperty
    • IIsQuestionProperty
    • IIsRequiredProperty
    • IIsRestrictedToLevelProperty
    • IIsSupressedProperty
    • IIsTrendingEnabledProperty
    • IIsUniqueProperty
    • ILinkProperty
    • ILookupReportProperty
    • IMaxAttachmentsAllowedProperty
    • IMaxFileSizeProperty
    • IMaximumSelectionProperty
    • IMaxIntValueProperty
    • IMaxLongValueProperty
    • IMinAttachmentsAllowedProperty
    • IMinimumSelectionProperty
    • IMinIntValueProperty
    • IMinLongValueProperty
    • IMinMaxSelectionProperty
    • IPrefixProperty
    • ISuffixProperty
    • ITrendingDurationProperty
    • ITrendingDurationTypeProperty
    • MatrixAxis
    • NegativeDisplayType
  • Estrelica.Archer.Metadata.Properties
    • IIsDeprecatedProperty
    • IIsDirectToEditEnabledProperty
    • IIsMobileEnabledProperty
    • IIsNotificationProperty
    • IIsTaskManagementEnabledProperty
    • IIsWaveEnabledProperty
    • IKeepLicensedProperty
    • ISearchViewProperty
  • Estrelica.Archer.Utility
    • APIExceptionExtensions
    • APIPreference
    • APISource
    • ArcherAPIException
    • ArcherEntitySerializer
    • BaseDataWrapper<K>
    • CachedResolver
    • DictionaryDataWrapper<K>
    • DomainFormat
    • EditUtilities
    • ExtensionsUnavailableException
    • FilterCriteriaHelper
    • IAccessResolver
    • IAPIFacade
    • IArcherRestAPI
    • IArcherSoapAPI
    • IArcherUndocumentedAPI
    • ICastleHillExtendedAPI
    • IContentResolver
    • ILayoutResolver
    • IMetadataResolver
    • IReportResolver
    • IValueAccessor
    • ObjectDataWrapper<T, K>
    • ObjectKeyAttribute
    • ValuesListChangeEvent
    • ValuesListChangeEventArgs
  • Estrelica.Interfaces
    • IArcherAuthProvider
    • ICacheProvider
    • IClearable
    • IDatabaseAuthProvider
    • IEditable
    • IEditable<V>
    • IEditableCollection<V>
    • IEditableEnumerable<V>
    • IEditableFieldSelection<V>
    • IEditableInterface<I>
    • IEntityResolver
    • IExtendedAPIAuthProvider
    • IHttpClientAccessor
    • ILogCleanup
    • ILogSubscriber
    • InvalidateEntity<K>
    • InvalidateEntityEventArgs<K>
    • IRecordAccess
    • IRecordAccess<T>
    • IResolverProvider
    • ISessionProvider
    • ISystemUpdateable
    • ITrafficCounter
    • LogLevel
  • Estrelica.Logging
    • BaseLogger
    • ConsoleLogger
    • FileLogger
    • FileLogger.TimestampFormat
    • Logger
    • TraceLogger
  • Estrelica.Utility
    • Arguments
    • BaseRecordAccess
    • DataReaderExtensions
    • DateTimeExtensions
    • Debouncer
    • DebugLog
    • DeferEnumerable<T>
    • DeferValue<V>
    • DictionaryExtensions
    • EnumHelper
    • ExceptionExtensions
    • GuidUtility
    • HandledException
    • HashSetExtensions
    • ICacheHandler
    • ICollectionExtensions
    • IDeferrable
    • IDeferredValue
    • IEnumerableExtensions
    • IgnoreDefaultValuesDictionary<K, V>
    • JsonDictionary<V>
    • OperationExtensions
    • Resource
    • SqlConnectionExtensions
    • SqlUtilities
    • StreamExtensions
    • StringExtensions
    • TableMapper
    • TimeoutDictionary<K, V>
    • TypeExtensions
    • XElementExtensions

Class ArcherContentExtensions

Provides extension methods to convert XElement and JSON records returned from the Archer Search and REST APIs via the Estrelica.Core Content resolver into IArcherContentAccess implementations for simplified access and editing.

Inheritance
object
ArcherContentExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Estrelica.Archer.Content
Assembly: Estrelica.Archer.Entities.dll
Syntax
[DoNotObfuscateType]
public static class ArcherContentExtensions

Methods

AsZipStream(IEnumerable<IArcherDocument>, string)

Returns a collection of IArcherDocument downloads as a Zip MemoryStream.

Declaration
public static MemoryStream AsZipStream(this IEnumerable<IArcherDocument> documents, string exceptionReportFilename = "_exceptionReport.txt")
Parameters
IEnumerable<IArcherDocument> documents

The IArcherDocument references to be downloaded and included in the Zip

string exceptionReportFilename

Defaults to _exceptionReport.txt. If not null, any exceptions that arise during the export attempt will be logged in this file and included in the zip result. Pass null here if you don't want that report.

Returns
MemoryStream

A MemoryStream representing the Zip result

Remarks

If duplicate filenames are found in the documents returned from Archer, they will be distinguished in "Filename.txt", "Filename (1).txt", "Filename (2).txt" in the result.

ContentAccess(IArcherContent, IResolverProvider)

Converts a single JSON content record returned from the Archer REST API, seriliazed into a dictionary supporting the IArcherContent interface, into a more easily-accessible IArcherContentAccess implementation

Declaration
public static IArcherContentAccess ContentAccess(this IArcherContent record, IResolverProvider resolver)
Parameters
IArcherContent record

A single IArcherContent (JSON) record obtained from the Archer REST API (typically via the Estrelica.Core Content resolver)

IResolverProvider resolver

IResolverProvider (typically the Estrelica.Core itself) providing access to all the resolvers needed to flesh out the record's content (e.g. metadata, values lists, users/groups, content update info, etc.)

Returns
IArcherContentAccess

A single IArcherContentAccess implementation

ContentAccess(IEnumerable<IArcherContent>, IResolverProvider)

Converts JSON content records returned from the Archer REST API, seriliazed into dictionaries supporting the IArcherContent interface, into more easily-accessible IArcherContentAccess implementations

Declaration
public static IEnumerable<IArcherContentAccess> ContentAccess(this IEnumerable<IArcherContent> records, IResolverProvider resolver)
Parameters
IEnumerable<IArcherContent> records

IEnumerable set of IArcherContent (JSON) records obtained from the Archer REST API (typically via the Estrelica.Core Content resolver)

IResolverProvider resolver

IResolverProvider (typically the Estrelica.Core itself) providing access to all the resolvers needed to flesh out each record's content (e.g. metadata, values lists, users/groups, content update info, etc.)

Returns
IEnumerable<IArcherContentAccess>

An IEnumerable set of IArcherContentAccess implementations

ContentAccess(IEnumerable<XElement>, IResolverProvider)

Converts XML records returned from the Archer Search API into more easily-accessible IArcherContentAccess implementations

Declaration
public static IEnumerable<IArcherContentAccess> ContentAccess(this IEnumerable<XElement> records, IResolverProvider resolver)
Parameters
IEnumerable<XElement> records

IEnumerable set of XElement records obtained from the Archer Search API (typically via the Estrelica.Core Content resolver)

IResolverProvider resolver

IResolverProvider (typically the Estrelica.Core itself) providing access to all the resolvers needed to flesh out each record's content (e.g. metadata, values lists, users/groups, content update info, etc.)

Returns
IEnumerable<IArcherContentAccess>

An IEnumerable set of IArcherContentAccess implementations

ContentAccess(XElement, IResolverProvider)

Converts a single XML record returned from the Archer Search API into a more easily-accessible IArcherContentAccess implementation

Declaration
public static IArcherContentAccess ContentAccess(this XElement record, IResolverProvider resolver)
Parameters
XElement record

A single XElement record obtained from the Archer Search API (typically via the Estrelica.Core Content resolver)

IResolverProvider resolver

IResolverProvider (typically the Estrelica.Core itself) providing access to all the resolvers needed to flesh out the record's content (e.g. metadata, values lists, users/groups, content update info, etc.)

Returns
IArcherContentAccess

A single IArcherContentAccess implementation

CreateLinkedContent(IArcherContentAccess, IReferenceField, int?)

Returns a new IArcherContentEdit record linked to the current (this) record via one of its IReferenceField fields (i.e. a Cross Reference, Related Records or Subform field). If the field is a Cross-Reference field which targets multiple Levels, the target level Id for the created record must be specified via the referencedLevelId parameter. The returned IArcherContentEdit is not immediately created in Archer, but instead must be persisted (after the appropriate field value changes have been made) via a call to the Content resolver's Estrelica.Archer.Utility.IContentResolver.Update method.

Declaration
public static IArcherContentEdit CreateLinkedContent(this IArcherContentAccess record, IReferenceField referenceField, int? referencedLevelId = null)
Parameters
IArcherContentAccess record

An IArcherContentAccess record to which a new cross-reference, related record, or subform record is to be added

IReferenceField referenceField

The Cross Reference, Related Record, or Subform field on the current record via which the new record should be linked

int? referencedLevelId

An optional parameter specifying the Level in which the new record should be created. This is optional for Related Record, Subform, and single-level Cross Reference fields (as the Level will be determined from the reference field itself) but must be explicitly specified in the case of a multi-level Cross Reference field.

Returns
IArcherContentEdit

An IArcherContentEdit instance, ready for modification of its record values

ForEdit(IArcherContent, IResolverProvider)

Prepares an IArcherContentAccess record for editing.

Declaration
public static IArcherContentEdit ForEdit(this IArcherContent record, IResolverProvider resolver)
Parameters
IArcherContent record

An IArcherContentAccess to be edited and eventually persisted back to Archer via an Estrelica.Archer.Utility.IContentResolver.Update call

IResolverProvider resolver

IResolverProvider (typically the Estrelica.Core itself) providing access to all the resolvers needed to flesh out the record's content (e.g. metadata, values lists, users/groups, content update info, etc.)

Returns
IArcherContentEdit

An IArcherContentEdit instance, ready for modification of its record values

ForEdit(XElement, IResolverProvider)

Prepares an XElement search result record for editing.

Declaration
public static IArcherContentEdit ForEdit(this XElement record, IResolverProvider resolver)
Parameters
XElement record

An XElement record returned from the Archer Search API to be edited and eventually persisted back to Archer via an Estrelica.Archer.Utility.IContentResolver.Update call

IResolverProvider resolver

IResolverProvider (typically the Estrelica.Core itself) providing access to all the resolvers needed to flesh out the record's content (e.g. metadata, values lists, users/groups, content update info, etc.)

Returns
IArcherContentEdit

An IArcherContentEdit instance, ready for modification of its record values

PerformWorkflowAction(IArcherContentAccess, IWorkflowAction)

Performs a selected workflow action on the record.

Declaration
public static bool PerformWorkflowAction(this IArcherContentAccess record, IWorkflowAction action)
Parameters
IArcherContentAccess record

The Archer content record on which the workflow action is to be performed

IWorkflowAction action

The workflow action to be performed

Returns
bool

True if the workflow action was successfully performed, otherwise False

SaveToZipFile(IEnumerable<IArcherDocument>, string, string, bool)

Saves a collection of IArcherDocument downloads to a Zip file

Declaration
public static string SaveToZipFile(this IEnumerable<IArcherDocument> documents, string zipFilename, string exceptionReportFilename = "_exceptionReport.txt", bool overwriteIfFileExists = false)
Parameters
IEnumerable<IArcherDocument> documents

The IArcherDocument references to be downloaded and included in the Zip

string zipFilename

The intended output filename of the zip file. If no extension is specified, .zip will be assumed.

string exceptionReportFilename

Defaults to _exceptionReport.txt. If not null, any exceptions that arise during the export attempt will be logged in this file and included in the zip result. Pass null here if you don't want that report.

bool overwriteIfFileExists

Indicates whether the zipFilename file should be overwritten if it already exists, or an InvalidOperationException should be raised. Defaults to false (throws exception).

Returns
string

The fully-qualified filename of the Zip file containing the documents

Remarks

If duplicate filenames are found in the documents returned from Archer, they will be distinguished in "Filename.txt", "Filename (1).txt", "Filename (2).txt" in the result.

WorkflowActions(IArcherContentAccess)

Returns the available workflow actions that may be performed on the record, or an empty IEnumerable<IWorkflowAction> if no actions are applicable.

Declaration
public static IEnumerable<IWorkflowAction> WorkflowActions(this IArcherContentAccess record)
Parameters
IArcherContentAccess record

Returns
IEnumerable<IWorkflowAction>

WorkflowNode(IArcherContentAccess)

Returns the workflow details for the content record, or null if the record is not enrolled in workflow.

Declaration
public static IWorkflowNode WorkflowNode(this IArcherContentAccess record)
Parameters
IArcherContentAccess record

Returns
IWorkflowNode

Back to top Copyright 2019-2023 by CastleHill Software LLC