SPS技术体系分析(张永康)

查看完全版本论坛: SPS技术体系分析(张永康)


Pages :[1]  共 6 楼
#1 作者:胡涛 2004-11-17 16:13:00)

SPS技术体系分析(张永康)

SPS技术体系分析


张永康 2004-5-31收集整理编写



一、程序文件及IIS配置 2
二、SPS数据库对象分析 2
1.主要数据库表 3
2.主要表及字段 4
3.Windows SharePointServices存储过程 8
三、SPS封装后的对象分析 9
1.SPS主要对象体系结构 9
2.Microsoft.SharePoint命名空间简介 9
3.Windows SharePoint Services Web Service简介 13
4.SharePoint 事件分析 20
四、开发相关资源 22

......

  您还没有登陆,只能查看部分内容,欲知全文内容,请选择[注册]或者[登陆]
#2 作者:胡涛 2004-11-17 16:14:00)


一、程序文件及IIS配置 SPS安装后的文件主要存放在如下两个目录 D:\\Program Files\\SharePoint Portal Server 该目录主要存放服务器管理工具,搜索和索引文件数据,日志文件。 C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\60\\ 该目录主要存放网页相关文件(网页,程序,配置文件,图片,网页模板文件) SPS网站中上传的图片,文档及各种列表数据都存放在SQL_Server数据库中。 SPS安装好后,[控制面板]/[管理工具]中增加一个[SharePoint 管理中心],主要通过它来完成SPS的配置。它实际上是一个IIS网站,网页及程序文件在如下目录:C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\60\\TEMPLATE\\ADMIN\\2052 它对应的IIS应用程序池名为CentralAdminAppPool (应用程序池的主要作用是为WEB程序提供进程和内存管理)

安装SPS后,默认网站会被SPS占用(默认用80端口),对应的IIS应用程序池为 MSSharePointPortalAppPool,它负责客户端浏览SPS时的进程和内存管理。所以,如果以前的IIS网站虚拟目录还需要用的话,需要修改虚拟目录的应用程序池,改为DefaultAppPool,或者,新建一个网站(虚拟服务器),启用其它的端口来访问。

#3 作者:胡涛 2004-11-17 16:14:00)


二、SPS数据库对象分析 SPS的数据存放在SQL_Server中,SQL_Server中包含三个数据库: SPS01_Config_db,SPS配置信息数据库网站名1_PROF,存储SPS个人信息网站名1_SERV,存储服务器相关信息网站名1_SITE,SPS的主数据库,站点中的文档,列表,图片基本上都存放在此数据库中。(其中“网站名”指安装SPS时指定的SPS服务器名)

1.主要数据库表 配置数据库表(10个表) Name Description 描述 AntiVirusVendors Antivirus software vendors. 防毒软件提供商。 CustomTemplates Templates that appear in the global templates list (template picker). 出现在全局模板列表中的模板(模板选取)。 Databases Content databases and associated settings. 内容数据库及相关设置。 Globals Settings that apply to all sites on the physical server within a Windows SharePoint Services topology. SharePoint架构中应用于所有物理站点的设置。 InstalledWebPartPackages Web Part Packages that are available to the virtual server. 虚拟服务器可用的web组件包。 Servers Physical computers in the Windows SharePoint Services topology. SharePoint架构中物理计算机。 Services Services such as database, Web, and mail services that are included in the Windows SharePoint Services topology. SharePoint架构中的服务,例如数据库,站点,邮件等。 Sites Sites in the Windows SharePoint Services topology. SharePoint架构中的站点。 VirtualServers Virtual servers and their associated settings. 虚拟服务器及其相关设置。 WebPartPackages Web Part Packages that are installed in a topology. 安装在架构中的web组件包。

内容数据库(29个表) Name Description 描述 Categories Associations among documents and their assigned areas. 文档及其分配区域协作。 ComMd Document discussions. 文档讨论。 Deps Document dependencies. 文档附件。 DiskWarningDate Date and time of last warning about disk quota. 最后警告磁盘配额的日期和时间。 Docs Documents and document folders. 文件和文件夹。 DocVersions Version history of documents from document libraries. 来自文档库的文档版本历史。 EventCache Cache for alerts. 警报缓存。 EventLog Log for alerts. 警报日志。 HT_Cache Cache of documents transformed for viewing in a Web browser. 浏览器文档转换视图缓存。 HT_Settings Settings for HTML viewing. HTML视图配置。 ImmedSubscriptions Alerts that are set to be sent as soon as the changes occur. 即时发送的变更通知 Links Links to be recalculated during a site recalculation. 重算过程中到重新计算的链接。 Lists Lists in the site. 站点列表。 NavNodes Nodes that are displayed in the navigation bars. 导航条显示的节点集。 Personalization Personalization done to Web Parts. 自定义web组件。 SchedSubscriptions Alerts that are set to be sent on a daily or weekly basis. 每天或每周预定发送的通知。 SiteGroupMembership Members of cross-site groups. 跨站点组成员。 SiteGroups Cross-site groups. 跨站点组。 Sites Sites in the content database. 内容数据库站点。 TimerLock Locking scheme that determines which server locks which database. 决定服务器锁锁定数据库的锁方案。 UserData List data. 列表数据。 UserInfo Info about each user added to the site. 每一个用户添加到站点的信息。 WebCat Links between Web sites and areas. 站点和区域间的链接。 WebGroupMembership List of members of the site groups. 站点组成员列表。 WebGroups Site groups (such as Administrator, Web Designer) for the site. 站点组(例如管理员,站点设计者)。 WebMembers Members of a site. 站点成员。 WebParts Web Parts available for the sites. A view is a Web Part. 站点可用的web组件。一个web组件的视图。 Webs Subsites associated with a site. 和一个站点关联的子站点。 WelcomeNames Default documents for the site. 站点默认文档。

