QuickLinkManager QuickLinkManager QuickLinkManager Class

Definition

Represents the entry point for managing QuickLink objects.

public ref class QuickLinkManager : Microsoft::Office::Server::UserProfiles::PrivacyItemManagerBase<Microsoft::Office::Server::UserProfiles::QuickLink ^>
public class QuickLinkManager : Microsoft.Office.Server.UserProfiles.PrivacyItemManagerBase<Microsoft.Office.Server.UserProfiles.QuickLink>
Public Class QuickLinkManager
Inherits PrivacyItemManagerBase(Of QuickLink)
Inheritance

Examples

<p>The following code example shows the use of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Server.UserProfiles.QuickLinkManager"></xref><strong></strong>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.Add(strTitle, sLinkUrl, strGroup, True)
     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.Add(strTitle, sLinkUrl, strGroup, true); int iLinkID = ql.LinkID;

//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); }

Constructors

QuickLinkManager(UserProfile) QuickLinkManager(UserProfile) QuickLinkManager(UserProfile)

Initializes a new instance of the QuickLinkManager class.

Properties

DefaultPolicy DefaultPolicy DefaultPolicy
Item[Int64] Item[Int64] Item[Int64]

Gets an existing item by ID.

(Inherited from PrivacyItemManagerBase<T>)
PartitionID PartitionID PartitionID Inherited from PrivacyItemManagerBase<T>

Methods

AppendUniqueGroupList(StringCollection) AppendUniqueGroupList(StringCollection) AppendUniqueGroupList(StringCollection) Inherited from PrivacyItemManagerBase<T>
Create(String, String, QuickLinkGroupType, String, Privacy) Create(String, String, QuickLinkGroupType, String, Privacy) Create(String, String, QuickLinkGroupType, String, Privacy)

Creates a generic quick link.

DeleteAll() DeleteAll() DeleteAll()

Deletes all the items corresponding to the given user.

(Inherited from PrivacyItemManagerBase<T>)
GetDataSet() GetDataSet() GetDataSet()

Returns a DataSet containing all items to which the viewer has rights

(Inherited from PrivacyItemManagerBase<T>)
GetDataSet(Privacy) GetDataSet(Privacy) GetDataSet(Privacy)

Returns a DataSet containing all items restricted to a certain level of privacy

(Inherited from PrivacyItemManagerBase<T>)
GetGroupList() GetGroupList() GetGroupList()

Gets a list of groups.

GetItems() GetItems() GetItems()

Returns all items to which the viewer has rights

(Inherited from PrivacyItemManagerBase<T>)
GetItems(Privacy) GetItems(Privacy) GetItems(Privacy)

Gets all privacy items, restricted to a certain privacy level

(Inherited from PrivacyItemManagerBase<T>)
GetItems(Privacy, Comparison<T>) GetItems(Privacy, Comparison<T>) GetItems(Privacy, Comparison<T>) Inherited from PrivacyItemManagerBase<T>
ModifyDataRow(DataRow, QuickLink) ModifyDataRow(DataRow, QuickLink) ModifyDataRow(DataRow, QuickLink)
ModifyDataRow(DataRow, T) ModifyDataRow(DataRow, T) ModifyDataRow(DataRow, T) Inherited from PrivacyItemManagerBase<T>
ModifyDataTable(DataTable) ModifyDataTable(DataTable) ModifyDataTable(DataTable)
RepresentedObjectEquals(T, T) RepresentedObjectEquals(T, T) RepresentedObjectEquals(T, T) Inherited from PrivacyItemManagerBase<T>
RepresentedObjectUniqueIdentifier(T) RepresentedObjectUniqueIdentifier(T) RepresentedObjectUniqueIdentifier(T) Inherited from PrivacyItemManagerBase<T>

Fields

m_objOwnerProfile m_objOwnerProfile m_objOwnerProfile Inherited from PrivacyItemManagerBase<T>

Extension Methods

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

Applies to