sharepoint对象模型及相关属性

上传人:野鹰 文档编号:1134823 上传时间:2017-05-29 格式:TXT 页数:8 大小:9.13KB
返回 下载 相关 举报
sharepoint对象模型及相关属性_第1页
第1页 / 共8页
sharepoint对象模型及相关属性_第2页
第2页 / 共8页
sharepoint对象模型及相关属性_第3页
第3页 / 共8页
sharepoint对象模型及相关属性_第4页
第4页 / 共8页
sharepoint对象模型及相关属性_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《sharepoint对象模型及相关属性》由会员分享,可在线阅读,更多相关《sharepoint对象模型及相关属性(8页珍藏版)》请在金锄头文库上搜索。

1、sharepoint对象模型及相关属性首先介绍关于SharePoint对象模型的开发简单的入门SharePoint对象模型概述一些基本对象Farm, Service, Web Application, Site, WebList, View, Field, Item几个主要功能文件结构权限系统查询集合(Collection)很多对象都有集合SPWebSPWebCollectionSPList - SPListCollection操作Get:xxCollectionidx, xxCollection.GetxxxByxxxAdd: xxCollection.AddDel: xxCollectio

2、n.Delete, xx.Delete, xx.RecycleUpdate: xx.Update集合(Collection)向下访问site.AllWebsweb.Listslist.Views向上访问web.Sitelist.ParentWebview.ParentList四种Urlabsolute urlmossserver-relative url/sites/myweb/doc/folder/file.docxx.ServerRelativeUrlsite-relative urldoc/folder/file.docxx.Urlrelative urlfile.doc (base =

3、 folder)服务器场SPFarmSPFarm.Local 当前服务器场内容服务SPWebServiceSPWebService.ContentService 当前内容服务webService.WebApplicationsWeb应用程序SPWebApplicationwebApp.Sites网站的获取通过SPSite的构造函数获取网站集使用absolute urlsite.AllWebsidxsite.RootWebsite.OpenWeb()顶级站点与子站点SPContext.Current在Context环境下使用最经常用到的容器列表:web.Lists文件:web.Files文件夹:

4、web.Folders用户:web.Users组:web.Groups回收站:web.RecycleBinSPListSharePoint中最主要的数据容器内容list.Itemslist.Viewslist.Fieldslist.Folders(*)SPList几个属性BaseType和BaseTemplateRootFolder列表的获取web.Listsidxweb.GetList()server-relative urlweb.GetListFromUrl()web.GetListFromWebPartPageUrl()site-relative urlweb.GetListsOfTy

5、pe()SPView显示的渠道视图包含Query:筛选和排序ViewFields:显示的字段SchemaXml:基本设置ViewBody等:显示样式Url:视图的地址SPView获取list.ViewsidxGuid, index, namelist.GetView()Guidweb.GetViewFromUrl()server-relative urlSPFieldSPField (Base Class)SPFieldTextSPFieldComputedSPFieldMultiChoiceSPFieldChoiceSPFieldLookupSPFieldUserSPField几个属性Tit

6、le(显示名称)和InternalName(内部名称)Type: 型SchemaXml:基本设置获取fieldsidxindex, display namefields.GetField()fields.GetFieldByInternalName()SPListItem获取itemsidxitems.GetItemById(), list.GetItemById()list.GetItemByUniqueId()list.GetItems()items.Add() - modify - item.Update()SPFile和SPFolder获取web.GetFile(), web.GetF