2.主要表及字段 SPS01_config_db数据库主要存储SPS的配置信息下面对其中的5个重点表进行分析说明 AntiVirusVendors Table(AntiVirusVendors表) CustomTemplates Table(CustomTemplates表) Databases Table(Databases表) Globals Table(Globals表) Services Table(Services表)

AntiVirusVendors Table(AntiVirusVendors表) The AntiVirusVendors table stores a list of antivirus software vendors whose software is used in the Microsoft Windows SharePoint Services deployment. AntiVirusVendors表存储了SharePoint中使用的防毒软件提供商的信息。 Columns Column name Data type Description 描述 VendorID Int Unique identifier for each vendor. Part of the primary key. 提供商标识。主键组成部分。 VendorProduct nvarchar Name of the antivirus software product. Part of the primary key. 防毒软件产品名称。主键组成部分。 VendorVersion Int Version of the signature file for the antivirus software product. 防毒软件产品签名文件版本

CustomTemplates Table(CustomTemplates表) The CustomTemplates table stores the list of custom page templates that appear in the global templates list . CustomTemplates表存储了出现在全局模板列表中的自定义页面模板列表。 Columns Column name Data type Description 描述 Id int Unique identifier for the custom template. Primary key. 自定义模板标识。主键。 Title nvarchar Title of the template that displays in the template picker list box. 在模板选择列表框显示的模板名称。 Description nvarchar Description of the template. 模板描述说明。 LCID int Locale ID; for example, 1033 is English. 区域编码;例如,例如1033是英国的区域编码。 Content image Content that is applied to the site. 应用到站点的内容。 TemplateID int Template type. 模板类型。

Databases Table(Databases表) The Databases table stores content database records that list content databases and the associated settings in a Microsoft Windows SharePoint Services deployment. Each virtual server in the deployment hosts a content database. Databases表存储内容数据库(包括列表内容数据库及与其关联的SharePoint架构设置)记录。每一个虚服务器都有一个内容数据库。 Columns Column name Data type Description 描述 DatabaseId uniqueidentifier Primary key. 主键。 VirtualServerId uniqueidentifier Associated virtual server. Foreign key, available from the VirtualServers table. 关联的虚服务器。外键,来自VirtualServers表。 Name nvarchar Database name. 数据库名。 UserId nvarchar User ID used to connect to the database. Blank for Integrated Windows authentication. User ID被用来连接到数据库。如果为空则为集成windows验证。 Password nvarchar Password used to connect to the database. Blank for Integrated Windows authentication. Password用来连接到数据库。如果为空则为集成windows验证。 SiteCount int Number of sites in the database. 数据库中站点数量。 SiteCountWarning int Number of sites allowed before a warning is generated. 数据库中允许最大的站点数量。 SiteCountLimit int Number of sites allowed. 允许的站点数量。 DatabaseServiceId uniqueidentifier Foreign key, available from the Services table. 外键,来自Services表。 LastModified datetime Time of last modification to the database record. 数据库记录最新修改时间。 LastModifiedUser nvarchar User who last modified the database record. 最后修改数据库记录的用户。 LastModifiedServer nvarchar Name of the server affected by the modifications. 修改影响的服务器名称。 Status int Ready or Offline Status (0 is ready, 1 is offline). When offline, no additional sites can be created but existing sites are accessible. 就绪或离线状态(0表示就绪,1表示离线)。如果处于离线状态,除了已存在站点外不能创建其它站点创建。 Version timestamp Version of the metainfo parameter in the table. This value is incremented when a site is created and the site count is incremented. 数据表元参数版本。当一个站点被创建和站点数量增加时,这个值就会增加。 Properties ntext Not used in this table. 备用字段

Globals Table(Globals表) The Globals table stores settings that apply across a Microsoft Windows SharePoint Services deployment. Globals表存储跨越应用于SharePoint设置的设置信息。 Columns Column name Data type Description 描述 GlobalId uniqueidentifier Primary key. 主键。 SchemaVersion nvarchar Schema version of the configuration database. 配置数据库架构版本。 UseHostHeader bit Hoster Header mode settings for Windows SharePoint Services. Windows SharePoint Services的主机头样式设置。 UseNtAuthForDatabase bit 1 if Integrated Windows Authentication is being used for database access; 0 if SQL Authentication is being used. 1表示访问数据库用集成windows验证;0表示用SQL验证。 SmtpServiceId uniqueidentifier GUID for the Simple Mail Transfer Protocol (SMTP) Service specified in the global settings of SharePoint Central Administration. Foreign key (Services table). SharePoint中心管理全局设置简单邮件传输协议的GUID.外键来 MailCodePage int Option selected for character set in the SMTP Settings specified in the global settings of Central Administration. 中心管理的全局设置中SMTP设置的可选字符集选项。 FromAddress nvarchar E-mail address identified in the From field of the SMTP settings specified in the global settings of SharePoint Central Administration. 中心管理的全局设置的SMTP设置的来自域的可识别的E-mail地址。 ReplyToAddress nvarchar E-mail address that was placed in the Reply To field of the SMTP settings specified in the global settings of SharePoint Central Administration. 中心管理的全局设置的SMTP设置的回复域的可识别的E-mail地址。 LastModified datetime Time of last modification to global settings record. 全局设置的最新修改时间。 LastModifiedUser nvarchar User name of the person who last modified global settings record. 全局设置的最新修改人的用户名。 LastModifiedServer nvarchar Name of the server affected by the modifications. 修改影响的服器名。 Status int Not used in this table. 备用字段。 Version timestamp Version of the metainfo parameter in the table. This value is incremented when the UseHostHeader or SMTP Server Settings change. 表元参数版本。当用户主机头或SMTP设置变更时该值增加。 Properties ntext Miscellaneous properties for the deployment. For example, this may include metadata such as HTML viewing settings, blocked file types. 混合属性。例如,可能包括原数据,比方说HTML视图设置或者 LastModifiedServer nvarchar Name of the server affected by the modifications. 修改影响的服务器名。 Status int Not used in this table. 备用字段。 Version timestamp Version of the metainfo parameter in the table. This value is incremented when a new computer is added to the server farm. 表元参数版本。当一台新的计算机被添加到服务器工厂时,该值是就会增加。 Properties ntext Additional information about the server stored in XML format. 以xml格式存储的服务器附加信息。

