ReportingService2006.MoveItem(String, String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アイテムを移動したり名前を変更したりします。
public:
void MoveItem(System::String ^ Item, System::String ^ Target);
public void MoveItem(string Item, string Target);
member this.MoveItem : string * string -> unit
Public Sub MoveItem (Item As String, Target As String)
パラメーター
- Item
- String
ファイル名と拡張子を含む、アイテムの完全限定URLです。
- Target
- String
ファイル名と拡張子を含むアイテムの新しい完全限定URLです。
例
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
class Sample
{
static void Main(string[] args)
{
ReportingService2006 rs = new ReportingService2006();
rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +
"ReportService2006.asmx";
rs.Credentials =
System.Net.CredentialCache.DefaultCredentials;
string currentPath = "http://<Server Name>/Docs/Documents" +
"/Data Sources/Sales Order Detail.rdl";
string targetPath = "http://<Server Name>/Docs/Documents/" +
"AdventureWorks Sample Reports/Sales Order Detail.rdl";
try
{
rs.MoveItem(currentPath, targetPath);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.OuterXml);
}
}
}
Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2006()
rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + _
"ReportService2006.asmx"
rs.Credentials = _
System.Net.CredentialCache.DefaultCredentials
Dim currentPath As String = "http://<Server Name>/Docs/" + _
"Documents/AdventureWorks Sample Reports/Sales Order Detail.rdl"
Dim targetPath As String = "http://<Server Name>/Docs/" + _
"Documents/Data Sources/Sales Order Detail.rdl"
Try
rs.MoveItem(currentPath, targetPath)
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
End Class
注釈
以下の表は、この操作のヘッダーおよび権限情報を示しています。
| SOAPヘッダー | (イン) TrustedUserHeaderValue (アウト) ServerInfoHeaderValue |
| 必要なアクセス許可 |
<xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>
Itemの上で、Targetの親フォルダに<xref:Microsoft.SharePoint.SPBasePermissions.AddListItems>(ターゲットの親フォルダが異なる場合)で |
アイテムが親からセキュリティポリシーを継承した場合、そのアイテムを移動するとターゲットフォルダーのセキュリティポリシーが継承されます。 もしアイテムが親からセキュリティポリシーを受け継がない場合、アイテムを移動してもセキュリティポリシーは変更されません。
ターゲットパスが指定された項目と同じSharePointサイトにない場合、rsInvalidDestinationエラーが返されます。
SharePoint ライブラリ内のアイテムの移動や名前変更は、アイテムのModifiedByおよびModifiedDateプロパティ、ソースフォルダーとターゲットフォルダーを変更します。