InsertLinkByPermission Class Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Writes a link to the actual document, depending on the permissions that are set for the caller, to the supplied stream or the default response stream The InsertLinkByPermission class acts as the underlying engine for the Insert Link By Permission AS component.
Inheritance Hierarchy

SystemObject
  ContentStudio.SiteCodeBase
    ContentStudio.Site.ActiveScriptingActiveScriptingBase
      ContentStudio.Site.ActiveScriptingSecurityBase
        ContentStudio.Site.ActiveScripting.SecurityPermissionDependentComponent
          ContentStudio.Site.ActiveScripting.SecurityInsertLinkByPermission

Namespace: ContentStudio.Site.ActiveScripting.Security
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public class InsertLinkByPermission : PermissionDependentComponent

The InsertLinkByPermission type exposes the following members.

Constructors

  NameDescription
Public methodInsertLinkByPermission
Constructs a new instance of the InsertLinkByPermission class that writes to the default response stream
Public methodInsertLinkByPermission(Stream)
Constructs a new instance of the InsertLinkByPermission class that writes to the supplied stream
Top
Properties

  NameDescription
Public propertyAccessCheckTarget
Sets or gets the object on which the access check should be done. The default value is AccessCheckTarget.CurrentDocument
Public propertyAccessMask
Sets or gets the permission or combination of permissions to check for. The default value is CSObjectPermissions.Read.
(Inherited from PermissionDependentComponent.)
Public propertyBackwardsComponentCompatibilityMode
Sets or gets a value that indicates whether the code runs in backwards compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.)
Public propertyCheckForLackOfPermission
Sets or gets a value that indicates if the component should render its content when the users lacks permissions. The default value is false (render when the users have permissions).
Public propertyClassName
Sets or gets a value that of an EPT field that contains the CSS class name that should be applied to the generated link or button. The default value is an empty string
Public propertyComponentName
Gets the name of the component
(Overrides ActiveScriptingBaseComponentName.)
Public propertyConformance
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.)
Protected propertyCode exampleCS_DataFields
Gets a EPTXmlParser that contains a collection of EPT field definitions and values. This property is the replacement for the obsolete EPT_GetFieldName(String) and EPT_GetFieldValue(String) methods.
(Inherited from CodeBase.)
Public propertyElementType
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.)
Public propertyEncoding
Sets or gets the encoding the component uses. The default encoding is the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.)
Public propertyImageAlt
Sets or gets a value that of an EPT field that contains the ALT text of the image. The default value is an empty string
Public propertyLinkImage
Gets or sets the a name of an EPT field that contains the URL to an image file to be used as a part of the link. The default value is an empty string.
Public propertyLinkText
Gets or sets a name of an EPT field that contains the text to display in the link. The default value is an empty string
Public propertyLinkType
Sets or gets the link type to generate. The default value is LinkTypes.Link
Public propertyLinkURL
Gets or sets the a name of an EPT field that contains the link URL. The default value is an empty string.
Public propertyMakeDisabled
Sets or gets a value that indicates if the controls should be rendered as disabled (rather omitting them) when access check fails. The default value is true.
Public propertyCode exampleObjectAttributes
Sets or gets a value that defines attributes to be used on the generated link or button element. The value of this property must either be empty or a valid attribute syntax. The default value is an empty string.
Protected propertyObjectToCheck
Sets or gets a value that indicates the id of the Content Studio object to perform the access check on. The default value is 1.
(Inherited from PermissionDependentComponent.)
Protected propertyObjectType
Sets or gets a value that indicates what type of object that is referenced in the ObjectToCheck property. The caller's permission will be checked against this object when the derived class calls the Invoke method. The default value is CSSecurableObjects.DocumentItem.
(Inherited from PermissionDependentComponent.)
Protected propertyPage
A reference to the current context page. This will initialize in the constructor of this class.
(Inherited from CodeBase.)
Protected propertyRunningUserControl
Gets the current running user control.
(Inherited from CodeBase.)
Public propertyStaticClass
Sets or gets a value that specifies the CSS class name that should be applied to the generated link or button. The default value is an empty string.
Public propertyStaticImageAlt
Sets or gets the ALT attribute of the generated image link. The default value is an empty string.
Public propertyStaticLinkImage
Gets or sets the name of an URL to an image file to be used as a part of the link. Set this property to an empty string if LinkImage should be used instead. The default value is an empty string.
Public propertyStaticLinkText
Gets or sets the text of the link. Set this property to an empty string if the LinkText should be used instead. The default value is an empty string.
Public propertyStaticLinkURL
Gets or sets the link URL. Set this property to an empty string if the LinkURL should be used instead. The default value is an empty string.
Public propertyStaticTarget
Sets or gets a value that defines the TARGET attribute on the generated link. The default value is an empty string.
Public propertyStaticTitle
Sets or gets a value that specifies the TITLE attribute of the generated link or button. The default value is an empty string
Public propertyTarget
Sets or gets a value that of an EPT field that contains the TARGET attribute of the generated link or button. The default value is an empty string
Public propertyTitle
Sets or gets a value that of an EPT field that contains the TITLE attribute of the generated image link. The default value is an empty string.
Public propertyUDFCategoryID
Sets or gets a value that indicates a category to perform access check on. The default value is zero.
Top
Methods

  NameDescription