7、older()web.RootFolder, list.RootFolder(*)folder.Files, folder.SubFoldersforeach 要 权限的列表SPDocumentLibrarySPList属性IsCatalog: 的一些模 Web部件 下 介绍一个简单的Demo访问文 有的文件和文件夹SPWeb web = (new SPSite(http:/moss/sites/hello).OpenWeb();SPDocumentLibrary doclib = (SPDocumentLibrary)web.Lists 文 ;doclib.Lists.IncludeRoot

8、Folder = true;GoThroughDocLib(doclib, doclib.RootFolder, 0);static void GoThroughDocLib(SPDocumentLibrary doclib, SPFolder folder, intlevel)SPListItemCollection items = doclib.GetItemsInFolder(doclib.DefaultView, folder);if (items.Count = 0)return;for (int i = 0; i level; i+)Console.Write( );foreach

9、 (SPListItem item in items)if (item.FileSystemObjectType = SPFileSystemObjectType.Folder)Console.WriteLine(0, item.Name);GoThroughDocLib(doclib, item.Folder, level + 1);elseConsole.WriteLine(item.Name);Moss :Windows SharePoint Services 名:Microsoft.SharePoint SPSite 功能: Represents a collection of sit

10、es on a virtual server, including a top-level siteand all its subsites. 表一个服务器的网站集合包含一个顶集网站和的 有子站点Windows SharePoint Services 名:Microsoft.SharePointSPSite功能:Represents a collection of sites on a virtual server, including a top-level siteand all its subsites.表一个服务器的网站集合包含一个顶集网站和的 有子站点AllWebs:属性表示上 cu

11、rrency1的网站集合Quota:网站“用户的限IISAllowsAnonymous:IISfifl 名 PortalUrl:网站 在的门户网站的URL对于WSS网站 fiURL:网站 在的网址SPWeb功能:Represents a SharePoint site.表SharePoint的一个网站Alerts: 有通的集合AllUsers:表 有用户对象的集合个用户”fi网站的用户”fi经过 的用户Configuration:用 站点的 置IDDocTemplates:网站 用的文 模EmailInsertsEnabled:取表 网站的文 fifl收Excahnge的 文件件中的件Even

12、tHandlersEnabled:取网站的文 fifl收件 Files:取网站 下 有的文件Folders:取站点 有 一级文件夹Groups:取站点站点的组IncludeSupportingFolders:取设置在站点中的文件夹文件夹中的文件fifl IsADAccountCreationMode:取访问站点的用户fifl 在 户IsRootWeb:取站点fifl 站点集中的 一级站点Lists:取在站点中 有列表的集合Modules:取在站点中使用的模 PortalMember:fifl与Portal相关 PortalSubscriptionUrl:一 URL Portal 中的Alert

13、sPresenceEnabled:取设置fifl 用户在 Properties:属性集合集合中包含WSS的 本地 PublicFolderRootUrl:取文 收 文件夹中件件的URLRoles:取站点的用户组SiteGroups:取网站集合的网站组SiteUsers:取站点集合的 有用户Users:取站点的用户集合Microsoft.SharePoint.SPWeb.ViewStyles:取站点的视图样式Webs:取在站点”下 有子站点的集合SPAlert功能:Represents an alert, which generates periodic e-mail notifications

14、 sent to a user about the list, list item, document, or document library to which the alertapplies.表一个通 一个的e-mail通发 到用户 发 与通关 的列表列表 文 文 等的 SPAlertFrequency:通发 的 一 一 发 SPEventType:件 型:部 Item:通属于的列表 文 List:通 属的列表文 User:到通的SPListRepresents a list on a SharePoint Web site.表SharePoint 网站中的一个列表AllowDeleti

15、on:列表fifl AllowMultiResponses: 查fifl 多 见 查属于列表的一种AnonymousPermMask:fifl 名用户访问BaseTemplate: 列表基于的模 型,模 型有通 系 表格 数据源 文 件 列表 不合法列表 问题跟踪 链 列表模 图片 查 任务 Web部件 网站模 Xml表格 BaseType:列表的基本 型 型有: 文 列表 问题跟踪 查 无 型 没有使用的DefaultView: 视图Direction:阅的方向EnableAttachments:fifl 添件EnableModeration:fifl 要审批EnableVersioning:fifl 本EventSinkAssembly: 件通程序集的强名称EventSinkClass: 件通 名称EventSinkData:文 的件通中的任currency1字符串ExcludeFromTemplate:当列表被存成模时fifl包含内容Fields:列表中字段的集合Forms:在列表中用 显示 编辑

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 研究报告 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号