Services Table(Services表) The Services table stores records for services used by the Microsoft Windows SharePoint Services deployment. Services表存储了Microsoft Windows SharePoint Services架构使用的服务记录。 Columns Column name Data type Description 描述 ServiceId uniqueidentifier Primary key. 主键。 ClassId uniqueidentifier GUID that indicates the service type such as database, Simple Mail Transfer Protocol (SMTP), or Web service. Web service corresponds to a virtual server in Microsoft Internet Information Services (IIS). GUID表明IIS服务类型,例如数据库,SMTP,Web服务,或者web服务和虚拟服务器之间的通信。 ServerId uniqueidentifier Associated server. Foreign key (Servers table). 关联的服务器。外键,来自Servers表。 Instance nvarchar Instance name of the service where a service such as the database service supports additional named instances. 服务实例名,比如数据库服务就支持附加实例名。 LastModified datetime Time of the last modification to the service record. 服务记录最新修改时间。 LastModifiedUser nvarchar User name of the person who last modified the service record. 最新修改服务记录的用户名。 LastModifiedServer nvarchar Name of the server affected by the modifications. 修改影响的服务器名 Status int Not used in this table. 备用字段。 Version timestamp Version of the metainfo parameter in the table. This value is incremented when a service changes. 表元参数版本号。当一个服务改变的时候,该值是增加的。 Properties ntext Not used in this table. 备用字段。由于SPS的开发主要通过封装的SPS对象去实现,而不是直接操作数据库对象,所以,这里没有对数据库对象(表,存储过程,触发器,约束等)进行详细研究,做了一个excel表格,该表格通过程序列出了SPS的主数据库[网站名1_SITE]中的对象,供参考。见附加excel文件。

3.Windows SharePointServices存储过程

Databases 表存储过程名称 描述 proc_putDatabase 添加或更新一条数据库记录。 proc_getDatabaseById 返回单条数据库记录。 proc_getDatabases 返回一个数据库记录集。 proc_dropDatabase 删除一条数据库记录。 Globals 表存储过程名称 描述 proc_putGlobals 保存全局设置. proc_getGlobals 返回全局设置 Servers 表存储过程名称 描述 proc_putServer 添加或更新一条服务器记录。 proc_getServerById 返回单条服务器记录。 proc_getServers 返回一个数据库记录集合。 proc_dropServer 删除一条服务器记录。 Services 表存储过程名称 描述 proc_putService 添加或更新一条服务记录。 proc_getServiceById 返回单条服务记录。 proc_getServicesByClass 返回一个服务记录集合。 proc_dropService 删除一个服务记录。 Sites 表存储过程名称 描述 proc_putSite 添加或更新一个站点记录。 proc_getSiteById 返回单条站点记录。 proc_getSites 返回一个站点记录集合。 proc_dropSite 删除一个站点记录。 VirtualServers 表存储过程名称 描述 proc_putVirtualServer 添加或更新一条虚服务器记录。 proc_getVirtualServerById 返回单条虚服务器记录 proc_getVirtualServers 返回一个虚服务器记录集合 proc_dropVirtualServer 删除一个虚服务器记录。

#4 作者:胡涛 2004-11-17 16:17:00)


三、SPS封装后的对象分析
1.SPS主要对象体系结构
以下是SharePoint可编程控制的范围。

Security, Users, and Groups Overview (安全,用户,和组的预览)
Namespaces in the Windows SharePoint Services Object Model (SharePoint对象模型的命名空间)
Programming with the Microsoft.SharePoint and Microsoft.SharePoint.Administration Namespaces (Microsoft.SharePoint和Microsoft.SharePoint.Administration命名空间)
Programming with the Microsoft.HtmlTrans.Interface Namespace (Microsoft.HtmlTrans.Interface命名空间)
Server and Site Architecture Overview (Server和Site体系结构预览)
Introduction to Templates and Definitions (模板定义和说明)
Guidelines for Templates and Definitions (模板定义和策略)
Introduction to the Windows SharePoint Services Web Service(SharePoint Web服务说明)
Guidelines for Using the Object Model (对象模型策略)
Major Schema Files(主要模式文件)

2.Microsoft.SharePoint命名空间简介
命名空间:Microsoft.SharePoint
SPSite
功能:
Represents a collection of sites on a virtual server, including a top-level site and all its subsites.
代表一个虚拟服务器的网站集合,包含一个顶集网站和他的所有子站点
AllWebs:属性表示上面意义的网站集合
Quota:网站给定某用户的限额
IISAllowsAnonymous:IIS是否允许匿名登录
PortalUrl:网站所在的门户网站的URL对于WSS网站,此项是空值
URL:网站所在的网址