Protected methodAccessCheck
Determines if the user has sufficient access permissions.
(Overrides PermissionDependentComponentAccessCheck.)
Public methodAccessCheckForCurrentCategory
Determines if access us granted to the current category for the calling user.
(Inherited from SecurityBase.)
Public methodAccessCheckForCurrentDocument
Determines if access us granted to the current document for the calling user.
(Inherited from SecurityBase.)
Public methodStatic memberBuildAccessMaskforComponent
Returns the access mask which is a combination of all the specified permissions available in this method. This support method makes it easier to create the access mask to use when setting the AccessMask property.
Protected methodBuildHTMLComponentException
Returns an component exception in HTML format.
(Inherited from ActiveScriptingBase.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Protected methodGenerateLinkTargetAttribute
Returns the attribute string to be written to the link.
(Inherited from ActiveScriptingBase.)
Protected methodGetCorrectField
Extracts the correct value from a passed in EPT field name and a static field value.
(Inherited from ActiveScriptingBase.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInvoke
Invokes the component, performs the access check, and calls the OnRender method that writes the content into the specified stream.
(Overrides PermissionDependentComponentInvoke.)
Protected methodInvoke(PermissionDependentComponent)
Invokes the component by performing the checks and reporting the result to the OnRender event handler of the derived class.
(Inherited from PermissionDependentComponent.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnRender
Target for the OnRender event, that renders the content to the specified output stream.
(Overrides PermissionDependentComponentOnRender(Object, RenderEventArgs).)
Protected methodReadFromApplicationCache
Returns data that is read from the application cache.
(Inherited from ActiveScriptingBase.)
Protected methodSetApplicationCache
Stores a string in the application cache.
(Inherited from ActiveScriptingBase.)
Protected methodSyncronizeMLC
Provides support for components that needs to be MLC aware, by localizing the supplied category or presentation template from the current document, or the preferred language of the visitor.
(Inherited from ActiveScriptingBase.)
Public methodToString (Inherited from Object.)
Protected methodWriteAttribute(TextWriter, String, String)
Writes an attribute string to the supplied stream, unless Value is an empty string or null
(Inherited from ActiveScriptingBase.)
Protected methodWriteAttribute(TextWriter, String, String, Boolean)
Writes an attribute string to the supplied stream.
(Inherited from ActiveScriptingBase.)
Top
Remarks

To use this class, create an instance of this object and call the Invoke method with an appropriate set of parameters. This class can throw exceptions, thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash. This class generates inline code, thus you must wrap it into a block element to make the page validate according to the HTML/XHTML regulations. The generated code is fully HTML/XHTML strict compatible.
See Also

Reference