Moss Object Model

Source: Internet
Author: User
Tags configuration settings

1.Everyone knowsWindows SharePoint ServicesProvides a highly structured server-side object model that allows you to easily access the representationSharePointAll aspects of the website. You can start from an object with a higher level and step through the object hierarchy to obtainCode. Next, I willServer ArchitectureAndWebsite Architecture ModelApplication Details:

Entry Point

2.Based on the custom application to be createdProgramType or solution type. You can use different entry points to enter the object model to obtain the appropriate object from which you want to start operations. For example, you can use staticContentservice Property returns the current web service object and its web application set. To modify the settings in the Web application management, useAdministrationserviceAttribute. SlaveMicrosoft. Sharepoint. Administration. spperistedobjectcollectionA collection class derived from a class inherits the getvalue method. You can use this method to return specific objects from the set.

Note:

You can useMicrosoft. Sharepoint. spcontext To obtain the current website set, website, or list. In/_ Layouts After a web application is created in the virtual directory, the function of this application can be used for all websites on the Web server. UseSpsite Class constructor to obtain a specific website set and access each object in the website set. For more information, seeObtainReferences of applications and other key objects.

Server Architecture

Display andMicrosoft. Sharepoint. Administration The Windows SharePoint Services server architecture related to the collection and objects of the namespace.

  1. Spfarm Objects are at the highest level in the Windows SharePoint services object model hierarchy.Servers Attribute acquisition indicates the set of all servers in the deployment.ServicesAttribute acquisition indicates the set of all services.
  2. EachSpserver All objects represent a physical server computer.ServiceinstancesAttribute to access a single service instance set running on a single computer.
  3. EachSpservice All objects represent a logical service or application installed on the server farm. The service object provides access permissions for the server farm range of the Server Load balancer Service (implemented by the corresponding service instance. The derived types of the spservice class include (example) for Windows Services (such as timer service, search, Microsoft SQL Server, and database service) and the objects used for web services (such as services in Windows SharePoint Services or Microsoft Office System.
  4. Spwebservice Objects provide access permissions for configuration settings of specific logical services or applications.Webapplications Property to obtain the set of web applications that run the service.
  5. Spdatabaseserviceinstance Object indicates a single instance of the Database Service Running on the server computer. The spdatabaseserviceinstance class is derived fromSpserviceinstance Class, so it inheritsServiceAttribute, which provides access permissions to the services or applications implemented by the instance.DatabasesObtain the content database set used for the service.
  6. EachSpwebapplication All objects represent a load balancing Web Application Based on Internet Information Services (IIS. The spwebapplication object provides access permissions for creden。 and other server farm applications.SitesProperty to obtain the set of websites in a web application,ContentdatabasesAttribute to obtain the set of content databases used in Web applications. The spwebapplication class replaces outdatedSpvirtualserverClass, but outdated classes are still very useful when the spwebapplication object is considered as a virtual server (that is, a server group that makes the user feel that one or more physical servers are one server.
  7. Spcontentdatabase The object is fromSpdatabase Class, indicating the database that contains user data of SharePoint web applications.SitesAttribute to obtain the collection of websites where the content database stores its data;WebapplicationProperty to obtain the parent web application.
  8. Spsitecollection An object is a collection of websites in a web application.Item The property or indexer obtains the specified website set from the set;AddMethod to create a website set in this set.

Website architecture

Display andN. Microsoft. SharePoint The Windows SharePoint Services website architecture related to the collection and objects of the namespace.

 

  1. Each spsite object indicates a group of logically associatedSpweb Object (see below), although its name is in the singular form. This type of group is usually called "website set",SpwebcollectionThe difference is that spsite is not a standard Microsoft. NET collection class. These groups contain members that can be used to manage a website set.AllwebsProperty provides access permissions for objects in the spwebcollection set that indicate all websites (including primary websites) in the website. Spsite classMicrosoft. Sharepoint. spsite. openwebMethod.
  2. Each website set contains any number of spweb objects, and each object contains members that can be used to manage the website (including its templates and themes) and access files and folders on the website. The webs attribute returns a spwebcollection object indicating all the sub-websites on the specified website;Lists Property returnsSplistcollectionObject.
  3. EachSplist Objects contain members used to manage the list or access items in the list.GetitemsYou can use this method to query a specific project.FieldsProperty returns a list of all fields or columnsSpfieldcollectionObject;ItemsProperty returnsSplistitemcollectionObject.
  4. EachSpfield All objects have members that contain field settings.
  5. EachSplistitem All objects represent a row in the list.

If you have installed Windows SharePoint Services 3.0 infrastructure Update (kb951695), the custom solution fails to call the SharePoint object model during simulated suspension. If you use Windows authentication and the Code calls the SharePoint object model from the IIS working process, the request must simulate the identity of the calling user. Although Windows SharePoint Services. net is configured to automatically simulate the call of users, but if you suspend the simulation (for example, by calling the reverttoself function of Windows API, or by calling the system. security. principal. windowsidentity. impersonate method and pass intptr. zero is the value of the User Token parameter. Even if the code is not restored to itself, Asp.. NET may be called after the code is restored to itself (this happens when the virtual path provider is implemented). If the Code does not simulate calling the user, it may not run properly.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.