SPWeb
功能:
Represents a SharePoint site.
代表SharePoint的一个网站
Alerts:所有通知的集合
AllUsers:代表所有用户对象的集合,这个用户可以是网站的用户,也可以是经过认证的域用户
Configuration:用来建立站点的配置ID,
DocTemplates:此网站所用的文档模板
EmailInsertsEnabled:取得值,表明此网站的文档库是否接收Excahnge的公共文件邮件中的附件
EventHandlersEnabled:读取此网站的文档库是否接收事件处理
Files:取得此网站根目录下所有的文件
Folders:取得此站点所有第一级文件夹
Groups:取得此站点交差站点的组
IncludeSupportingFolders:取得或设置在此站点中的文件夹或文件夹中的文件是否支持枚举
IsADAccountCreationMode:取得访问站点的用户是否自动在活动目录里建立帐户
IsRootWeb:取得此站点是否为站点集中的第一级站点
Lists:取得在此站点中所有列表的集合
Modules:取得在此站点中使用的模块
PortalMember:是否与Portal相关联
PortalSubscriptionUrl:一直URL供Portal 中的Alerts
PresenceEnabled:取得或设置是否为记录用户在线信息
Properties:属性集合,此集合中包含WSS的版本或地域信息
PublicFolderRootUrl:取得文档库接收公共文件夹中邮件附件的URL
Roles:取得站点的用户组
SiteGroups:取得网站集合的交差网站组
SiteUsers:取得站点集合的所有用户
Users:取得此站点的用户集合
Microsoft.SharePoint.SPWeb.ViewStyles:取得站点的视图样式
Webs:取得在此站点以下所有子站点的集合

SPAlert
功能:
Represents an alert, which generates periodic e-mail notifications sent to a user about the list, list item, document, or document library to which the alert applies.
代表一个通知,它产生一个定期的e-mail通知发送到用户那里,发更新与此通知关联的列表,列表项,文档,文档库等的消息
SPAlertFrequency:通知发生的频率,分别为每天一次,每周一次,立即发送
SPEventType:事件类型:全部,删除,增加,讨论,修改
Item:此通知属于的列表项或文档
List:此通知所属的列表或文档库
User:得到通知的人

SPList
Represents a list on a SharePoint Web site.
功能:代表SharePoint 网站中的一个列表
AllowDeletion:此列表是否允许删除
AllowMultiResponses:指定调查是否允许多次答复,由此可见,调查属于列表的一种
AnonymousPermMask:是否允许匿名用户访问
BaseTemplate:说明列表基于的模板类型,模板类型有通知、联系人、自定义表格、数据源、讨论板、文档库、事件、自定义列表、不合法列表、问题跟踪、链接、列表模板库、图片库、调查、任务、Web部件库、网站模板库、Xml表格库
BaseType:列表的基本类型,类型有:讨论板、文档库、自定义列表、问题跟踪、调查、无类型、没有使用的
DefaultView:默认视图
Direction:阅读的方向
EnableAttachments:是否允许添加附件
EnableModeration:是否需要审批
EnableVersioning:是否支持版本
EventSinkAssembly:支持事件通知程序集的强名称
EventSinkClass:支持事件通知类名称
EventSinkData:文档库的事件通知中定义的任意字符串
ExcludeFromTemplate:当列表被存成模板时,是否包含内容
Fields:列表中字段的集合
Forms:在列表中用来显示、编辑、增加列表项的表格集合
Hidden:此列表是否隐藏
ImageUrl:列表的图标的服务器相对地址
ItemCount:列表项的数目
Items:列表项集合
Lists:该列表所在的列表集合
MultipleDataList:指定这个在会议工作区中的列表,是否包含多个会议的实例
OnQuickLaunch:是否有首页的快速启动中显示
Ordered:是否允许用户重新对列表项排序
ParentWeb:列表属于的父网站
Permissions:权限集合
PropertiesXml:协作应用标记语言,代表列表的属性值
ReadSecurity:阅读权限设置
RootFolder:取得在列表中包含所有文件的文件夹
SchemaXml:取得此列表的Xml样式
ShowUser:是否在调查中是否显示用户名称
Views:此列表所有视图集合
WriteSecurity:指定写入设置

SPListEvent
Represents an event that occurs within a document library.
功能:代表文档库内发生的事件
ListID:事件发生的文档库的GUID
PropertiesAfter:事件发生后文档库状态属性
Type:事件类型:签入、签出、复制、删除、插入、不合法、剪切、撤消签出、更新
UrlAfter:返回文档或文件夹的网站相对地址,在任何事件发生时,除了删除事件
UserDisplayName:引发事件的用户的显示名称
UserID:引发事件的用户ID
UserLoginName:引发事件的用户登录名称
WebUrl:事件发生的网站的绝对URL

SPListItem
功能:
Represents an item, or row, in a list.
代表列表中的一个列表项或者一行
Attachments:与列表项关联的附件
Fields:列表项所在的列表字段集合
File:由列表所代表的文档库中的文件
ListItems:所在的父列表
ModerationInformation:审批信息,包含状态和描述
ParentList:所在父列表
Xml:列表中的数据的Xml格式

SPIssueList
此类从SPList继承
功能:表示一个问题列表
EnableAssignedToEmail:当列表项与用户关联时,是否发送e-mail通知

