Usman Zafar Malik MCTS

Download Report

Transcript Usman Zafar Malik MCTS

By: Usman Zafar Malik
[MCTS : Microsoft Office SharePoint Server 2007]
Policy
 Auditing
 Creating Business Intelligence(BI)
Solutions by using MOSS
 Working with KPIs

What is the Policy?
 Policy Architecture.
 How to define Policy?
 How to implement the Policy by using
Code?


Policy is a collection of instruction sets
for one or more policy features.

Each policy feature provides a specific
kind of content management
functionality.

You can assign a policy to either a
content type or a list.

Each policy feature that you want to
include in a policy, you include an
instruction set, called a policy item, in
the policy.

Policy item is an XML node within a
policy that contains the settings for only
one policy feature, includes like ID,
NAME of Policy Feature.

A policy feature is an assembly that provides
some content management functionality to
Office SharePoint Server 2007.

You can include the same policy feature in
multiple policies.

A policy feature can use one or more policy
resources

Example: Audit. Expiration ,Labels, Bar Codes

A policy resource is an assembly that assists the policy
feature by providing some functionality the feature needs.

For example, the Bar Code policy feature uses a Bar Code
Provider, which generates the bar codes, as a policy
resource.

Expiration policy feature applies an Expiration Formula
Calculator as a policy resource to determine a document's
actual expiration date. Policy feature also uses an
Expiration Action policy resource to determine what
action to take when an item reaches its expiration date.

Policy Resources are not shared between Policy Features.

Implement Interface IPolicyFeature .

Reference:
 Microsoft.Office.Policy.dll

NameSpace:
 Microsoft.Office.RecordsManagement.InformationPolicy

Include these methods






OnCustomDataChange
OnGlobalCustomDataChange
ProcessListItem
ProcessListItemOnRemove
Register
UnRegister
<?xml version="1.0" encoding="utf-8" ?>
<p:PolicyFeature id="TST.POC.PolicyFeatures.PolicyOfTruth"
xmlns:p="urn:schemas-microsoft-com:office:server:policy" group="Policy">
<p:LocalizationResources>dlccore</p:LocalizationResources>
<p:Name>Policy of Truth</p:Name>
<p:Description>
This policy helps us to achieve the goals set in our
"one version of the truth" project
</p:Description>
<p:Publisher>Ton Stegeman</p:Publisher>
<p:ConfigPage>policyoftruthsettings.ascx</p:ConfigPage>
<p:ConfigPageInstructions>
You can add keywords here.
If any of these keywords is found in the item"s metadata and the metadata also has
the word "truth" or "proof", then the item is considered to be the "truth". And our
truth is something we need to manage. Separate your keywords with a ";"
</p:ConfigPageInstructions>
<p:AssemblyName>
TST.POC.PolicyOfTruth, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=503edd7b21a430b3
</p:AssemblyName>
<p:ClassName>TST.POC.PolicyFeatures.PolicyOfTruth</p:ClassName>
</p:PolicyFeature>
<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->
<!-- _LocalBinding -->
<%@ Assembly Name="TST.POC.PolicyOfTruth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=503edd7b21a430b3"%>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Control Language="C#" Inherits="TST.POC.PolicyOfTruth.PolicyOfTruthSettings" %>
<p>
<table cellpadding="0" class="ms-authoringcontrols">
<tr>
<td>&nbsp;</td>
<td><asp:Label runat="server" Text="Enter your keywords, separated by ";""></asp:Label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:TextBox id="TextBoxKeywords" runat="server" MaxLength="1024"
class="ms-input" ToolTip="Enter your keywords here." />
<asp:RequiredFieldValidator
id="RequiredValidatorKeywords"
ControlToValidate="TextBoxKeywords"
ErrorMessage="At least one keyword is required."
Text="Please enter on or more keywords separated by a semicolon."
EnableClientScript="false"
runat="server"/>
</td>
</tr>
</table>
</p>

Creating the Policy Control you have to inherit
the control from abstract class
CustomSettingsControl.

Important part are “CustomData” property
and “onLoad” Method.

In the “CustomData” property the xml is
generated with the values of the controls.

The “OnLoad” reads the xml string and sets
the values for the usercontrol(s) in your editor.

Add the Control in the “LAYOUTS”
folder of the MOSS Deployed Path.

Deploy the Assemblies.

Register your policy in the Policy Catalog.
PolicyFeatureCollection policyFeatures = PolicyCatalog.FeatureList;
foreach (PolicyFeature policyFeature in policyFeatures)
{
if (policyFeature.Id=="TST.POC.PolicyFeatures.PolicyOfTruth")
{
MessageBox.Show("Policy was already installed");
return;
}
}
string manifest = System.IO.File.ReadAllText("manifest.xml");
PolicyFeature.ValidateManifest(manifest);
PolicyFeatureCollection.Add(manifest);

