This topic has not yet been rated - Rate this topic

3.1.4.37 proc_GetTpWebMetaDataAndListMetaData

proc_GetTpWebMetaDataAndListMetaData is invoked to retrieve metadata for a particular site or list.


PROCEDURE proc_GetTpWebMetaDataAndListMetaData(
      @WebSiteId                     uniqueidentifier,
      @WebId                         uniqueidentifier,
      @Url                           nvarchar(260),
      @ListId                        uniqueidentifier,
      @RunUrlToWebUrl                bit,
      @DGCacheVersion                bigint,
      @SystemId                      varbinary(512)     = NULL,
      @MetadataFlags                 int                = 0
);

@WebSiteId: The Site Collection Identifier for a site collection containing the site.

@WebId: The Site Identifier of the site for which metadata is requested, or of the site containing the list for which metadata is requested. This parameter is ignored if the @MetadataFlags has the METADATA_WEB flag set and if values in @WebSiteId and @URL are valid.

@Url: The store-relative form URL of the site or list to retrieve metadata for.

@ListId: The List Identifier of the List for which metadata is requested. This parameter is optional and MUST be NULL if no List metadata is required.

@RunUrlToWebUrl: A bit flag specifying whether the @URL parameter is for a site or for a list within a site. If this value is set to "1", the value in @URL is for a list, and MUST be converted to a store-relative form URL for the containing site.

@DGCacheVersion: The version number of the Domain Group Map Cache in the WFE. This can be compared with the Domain Group Map Cache version number on the BEDS returned in the Domain Group Cache Versions Result Set to determine whether updates are needed. A @DGCacheVersion value of -2 specifies that information about the Domain Group Map Cache is not requested, and the Domain Group Cache BEDS Update Result Set and the Domain Group Cache WFE Update Result Set MUST NOT be returned.

@SystemId: The SystemId of the current user requesting the metadata.

@MetadataFlags: A bit field used to determine the types of metadata returned by this procedure. The only valid values of the Metadata Flags bits are specified as follows:

Symbolic name, Value Description

METADATA_NONE,

0x00000000

Do not provide any metadata.

METADATA_FETCH_VIEWS,

0x00000001

Retrieve List Views. This flag is set in combination with METADATA_LISTMETADATA_NOFETCH and the @ListID variable and will result in the List Web Parts Result Set.

METADATA_PREFETCH_SCOPES, 0x00000002

Retrieve security scopes. If this flag is set and @ListId is not NULL and Metadata_ListMetadata_NoFetch is not set, the UniqueListScope Result Set will be returned.

The Unique Permissions Result Set is also returned when set in combination with METADATA_USERINFOLIST and METADATA_USERINFOLIST_NOFETCH is not set, and ListID is NULL or is not equal to the UserInfo ListID.

METADATA_SAVE_SCOPE_DATA, 0x00000004

Save scope data. This flag is currently unused.

METADATA_FIGURE_TYPE,

0x00000008

Setting this flag in combination with NULL ListID will result in retrieving the ListID values directly from the Docs table.

METADATA_WEB,

0x00000010

Retrieve information pertaining to the provided Site information. This flag is used in combination with other flags to further define the set or sets of information to be retrieved.

METADATA_URL,

0x00000020

Setting this flag will populate the ListId column for all results, including those which are not list items.

When used in combination with a valid @WebSiteId, if @ListId is NULL or doesn't match the List contained within the Site identified by @WebSiteId, the Document Metadata Result Set is returned.

METADATA_USERINFOLIST,

0x00000040

Return User information. Setting this flag when METADATA_USERINFOLIST_NOFETCH is not set opens the option for List Metadata Result Set, List Permissions Result Set, Event Receivers Result Set, and the List Web Parts Result Set.

METADATA_USERINFOLIST_FULL, 0x00000080

Return full User information. Setting this flag in combination with METADATA_USERINFOLIST when METADATA_USERINFOLIST_NOFETCH, is not set, along with a valid Site Identifier in @WebSiteId, where @ListId is NULL or doesn't match a list identifier contained within the Site specified by @WebSiteId, returns the Event Receivers Result Set and the List Web Parts Result Set.

METADATA_WEB_PROP,

0x00000100

Return web data. Setting this flag in combination with METADATA_WEB will retrieve the Web Category Result Set and Web Metainfo Result Set.

METADATA_WEB_FEATURES,

0x00000200

Return Web features. Setting this flag in combination with METADATA_WEB will retrieve the Web Feature List Result Set.

METADATA_WEB_NAVSTRUCT, 0x00000400

Return Navigation Structure. Setting this flag in combination with METADATA_WEB will retrieve the Unique Permissions Result Set.

METADATA_LISTMETADATA_NOFETCH, 0x00000800

Do not return List metadata. Setting this flag will suppress the retrieval of the List Metadata Result Set, Unique Permissions Result Set, Event Receivers Result Set and the List Web Parts Result Set using the List identification parameters.

METADATA_USERINFOLIST_NOFETCH, 0x00001000

Do not return User information. Setting this flag will suppress the retrieval of the List Metadata Result Set, Unique Permissions Result Set, Event Receivers Result Set and the List Web Parts Result Set using the User identification parameters.

METADATA_URL_REALLY,

0x00002000

Return single document metadata. Setting this flag will return the Document Metadata Result Set.

METADATA_WEB_WELCOMEPAGE,

0x00004000

Redirect welcome page. Setting this flag in combination with METADATA_WEB will retrieve the Redirect URL Result Set.

Return Values: The proc_GetTpWebMetaDataAndListMetaData stored procedure returns an integer return code ,which MUST be in the following table:

Value Description

0

Successful operation.

1

Cross Site attack detected.

2

The attempt to retrieve a redirected URL failed.

3

The specified URL was not found.

1168

The site collection specified by @WebSiteId was not found.

1271

Access to the site is blocked because the site collection is locked.

The proc_GetTpWebMetaDataAndListMetaData stored procedure returns up to 27 result sets, depending on the state of the input parameters.

Did you find this helpful?
(1500 characters remaining)