SPField
功能:
Represents a field in a list on a SharePoint Web site.
代表SharePoint网站中列表的一个字段
CanToggleHidden:取得此字段是否可以通过用户界面隐藏
DefaultFormula:计划字段的默认公式
Direction:阅读顺序
DisplaySize:显示大小
FieldReferences:一个字符数组,表示字段引用计算机中的字段名称
Filterable:表明此字段是否可以过滤
FilterableNoRecurrence:取得是否可以在视图中的字段建立过滤,却不引发重复的事件
FromBaseType:是否从基本字段产生
Hidden:是否在视图中显示
InternalName:内部名称
ParentList:包含字段的列表
ReadOnlyField:此字段是否可以修改
Reorderable:在字段中的值是否可以重排序
Required:决定此字段是否为必须的
Sealed:此字段是否可以被其它字段继承
Sortable:是否可以被排序
Type:字段类型:TypeAsString:字段的名称的字符


3.Windows SharePoint Services Web Service简介
Administration Service
Administration Web服务提供了WSS网站管理,例如创建和删除站点等。
提供了4个方法:
(1)、CreateSite(string,string,string,int,string,string,string,string,string,string)
创建一个网站Url,包括站点集合的一个绝对URl。目前不能创建根节点,只能在http://Server_name/sites/site_name.aspx
Title 此字符串包含网站集合的显示名
Description 表示网站集合的描述
Lcid 网站集合的本地标识。英文版为1033,中文版为2052
WebTemplate 表示网站模版字符串为:STS#0, STS#1, STS#2
OwnerLogin 网站的拥有者(DOMAIN\\User_Alias)
OwnerName 网页上显示的名字.
OwnerEmail 网站所有者的Email地址.
PortalUrl A string that contains the URL of a portal for the site collection.
PortalName A string that contains the name of a portal for the site collection.

(2)、DeleteSite(string)
Url:要删除的网站的绝对Url
(3)、GetLanguages()
返回显示的语言信息
(4)、GetLanguages(GUID,bool)更新虚拟服务器的Cache配置信息。
VirtualServerId 虚拟服务器的表示符
AdminGroupChanged:true表示指定的管理员组改变配置。

Alerts Service
提供对SharePoint 站点列表通知的操作
提供方法:GetAlerts() 为当前站点返回所有通知(注:此方法目前有些不太明白,他并没有返回我们所想要的信息)
DeleteAlerts(string)删除指定的通知

List Data Retrieval Service
提供一个方法,对SharePoint Service 的一个列表进行查询
Request(QueryRequest)(quertRequest的select属性有问题)

Document Workspace Service
提供了一些方法,对文档工作区及其内容进行管理
(1)、CanCreateDwsUrl(String) 确定用户是否有在服务器上建立子站点的权限
返回值String,如果为:HTTP error code 401表示用户没有足够的权限!

(2)、CreateDws(string,string,string,string)
Name:新的文档工作站的名字,可选,如果不写的话按网站标题名命名。
Users:向SharePoint站点增加的新的用户信息。
Title:新的文档工作去的标题。
documents:An optional list of documents, in the format <Documents><item ID="{document ID}" Name="{document name}"/>...</Documents>, for Microsoft Windows SharePoint Services to retain for subsequent calls to the FindDwsDoc method. Used by Microsoft Office Outlook 2003 when adding shared attachments to a new Document Workspace site.
Error Code Description
HTTP error code 401 The user does not have sufficient rights.
DWSError.AlreadyExists (13) 指定的Url已存在.
DwsError.QuotaExceeded (14) 这个操作超出了用户权限.

(3)DeleteDws()
删除当前的文档工作区
Error Code Description
DWSError.NoAccess (3) 用户没有足够的权限删除此文档
DWSError.WebContainsSubwebs (11) 此文档工作区包含子站点

(4)CreateFolder(string) 创建文件夹, 如果返回值为空表示创建成功
url:创建文件夹的名字,例如:Shared Documents/folder_name.,不能创建根文件夹。
Error Code Description
DWSError.NoAccess (3) 用户没有足够的权限.
DWSError.FolderNotFound (10) 父文件夹不存在.

(5)DeleteFolder(string)删除文件夹。
Url:要删除的文件夹的名字。
Error Code Description
DWSError.NoAccess (3) 用户没有足够的权限完成此操作.
DWSError.FolderNotFound (10) 文件夹不存在

(6)FindDwsDoc(string)此方法返回一个在文档库中显示的文档URL。
Id (string),文档的唯一标识符(GUID),注:有些疑难,还是没找到文档的表示符。所以返回有错误

(7)GetDwsData(string,String)返回文档工作区所在站点及其包含的列表的信息
Document:在文档工作区站点上,文档库所包含的一个文档如:"Shared Documents/document_name.doc."
Lastupdata: 可以写入调用GetDwsData()方法或GetDwsMetadata ()方法后产生的值,也可以空着。

(8)GetDwsMetaData(string,string,bool)返回文档工作区站点及其包含的列表的信息
Document:在文档工作区站点上,文档库所包含的一个文档如:"Shared Documents/document_name.doc."
id ,可选,文档的Guid,
minimal Boolean:决定文档站点信息的输出是否包含schemas, lists, documents, links, and tasks lists等信息。
Return Value
String An XML document fragment that contains the following information:
SubscribeUrl
MtgInstance (meeting instance, if applicable)
SettingsUrl (site settings URL)
PermsUrl (edit permissions url)
UserInfoUrl (user information url)
Roles
[Schema items] (if Minimal is False)
[ListInfo items] (if Minimal is False)
Permissions
HasUniquePerm (true/false)
WorkspaceType ("DWS", "MWS", "SPS", "")
IsADMode (true/false)
DocUrl
Minimal (true/false)
Results (data returned by the GetDwsData method)

(7)和(8)区别不是太明显,但有那么一点区别,(8)包含所有显示的文档、列表等信息,但(7)不包含。
(9)RemoveDwsUser(string)在列表中移出指定的用户
Id:用户ID