Unregister your policy in the Policy Catalog.
PolicyFeatureCollection policyFeatures =
PolicyCatalog.FeatureList;
foreach (PolicyFeature policyFeature in policyFeatures)
{
if (policyFeature.Id ==
"TST.POC.PolicyFeatures.PolicyOfTruth")
{
PolicyFeatureCollection.Delete(policyFeature.Id);
return;
}
}
<p:Policy xmlns:p="office.server.policy" local="false" id="62bb137b-e4c5-4dab-9b90c9b3e54384c5">
<p:Name>The truth about SharePoint</p:Name>
<p:Description>This policy manages "truth" items on SharePoint in our
portal</p:Description>
<p:Statement>
SharePoint list items and documents that are considered to be the truth about
SharePoint
Technologies, will be managed by our "truth manager".
</p:Statement>
<p:PolicyItems>
<p:PolicyItem featureId="TST.POC.PolicyFeatures.PolicyOfTruth">
<p:Name>Policy of Truth</p:Name>
<p:Description>This policy helps us to achieve the goals set in our "one version of the
truth" project</p:Description>
<p:CustomData>
<data>
<keywords>SharePoint; MOSS; WSS</keywords>
</data>
</p:CustomData>
</p:PolicyItem>
</p:PolicyItems>
</p:Policy>

Demo (Label Policy)
 http://msdn2.microsoft.com/en-
us/library/ms499244.aspx
 http://jack.whyyoung.com/blog/www-
sharepointblogs-com-MainFeed-aspxGroupID-3/MOSS-Custom-policiespart-1--Creat.htm
What is the Auditing?
 Demos


Audits are performed to ascertain the
validity and reliability of information.

Track data such as which users viewed
and updated records and documents,
check-in, check-out etc.
Demo - Create a Custom Audit Report
Demo - Use auditing feature in MOSS
Demo - Create a Custom File Submission
Demo - Create a Custom Legal Hold

Implement interface “IRouter”

Only one method “OnSubmitFile”

Reference:
 Microsoft.Office.Policy.dll

NameSpace:
 Microsoft.Office.RecordsManagement.RecordsRe
pository

http://blog.thekid.me.uk/archive/2007/04/1
5/creating-a-custom-router-for-recordscenter-in-sharepoint.aspx
What is Business Intelligence?
 How many ways we can use BI in
MOSS?


The promise of Microsoft BI is to help
decision makers at all levels throughout
your organization have confidence that
their decisions support your company’s
goals and initiatives.
Report Center
 Excel Services
 Connections to external data sources
 Key Performance Indicators (KPIs)
 Filter Web Parts
 Dashboards


The Report Center site provides a central
location for business-intelligence-related
information.

Excel Services enables you to store an
Excel workbook on a server and then publish
any part of that workbook on a Web page.

Users need only a browser to view and
interact with the live data.

The workbook is published on the Web page
by using the Excel Web Access (EWA) Web
Part

You can use data from other business
applications, such as SAP and Siebel, in
SharePoint lists, pages, and Web Parts.

You can build Web Pages and SharePoint
lists that allow users to interact with the
data in the external source without ever
leaving the SharePoint page.

A Key Performance Indicator (KPI) is a
visual cue that communicates the amount
of progress made toward a goal.

KPIs are created by using KPI lists and
then are displayed by using special KPI
Web Parts.

Filters allow you to display only the
subset of data that you are interested in
view.

Office SharePoint Server 2007 has 10
Filter Web Parts.

Example : Current User Filter Web Part.

Dashboards, also known as multi-report
summary pages, contain one or more
Web Parts, such as business data Web
Parts, Excel Web Access Web Parts, or
KPIs etc.

You can create your own dashboard page
by using various Web Parts.

http://office.microsoft.com/enus/sharepointserver/HA100872181033.as
px

Indicator using data in SharePoint list
A SharePoint list that contains items from which you want to create an aggregate
value, such as a sum, minimum, or maximum. Before you set up the KPI, make
sure the SharePoint list already is in the view that you want to use. You must first
display the appropriate columns in order for the KPI to work.

Indicator using data in Excel workbook
An Excel workbook where the KPI is calculated in the workbook.

Indicator using data in SQL Server 2005 Analysis Services
A SQL Server 2005 Analysis Services cube.

Indicator using manually entered information
Information that is not in a system and therefore entered manually.

Demo

http://office.microsoft.com/enus/sharepointserver/HA100800271033.as
px
Extend Page Authoring Toolbar
 Create Pages Dynamically.
 Modify Page Layouts by using Content
Placeholders
 Create Custom Field Control
 Variations
 Deploy Content between servers.

Demo
 Files


Class: ConsoleAction
 A class provided by MOSS for you to create
new menu items.

Method: RaisePostBackEvent
 It basically does all the heavy lifting required
at the time the action is clicked

Class: ConsoleNode
 This feature to be presented as a top level menu with children
not just a single menu item.

Method: InitNode
 Will be run on every page load, when the object is created so we
use this method to determine whether the current page is in edit
mode.

Method: EnsureChildNodes
 Will construct the correct list of links which are to be displayed to
the user.

Steps involved to change the custom XML file:
 Using SharePoint Designer, check out the
