shins****@users*****
shins****@users*****
2006年 3月 31日 (金) 22:38:10 JST
Update of /cvsroot/jetspeed-japan/jetspeed-2-trans/ja/xdocs/guides In directory sf-cvs:/tmp/cvs-serv23284/ja/xdocs/guides Modified Files: guide-ajax-api.xml Log Message: submitted by KATOH Yasufumi jetspeed-2-trans/ja/xdocs/guides/guide-ajax-api.xml 1.1.1.1 -> 1.2 (modified) http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/jetspeed-japan/jetspeed-2-trans/ja/xdocs/guides/guide-ajax-api.xml.diff?r1=1.1.1.1&r2=1.2 =================================================================== RCS file: jetspeed-2-trans/ja/xdocs/guides/guide-ajax-api.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- guide-ajax-api.xml 2005/12/16 03:43:36 1.1.1.1 +++ guide-ajax-api.xml 2006/03/31 13:38:10 1.2 @@ -1,543 +1,989 @@ -<?xml version="1.0"?> -<!-- -Copyright 2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<document> - <properties> - <title>AJAX XML API</title> - <subtitle>Documentation for Jetspeed-2 AJAX XML API</subtitle> - <authors> - <person name="David Sean Taylor" email="taylo****@apach*****"/> - </authors> - </properties> - <body> -<section name="AJAX XML API Overview"> -<p> -The Jetspeed XML AJAX API is an XML-based API provided to AJAX clients for making -asynchronous requests to Jetspeed-2 services. </p> -<p> -Typical use cases: -</p> -<ul> - <li><b>Page Customization and Portlet Placement</b> - To move, copy, add, or remove portlets on a page</li> - <li><b>Layout Selection</b> - change the layout (number of rows and columns, size of columns) on a page</li> - <li><b>Theme and Decorator Selection</b> - change the page theme and portlet decorators on a page.</li> - <li><b>Portlet Selectors</b> - provide a select-list of portlets to the end user</li> - <li><b>Security Configuration</b> - configure the security constraints or policy on a resource (page, portlet, folder, link, fragment), or portal wide</li> - <li><b>Menu Configuration</b> - create and edit menus for the Jetspeed Site</li> - <li><b>General Administration</b> - all use cases for general administration have not yet been explored.</li> -</ul> -<subsection name='Secured Access'> -<p> -All AJAX XML API requests run through -a standard Jetspeed <a href='guide-pipeline.html'>Pipeline</a> request. This means that you can configure your AJAX -request with the usual array of Jetspeed components. The default AJAX pipeline secures -access to all requests. Each AJAX action may have its own security constraints. All -requests made to a page will use the declarative security constraints configured for that page. -AJAX request actions are enforced under edit or view mode, depending on the nature of the action. -</p> -</subsection> -</section> -<section name='API'> -<p> -The AJAX XML API is simply a HTTP request-based API, communicating over a simple REST (Representational State Transfer) protocol. -The API is accessed over HTTP via the "ajaxapi" servlet path on the portal URL: -<source><![CDATA[ -http://hostname/contextname/ajaxapi -]]></source> -</p> -<subsection name='Request Parameters and the Page'> -<p>Request Parameters specify the requested API action, and additional API parameters. -The page that a request is referencing is implied in the HTTP URL. -Thus if we are making a request to modify a page, the page is specified in the HTTP URL: -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi/Public/db-browser.psml -]]></source> -The page location algorithm using standard Jetspeed Profiling rules to locate the page. -A page is actually not required in the URL, since the <a href='guide-profiler.html'>Jetspeed Profiler</a> will locate the page -for you. Example: -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi -]]></source> -goes to the default page for the current user. -</p> -<p>Request Parameters are specific to each API. One request parameter, the "action" parameter, - is almost always required, (except in the default case). The default action is "action=getpage" -which returns an XML representation of the profile-located page in <a href='guide-psml.html'>PSML</a>. (PSML is an XML format). -See the table below for specific examples of request parameters. -</p> -<p>Here are the APIs currently available: -</p> -</subsection> -<subsection name='Get Page'> -<table> - <tr> - <td>API:</td> - <td>getpage</td> - </tr> - <tr> - <td>Component:</td> - <td>AjaxGetPage</td> - </tr> - <tr> - <td>Description:</td> - <td>Get Page retrieves a page from the Page Manager store in <a href='guide-psml.html'>PSML</a> format. - </td> - </tr> - <tr> - <td>Parameters:</td> - <table> - <tr> - <td>page</td> - <td>implied in the URL</td> - </tr> - <tr> - <td>action</td> - <td>getportlets (optional, this is the default action)</td> - </tr> - </table> - </tr> - <tr> - <td>API example:</td> - <td> -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi/Public/content.psml -]]></source> - </td> - </tr> - <tr> - <td>XML Response:</td> - <td> -<source><![CDATA[ -<js> -<status>success</status> -<action>getpage</action> - <page hidden="false"> - <defaults layout-decorator="tigris" portlet-decorator="tigris"/> - <name>public.psml</name> - <path>/Public/public.psml</path> - <title>Public Share</title> - <short-title>Public Share</short-title> - <metadata name="title" xml:lang="es">Carpeta compartida</metadata> - <fragment id="ps-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns" decorator=""> - <fragment id="ps-1001" type="portlet" name="rss::RSS" decorator=""> - <property name="row" value="0"/> - <property name="column" value="0"/> - </fragment> - <fragment id="ps-1002" type="portlet" name="demo::BookmarkPortlet" decorator=""> - <property name="row" value="1"/> - <property name="column" value="1"/> - </fragment> - <fragment id="ps-1003" type="portlet" name="jsf-demo::CalendarPortlet" decorator=""> - <property name="row" value="0"/> - <property name="column" value="1"/> - </fragment> - <fragment id="P-1080bff9b03-10000" type="portlet" name="jsf-demo::CalendarPortlet" decorator=""> - <property name="row" value="1"/> - <property name="column" value="0"/> - </fragment> - </fragment> -</page> -</js> -]]></source> - - </td> - </tr> -</table> -</subsection> -<subsection name='Move Absolute'> -<table> - <tr> - <td>API:</td> - <td>moveabs</td> - </tr> - <tr> - <td>Component:</td> - <td>AjaxMovePortletAbsolute</td> - </tr> - <tr> - <td>Description:</td> - <td>Move a portlet on a page to an absolute position specified in the row and col request parameters.</td> - </tr> - <tr> - <td>Parameters:</td> - <table> - <tr> - <td>page</td> - <td>implied in the URL</td> - </tr> - <tr> - <td>action</td> - <td>moveabs</td> - </tr> - <tr> - <td>id</td> - <td>the portlet PSML fragment id of the portlet to be moved</td> - </tr> - <tr> - <td>row</td> - <td>the absolute new row location to place the portlet fragment (zero based)</td> - </tr> - <tr> - <td>col</td> - <td>the absolute new column location to place the portlet fragment (zero based)</td> - </tr> - </table> - </tr> - <tr> - <td>API example:</td> - <td> -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=moveabs&id=ps-1003&row=0&col=1 -]]></source> - </td> - </tr> - <tr> - <td>XML Response:</td> - <td> -<source><![CDATA[ -<js> - <status>success</status> - <action>moveabs</action> - <id>ps-1003</id> - <old_position> - <col>1</col> - <row>1</row> - </old_position> - <new_position> - <col>1</col> - <row>0</row> - </new_position> -</js> -]]></source> - - </td> - </tr> -</table> -</subsection> -<subsection name='Move'> -<table> - <tr> - <td>APIs:</td> - <td>moveleft, moveright, moveup, movedown</td> - </tr> - <tr> - <td>Components:</td> - <td>AjaxMovePortletLeft, AjaxMovePortletRight, AjaxMovePortletUp, AjaxMoveDown</td> - </tr> - <tr> - <td>Description:</td> - <td>Move a portlet on a page relatively one position, based on the action.</td> - </tr> - <tr> - <td>Parameters:</td> - <table> - <tr> - <td>page</td> - <td>implied in the URL</td> - </tr> - <tr> - <td>action</td> - <td>moveleft, moveright, moveup, movedown</td> - </tr> - <tr> - <td>id</td> - <td>the portlet PSML fragment id of the portlet to be moved</td> - </tr> - </table> - </tr> - <tr> - <td>API example:</td> - <td> -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=movedown&id=ps-1003 -]]></source> - </td> - </tr> - <tr> - <td>XML Response:</td> - <td> -<source><![CDATA[ -<js> - <status>success</status> - <action>movedown</action> - <id>ps-1003</id> - <old_position> - <col>1</col> - <row>0</row> - </old_position> - <new_position> - <col>1</col> - <row>1</row> - </new_position> -</js> -]]></source> - - </td> - </tr> - -</table> -</subsection> -<subsection name='Add Portlet'> -<table> - <tr> - <td>API:</td> - <td>add</td> - </tr> - <tr> - <td>Component:</td> - <td>AjaxAddPortlet</td> - </tr> - <tr> - <td>Description:</td> - <td>Adds a new portlet to the current page. The portlet can be added at a specified row and column. - If either the row or column or not specified, defaults to zero respectively.</td> - </tr> - <tr> - <td>Parameters:</td> - <table> - <tr> - <td>page</td> - <td>implied in the URL</td> - </tr> - <tr> - <td>action</td> - <td>add</td> - </tr> - <tr> - <td>id</td> - <td>The portlet full name to be placed on the page, using Jetspeed Portlet Naming (PortletApplicationName::PortletName)</td> - </tr> - <tr> - <td>row</td> - <td>optional: the absolute new row location to place the new portlet fragment (zero based)</td> - </tr> - <tr> - <td>col</td> - <td>optional: the absolute new column location to place the new portlet fragment (zero based)</td> - </tr> - </table> - </tr> - <tr> - <td>API example:</td> - <td> -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=add&id=jsf-demo::CalendarPortlet -]]></source> - </td> - </tr> - <tr> - <td>XML Response:</td> - <td> -<source><![CDATA[ -<js> - <status>success</status> - <action>add</action> - <id>jsf-demo::CalendarPortlet</id> - <new_position> - <col>0</col> - <row>0</row> - </new_position> -</js> -]]></source> - - </td> - </tr> -</table> -</subsection> -<subsection name='Remove Portlet'> -<table> - - <tr> - <td>API:</td> - <td>remove</td> - </tr> - <tr> - <td>Component:</td> - <td>AjaxRemovePortlet</td> - </tr> - <tr> - <td>Description:</td> - <td>Removes a new portlet from the current page.</td> - </tr> - <tr> - <td>Parameters:</td> - <table> - <tr> - <td>page</td> - <td>implied in the URL</td> - </tr> - <tr> - <td>action</td> - <td>remove</td> - </tr> - <tr> - <td>id</td> - <td>the portlet PSML fragment id of the portlet to be removed</td> - </tr> - </table> - </tr> - <tr> - <td>API example:</td> - <td> -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=remove&id=ps-1003 -]]></source> - </td> - </tr> - <tr> - <td>XML Response:</td> - <td> -<source><![CDATA[ -<js> - <status>success</status> - <action>remove</action> - <id>jsf-demo::CalendarPortlet</id> - <new_position> - <col>0</col> - <row>0</row> - </new_position> -</js> -]]></source> - - </td> - </tr> -</table> -</subsection> -<subsection name='Get Portlets'> -<table> - - <tr> - <td>API:</td> - <td>getportlets</td> - </tr> - <tr> - <td>Component:</td> - <td>AjaxGetPortlets</td> - </tr> - <tr> - <td>Description:</td> - <td>Get Portlets retrieves the (sorted) portlet list available to the current subject, filtered - the portlet list, and returning portlets which the current subject may view. - The Jetspeed (JAAS) security policy enforces this filtering. Portlets are returned - in XML format, with name, displayName, and description for each portlet.</td> - </tr> - <tr> - <td>Parameters:</td> - <table> - <tr> - <td>page</td> - <td>implied in the URL</td> - </tr> - <tr> - <td>action</td> - <td>getportlets</td> - </tr> - <tr> - <td>filter</td> - <td>not yet implemented. A query filter to be defined.</td> - </tr> - - </table> - </tr> - <tr> - <td>API example:</td> - <td> -<source><![CDATA[ -http://localhost:8080/jetspeed/ajaxapi?action=getportlets -]]></source> - </td> - </tr> - <tr> - <td>XML Response:</td> - <td> -<source><![CDATA[ -<js> -<status>success</status> -<action>getportlets</action> -- - <portlets> -<portlet name="demo::AttributeScopePortlet" displayName="Attribute Scope Demo" description="$portlet.Description"> - </portlet> -<portlet name="demo::BookmarkPortlet" displayName="Bookmark Portlet" description="Bookmark Portlet"> - </portlet> -<portlet name="demo::BookmarkPortletForXHTMLBasic" displayName="Bookmark Portlet for XHTML Basic" description="Bookmark Portlet for XHTML Basic"> - </portlet> -<portlet name="demo::CSSDemoPortlet" displayName="CSS Demo Portlet" description="$portlet.Description"> - </portlet> -.... -<portlet name="rss::RSS" displayName="RSS Portlet" description="RSS Portlet"> - </portlet> -<portlet name="rss::RomeRSS" displayName="Rome RSS Portlet" description="Rome RSS Portlet"> - </portlet> -</portlets> -</js> -]]></source> - - </td> - </tr> -</table> -</subsection> -</section> - -<section name='Spring Assembly'> -<p> -The <code>AjaxRequestService</code> is a Spring component that handles AJAX requests. -It is hooked into the AJAX <a href='guide-pipeline.html'>Pipeline</a> for special processing -of AJAX request. Here is the Spring Assembly. Each API is configured in the Ajax Service. -</p> -<source><![CDATA[ -<bean id="AjaxRequestService" class="org.apache.jetspeed.ajax.AjaxRequestServiceImpl"> - <constructor-arg index="0"> - <map> - <entry key="moveabs"> - <ref bean="AjaxMovePortletAbsolute"/> - </entry> - <entry key="moveleft"> - <ref bean="AjaxMovePortletLeft"/> - </entry> - <entry key="moveright"> - <ref bean="AjaxMovePortletRight"/> - </entry> - <entry key="moveup"> - <ref bean="AjaxMovePortletUp"/> - </entry> - <entry key="movedown"> - <ref bean="AjaxMovePortletDown"/> - </entry> - <entry key="add"> - <ref bean="AjaxAddPortlet"/> - </entry> - <entry key="remove"> - <ref bean="AjaxRemovePortlet"/> - </entry> - <entry key="getportlets"> - <ref bean="AjaxGetPortlets"/> - </entry> - <entry key="getpage"> - <ref bean="AjaxGetPage"/> - </entry> - </map> - </constructor-arg> - <constructor-arg index="1"> - <ref bean="AjaxVelocityEngine"/> - </constructor-arg> -</bean> -]]></source> - -</section> -</body> -</document> - +<?xml version="1.0"?> +<!-- +Copyright 2004 The Apache Software Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<document> + <properties> + <title>[AJAX XML API] AJAX XML API</title> + <subtitle>[Documentation for Jetspeed-2 AJAX XML API] Jetspeed-2 の AJAX XML API についての文書</subtitle> + <authors> + <person name="David Sean Taylor" email="taylo****@apach*****"/> + </authors> + <translators> + <person name="加藤泰文" email="karma****@prog*****" /> + </translators> + </properties> + <body> +<section name="[AJAX XML API Overview] AJAX XML API の概要"> +<div class="original"> +<p> +The Jetspeed XML AJAX API is an XML-based API provided to AJAX clients for making +asynchronous requests to Jetspeed-2 services. </p> +</div> +<p> +Jetspeed の XML AJAX API は、AJAX クライアントが、非同期のリクエストを Jetspeed 2 サービスに送る事ができるようにするための XML ベースの API です。 +</p> +<div class="original"> +<p> +Typical use cases: +</p> +</div> +<p> +典型的な使用例としては、 +</p> +<div class="original"> +<ul> + <li><b>Page Customization and Portlet Placement</b> - To move, copy, add, or remove portlets on a page</li> + <li><b>Layout Selection</b> - change the layout (number of rows and columns, size of columns) on a page</li> + <li><b>Theme and Decorator Selection</b> - change the page theme and portlet decorators on a page.</li> + <li><b>Portlet Selectors</b> - provide a select-list of portlets to the end user</li> + <li><b>Security Configuration</b> - configure the security constraints or policy on a resource (page, portlet, folder, link, fragment), or portal wide</li> + <li><b>Menu Configuration</b> - create and edit menus for the Jetspeed Site</li> + <li><b>General Administration</b> - all use cases for general administration have not yet been explored.</li> +</ul> +</div> +<ul> + <li><b>ページのカスタマイズとポートレットの配置</b> - ページ上でのポートレットの移動、コピー、追加、削除。</li> + <li><b>レイアウトの選択</b> - ページのレイアウトの変更 (行や列の数の変更、列のサイズの変更)。</li> + <li><b>テーマとデコレータの選択</b> - ページのテーマやページ上のポートレットのデコレータの変更。</li> + <li><b>ポートレットのセレクタ</b> - エンドユーザへのポートレットの選択リストを提供。</li> + <li><b>セキュリティの設定</b> - リソース (ページ、ポートレット、フォルダ、リンク、フラグメント) もしくはポータル全体でのセキュリティ制約、またはポリシーの設定。</li> + <li><b>メニューの設定</b> - Jetspeed サイトのメニューの生成や編集。</li> + <li><b>全体的な管理</b> - 全体的な管理を行う全てはまだ提供されていません。</li> +</ul> +<subsection name='[Secured Access] 保証されたアクセス'> +<div class="original"> +<p> +All AJAX XML API requests run through +a standard Jetspeed <a href='guide-pipeline.html'>Pipeline</a> request. This means that you can configure your AJAX +request with the usual array of Jetspeed components. The default AJAX pipeline secures +access to all requests. Each AJAX action may have its own security constraints. All +requests made to a page will use the declarative security constraints configured for that page. +AJAX request actions are enforced under edit or view mode, depending on the nature of the action. +</p> +</div> +<p> +AJAX XML API リクエストの全ては、標準の Jetspeed <a href='guide-pipeline.html'>パイプライン</a>リクエストを通して実行されます。これは、通常の Jetspeed コンポーネントの配列を持った AJAX リクエストを構成可能である事を意味します。デフォルトの AJAX パイプラインは、全てのリクエストへのアクセスを保証します。AJAX アクションのそれぞれは、自身のセキュリティ制約を持ちます。ページを生成する全てのリクエストは、本来のアクションに依存する、編集もしくは閲覧モードの元で実行されます。 +</p> +</subsection> +</section> +<section name='[API] API'> +<div class="original"> +<p> +The AJAX XML API is simply a HTTP request-based API, communicating over a simple REST (Representational State Transfer) protocol. +The API is accessed over HTTP via the "ajaxapi" servlet path on the portal URL: +<source><![CDATA[ +http://hostname/contextname/ajaxapi +]]></source> +</p> +</div> +<p> +AJAX XML API は、単純な HTTP リクエストベースの API で、単純な REST (Representational State Transfer) プロトコル上での通信を行います。API へは、以下のようなポータル URL パスの "ajaxapi" サーブレット経由で HTTP を使ってアクセスします。 +<source><![CDATA[ +http://hostname/contextname/ajaxapi +]]></source> +</p> +<subsection name='[Request Parameters and the Page] リクエストパラメータとページ'> +<div class="original"> +<p>Request Parameters specify the requested API action, and additional API parameters. +The page that a request is referencing is implied in the HTTP URL. +Thus if we are making a request to modify a page, the page is specified in the HTTP URL: +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/db-browser.psml +]]></source> +The page location algorithm using standard Jetspeed Profiling rules to locate the page. +A page is actually not required in the URL, since the <a href='guide-profiler.html'>Jetspeed Profiler</a> will locate the page +for you. Example: +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi +]]></source> +goes to the default page for the current user. +</p> +</div> +<p>リクエストパラメータは、リクエストした API の動作と、追加の API パラメータを指定します。リクエストが参照しているページは、HTTP URL 内に含まれます。なので、もしページを変更するリクエストを作成したい場合、ページは以下のような HTTP URL 内で指定します。 +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/db-browser.psml +]]></source> +標準の Jetspeed プロファイリングを使ったページの配置アルゴリズムが、ページを配置します。ページは、実際は URL 中には不要です。<a href='guide-profiler.html'>Jetspeed プロファイラ</a> が、ユーザのためのページを配置するからです。例えば、 +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi +]]></source> +という URL は、現在のユーザのデフォルトページを表示します。 +</p> +<div class="original"> +<p>Request Parameters are specific to each API. One request parameter, the "action" parameter, + is almost always required, (except in the default case). The default action is "action=getpage" +which returns an XML representation of the profile-located page in <a href='guide-psml.html'>PSML</a>. (PSML is an XML format). +See the table below for specific examples of request parameters. +</p> +</div> +<p>リクエストパラメータは、API それぞれで固有です。大体の場合、"action" パラメータというリクエストパラメータだけは、必要になります (デフォルトの場合を除く)。デフォルトのアクションは "action=getpage" です。これは、<a href='guide-psml.html'>PSML</a> 内のプロファイルが示すページの XML 表現を返します (PSML は XML フォーマットです)。リクエストパラメータのそれぞれの例は以下の表を参照してください。 +</p> +<div class="original"> +<p>Here are the APIs currently available: +</p> +</div> +<p>現時点で利用可能な API を示します。</p> +</subsection> +<subsection name='[Get Page] Get Page'> +<div class="original"> +<table> + <tr> + <td>API:</td> + <td>getpage</td> + </tr> + <tr> + <td>Component:</td> + <td>AjaxGetPage</td> + </tr> + <tr> + <td>Description:</td> + <td>Get Page retrieves a page from the Page Manager store in <a href='guide-psml.html'>PSML</a> format. + </td> + </tr> + <tr> + <td>Parameters:</td> + <table> + <tr> + <td>page</td> + <td>implied in the URL</td> + </tr> + <tr> + <td>action</td> + <td>getportlets (optional, this is the default action)</td> + </tr> + </table> + </tr> + <tr> + <td>API example:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/content.psml +]]></source> + </td> + </tr> + <tr> + <td>XML Response:</td> + <td> +<source><![CDATA[ +<js> +<status>success</status> +<action>getpage</action> + <page hidden="false"> + <defaults layout-decorator="tigris" portlet-decorator="tigris"/> + <name>public.psml</name> + <path>/Public/public.psml</path> + <title>Public Share</title> + <short-title>Public Share</short-title> + <metadata name="title" xml:lang="es">Carpeta compartida</metadata> + <fragment id="ps-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns" decorator=""> + <fragment id="ps-1001" type="portlet" name="rss::RSS" decorator=""> + <property name="row" value="0"/> + <property name="column" value="0"/> + </fragment> + <fragment id="ps-1002" type="portlet" name="demo::BookmarkPortlet" decorator=""> + <property name="row" value="1"/> + <property name="column" value="1"/> + </fragment> + <fragment id="ps-1003" type="portlet" name="jsf-demo::CalendarPortlet" decorator=""> + <property name="row" value="0"/> + <property name="column" value="1"/> + </fragment> + <fragment id="P-1080bff9b03-10000" type="portlet" name="jsf-demo::CalendarPortlet" decorator=""> + <property name="row" value="1"/> + <property name="column" value="0"/> + </fragment> + </fragment> +</page> +</js> +]]></source> + + </td> + </tr> +</table> +</div> +<table> + <tr> + <td>API:</td> + <td>getpage</td> + </tr> + <tr> + <td>コンポーネント:</td> + <td>AjaxGetPage</td> + </tr> + <tr> + <td>説明:</td> + <td>getpage は、ページマネージャから、<a href='guide-psml.html'>PSML</a> に保存されたページを取得します。 + </td> + </tr> + <tr> + <td>パラメータ:</td> + <table> + <tr> + <td>page</td> + <td>URL に含まれます</td> + </tr> + <tr> + <td>action</td> + <td>getportlets (オプショナル、これがデフォルトのアクションです)</td> + </tr> + </table> + </tr> + <tr> + <td>API の例:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/content.psml +]]></source> + </td> + </tr> + <tr> + <td>XML レスポンス:</td> + <td> +<source><![CDATA[ +<js> +<status>success</status> +<action>getpage</action> + <page hidden="false"> + <defaults layout-decorator="tigris" portlet-decorator="tigris"/> + <name>public.psml</name> + <path>/Public/public.psml</path> + <title>Public Share</title> + <short-title>Public Share</short-title> + <metadata name="title" xml:lang="es">Carpeta compartida</metadata> + <fragment id="ps-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns" decorator=""> + <fragment id="ps-1001" type="portlet" name="rss::RSS" decorator=""> + <property name="row" value="0"/> + <property name="column" value="0"/> + </fragment> + <fragment id="ps-1002" type="portlet" name="demo::BookmarkPortlet" decorator=""> + <property name="row" value="1"/> + <property name="column" value="1"/> + </fragment> + <fragment id="ps-1003" type="portlet" name="jsf-demo::CalendarPortlet" decorator=""> + <property name="row" value="0"/> + <property name="column" value="1"/> + </fragment> + <fragment id="P-1080bff9b03-10000" type="portlet" name="jsf-demo::CalendarPortlet" decorator=""> + <property name="row" value="1"/> + <property name="column" value="0"/> + </fragment> + </fragment> +</page> +</js> +]]></source> + + </td> + </tr> +</table> +</subsection> +<subsection name='[Move Absolute] Move Absolute'> +<div class="original"> +<table> + <tr> + <td>API:</td> + <td>moveabs</td> + </tr> + <tr> + <td>Component:</td> + <td>AjaxMovePortletAbsolute</td> + </tr> + <tr> + <td>Description:</td> + <td>Move a portlet on a page to an absolute position specified in the row and col request parameters.</td> + </tr> + <tr> + <td>Parameters:</td> + <table> + <tr> + <td>page</td> + <td>implied in the URL</td> + </tr> + <tr> + <td>action</td> + <td>moveabs</td> + </tr> + <tr> + <td>id</td> + <td>the portlet PSML fragment id of the portlet to be moved</td> + </tr> + <tr> + <td>row</td> + <td>the absolute new row location to place the portlet fragment (zero based)</td> + </tr> + <tr> + <td>col</td> + <td>the absolute new column location to place the portlet fragment (zero based)</td> + </tr> + </table> + </tr> + <tr> + <td>API example:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=moveabs&id=ps-1003&row=0&col=1 +]]></source> + </td> + </tr> + <tr> + <td>XML Response:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>moveabs</action> + <id>ps-1003</id> + <old_position> + <col>1</col> + <row>1</row> + </old_position> + <new_position> + <col>1</col> + <row>0</row> + </new_position> +</js> +]]></source> + + </td> + </tr> +</table> +</div> +<table> + <tr> + <td>API:</td> + <td>moveabs</td> + </tr> + <tr> + <td>コンポーネント:</td> + <td>AjaxMovePortletAbsolute</td> + </tr> + <tr> + <td>説明:</td> + <td>ページ上のポートレットの絶対位置をリクエストパラメータで指定した row と col に従って移動する。</td> + </tr> + <tr> + <td>パラメータ:</td> + <table> + <tr> + <td>page</td> + <td>URL に含まれます</td> + </tr> + <tr> + <td>action</td> + <td>moveabs</td> + </tr> + <tr> + <td>id</td> + <td>移動させたいポートレットのポートレット PSML フラグメント ID</td> + </tr> + <tr> + <td>row</td> + <td>ポートレットフラグメントを置きたい位置の絶対的な行位置 (ゼロベース)</td> + </tr> + <tr> + <td>col</td> + <td>ポートレットフラグメントを置きたい位置の絶対的な列位置 (ゼロベース)</td> + </tr> + </table> + </tr> + <tr> + <td>API の例:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=moveabs&id=ps-1003&row=0&col=1 +]]></source> + </td> + </tr> + <tr> + <td>XML レスポンス:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>moveabs</action> + <id>ps-1003</id> + <old_position> + <col>1</col> + <row>1</row> + </old_position> + <new_position> + <col>1</col> + <row>0</row> + </new_position> +</js> +]]></source> + + </td> + </tr> +</table> +</subsection> +<subsection name='Move'> +<div class="original"> +<table> + <tr> + <td>APIs:</td> + <td>moveleft, moveright, moveup, movedown</td> + </tr> + <tr> + <td>Components:</td> + <td>AjaxMovePortletLeft, AjaxMovePortletRight, AjaxMovePortletUp, AjaxMoveDown</td> + </tr> + <tr> + <td>Description:</td> + <td>Move a portlet on a page relatively one position, based on the action.</td> + </tr> + <tr> + <td>Parameters:</td> + <table> + <tr> + <td>page</td> + <td>implied in the URL</td> + </tr> + <tr> + <td>action</td> + <td>moveleft, moveright, moveup, movedown</td> + </tr> + <tr> + <td>id</td> + <td>the portlet PSML fragment id of the portlet to be moved</td> + </tr> + </table> + </tr> + <tr> + <td>API example:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=movedown&id=ps-1003 +]]></source> + </td> + </tr> + <tr> + <td>XML Response:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>movedown</action> + <id>ps-1003</id> + <old_position> + <col>1</col> + <row>0</row> + </old_position> + <new_position> + <col>1</col> + <row>1</row> + </new_position> +</js> +]]></source> + + </td> + </tr> + +</table> +</div> +<table> + <tr> + <td>APIs:</td> + <td>moveleft, moveright, moveup, movedown</td> + </tr> + <tr> + <td>コンポーネント:</td> + <td>AjaxMovePortletLeft, AjaxMovePortletRight, AjaxMovePortletUp, AjaxMoveDown</td> + </tr> + <tr> + <td>説明:</td> + <td>ページのポートレットを、ある位置からの相対的なアクションを指定して移動する。</td> + </tr> + <tr> + <td>パラメータ:</td> + <table> + <tr> + <td>page</td> + <td>URL に含まれます</td> + </tr> + <tr> + <td>action</td> + <td>moveleft, moveright, moveup, movedown</td> + </tr> + <tr> + <td>id</td> + <td>移動させたいポートレットのポートレット PSML フラグメント ID</td> + </tr> + </table> + </tr> + <tr> + <td>API の例:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=movedown&id=ps-1003 +]]></source> + </td> + </tr> + <tr> + <td>XML Response:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>movedown</action> + <id>ps-1003</id> + <old_position> + <col>1</col> + <row>0</row> + </old_position> + <new_position> + <col>1</col> + <row>1</row> + </new_position> +</js> +]]></source> + + </td> + </tr> + +</table> +</subsection> +<subsection name='Add Portlet'> +<div class="original"> +<table> + <tr> + <td>API:</td> + <td>add</td> + </tr> + <tr> + <td>Component:</td> + <td>AjaxAddPortlet</td> + </tr> + <tr> + <td>Description:</td> + <td>Adds a new portlet to the current page. The portlet can be added at a specified row and column. + If either the row or column or not specified, defaults to zero respectively.</td> + </tr> + <tr> + <td>Parameters:</td> + <table> + <tr> + <td>page</td> + <td>implied in the URL</td> + </tr> + <tr> + <td>action</td> + <td>add</td> + </tr> + <tr> + <td>id</td> + <td>The portlet full name to be placed on the page, using Jetspeed Portlet Naming (PortletApplicationName::PortletName)</td> + </tr> + <tr> + <td>row</td> + <td>optional: the absolute new row location to place the new portlet fragment (zero based)</td> + </tr> + <tr> + <td>col</td> + <td>optional: the absolute new column location to place the new portlet fragment (zero based)</td> + </tr> + </table> + </tr> + <tr> + <td>API example:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=add&id=jsf-demo::CalendarPortlet +]]></source> + </td> + </tr> + <tr> + <td>XML Response:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>add</action> + <id>jsf-demo::CalendarPortlet</id> + <new_position> + <col>0</col> + <row>0</row> + </new_position> +</js> +]]></source> + + </td> + </tr> +</table> +</div> +<table> + <tr> + <td>API:</td> + <td>add</td> + </tr> + <tr> + <td>コンポーネント:</td> + <td>AjaxAddPortlet</td> + </tr> + <tr> + <td>説明:</td> + <td>現在のページに新しいポートレットを追加します。ポートレットは指定する行と列の場所に追加することが可能です。もし、行も列も指定されない場合は、デフォルトでそれぞれ 0 に設定されます。</td> + </tr> + <tr> + <td>パラメータ:</td> + <table> + <tr> + <td>page</td> + <td>URL に含まれます</td> + </tr> + <tr> + <td>action</td> + <td>add</td> + </tr> + <tr> + <td>id</td> + <td>ページに配置したいポートレットのフルネーム。Jetspeed のポートレットの命名規則を使って指定します (ポートレットアプリケーション名::ポートレット名)</td> + </tr> + <tr> + <td>row</td> + <td>オプショナル: 新しいポートレットフラグメントを置きたい場所の行位置の絶対指定 (ゼロベース)</td> + </tr> + <tr> + <td>col</td> + <td>オプショナル: 新しいポートレットフラグメントを置きたい場所の列位置の絶対指定 (ゼロベース)</td> + </tr> + </table> + </tr> + <tr> + <td>API の例:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=add&id=jsf-demo::CalendarPortlet +]]></source> + </td> + </tr> + <tr> + <td>XML レスポンス:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>add</action> + <id>jsf-demo::CalendarPortlet</id> + <new_position> + <col>0</col> + <row>0</row> + </new_position> +</js> +]]></source> + + </td> + </tr> +</table> +</subsection> +<subsection name='[Remove Portlet] Remove Portlet'> +<table> + + <tr> + <td>API:</td> + <td>remove</td> + </tr> + <tr> + <td>コンポーネント:</td> + <td>AjaxRemovePortlet</td> + </tr> + <tr> + <td>説明:</td> + <td>現在のページから新たにポートレットを削除する。</td> + </tr> + <tr> + <td>パラメータ:</td> + <table> + <tr> + <td>page</td> + <td>URL に含まれる</td> + </tr> + <tr> + <td>action</td> + <td>remove</td> + </tr> + <tr> + <td>id</td> + <td>削除したいポートレットのポートレット PSML ID</td> + </tr> + </table> + </tr> + <tr> + <td>API の例:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi/Public/public.psml?action=remove&id=ps-1003 +]]></source> + </td> + </tr> + <tr> + <td>XML レスポンス:</td> + <td> +<source><![CDATA[ +<js> + <status>success</status> + <action>remove</action> + <id>jsf-demo::CalendarPortlet</id> + <new_position> + <col>0</col> + <row>0</row> + </new_position> +</js> +]]></source> + + </td> + </tr> +</table> +</subsection> +<subsection name='[Get Portlets] Get Portlets'> +<div class="original"> +<table> + + <tr> + <td>API:</td> + <td>getportlets</td> + </tr> + <tr> + <td>Component:</td> + <td>AjaxGetPortlets</td> + </tr> + <tr> + <td>Description:</td> + <td>Get Portlets retrieves the (sorted) portlet list available to the current subject, filtered + the portlet list, and returning portlets which the current subject may view. + The Jetspeed (JAAS) security policy enforces this filtering. Portlets are returned + in XML format, with name, displayName, and description for each portlet.</td> + </tr> + <tr> + <td>Parameters:</td> + <table> + <tr> + <td>page</td> + <td>implied in the URL</td> + </tr> + <tr> + <td>action</td> + <td>getportlets</td> + </tr> + <tr> + <td>filter</td> + <td>not yet implemented. A query filter to be defined.</td> + </tr> + + </table> + </tr> + <tr> + <td>API example:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi?action=getportlets +]]></source> + </td> + </tr> + <tr> + <td>XML Response:</td> + <td> +<source><![CDATA[ +<js> +<status>success</status> +<action>getportlets</action> +- + <portlets> +<portlet name="demo::AttributeScopePortlet" displayName="Attribute Scope Demo" description="$portlet.Description"> + </portlet> +<portlet name="demo::BookmarkPortlet" displayName="Bookmark Portlet" description="Bookmark Portlet"> + </portlet> +<portlet name="demo::BookmarkPortletForXHTMLBasic" displayName="Bookmark Portlet for XHTML Basic" description="Bookmark Portlet for XHTML Basic"> + </portlet> +<portlet name="demo::CSSDemoPortlet" displayName="CSS Demo Portlet" description="$portlet.Description"> + </portlet> +.... +<portlet name="rss::RSS" displayName="RSS Portlet" description="RSS Portlet"> + </portlet> +<portlet name="rss::RomeRSS" displayName="Rome RSS Portlet" description="Rome RSS Portlet"> + </portlet> +</portlets> +</js> +]]></source> + + </td> + </tr> +</table> +</div> +<table> + + <tr> + <td>API:</td> + <td>getportlets</td> + </tr> + <tr> + <td>コンポーネント:</td> + <td>AjaxGetPortlets</td> + </tr> + <tr> + <td>説明:</td> + <td>Get Portlets は、現在のサブジェクトで利用可能な (ソートされた) ポートレットのリストを返します。ポートレットリストはフィルタリングされ、現在のサブジェクトで表示可能なポートレットが返されます。Jetspeed セキュリティポリシー (JAAS) は、このフィルタリングを実行します。ポートレット (のリスト) は、それぞれのポートレットの名前、表示名、説明の記述された XML フォーマットで返されます。</td> + </tr> + <tr> + <td>パラメータ:</td> + <table> + <tr> + <td>page</td> + <td>URL に含まれる</td> + </tr> + <tr> + <td>action</td> + <td>getportlets</td> + </tr> + <tr> + <td>filter</td> + <td>まだ実装されていません。クエリのフィルタを定義します。</td> + </tr> + + </table> + </tr> + <tr> + <td>API の例:</td> + <td> +<source><![CDATA[ +http://localhost:8080/jetspeed/ajaxapi?action=getportlets +]]></source> + </td> + </tr> + <tr> + <td>XML レスポンス:</td> + <td> +<source><![CDATA[ +<js> +<status>success</status> +<action>getportlets</action> +- + <portlets> +<portlet name="demo::AttributeScopePortlet" displayName="Attribute Scope Demo" description="$portlet.Description"> + </portlet> +<portlet name="demo::BookmarkPortlet" displayName="Bookmark Portlet" description="Bookmark Portlet"> + </portlet> +<portlet name="demo::BookmarkPortletForXHTMLBasic" displayName="Bookmark Portlet for XHTML Basic" description="Bookmark Portlet for XHTML Basic"> + </portlet> +<portlet name="demo::CSSDemoPortlet" displayName="CSS Demo Portlet" description="$portlet.Description"> + </portlet> +.... +<portlet name="rss::RSS" displayName="RSS Portlet" description="RSS Portlet"> + </portlet> +<portlet name="rss::RomeRSS" displayName="Rome RSS Portlet" description="Rome RSS Portlet"> + </portlet> +</portlets> +</js> +]]></source> + + </td> + </tr> +</table> +</subsection> +</section> + +<section name='[Spring Assembly] Spring アセンブリ'> +<div class="original"> +<p> +The <code>AjaxRequestService</code> is a Spring component that handles AJAX requests. +It is hooked into the AJAX <a href='guide-pipeline.html'>Pipeline</a> for special processing +of AJAX request. Here is the Spring Assembly. Each API is configured in the Ajax Service. +</p> +</div> +<p> +<code>AjaxRequestService</code> は、AJAX リクエストを扱う Spring のコンポーネントです。これは、AJAX リクエストの特別な処理のために、AJAX <a href='guide-pipeline.html'>Pipeline</a> 内でフックされます。以下が Spring アセンブリです。それぞれの API は Ajax サービス内で設定されます。 +</p> +<div class="original"> +<source><![CDATA[ +<bean id="AjaxRequestService" class="org.apache.jetspeed.ajax.AjaxRequestServiceImpl"> + <constructor-arg index="0"> + <map> + <entry key="moveabs"> + <ref bean="AjaxMovePortletAbsolute"/> + </entry> + <entry key="moveleft"> + <ref bean="AjaxMovePortletLeft"/> + </entry> + <entry key="moveright"> + <ref bean="AjaxMovePortletRight"/> + </entry> + <entry key="moveup"> + <ref bean="AjaxMovePortletUp"/> + </entry> + <entry key="movedown"> + <ref bean="AjaxMovePortletDown"/> + </entry> + <entry key="add"> + <ref bean="AjaxAddPortlet"/> + </entry> + <entry key="remove"> + <ref bean="AjaxRemovePortlet"/> + </entry> + <entry key="getportlets"> + <ref bean="AjaxGetPortlets"/> + </entry> + <entry key="getpage"> + <ref bean="AjaxGetPage"/> + </entry> + </map> + </constructor-arg> + <constructor-arg index="1"> + <ref bean="AjaxVelocityEngine"/> + </constructor-arg> +</bean> +]]></source> +</div> +<source><![CDATA[ +<bean id="AjaxRequestService" class="org.apache.jetspeed.ajax.AjaxRequestServiceImpl"> + <constructor-arg index="0"> + <map> + <entry key="moveabs"> + <ref bean="AjaxMovePortletAbsolute"/> + </entry> + <entry key="moveleft"> + <ref bean="AjaxMovePortletLeft"/> + </entry> + <entry key="moveright"> + <ref bean="AjaxMovePortletRight"/> + </entry> + <entry key="moveup"> + <ref bean="AjaxMovePortletUp"/> + </entry> + <entry key="movedown"> + <ref bean="AjaxMovePortletDown"/> + </entry> + <entry key="add"> + <ref bean="AjaxAddPortlet"/> + </entry> + <entry key="remove"> + <ref bean="AjaxRemovePortlet"/> + </entry> + <entry key="getportlets"> + <ref bean="AjaxGetPortlets"/> + </entry> + <entry key="getpage"> + <ref bean="AjaxGetPage"/> + </entry> + </map> + </constructor-arg> + <constructor-arg index="1"> + <ref bean="AjaxVelocityEngine"/> + </constructor-arg> +</bean> +]]></source> +</section> +</body> +</document> +