#5 作者:胡涛 2004-11-17 16:18:00)


(10)RenameDws (string)改变当前文档工作区的标题
Title:当前文档工作区的新标题
Versions Service
DeleteAllVersions(string)删除指定文件的所有版本,(除最新版本外)
File_name版本被删除的文件的名字如shared documents/file_name
DeleteVersion(string,string)删除指定文件的制订版本
File_name string版本被删除的文件的名字如shared documents/file_name
File_Vesion 此文件的指定版本(版本号从”1”开始)此版本必须存在,否则会发生错误。
XmlNode GetVersions(string)以XMl 格式返回指定文件的所有版本信息。
RestoreVersion(string,string)导入以有版本的文件。
File_name string版本被删除的文件的名字如shared documents/file_name
File_Vesion 此文件的指定版本(版本号从”1”开始)此版本必须存在,否则会发生错误。


Lists Service
为列表及其列表数据提供操作的方法。
AddAttachment(string,string,string,byte[])为指定的列表项增加属性文件
ListName:列表的Guid或列表名
ItemId:要增加属性列表的Item Id
filename:要上传的文件的文件名
content:此文件的二进制数组
AddList(string,string, int )在当前站点下增加一个列表
listName:列表名
description:对此列表的描述
templateId:使用的模版ID号。
可用的模版ID号如下:

List Display Name Type
通知 104
联系人 105
自定义列表 100
在数据表中自定义列表 120
DataSources 110
讨论版 108
文档库 101
事件 106
表单 115
问题跟踪 1100
链接 103
图片库 109
调查 102
任务 107

DeleteAttachment(string,string,string)
Listname:列表名
ItemId:列表的Item Id
DesUrl:包含属性文件的绝对Url如:http://Server_Name/Site_Name/Lists/List_Name/Attachments/Item_ID/FileName.
在此情况下,可以用程序获得的此Url
XmlNode ndAttach = listService.GetAttachmentCollection("List_Name", "1");
XmlNodeList ndsAttach = ndAttach.ChildNodes;
for (int i=0; i<ndsAttach.Count; i++)
{
string delUrl = ndsAttach[i].InnerText;
listService.DeleteAttachment("List_Name", "1", delUrl);
}

DeleteList(string)删除指定的列表
ListName:列表名
XmlNode GetAttachmentCollection(string,string)返回列表指定Item的属性集合的Urls
ListName:列表名
ItemId:此列表的ItemId。
xmlNode GetList(string)以XML格式返回指定的列表
listname 列表名
xmlNode GetListAndView(string,string)以xml格式为指定列表返回链接和视图
listname:列表名
viewname:试图名
xmlNode GetListCollection()返回一个站点所有列表的名字和GUID
xmlNode GetListItemChanges(string,System.Xml.XmlNode,string,System.Xml.XmlNode)
listname:列表名
viewFields :A ViewFields element that specifies which fields to return in the query and in what order, and that can be assigned to a System.Xml.XmlNode object
since A string that contains the date and time in Coordinated Universal Time (UTC) ISO8601 format from which to start retrieving changes in the list. The value of this parameter is typically retrieved from a prior SOAP response. If this value is null, the query returns all items in the list
contains A Contains element that defines custom filtering for the query and that can be assigned to a System.Xml.XmlNode object,


