QuickLink QuickLink QuickLink Class

Definition

Represents a quick link.

public ref class QuickLink : Microsoft::Office::Server::UserProfiles::PrivacyItem
public class QuickLink : Microsoft.Office.Server.UserProfiles.PrivacyItem
Public Class QuickLink
Inherits PrivacyItem
Inheritance

Examples

<p>The following code example shows the use of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Server.UserProfiles.QuickLink"></xref> class.</p>
<p>[Visual Basic]</p>
<pre><code>      Public Sub QuickLinkSample() 
     'Get portal site context from topology.          Dim strUrl As String = "http://SampleName"          Dim tm As New TopologyManager()          Dim ps As PortalSite = tm.PortalSites(New Uri(strUrl))          Dim pc As PortalContext = PortalApplication.GetContext(ps)           'Initialize user profile config manager object.          Dim upm As New UserProfileManager(pc)          Dim sAccount As String = "mydomain\myalias"          Dim u As UserProfile = upm.GetUserProfile(sAccount)          Dim qlm As QuickLinkManager = u.QuickLinks          Dim strTitle As String = "mylink"          Dim sLinkUrl As String = "http://my"          Dim strGroup As String = "my group"          Dim ql As QuickLink = qlm.Create(strTitle, sLinkUrl, QuickLinkGroupType.UserSpecified, strGroup, Privacy.Public)          Dim iLinkID As Integer = ql.LinkID           'Edit quick link.          Dim qedit As QuickLink = qlm(iLinkID)          qedit.Group = "new group"          qedit.Commit()           'Remove quick link.          qlm.Delete(iLinkID)           'Add another quick link to a person          Dim strTitle2 As String = "mycontact"          Dim sContactAcc As String = "mydomain\mycontact"          Dim ucon As UserProfile = upm.GetUserProfile(sContactAcc)          Dim userguid As Guid = ucon.ID          qlm.AddPerson(strTitle2, userguid, strGroup, False)       End Sub 'QuickLinkSample</code></pre>
<p>[C#]</p>
<pre><code>public void QuickLinkSample() 

{ // Get portal site context from topology. string strUrl = "http://SampleName"; TopologyManager tm = new TopologyManager(); PortalSite ps = tm.PortalSites[new Uri(strUrl)]; PortalContext pc = PortalApplication.GetContext(ps); // Initialize user profile config manager object. UserProfileManager upm = new UserProfileManager(pc); string sAccount = "mydomain\myalias"; UserProfile u = upm.GetUserProfile(sAccount); QuickLinkManager qlm = u.QuickLinks; string strTitle = "mylink"; string sLinkUrl = "http://my"; string strGroup = "my group"; QuickLink ql = qlm.Create(strTitle, sLinkUrl, QuickLinkGroupType.UserSpecified, strGroup, Privacy.Public); // Edit quick link. QuickLink qedit = qlm[iLinkID]; qedit.Group = "new group"; qedit.Commit(); // Remove quick link. qlm.Delete(iLinkID); // Add another quick link to a person. string strTitle2 = "mycontact"; string sContactAcc = "mydomain\mycontact"; UserProfile ucon = upm.GetUserProfile(sContactAcc); Guid userguid = ucon.ID; qlm.AddPerson(strTitle2, userguid, strGroup, false);

}

Properties

ContentClass ContentClass ContentClass

Gets or sets the icon that is displayed.

Group Group Group

Gets or sets the group for the privacy item.

(Inherited from PrivacyItem)
GroupType GroupType GroupType

Gets or sets the group name by which a link is organized.

ID ID ID

Gets the unique identifier (ID) of the privacy item.

(Inherited from PrivacyItem)
IsBestBet IsBestBet IsBestBet

Gets whether or not this link is a Best Bet (set using "GroupType" property).

IsEditable IsEditable IsEditable

Returns a Boolean value that specifies whether a privacy item can be edited.

(Inherited from PrivacyItem)
IsPrivacyLevelEditable IsPrivacyLevelEditable IsPrivacyLevelEditable

Returns a Boolean value that specifies whether a privacy level can be edited.

(Inherited from PrivacyItem)
IsTitleEditable IsTitleEditable IsTitleEditable
IsUrlEditable IsUrlEditable IsUrlEditable

Gets a value indicating whether the URL property of a specified link is editable.

ItemOwner ItemOwner ItemOwner

Gets the owner of the privacy item.

(Inherited from PrivacyItem)
PartitionID PartitionID PartitionID Inherited from PrivacyItem
Policy Policy Policy
PrivacyLevel PrivacyLevel PrivacyLevel

Gets and sets the privacy level of an item.

(Inherited from PrivacyItem)
Title Title Title

Gets or sets the title of the privacy item.

(Inherited from PrivacyItem)
Url Url Url

Gets or sets the URL for the privacy item.

(Inherited from PrivacyItem)
ValidGroupEnumType ValidGroupEnumType ValidGroupEnumType

Methods

AddCustomCommitFields(SqlCommand) AddCustomCommitFields(SqlCommand) AddCustomCommitFields(SqlCommand)
Commit() Commit() Commit()

Saves the changes made to a quick link to the user profile data store.

Delete() Delete() Delete()

Deletes a privacy item.

(Inherited from PrivacyItem)
GetPrivacyPolicy(Guid) GetPrivacyPolicy(Guid) GetPrivacyPolicy(Guid)

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)
InitializeNewPrivacyItem(String, String, Object, String, Privacy) InitializeNewPrivacyItem(String, String, Object, String, Privacy) InitializeNewPrivacyItem(String, String, Object, String, Privacy)

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)
SetPropertyValues(SqlDataReader) SetPropertyValues(SqlDataReader) SetPropertyValues(SqlDataReader)

Fields

m_bIsNewLink m_bIsNewLink m_bIsNewLink

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)
m_objOwnerProfile m_objOwnerProfile m_objOwnerProfile

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)
m_strGroup m_strGroup m_strGroup

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)
m_strTitle m_strTitle m_strTitle

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)
m_strUrl m_strUrl m_strUrl

This member is reserved for internal use and is not intended to be used directly from your code.

(Inherited from PrivacyItem)

Extension Methods

ToJson(Object) ToJson(Object) ToJson(Object)

Applies to