Click or drag to resize

IAsset Interface


Represents an asset in the Assets Tree within a particular Site.

It can be retrieved via Asset method from the Site object.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
public interface IAsset : IAssetItem, IContentItem<IAssetItem, IAssetVersion, IAssetSchema, IAssetSchemaVersion>, 
	IContentItem, IContentItemVersion, IEntity<ISite>, IEntity, 
	IEntityEvents, IContentItemWorkflowSuper, IAssetVersion, IAssetEvents

The IAsset type exposes the following members.

Properties
  NameDescription
Public propertyCode example_Locale
Gets/sets the locale name of this object, if this object has language property
(Inherited from IContentItem.)
Public propertyCode exampleAdminRightsEnabled
Gets and sets whether the content item has admin rights enabled. Admin rights will allow actions to the item that cannot normally be done by the user whose session is processing the request.
(Inherited from IContentItemWorkflowSuper.)
Public propertyCode exampleAncestorEditionIds

Gets the collection of SourceEditionId strings of all ancestor editions of the content item.

Assets are connected as Source Editions when they are edited in the CMS and saved using Save As.

Public propertyAssetType
Gets the type of Asset this version object belongs to. If it belongs to an Asset Folder, the type will be null.
(Inherited from IAssetVersion.)
Public propertyAssignedGroup
Gets the Group to which this page is currently assigned. If the page is not assigned to a group, this method returns null.
(Inherited from IContentItem.)
Public propertyAssignedUser
Gets the User to whom this page is currently assigned. If the page is not assigned to a user, this method returns null.
(Inherited from IContentItem.)
Public propertyAssignmentComment
Gets the comments from assignments when the page was not in workflow.
(Inherited from IContentItem.)
Public propertyCanMarkForPublish
Controls whether the page is allowed to mark for publish.
(Inherited from IContentItem.)
Public propertyCanParentRegionRoots
Gets and sets whether this content item allows region roots (content items with a noninherited locale) when the content item isn't language-neutral.
(Inherited from IContentItem.)
Public propertyCheckedOut
Gets whether this page is checked out. A page has to be checked out to a specific User to be edited. A page's checked-out content is subject to modification by the assigned User. These modifications can only be published if the page is checked in.
(Inherited from IContentItem.)
Public propertyComments
Gets/sets the comment of this version.

Comments are set during check-in of a IContentItemContent Item

.

However, it can be changed anytime afterwards.

(Inherited from IContentItemVersion.)
Public propertyContentItemType (Inherited from IContentItem.)
Public propertyCreated
Gets the entity's creation date.
(Inherited from IEntity.)
Public propertyCreationUser
Gets the ID of the User who created this entity.
(Inherited from IEntity.)
Public propertyCurrentWorkflow
Gets the workflow this page is in. If page is not in a workflow, this method returns null.
(Inherited from IContentItem.)
Public propertyDate
Gets the date and time when this version was last changed.
(Inherited from IContentItemVersion.)
Public propertyDescriptiveMetadata
Gets the metadata covering the descriptive aspect of this asset version. Will be null for Asset Folder
(Inherited from IAssetVersion.)
Public propertyEndDate
Gets and sets the end date of the page. When set, this page will not be included in navigations when current time is greater than the EndDate value.
(Inherited from IContentItem.)
Public propertyCode exampleExtension
Gets the extension of the file associated with the current version of the asset.
Public propertyCode exampleExternalUrl
Gets the External URL of the asset. The External URL is dynamically generated by the path of the asset in the Assets Tree.
Public propertyCode exampleFileName
Gets the name of the file associated with the current version of the asset. Does not provide the extension of the file.
Public propertyHierarchy Obsolete. (Inherited from IContentItem.)
Public propertyIcon
Gets and sets the icon of the page. The value is the numeric representation of the icon images.
(Inherited from IContentItem.)
Public propertyCode exampleInWorkflowTransition
Gets and sets whether the content item is being accessed within the bounds of a workflow transition.
(Inherited from IContentItemWorkflowSuper.)
Public propertyCode exampleIsExternal
Checks whether the asset is referencing an external asset.
Public propertyIsFolder
Gets whether this Asset version belongs to an Asset Folder or an Asset
(Inherited from IAssetVersion.)
Public propertyJustSynced
Gets whether the page's content was updated via Schema synchronization and hasn't yet been modified directly.
(Inherited from IContentItem.)
Public propertyLastModified
Gets the date when the entity was most recently modified.
(Inherited from IEntity.)
Public propertyLastModifiedUser
Gets the ID of the User who lasted edited the entity.
(Inherited from IEntity.)
Public propertyLastVersion
Gets the most-recent previous version. It is the version before this page was last checked in.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public propertyLocale
Gets and sets the language of this page.
(Inherited from IContentItem.)
Public propertyLocaleInherited
Gets whether this page inherits its locale from its ancestor page.
(Inherited from IContentItem.)
Public propertyManager
Gets the manager that retrieved this entity instance.
(Inherited from IEntityTManager.)
Public propertyMasterLingualMap
Gets the lingual map between this page and its Master Page.
(Inherited from IContentItem.)
Public propertyName
Gets and sets the entity's name.
(Inherited from IEntity.)
Public propertyCode exampleNeedsEdit