Meetings service
提供了创建和管理会议工作区的方法。
System.Xml.XmlNode AddMeeting ( String organizerEmail , String uid , UInt32 sequence , System.DateTime utcDateStamp , String title , String location , System.DateTime utcDateStart , System.DateTime utcDateEnd , System.Boolean nonGregorian )在会议工作区增加一次会议
organizerEmail:会议组织者的Email地址 格式:email_address@domain.ext
uid:日历组件的GUID
sequence:一个int值,用来决定更新顺序,如果顺序与当前顺序相同,将应用最新的更新。
utcDateStamp:实例化iCalender的日期和时间
title:会议标题
location: 会议地点
utcDateStart:会议开始的日期和时间 (以UTC格式表达)
utcDateEnd:会议结束的日期和时间 (以UTC格式表达)
nonGregorian:如果日期的设置格式不同于Gregorian为true,否则false
System.Xml.XmlNode AddMeetingFromICal (String organizerEmail , String icalText )在Wss中,使用会议工作区创建一个网络、日历格式的会议
organizerEmail:会议组织者的Email
icalText:iCal(Internet Calendar)代表了与此会议工作区相关的会议
System.Xml.XmlNode CreateWorkspace (String title , String templateName ,UInt32 lcid , WssWebService.Meeting.TimeZoneInf timeZoneInformation )在指定的Wss服务器上建立一个新的会议工作区自站点。
Title:新的会议工作区的标题
templateName:建立新的会议工作区所使用的模版,可以用过查看Wss模版使用指南来指定配置模版
lcid:站点建立时您想使用的Lcid(Local identifier)
timeZoneInformation:站点建立时,您想使用的时间区域信息
void DeleteWorkspace()从指定的Wss服务器上删除会议工作区
System.Xml.XmlNode GetMeetingsInformation ( System.UInt32 requestFlags ,UInt32 lcid )此方法列出了Wss服务器上支持的语言和模版 信息。同时指出了调用者在此会议工作区内是否有管理子站点的权限。例如:匿名访问权限等。
Lcid:您想限制的结果集的本地Id (local identifier)
requestFlags:可能是一个或多个下面的标记
canCreateMeetings:返回ture or false 表明是否有ManageSubSite的权限
templateLanguages:返回列表可用的语言模版
templateList:返回本地会议工作区可用的模版
workspacestatus:返回会议工作区的信息
System.Xml.XmlNode GetMeetingWorkspaces ( System.Boolean recurring )在指定的站点上返回所有会议工作区的列表。
Recurring:true表示会议可重复。
void RestoreMeeting ( System.String uid )导入并重新链接一个以前移除的会议。
Uid:日历组件的GUID
Void SetAttendeeResponse (String attendeeEmail , System.UInt32 recurrenceId , String uid , System.UInt32 sequence , System.DateTime utcDateTimeOrganizerCriticalChange , System.DateTime utcDateTimeAttendeeCriticalChange , WssWebService.Meeting.AttendeeResponse response )设置与会者的应答信息。
attendeeEmail The e-mail address, specified as email_address@domain.ext, for the responding user.
recurrenceId The recurrence ID for the meeting. For single instance meetings, this parameter can be set to zero.
response The response from the responding user (responseAccepted, responseTentative, or responseDeclined).
sequence An integer used to determine the ordering of updates in case they arrive out of sequence. Updates with a lower-than-current sequence are discarded. If the sequence is equal to the current sequence, the latest update will be applied.
uid A persistent GUID for the calendar component.
utcDateTimeOrganizerCriticalChange This parameter is ignored in this release, therefore, this parameter can be a default date time.
utcDateTimeAttendeeCriticalChange The date and time that the instance of the attendee object was created, expressed in Coordinated Universal Time
void SetWorkspaceTitle ( System.String title ) 设置会议工作区的标题
title:新的标题!
void UpdateMeeting ( System.String uid , System.UInt32 sequence , System.DateTime utcDateStamp , System.String title , System.String location , System.DateTime utcDateStart , System.DateTime utcDateEnd , System.Boolean nonGregorian )在会议工作区内更新会议的信息
uid:日历组件的Guid
sequence An integer used to determine the ordering of updates in case they arrive out of sequence. Updates with a lower-than-current sequence are discarded.
utcDateStamp The date and time that the instance of the iCalendar object was created in UTC format.
Title:会议标题
Location:会议地址
utcDateStart:会议开始的日期和时间 (以UTC格式表达)
utcDateEnd:会议结束的日期和时间 (以UTC格式表达)
nonGregorian:如果日期的设置格式不同于Gregorian为true,否则false
System.Xml.XmlNode UpdateMeetingFromICal ( System.String icalText , System.Boolean ignoreAttendees )
icalText The iCal representation of the updated meeting.
ignoreAttendees true if you want to skip processing of attendee information in the iCal; otherwise, false.


Permissions service
为一个站点或列表提供权限的管理
AddPermission()为站点上已存在的用户组修改权限级别,或者增加或修改指定列表的用户、用户组、跨站点用户组的访问权限。
AddPermissionCollection()为一个站点或列表的权限结合增加一些权限
GetPermissionCollection()返回站点或列表的权限集合
RemovePermission()从站点或列表中移出指定的权限
RemovePermissionCollection()从站点或列表中移出指定成员的访问权限。
UpdatePermission()为站点或列表修改指定的权限

Site Data service
返回站点的原数据或者列表的原数据
EnumerateFolde()返回一个文件夹里的文件或自文件夹的信息
GetAttachments()返回SharePoint 站点中列表的指定项的所有附件
GetList()返回指定 列表的源数据
GetListCollection()返回当前站点的所有列表信息
GetListItems()对指定的列表执行一次查询。
GetSite()返回站点的原数据、当前站点集合中子站点的信息,站点上跨站点用户组的信息,以及每个用户组的成员
GetSiteAndWeb()返回指定站点的子站点的绝对Url以及 高一级的父站点的Url
GetWeb()返回站点及列表的元数据,以及当前站点及站点用户组的信息。

Sites Service
在虚拟服务器上,返回站点模版集合的信息
GetSiteTemplates()返回精确的站点集合的信息,以及虚拟服务器上站点的模版

Users and Groups Service
提供了用户、用户组、跨站点用户组的工作
AddGroup()向当前站点集合中增加一个跨站点用户组
AddGroupToRole()向指定的站点增加一个跨站点用户组。
AddRole()向当前站点集合中增加一个站点用户组
AddUserCollectionToGroup()向指定的跨站点用户组增加一个用户集合
AddUserCollectionToRole()向指定的用户组增加

Views Service
提供列表试图的工作方法
AddView()为指定的列表 增加一个试图
DeleteView()删除指定列表的指定试图
GetView()获取指定列表的制定试图的架构
GetViewCollection()返回指定列表的试图集合的显示名、内部名、以及Urls
GetViewHtml()返回指定列表制定试图的完整的架构,包括Html部分
UpdateView()修改指定列表的指定试
UpdateViewHtml()用提供的属性及值修改指定的视图,包括:CAML的显示属性及HTML


Web Part Pages Service
从XML Web Service 获取数据或者给XML Web Service 发送数据
AddWebPart()向WebPart 页面中增加一个新的WebPArt
DeleteWebPart()删除一个WebPart
GetWebPart()返回WebPart的XML数据
GetWebPartCrossPageCompatibility()在目标网页上返回所有的WebPart的相容性providerPartID信息
GetWebPartPageConnectionInfo()返回在同一页面中包含的 所有部分的接口及组信息以及各部分之间的相容性信息
GetWebPartPageDocument()返回一个WebPart页面,连同WebPart、属性、以及各个WebParts区域信息
GetWebPartProperties()返回一个Webpart 页面所有的WebPart的XMl字符串
GetXmlDataFromDataSource()Returns the XML from a data retrieval service
SaveWebPart()保存对WebPart的更改
GetAllSubWebCollection()