CustomEditingMenu.xml file under the master
page gallery: ”_Catalogs\masterpage\Editing
Menu”, Then, modify the custom XML file with
the following changes.
 Add some references to the top of the file so that the
new actions from the assemblies can be referenced.
Make sure you use the right PublicKeyToken key
and the namespace so that the references are clear.

http://blogs.msdn.com/ecm/archive/2007/0
3/04/customize-the-page-editing-toolbar-inmoss-2007.aspx
PageLayout
 PublishingPage


Go to “Site Actions”  “Site Settings”  “Modify All Site Settings” 
“Site columns”  “Create”

Enter the Column Name “NewsHtmlColumn”

Select Column type to “Full HTML content with formatting and
constraints for publishing.

Enter the Group Name “ColumnsGroup” in a new Group Section and
Press the Ok Button.

The Go to “Site content type”  “Page (link under the “Publishing
Content Types Group”)”  “Add from existing site columns”

Add the “NewsHtmlColumn”
Demo

Create an “.ascx” file with a
“Sharepoint :RenderingTemplate”
control.

We need to implement its code behind
class must derives “BaseFieldControl”
and overrides the Property “Value”.

Create a custom “field type” class, must
inherit the base class “SPField”.

Override method “GetValidatedString” to
check the validity of input and return value.

Override method “GetFieldValue” to get the
field value

Override “FieldRenderingControl” property
returns the user control that created above.

The custom type must include a custom
field type definition and name
convention should be “fldtypes_*.xml”.

Build the solution and sign the assembly

Put the assembly into GAC

Copy the user control to \program files\...\web server
extensions\12\template\controltemplates

Copy fldtypes_name.xml to \program files\...\web
server extensions\12\template\xml\

Run iisreset command.

SPFieldBoolean
Represents a Boolean field type.

SPFieldChoice
Represents a choice field type.

SPFieldCurrency
Represents a currency field type.

SPFieldDateTime
Represents a date-time field type.

SPFieldMultiColumn Represents a multicolumn field type

Demo

http://msdn2.microsoft.com/enUS/library/aa830815.aspx#Office2007SS
BrandingWCMPart2_CreatingCustomField
Controls

http://www.sharepointblogs.com/jimyang/d
efault.aspx

Variations can be used for publishing
related sites or pages, purpose is to
support Multilingual in MOSS.

Instead, you will have sub sites under
the web root representing your
variations.

The root welcome page is configured by SharePoint (upon creation of
variation labels and site structures) to point to a file called
“VariationRoot.aspx”.

Template Page of “VariationRoot.aspx” is
“VariationRootPageLayout.aspx”

This file contains a user control “VariationsRootLanding.ascx”, which
has the code that redirects.

For customization you have to change the control.

Control Location:
 “C:\Program Files\Common Files\Microsoft Shared\web server
extensions\12\TEMPLATE\CONTROLTEMPLATES\VariationsRootLanding.as
cx”

http://msdn2.microsoft.com/enus/library/ms562040.aspx

Create Production Site Collection.

Allow Incoming Content Deployment Jobs on the
Production Site.

Create Content Deployment Path from Staging to
Production.

Create Content Deployment Job.

Run Content Deployment Job.

Run Quick Deploy Job.

Create Production Site Collection.


Allow Incoming Content Deployment Jobs on the Production Site.


Central AdministrationOperation” Content deployment paths and jobs””
New Job”
Run Content Deployment Job.


Central AdministrationOperation” Content deployment paths and jobs””
New Path”
Create Content Deployment Job.


Central AdministrationOperation”Content deployment settings”(Select
“Accept incoming content deployment jobs”)
Create Content Deployment Path from Staging to Production.


Select "Blank Site" as the template. This step is IMPORTANT, because Blank Site
is the only template that you can import any other template into
From the context menu on the job, select “Run Now”
Run Quick Deploy Job.

http://blogs.msdn.com/jackiebo/archive/
2007/02/26/content-deployment-step-bystep-tutorial.aspx






Provision multiple sites in a hierarchy.
Display data from a Microsoft Excel
workbook by using Excel Services.
Create a trusted workbook location by
using the Stsadm.exe command-line tool.
Filter data in a workbook by using Excel
Services.
Configuration of Reporting Services.
How to use Report Viewer webpart
providing with parameters.

Make sure the file from where the Excel file is view its
path should be added in the “trusted file location” of
Shared Services.

Path: SharedServices1 “Trusted file locations””
Add Trusted File Location”.

You can view the Excel file on the web with the help of
excel services and at the backend the “Excel Web
Access (EWA)” webpart is viewing this file.

Demo
Trusted file location


%STSADM% -o add-ecsfiletrustedlocation
-ssp %sspname% -location %1 includechildren true -locationtype
%LocationType%

Microsoft SQL Server 2005.

Reporting Services installed on the server.

SQL Server Service Pack 2

Microsoft SQL Server 2005 Reporting Services Add
in for SharePoint Technologies

Download at:
http://www.microsoft.com/downloads/details.aspx?fa
milyid=1E53F882-0C16-4847-B331132274AE8C84&displaylang=en