Checks whether the asset is flagged as needing edits.

Newly uploaded images are flagged as needing edits until they are checked in or removed from queue.

Public propertyNonRuntimeIndexable
Gets/sets whether this asset can be picked up by InSite search content index.
Public propertyNowSyncing
Gets whether the page is currently being synchronized to the latest version of the Schema used to create it.
(Inherited from IContentItem.)
Public propertyOwnerItem
Gets the owner item of this version object. It can be either Asset or Asset Folder
(Inherited from IAssetVersion.)
Public propertyParentId
Gets the unique ID of the parent object
(Inherited from IContentItem.)
Public propertyCode examplePathHistory
Gets a list of previous paths for the object.
(Inherited from IAssetItem.)
Public propertyRemoved
Gets whether the page is under Removed status, which means it is currently a descendant of the Recycle Folder.
(Inherited from IContentItem.)
Public propertySchema
Gets the Schema from which this page is based on.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public propertySchemaName
Gets the root name of the Schema, which is also the root element name of this version's serialized XML document.
(Inherited from IContentItemVersion.)
Public propertySchemaVersion
Gets the Schema Version which with this page is synchronized. Note that if the schema has not been updated and or sychronized to this page, the page will be on a older version of the schema.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public propertySecurityDescriptor
Gets the security descriptor of this content item
(Inherited from IContentItem.)
Public propertySecurityInherited
Gets whether this content item has security inherited from its parent
(Inherited from IContentItem.)
Public propertySession
Gets the session that retrieved this entity. An entity is always session-specific.
(Inherited from IEntity.)
Public propertySessionId
Gets the unique ID of the session that retrieved this entity.
(Inherited from IEntity.)
Public propertySiblingPosition
Gets the position of this object among its siblings
(Inherited from IContentItem.)
Public propertyCode exampleSourceEditionId

Gets the current Source Edition Id for the content item.

Assets are connected as Source Editions when they are edited in the CMS and saved using Save As.

Public propertyStartDate
Gets and sets the start date of the page. When set, this page will not be included in navigations when current time is less than the StartDate value.
(Inherited from IContentItem.)
Public propertyStorageQuota
Gets the storage quota information of the Asset this version belongs to
(Inherited from IAssetVersion.)
Public propertyTechnicalMetadata
Gets the metadata covering technical aspect of this asset version. Will be null for Asset Folder
(Inherited from IAssetVersion.)
Public propertyVersionNumber
Gets the version number of this version.
(Inherited from IContentItemVersion.)
Public propertyCode exampleViewBound

Checks whether the asset is view bound.

