CustomSite
Force.com サイトを表します。Force.com サイトでは、公開 Web サイトとアプリケーションを作成できます。それらは Salesforce 組織と直接統合されるため、ユーザがログインする場合にユーザ名やパスワードは必要ありません。詳細は、Salesforce オンラインヘルプの「Force.com サイトの概要」を参照してください。
Metadata メタデータ型を拡張し、その fullName 項目を継承します。
宣言的なメタデータファイルのサフィックスおよびディレクトリの場所
Force.com CustomSite コンポーネントは、対応するパッケージディレクトリの sites ディレクトリに保存されます。ファイル名はサイト名に一致し、拡張子は .site です。
バージョン
Force.com CustomSite コンポーネントは、API バージョン 14.0 以降で使用できます。
項目
SiteRedirectMapping
SiteRedirectMapping は、Force.com サイトの URL リダイレクトルールを表します。詳細は、Salesforce オンラインヘルプの「Force.com サイトの URL リダイレクト」を参照してください。
| 項目 | データ型 | 説明 |
|---|---|---|
| action | SiteRedirect (string 型の列挙) | リダイレクトの種別。使用可能な string 値は次のとおりです。
|
| isActive | boolean | リダイレクトの状況 (有効または無効)。 |
| source | string | リダイレクトする URL。相対 URL である必要がありますが、.html や .php など、任意の有効な種類の拡張子にできます。 |
| target | string | ユーザのアクセス先とする新しい URL。相対 URL または http:// や https:// プレフィックスを含む完全修飾 URL にすることができます。 |
SiteWebAddress
| 項目 | データ型 | 説明 |
|---|---|---|
| certificate | string | この項目は メタデータ API バージョン 36.0 では表示されますが、機能しないため、空白のままにする必要があります。 |
| domainName | string | Web サイトのドメイン。www.acme.com 形式で指定します。 |
| primary | boolean | これはプライマリドメインであるか (true)、否かを示します。false の場合は、プライマリドメインではありません。 |
宣言的なメタデータの定義のサンプル
サイトの XML 定義のサンプルを以下に示します。
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
3 <active>true</active>
4 <allowHomePage>true</allowHomePage>
5 <allowStandardIdeasPages>true</allowStandardIdeasPages>
6 <allowStandardLookups>true</allowStandardLookups>
7 <allowStandardSearch>true</allowStandardSearch>
8 <authorizationRequiredPage>Unauthorized</authorizationRequiredPage>
9 <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
10 <changePasswordPage>ChangePassword</changePasswordPage>
11 <chatterAnswersForgotPasswordConfirmPage>ChatterAnswersForgotPasswordConfirm</chatterAnswersForgotPasswordConfirmPage>
12 <chatterAnswersForgotPasswordPage>ChatterAnswersForgotPassword</chatterAnswersForgotPasswordPage>
13 <chatterAnswersHelpPage>ChatterAnswersHelp</chatterAnswersHelpPage>
14 <chatterAnswersLoginPage>ChatterAnswersLogin</chatterAnswersLoginPage>
15 <chatterAnswersRegistrationPage>ChatterAnswersRegistration</chatterAnswersRegistrationPage>
16 <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
17 <customWebAddresses>
18 <domainName>www.testing123.com</domainName>
19 <primary>true</primary>
20 </customWebAddress>
21 <favoriteIcon>myFavIcon</favoriteIcon>
22 <fileNotFoundPage>FileNotFound</fileNotFoundPage>
23 <genericErrorPage>Exception</genericErrorPage>
24 <inMaintenancePage>InMaintenance</inMaintenancePage>
25 <serverIsDown>MyServerDownResource</serverIsDown>
26 <indexPage>UnderConstruction</indexPage>
27 <masterLabel>customSite</masterLabel>
28 <portal>Customer Portal</portal>
29 <requireInsecurePortalAccess>false</requireInsecurePortalAccess>
30 <siteAdmin>admin@myco.org</siteAdmin>
31 <siteTemplate>SiteTemplate</siteTemplate>
32 <subdomain>myco</subdomain>
33</CustomSite>