Welcome!

.NET Authors: Liz McMillan, Peter Silva, Yakov Werde, Matthew Pollicove , Kevin Benedict

Related Topics: .NET

.NET: Article

Integrating Content and Search Results with SharePoint

How we built a SharePoint Connector for Confluence - Part 1

Confluence Space Pages Web Part
The Confluence Space Pages Web part shows the list of pages in a single Confluence space as shown in Figure 5. The tree view of pages should look familiar. It uses the same Control created and used by the editor part for the Confluence Page Web part.

The corresponding editor part for this Web part simply lets the user select a space from the space drop-down list ( see Figure 6). It also uses the same custom control used by the editor part for the Confluence Page Web part to show the spaces. The option of showing the space list lets the user show the drop-down list of spaces in the body of the Web part.

This Web part uses the same concepts discussed for the Confluence Page Web part above including communication between the editor part and the Web part.

Web Part Administration
To use the Web parts, we need to know how to access Confluence. This could have been done through the Web part properties, but we decided to configure how to access Confluence in the site settings by creating a custom administration page. To provide access to the page we needed to create a custom action in our feature's "elements.xml" file.

<CustomAction
   Id="ConfluenceSettings"
   GroupId="SiteAdministration"
   Location="Microsoft.SharePoint.SiteSettings"
   Sequence="33300"
   Title="Confluence Settings"
   Rights="ManageWeb,BrowseUserInfo">
   <UrlAction Url=
"_layouts/Atlassian/ConfluenceSettings.aspx" />
</CustomAction>

Describing the details behind deploying the features and SharePoint solution file is beyond the scope of this article, but the result of the custom action above in our deployed feature is in a site settings page with our "Confluence Settings" link as shown in Figure 7.

The administration page itself is a SharePoint application page that inherits from LayoutsPageBase. You can use existing application pages under TEMPLATE\LAYOUTS in the 12 hive as a starting point. Simply find an existing page that's similar to what you want and copy it. See Figure 8 for the administrative page.

For the code behind you'll want to declare protected page variables for each named control you want to access in your code. For example:

protected InputFormTextBox ConfluenceSite;
protected InputFormCheckBox UseSsoCheckBox;

Then you can populate the controls in OnLoad, OnPreRender, etc. and update the SharePoint button-click event handlers. In our case we stored the Confluence settings for the site in a property bag on the site. Each SharePoint site has a property bag you can use to store data. This lets us store information without having to use a hidden list or a separate database.

The code for saving the property values is in Listing 5. Retrieving the property values uses similar code, but we recursively look to the parent site's property bag if we can't find the property on our site. This allows for simple inheritance of properties on sub-sites as shown in Listing 6.

Summary
In Part 1 of this two-part series we covered the primary points of content embedding including the development of Web parts and application pages for administration. In Part 2 we'll cover integrated search and single sign-on.

About ThreeWill
ThreeWill is a software solutions provider based in Alpharetta, GA that helps companies build custom collaborative and workflow solutions that enable their people to "work together better." As a Microsoft Gold Partner, we specialize on the building on SharePoint 2007 technologies to produce effective solutions for our client's business problems. To learn more, visit www.threewill.com.

About Atlassian
Atlassian develops affordable, lightweight software that helps enterprises collaborate better. Its products include Confluence, widely recognized as the most advanced enterprise wiki, and JIRA, one of the world's most popular issue trackers for IT project management. The company has more than 9,000 customers worldwide, including 30 of the world's top 50 corporations. For more information, visit: www.atlassian.com. (See Sidebar)

References

  1. Confluence: www.atlassian.com/software/confluence/
  2. SharePoint Connector for Confluence features: www.atlassian.com/sharepoint/features.jsp
  3. SharePoint Connector for Confluence Homepage:
    http://confluence.atlassian.com/display/CONFEXT/SharePoint+Connector+for+Confluence
  4. External link to a document stored in a SharePoint library:
    http://blogs.threewill.com/implementingsharepoint/Lists/Posts/Post.aspx?ID=20

More Stories By Kirk Liemohn

Kirk Liemohn is a principal software engineer with ThreeWill. His recent project experience includes Microsoft Office SharePoint Server (MOSS) enterprise search projects as well as a Windows SharePoint Services (WSS) business analysis portal. Kirk manages a SharePoint blog at http://www.implementingsharepoint.com.

More Stories By Chris Edwards

Chris Edwards is a senior software engineer with ThreeWill. His project roles have ranged from development/technical lead to development resource. He is certified as MCSD using Microsoft .NET and as MCTS: SharePoint Services 3.0, Application Development. Chris manages resource links related to WSS at http://wssresourceguide.com.

Comments (3) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
fdaske 09/23/09 11:33:00 AM EDT

Generally SharePoint is a great platform for data integration. Sharepoint lists can be directly connected to almost any external data sources using the BDLC found here.

In this way you can use all SharePoint list features, even workflows if external data records are changed.

shirley 11/26/08 05:05:46 AM EST

We can assist here as we specialize in developing and implementing SharePoint 2007 – that’s all we do. There is more information on this at http://www.nsynergy.com/Services/Pages/default.aspx or mail to Mark.Davis@nsynergy.com .

shirley 11/04/08 12:01:21 AM EST

For more information on document management and collaboration solutions, please visit http://www.nsynergy.com or please email to Mark.Davis@nsynergy.com.