View bound assets are views that are attached to Presentation Content Units and are published automatically.

Top
Methods
  NameDescription
Public methodAddCategories
Adds Categories association to this Page. Which also means, categorized this page with given categories.
(Inherited from IContentItem.)
Public methodAddElement
Adds one or multiple elements to the Elements collection.
(Inherited from IContentItemVersion.)
Public methodAddElementAfter
Adds one or more elements to the Elements collection after the specified anchor element.
(Inherited from IContentItemVersion.)
Public methodAddElementBefore
Adds one or more elements to the Elements collection before a specified anchor element.
(Inherited from IContentItemVersion.)
Public methodAddElementFirst
Adds one or more elements to the front of the Elements collection.
(Inherited from IContentItemVersion.)
Public methodAddElements
Adds a group of elements to the Elements collection.
(Inherited from IContentItemVersion.)
Public methodAddElementsAfter
Adds a group of elements to the Elements collection after the specified anchor element.
(Inherited from IContentItemVersion.)
Public methodAddElementsBefore
Adds a group of elements to Elements collection before a specified anchor element.
(Inherited from IContentItemVersion.)
Public methodAddElementsFirst
Adds a group of elements to the front of the Elements collection.
(Inherited from IContentItemVersion.)
Public methodAddToWorkflow
Adds this page to workflow. This operation creates a new workflow instance for this page based on the Workflow Definition provided and assigns the page to the specified User.
(Inherited from IContentItem.)
Public methodAddToWorkflowDefault
Adds this page to a workflow. If the initial Transition has a Default User specified, the page will be assigned to that user. Otherwise, it will be assigned to the Next Group specified by the transition. This operation creates a new workflow instance for this page based on the Workflow Definition provided.
(Inherited from IContentItem.)
Public methodAllElements
Retrieves the collection of descendant Elements on which the filter callback method returns true.
(Inherited from IContentItemVersion.)
Public methodAllowUser
Checks whether the given user was granted the specified access level.
(Inherited from IContentItem.)
Public methodCode exampleAncestorFolders
Retrieves a collection of Asset Folders that make up the ancestors of the context asset item.
(Inherited from IAssetItem.)
Public methodCode exampleAncestorFoldersCount
Gets the count of ancestor asset folders of the context asset item.
(Inherited from IAssetItem.)
Public methodAncestorsCount
Returns the count of ancestors for this content item.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodAssignGroup
Assigns this page to a specific User Group.
(Inherited from IContentItem.)
Public methodAssignUser
Assigns this page to a specific User.
(Inherited from IContentItem.)
Public methodAssociatedCategories
Retrieves the collection of Categories associated with this page.
(Inherited from IContentItem.)
Public methodAssociatedCategoriesCount
Gets the count of the Categories that are associated with this page.
(Inherited from IContentItem.)
Public methodCheckedInVersion
Retrieves the checked in version of the item. Mainly used for retrieving checked in version on a checked out item
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodCheckIn
Checks in either the page itself or the page and its descendants.
(Inherited from IContentItem.)
Public methodCheckInOnProfile
Checks in either the page itself or the page and its descendants toward the Publishing Targets included in the Publishing Profile.
(Inherited from IContentItem.)
Public methodCheckInSingle(IEnumerableString, String) (Inherited from IContentItem.)
Public methodCheckInSingle(IEnumerableIPublishingTarget, String) (Inherited from IContentItem.)
Public methodCheckInSingleWithNoValidate
Checks in the page itself without applying validations before check-in.
(Inherited from IContentItem.)
Public methodCheckInSingleWithNoValidateOnProfile
Checks in the page itself, without applying validations before check-in, toward the Publishing Targets included in the Publishing Profile.
(Inherited from IContentItem.)
Public methodCheckOut
Checks out the page and assigns it to the current user. A page can only be edited after it is checked out to the current user.
(Inherited from IContentItem.)
Public methodClaimPageForCurrentUser
Assigns the Page to the current operating User.
(Inherited from IContentItem.)
Public methodClearElements
Removes all Elements from the collection.
(Inherited from IContentItemVersion.)
Public methodClearSecurity
Clears all access to this page. Note that if no further security setting procedures are taken, no one except administrators will have access to this page . This action permenantly removes the security descriptor for this page.
(Inherited from IContentItem.)
Public methodCloneLingualMaps
Retrieves the lingual maps between this page and its clone pages.
(Inherited from IContentItem.)
Public methodCloneLingualMapsCount
Returns the count of all clone lingual maps.
(Inherited from IContentItem.)
Public methodCode exampleCMSPath
Retrieves the ancestry path of the asset within the CMS Assets Tree starting at the root Assets node and including the file name.
Public methodCode exampleCurrentVersionStorageSize
Retrieves the storage size of the asset file for current version of the context asset.
Public methodDecorateElement
Manually apply Session, Manager, and Owner information on an Element field on this version object
(Inherited from IContentItemVersion.)
Public methodCode exampleDescendantIDsWithMaxDepth
Retrieves metadata of the descendants of this page within the given depth limit.
(Inherited from IContentItem.)
Public methodDescendantIDsWithMaxDepthForPreview
Retrieves the collection of descendants hierarchy information, under the limitations of maximum descendants depth, and maximum descendants count.
(Inherited from IContentItem.)
Public methodDescendantsCount
Calculates the count of this items descendant items
(Inherited from IContentItem.)
Public methodDescendantsIDs
Retrieves metadata of the descendants of this page. The results are returned in ascending order based on the pages' hierarchy level.
(Inherited from IContentItem.)
Public methodElement
Retrieves an Element by its name.
(Inherited from IContentItemVersion.)
Public methodElementById
Retrieves an Element by its unique ID.
(Inherited from IContentItemVersion.)
Public methodElements
Retrieves the direct child Elements of this version.
(Inherited from IContentItemVersion.)
Public methodElements(String)
Retrieves the direct child Elements of this version with names that match the specified name. Case-sensitive.
(Inherited from IContentItemVersion.)
Public methodElementsCount
Gets the count of all direct child Elements.
(Inherited from IContentItemVersion.)
Public methodCode exampleFile