Webs Service
提供对站点或子站点的工作方法。
GetAllSubWebCollection()在当前的站点集合中返回所有站点的标题和Urls
GetListTemplates()返回当前站点模版的集合
GetWeb()返回一个站点的属性(例如:Name、description、theme等)
GetWebCollection()返回当前站点的所有子站点的标题和Url
WebUrlFromPageUrl()返回指定页面上一级页面的URL

4.SharePoint 事件分析
主要功能:
(1) 提供共享信息
(2) 在选定的时间段内周期性的执行事务
(3) 可以与Outlook结合发送通知
属性描述
属性描述:
? 标题(Title):事件的标题
? 事件创建者(EventCreater):事件的创建者
? 用户群体(EvnetUserGroup):与此事件相关的人员
? 开始时间(StartTime):事件开始执行的时间
? 结束时间(EndTime):事件执行结束时间
? 事件说明(EventDescription):对此次事件的说明
? 事件发生地点(EvnetAddress):事件发生的地点
? 事件执行周期描述:
? 无模式:在指定的时间上执行一次就结束
? 每日:可以选择每隔几天发生一次
? 每周:可以选择星期几发生
? 每月:可以选择每隔几个月第几天发生;也可以选择每隔几个月的第几个星期几发生。
? 每年:
? 以上(除无模式)都可以选择总共发生的次数;结束日期;或者无结束日期
用户界面
? 事件列表
(1) 提供事件标题、创建人、创建日期、以及事件描述
(2) 提供对事件的操作按钮如:创建、删除、编辑、导出,发送事件信息等
(3) 事件查询:根据不同的筛选条件查询事件
? 新建事件界面:(空白模式)列出所有要填写的信息
? 编辑事件界面(重现以上界面,但要读出以前填写的信息)
? 日历表形式界面(显示一个日历)
? 发送通知界面(给相关人员发送通知)
? 查看事件信息
流程
(1):填写事件信息
组件
(1) 事件访问组件(提供增加事件,删除事件(判断权限)、修改事件、以及根据不同条件选择事件)
(2) 事件触发组件(首先读取当天要发生的事件,在检测发生时间)
(3) 导入OutLook,自动发送邮件
数据访问
(1)提供增、删、改、查等功能。
数据层
(1) 事件信息表(EventInfomation)
EventId int 事件编号
Title varchar(200) 标题
Creater int 创建者Id
Usergroup int 用户群体Id
EventDescription varchar(500) 事件说明
EventAddress varchar(500) 事件发生地
LastModificationTime DateTime 最近修改时间
EventType int 事件类型号

(2) 事件发生时间和发生周期(EventExcute)
EventId int 事件Id
StartTime DateTime 开始时间
EndTime DateTime 结束时间
EventPeriod 特定描述字符串例如:SPPS数据库中描述的<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><daily dayFrequency=\'1\' /></repeat><repeatInstances>10</repeatInstances></rule></recurrence> 发生周期
RepeatNum int 事件发生次数(-1)为无限制
或者按结束时间计算。为(0)事件结束
(3) 事件附件表(EventAttachment)
AttachmentId int 附件ID
AttachmentPosition varchar(100) 附件存储位置
EventId int 附件所属事件Id
(4) 事件类型表
EventTypeId int 事件类型
TypeDescription varchar(500) 类型描述
TypeTitle varchar(200) 类型标题

(5) SORT用户表
(6) SORT用户群体表
视图
(1)事件细节(EventDetial):合并表(1~3)主要功能是提供读取事件信息用的
存储过程:
(1) sp_AddEvent(所有需要填写的参数)
(2) sp_AddAttachment(增加附件)
(3) sp_DeleteEventById(级联删除事件所有信息)
(4) sp_UpdataEvent(修改事件)
(5) sp_SelectEventByTitle(根据标题选择事件)
(6) sp_SelectEventByCreater(根据创建者选择事件)
(7) sp_SelectEventByCreateTime(根据创建时间选择事件)
(8) sp_SelectEventByAddress(根据地点选择事件)

#6 作者:胡涛 2004-11-17 16:18:00)


四、开发相关资源
开发工具:VS.NET 2003,另需外加SPS开发工具包
WebPart Templates for VS.NET
http://www.microsoft.com/downloads/details.aspx?FamilyID=cac3e0d2-bec1-494c-a74e-75936b88e3b5&DisplayLang=en

spswebpartdeveloper


1. WEB部件开发
方法见http://blog.joycode.com/kaneboy/posts/21140.aspx
http://blog.joycode.com/joy/posts/20523.aspx
2. 流程定制开发
方法见http://blog.joycode.com/kaneboy/posts/21800.aspx
http://www.erist.com/Articles/ShowArticle.aspx?ArticleID=183
3. Office Research Service开发
方法见http://blog.joycode.com/kaneboy/posts/13869.aspx
http://blog.joycode.com/joy/posts/16105.aspx


SPS开发相关站点
论坛http://msd2d.com
http://www.skillart.com/bbs/index.asp

博客站
http://blog.joycode.com/kaneboy/
http://dog.xmu.edu.cn/index.php

MSDN开发资料
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_sp2003_ta/html/sharepoint_northwindwebparts.asp
SharePoint Service 2003 SDK
http://www.microsoft.com/downloads/details.aspx?FamilyID=1c64af62-c2e9-4ca3-a2a0-7d4319980011&DisplayLang=en

国内的开发者站点:
情升网络http://www.erist.com/Articles/ChannelIndex.aspx?ChannelID=9
技艺网络http://www.skillart.com/News/2j.asp?id=62



posted on 2007-11-23 17:27  山 前  阅读(740)  评论(1编辑  收藏  举报