Difference between revisions of "Lyo/SharepointAdapter"

From Eclipsepedia

< Lyo
Jump to: navigation, search
(Scenario:)
m (Prerequisites)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Building and Running the Lyo Sharepoint Sample in Eclipse  =
+
= Building and Running the Lyo SharePoint Sample in Eclipse  =
  
 
== Prerequisites  ==
 
== Prerequisites  ==
  
*[http://eclipse.org/downloads Eclipse 3.6 or 3.7 IDE]  
+
*[http://eclipse.org/downloads Eclipse 3.6 or higher IDE]  
 
*[http://eclipse.org/egit/download/ EGit] team provider for git (recommended) or [http://git-scm.com/download git command line package].  
 
*[http://eclipse.org/egit/download/ EGit] team provider for git (recommended) or [http://git-scm.com/download git command line package].  
 
*[http://www.eclipse.org/m2e/download/ m2eclipse] for Maven support in the Eclipse IDE
 
*[http://www.eclipse.org/m2e/download/ m2eclipse] for Maven support in the Eclipse IDE
Line 29: Line 29:
 
*[Optional] Add the projects to a new working set.
 
*[Optional] Add the projects to a new working set.
  
== Edit the Sharepoint configuration  ==
+
== Edit the SharePoint configuration  ==
  
 
Find and open the '''sharepoint.properties''' file.
 
Find and open the '''sharepoint.properties''' file.
Line 40: Line 40:
  
  
The '''adapter_uri''' is used to specify the OSLC adapter which will sit between Microsoft Sharepoint and Rational Team Concert (RTC).  It should be a working URI for the OSLC adapter servlet, e.g. http://localhost:8080/OSLCSharepoint.
+
The '''adapter_uri''' is used to specify the OSLC adapter which will sit between Microsoft SharePoint and Rational Team Concert (RTC).  It should be a working URI for the OSLC adapter servlet, e.g. http://localhost:8080/OSLCSharepoint.
 
This servlet provides an OSLC Catalog, Service provider, an example of Creation and Selection dialogs and a delegated UI for sharepoint documents.   
 
This servlet provides an OSLC Catalog, Service provider, an example of Creation and Selection dialogs and a delegated UI for sharepoint documents.   
  
Next, specify the Microsoft Sharepoint service for OData by updating '''sharepoint_uri''', usually this is specified by appending "_vti_bin/listdata.svc" to your Sharepoinnt server. (e.g.: http://www.sharepointserver.com:20001/_vti_bin/listdata.svc_.
+
Next, specify the Microsoft SharePoint service for OData by updating '''sharepoint_uri''', usually this is specified by appending "_vti_bin/listdata.svc" to your Sharepoinnt server. (e.g.: http://www.sharepointserver.com:20001/_vti_bin/listdata.svc_.
  
Next, specify the basic authentication ('''userid''', '''password''') for accessing the Sharepoint server at the address for '''sharepoint_uri'''.
+
Next, specify the basic authentication ('''userid''', '''password''') for accessing the SharePoint server at the address for '''sharepoint_uri'''.
  
 
== Build the projects  ==
 
== Build the projects  ==
Line 68: Line 68:
 
== Run the Sharepoint sample web application  ==
 
== Run the Sharepoint sample web application  ==
  
This Sharepoint adapter looks through the sharepoint oData catalog for ''ContentType''="Document".
+
This SharePoint adapter looks through the sharepoint OData collections for collections where the ''ContentType'' is defined as "Document".   For each SharePoint library that contains documents, an OSLC service provider is created with the basic services for OSLC Delegated dialogs for selection and creation as well as listing the documents with a UI preview.
For each sharepoint library that contains documents, an OSLC service provider is created with the basic services for an OSLC Delegated dialog foe selection and creation as well as listing the documents with a UI preview.  
+
 
 +
* First, edit the sharepoint.properties with the URL and credentials for your SharePoint server.  '''NOTE:'''  The SharePoint IIS server must be configured to allow basic authentication.
 +
* Go to the Server view (Window->Show View->Other and select Servers)
 +
* right click the server running on port 8080 and select Add and Remove
 +
* Add org.eclipse.lyo.samples.sharepoint and start this server
 +
* Test that the server is running by going to this URL in a web browser:  http://localhost:8080/OSLCSharepoint.  You should get the home page for your adapter.  If sharepoint.properties is configured correctly, you should be able to select the catalog and see a list of SharePoint collections
  
 
==Scenario:==
 
==Scenario:==
Line 79: Line 84:
 
Rational Team Concert is widely recognized as a tool to manage the lifecycle processes for software: defect tracking, quality assurance, requirements management, and much more.  In this scenario, a project manager has determined a customer request will require an architectural design change, and once the design change has been approved the modifications will be worked on by a software engineer.  
 
Rational Team Concert is widely recognized as a tool to manage the lifecycle processes for software: defect tracking, quality assurance, requirements management, and much more.  In this scenario, a project manager has determined a customer request will require an architectural design change, and once the design change has been approved the modifications will be worked on by a software engineer.  
  
Before the use of the Lyo Sharepoint adapter:
+
Before the use of the Lyo SharePoint adapter:
The Project Manager consults and discusses the customer's requested architecture change with a Design Architect who works for a business partner.  The Design Architect manages design document changes using Microsoft Sharepoint and Microsoft Word in a separate system.  The Project Manager and the Software engineer utilize RTC to manage the changes to the software.  In this case, once the Project Manager discusses and approves the work to be completed by the Design Architect, he opens a workitem in RTC and assigns in to a Software Engineer. The Software Engineer has to email, IM or call the Design Architect until he/she determines the design changes have been approved.  
+
The Project Manager consults and discusses the customer's requested architecture change with a Design Architect who works for a business partner.  The Design Architect manages design document changes using Microsoft Sharepoint and Microsoft Word in a separate system.  The Project Manager and the Software engineer utilize RTC to manage the changes to the software.  In this case, once the Project Manager discusses and approves the work to be completed by the Design Architect, he opens a workitem in RTC and assigns it to a Software Engineer. The Software Engineer has to email, IM or call the Design Architect until he/she determines the design changes have been approved.  
  
After adding the Lyo Sharepoint adapter:  
+
After adding the Lyo SharePoint adapter:  
 
After the Project Manager consults with the Design Manager, he opens a workitem in RTC, and adds a link to the workitem which will allow the Software Engineer to readily determine the approval state of the design document kept in Sharepoint.
 
After the Project Manager consults with the Design Manager, he opens a workitem in RTC, and adds a link to the workitem which will allow the Software Engineer to readily determine the approval state of the design document kept in Sharepoint.
  
Before working with this scenario you will need to set-up your environment for the Lyo Sharepoint adapter and modify the sharepoint.properties file.
+
Before working with this scenario you will need to set-up your environment for the Lyo SharePoint adapter and modify the sharepoint.properties file.
 +
 
 +
First, configure the adapter as a "Friend" to RTC and connect your RTC project area to a SharePoint collection.  Note:  This requires JazzAdmin authority.  You may need your RTC administrator's assistance.
 +
# In the RTC administration pages, go to Application administration
 +
# Configure Friends
 +
# Add the SharePoint adapter as a friend.  The URL should be ''https://hostname:8080/OSLCSharepoint/rootservices''.  Complete the wizard
 +
# Go to Project Area administration and select the appropriate project area
 +
# Under Associations, click Add
 +
# Select the SharePoint Adapter friend
 +
# Select Provides Change Requests as the association type
 +
# Select the collection to associate with this project area and then Save the project area
  
 
Then you should be ready to try this adapter with RTC.
 
Then you should be ready to try this adapter with RTC.
Line 92: Line 107:
 
# Select the Links tab
 
# Select the Links tab
 
# Add Related Artefacts
 
# Add Related Artefacts
# In the '''Resource URL''', type or paste the URL from the Lyo Sharepoint Adapter perspective.  Usually, this will consists of the adapter_uri+"/resource/"+Sharepoint Library+"/"+an identifier for the document in Sharepoint.  For example: http://localhost:8080/OSLCSharepoint/resource/Empire/22, would refer to the Sharepoint document library and 22 is the identifier for the one of the saved documents.
+
# In the '''Resource URL''', type or paste the URL from the Lyo SharePoint Adapter perspective.  Usually, this will consists of the adapter_uri+"/resource/"+SharePoint Library+"/"+an identifier for the document in SharePoint.  For example: http://localhost:8080/OSLCSharepoint/resource/Empire/22, would refer to the SharePoint document library and 22 is the identifier for the one of the saved documents.
 
# Save the workitem
 
# Save the workitem
  
 
[[Image:LyoImageTimeShare.gif]]
 
[[Image:LyoImageTimeShare.gif]]
  
If everything works correctly, when you hover over the workitem link you added above you should see a UI preview of a sharepoint document.  
+
If everything works correctly, when you hover over the workitem link you added above you should see a UI preview of a SharePoint document.  
  
 
[[Image:LyoImageTimeShareCrop.gif]]
 
[[Image:LyoImageTimeShareCrop.gif]]
  
You should be able to select '''More''' and '''Less''' links in the hover dialog.  
+
You should be able to select '''Show More''' and '''Show Less''' links in the hover dialog.  
  
You should be able to select the link which will take you to document in Microsoft Sharepoint, and from there, you can open the document with Microsoft Word.
+
You should be able to select this link which will take you to the document in Microsoft SharePoint, and from there, you can open the document with Microsoft Word.
  
 
[[Image:LyoImageTimeShare4crop.gif]]
 
[[Image:LyoImageTimeShare4crop.gif]]
  
*note: need to say anything about friend of adapter to RTC?
+
===Services:===
 +
The Lyo SharePoint adapter also provides a catalog of services, a service provider for each document library in the ShareSharePointoint instance, an example of Delegated UI for Creation and Selection dialogs, as well as a list of documents saved in the SharePoint instance.
 +
 
 +
To access the catalog of services: http://localhost:8080/OSLCSharepoint/catalog
 +
 
 +
To access a service provider: http://localhost:8080/OSLCSharepoint/provider?collection=DocLib
 +
 
 +
To list all of the documents in the SharePoint document library: http://localhost:8080/OSLCSharepoint/list/resource?collection=DocLib
 +
 
 +
To access a service provider delegated selection UI: http://localhost:8080/OSLCSharepoint/selector?collection=DocLib
 +
 
 +
To access a service provider delegated creation UI: http://localhost:8080/OSLCSharepoint/creator?collection=DocLib
 +
 
 +
To access a single document as a resource: http://localhost:8080/OSLCSharepoint/resource/DocLib/22
  
*note: Detail the catalog, service provider, and dialogs..
+
Note: "DocLib" should be substituted for the the actual SharePoint instance document library.

Latest revision as of 15:11, 18 September 2012

Contents

[edit] Building and Running the Lyo SharePoint Sample in Eclipse

[edit] Prerequisites

[edit] Clone the Lyo Server git repository

This example assumes EGit is being used.

  • Open the Git Repositories view in Eclipse and click the Clone Git Repository icon
  • Use git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.server.git as the URI (browse it also on line). User/Password are not required.
  • On the Branch Selection page, select the master branch
  • On the Local Destination page, specify a location or accept the default and click Finish

The repository should now show up in your Git Repositories view.

[edit] Import Eclipse projects from the git repository

  • In the Git Repositories view, right click org.eclipse.lyo.server and select Import Projects
  • Select the Import Existing Projects wizard and click Next
  • Import the following projects:
    • org.eclipse.lyo.samples.sharepoint

TODO: screenshot

  • [Optional] Add the projects to a new working set.

[edit] Edit the SharePoint configuration

Find and open the sharepoint.properties file.

Modify the values in the following key/value pairs:


The adapter_uri is used to specify the OSLC adapter which will sit between Microsoft SharePoint and Rational Team Concert (RTC). It should be a working URI for the OSLC adapter servlet, e.g. http://localhost:8080/OSLCSharepoint. This servlet provides an OSLC Catalog, Service provider, an example of Creation and Selection dialogs and a delegated UI for sharepoint documents.

Next, specify the Microsoft SharePoint service for OData by updating sharepoint_uri, usually this is specified by appending "_vti_bin/listdata.svc" to your Sharepoinnt server. (e.g.: http://www.sharepointserver.com:20001/_vti_bin/listdata.svc_.

Next, specify the basic authentication (userid, password) for accessing the SharePoint server at the address for sharepoint_uri.

[edit] Build the projects

  • In the Eclipse Package Explorer view, select all the projects you've imported, right click, and select Maven->Update Project Configuration. Click OK.
  • Run Maven Install on each project in this order,
    • org.eclipse.lyo.server.samples.sharepoint
  • To run Maven Install,
    • Expand the project
    • Right click pom.xml and select Run As->Maven install.

MavenInstall.png

  • IBM JVM/JRE Users: There is an issue with m2eclipse and the the IBM JRE. If you have see the error java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder when running a Maven install, you need to copy a newer slf4j api jar into your JRE directory to work around the issue until it is fixed:


[edit] Run the Sharepoint sample web application

This SharePoint adapter looks through the sharepoint OData collections for collections where the ContentType is defined as "Document". For each SharePoint library that contains documents, an OSLC service provider is created with the basic services for OSLC Delegated dialogs for selection and creation as well as listing the documents with a UI preview.

  • First, edit the sharepoint.properties with the URL and credentials for your SharePoint server. NOTE: The SharePoint IIS server must be configured to allow basic authentication.
  • Go to the Server view (Window->Show View->Other and select Servers)
  • right click the server running on port 8080 and select Add and Remove
  • Add org.eclipse.lyo.samples.sharepoint and start this server
  • Test that the server is running by going to this URL in a web browser: http://localhost:8080/OSLCSharepoint. You should get the home page for your adapter. If sharepoint.properties is configured correctly, you should be able to select the catalog and see a list of SharePoint collections

[edit] Scenario:

In this scenario, there are three participants with these roles:

  • Project Manager
  • Design Architect
  • Software Engineer

Rational Team Concert is widely recognized as a tool to manage the lifecycle processes for software: defect tracking, quality assurance, requirements management, and much more. In this scenario, a project manager has determined a customer request will require an architectural design change, and once the design change has been approved the modifications will be worked on by a software engineer.

Before the use of the Lyo SharePoint adapter: The Project Manager consults and discusses the customer's requested architecture change with a Design Architect who works for a business partner. The Design Architect manages design document changes using Microsoft Sharepoint and Microsoft Word in a separate system. The Project Manager and the Software engineer utilize RTC to manage the changes to the software. In this case, once the Project Manager discusses and approves the work to be completed by the Design Architect, he opens a workitem in RTC and assigns it to a Software Engineer. The Software Engineer has to email, IM or call the Design Architect until he/she determines the design changes have been approved.

After adding the Lyo SharePoint adapter: After the Project Manager consults with the Design Manager, he opens a workitem in RTC, and adds a link to the workitem which will allow the Software Engineer to readily determine the approval state of the design document kept in Sharepoint.

Before working with this scenario you will need to set-up your environment for the Lyo SharePoint adapter and modify the sharepoint.properties file.

First, configure the adapter as a "Friend" to RTC and connect your RTC project area to a SharePoint collection. Note: This requires JazzAdmin authority. You may need your RTC administrator's assistance.

  1. In the RTC administration pages, go to Application administration
  2. Configure Friends
  3. Add the SharePoint adapter as a friend. The URL should be https://hostname:8080/OSLCSharepoint/rootservices. Complete the wizard
  4. Go to Project Area administration and select the appropriate project area
  5. Under Associations, click Add
  6. Select the SharePoint Adapter friend
  7. Select Provides Change Requests as the association type
  8. Select the collection to associate with this project area and then Save the project area

Then you should be ready to try this adapter with RTC.

  1. Open a workitem in RTC.
  2. Navigate to the workitem.
  3. Select the Links tab
  4. Add Related Artefacts
  5. In the Resource URL, type or paste the URL from the Lyo SharePoint Adapter perspective. Usually, this will consists of the adapter_uri+"/resource/"+SharePoint Library+"/"+an identifier for the document in SharePoint. For example: http://localhost:8080/OSLCSharepoint/resource/Empire/22, would refer to the SharePoint document library and 22 is the identifier for the one of the saved documents.
  6. Save the workitem

LyoImageTimeShare.gif

If everything works correctly, when you hover over the workitem link you added above you should see a UI preview of a SharePoint document.

LyoImageTimeShareCrop.gif

You should be able to select Show More and Show Less links in the hover dialog.

You should be able to select this link which will take you to the document in Microsoft SharePoint, and from there, you can open the document with Microsoft Word.

LyoImageTimeShare4crop.gif

[edit] Services:

The Lyo SharePoint adapter also provides a catalog of services, a service provider for each document library in the ShareSharePointoint instance, an example of Delegated UI for Creation and Selection dialogs, as well as a list of documents saved in the SharePoint instance.

To access the catalog of services: http://localhost:8080/OSLCSharepoint/catalog

To access a service provider: http://localhost:8080/OSLCSharepoint/provider?collection=DocLib

To list all of the documents in the SharePoint document library: http://localhost:8080/OSLCSharepoint/list/resource?collection=DocLib

To access a service provider delegated selection UI: http://localhost:8080/OSLCSharepoint/selector?collection=DocLib

To access a service provider delegated creation UI: http://localhost:8080/OSLCSharepoint/creator?collection=DocLib

To access a single document as a resource: http://localhost:8080/OSLCSharepoint/resource/DocLib/22

Note: "DocLib" should be substituted for the the actual SharePoint instance document library.