Retrieves the FileInfo object for the associated file.

The FileInfo class provides properties and methods for manipulating physical files and facilitates creation of FileStream objects.

Public methodGetSystemAttribute
Retrieves a system attribute by its enum value. System attributes are attributes on a page document that contain the page's metadata.
(Inherited from IContentItem.)
Public methodCode exampleIsDescendantOf
Checks whether the specified Asset Folder is an ancestor of the context asset item.
(Inherited from IAssetItem.)
Public methodMarkedForPublish
Finds out whether the page is marked for publish on any Publishing Target.
(Inherited from IContentItem.)
Public methodMarkedForPublishOnTarget(String)
Finds out whether the page is marked for publish on a specific Publishing Target.
(Inherited from IContentItem.)
Public methodMarkedForPublishOnTarget(IPublishingTarget)
Finds out whether the page is marked for publish on a specific Publishing Target.
(Inherited from IContentItem.)
Public methodMarkedForPublishPropagated
Finds out whether the page is marked on all Publishing Targets, and the marked versions are the targets are the latest version of this page.
(Inherited from IContentItem.)
Public methodMarkedVersion(String)
Retrieves the marked version object on a specific Publishing Target. Can be null if not marked on that Publishing Target
(Inherited from IContentItem.)
Public methodMarkedVersion(IPublishingTarget)
Retrieves the marked version object on a specific Publishing Target. Can be null if not marked on that Publishing Target
(Inherited from IContentItem.)
Public methodMarkedVersionNumber(String)
Retrieves the marking version number on a specific Publishing Target. If item is not marked on that target, returns -1
(Inherited from IContentItem.)
Public methodMarkedVersionNumber(IPublishingTarget)
Retrieves the marking version number on a specific Publishing Target. If item is not marked on that target, returns -1
(Inherited from IContentItem.)
Public methodMarkForPublish
Marks this version for publish on the specified Publishing Target
(Inherited from IContentItem.)
Public methodNextChildPosition
Retrieves position reversed for the next child object to be created under this object
(Inherited from IContentItem.)
Public methodCode exampleParentFolder
Retrieves the parent asset folder of the context asset item.
(Inherited from IAssetItem.)
Public methodPath
Retrieves the string path of the page names, starting from the content store root node. Delimited by "/".
(Inherited from IContentItem.)
Public methodCode examplePreviousVersionsStorageSize
Retrieves the total storage size of asset files for all previous versions of the context asset.
Public methodQuickEditableFields
Retrieves the collection of fields, that represents the version object and contains the summary of the version
(Inherited from IContentItemVersion.)
Public methodRegionRoot
Retrieves the Locale (language) root of this page.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodRemoveCategory
Removes the association between this page and the specified Category.
(Inherited from IContentItem.)
Public methodRemoveElement
Removes an Element from the descendants collection.
(Inherited from IContentItemVersion.)
Public methodRemoveFromWorkflow
Removes the page from its Current Workflow.
(Inherited from IContentItem.)
Public methodRemoveSecurityGroup
Removes the access rights of a given user group to this page.
(Inherited from IContentItem.)
Public methodRevertToVersion
Reverts the page's content to that of a given Version.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodRollback
Reverts a page's content to that of its latest previous Version.
(Inherited from IContentItem.)
Public methodSave
Saves this page's XML content. This method must be called to update a page's XML content.
(Inherited from IContentItem.)
Public methodSecurityGroups
Retrieves the collection of User Groups that have the given access level on this page.
(Inherited from IContentItem.)
Public methodSecurityGroupsCount
Retrieves the count of User Groups that have a security setting—either explicit or inherited from parent pages—on this page.
(Inherited from IContentItem.)
Public methodSecurityLevel
Retrieves the access level of specific User. The access level is the highest access level of all the Groups to which this user belongs.
(Inherited from IContentItem.)
Public methodSendGroupNotificationMail
Sends out a Workflow notification email to all Users of a given Group.
(Inherited from IContentItem.)
Public methodSendWorkFlowNotificationMail
Sends a workflow notification email to the given recipients.
(Inherited from IContentItem.)
Public methodSerializeCheckedInVersion
Returns the XML element that was serialized from the checked-in version of this page.
(Inherited from IContentItem.)
Public methodSetSecurityGroup
Sets the access level to this page for a specific User Group. Successful execution of this method causes the SecurityInherited property to be set to false.
(Inherited from IContentItem.)
Public methodSetSystemAttribute(EnumSystemAttributes, IAttribute)
Sets value for a system attribute.
(Inherited from IContentItem.)
Public methodSetSystemAttribute(EnumSystemAttributes, String)
Sets string value for a system attribute.
(Inherited from IContentItem.)
Public methodSiblings
Retrieves sibling pages of this page on the content tree.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodCode exampleStream

Retrieves a Stream for the file associated with the current version of the asset.

A Stream is a view of the bytes of the file.

Public methodUnassign
Removes the assignment of this page so that it doesn't belong to any User or Group.
(Inherited from IContentItem.)
Public methodUndoCheckOut
Discards the changes in checked-out content and reverts the page to a checked-in state.
(Inherited from IContentItem.)
Public methodUpdateFile
Update the binary file for the current asset item.
Public methodValidateData
Validates this entity's data. Implemented by concrete inheriting types.
(Inherited from IEntity.)
Public methodValidateUserPermission
Validates the user permission on the current entity. Implemented by concrete inheriting types. It is called automatically upon saving an entity.
(Inherited from IEntity.)
Public methodVersion
Retrieves a Version of this page by version number.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodVersions
Retrieves the version history of this page. The items are returned by version number in descending order.
(Inherited from IContentItemT, TVersion, TSchema, TSchemaVersion.)
Public methodVersionsCount
Gets the count of all previous versions of this page.
(Inherited from IContentItem.)
Top
Events
  NameDescription
Public eventAfterAssetAssign
This event is fired after page is assigned.
(Inherited from IAssetEvents.)
Public eventAfterAssetCheckIn
This event is fired after a page is checked in.
(Inherited from IAssetEvents.)
Public eventAfterAssetCheckOut
This event is fired after a page is checked out.
(Inherited from IAssetEvents.)
Public eventAfterAssetMarkForPublishChange
This event is fired after a page had marked-for-publish changes applied to it.
(Inherited from IAssetEvents.)
Public eventAfterAssetRollback
This event is fired after a page is rolled back.
(Inherited from IAssetEvents.)
Public eventAfterAssetUndoCheckOut
This event is fired after a page undo check-out.
(Inherited from IAssetEvents.)
Public eventAfterEntitySave
This event is fired after a Entity object is saved.
(Inherited from IEntityEvents.)
Public eventAssetRenamed
This event is fired after a page is renamed.
(Inherited from IAssetEvents.)
Public eventBeforeAssetAssign
This event is fired before page is assigned.
(Inherited from IAssetEvents.)
Public eventBeforeAssetCheckIn
This event is fired before a page is checked in.
(Inherited from IAssetEvents.)
Public eventBeforeAssetCheckOut
This event is fired before a page is checked out.
(Inherited from IAssetEvents.)
Public eventBeforeAssetMarkForPublishChange
This event is fired before a page has any changes marked for publish.
(Inherited from IAssetEvents.)
Public eventBeforeAssetRollback
This event is fired before a page is rolled back to previous version.
(Inherited from IAssetEvents.)
Public eventBeforeAssetUndoCheckOut
This event is fired before a page undo check-out.
(Inherited from IAssetEvents.)
Public eventBeforeEntitySave
This event is fired before any Entity object is about to be saved.
(Inherited from IEntityEvents.)
Top
Examples
Example of asset serialization output:
XML
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="baby-sloth" xmlns:igx="http://ingeniux.com/xmp/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#" xmlns:dc="http://purl.org/dc/elements/1.1/" igx:SchemaRootName="Image" igx:AssetType="Image" igx:dpi="96" igx:colors="24" xmp:CreateDate="1/17/2017 2:58:12 PM" xmp:ModifyDate="1/17/2017 2:58:12 PM" stDim:w="768" stDim:h="511" dc:Coverage="" dc:Format="" dc:Publisher="">
<dc:Contributor>
  <rdf:Bag>
    <rdf:li />
  </rdf:Bag>
</dc:Contributor>
<dc:Creator>
  <rdf:Bag>
    <rdf:li />
  </rdf:Bag>
</dc:Creator>
<dc:Rights>
  <rdf:Alt>
    <rdf:li xml:lang="x-default" />
    <rdf:li xml:lang="iv" />
  </rdf:Alt>
</dc:Rights>
<dc:Subject>
  <rdf:Alt>
    <rdf:li xml:lang="x-default" />
    <rdf:li xml:lang="iv" />
  </rdf:Alt>
</dc:Subject>
<dc:Title>
  <rdf:Alt>
    <rdf:li xml:lang="x-default" />
    <rdf:li xml:lang="iv" />
  </rdf:Alt>
</dc:Title>
<dc:Description>
  <rdf:Alt>
    <rdf:li xml:lang="x-default" />
    <rdf:li xml:lang="iv" />
  </rdf:Alt>
</dc:Description>
</rdf:Description>
</rdf:RDF>
Examples
Example of retrieving a specific asset in a custom hook:
C#
IAsset mainCSS = session.Site.Asset("a/100");
if(mainCSS != null){
 //Additional Actions
}
See Also