Portlets
ご覧のページは、お客様の利便性のために一部機械翻訳されています。また、ドキュメントは頻繁に更新が加えられており、翻訳は未完成の部分が含まれることをご了承ください。最新情報は都度公開されておりますため、必ず英語版をご参照ください。翻訳に問題がある場合は、 こちら までご連絡ください。

OSGiサービスのプロパティマップへのポートレット記述子

ここでは、OSGiポートレットを発行するためのOSGiサービスプロパティへのポートレットXML記述子の値のマップを示します。 プロパティは、ポートレット設定を一元化および簡素化します。 これらは通常、キーと値のペアとして、またはより一般的にはマップのようなオブジェクトとして表されます。

プロパティキーは、基本的にXML記述子をフラットにしたものですが、記述子の名前に似ています。

マッピングは、記述子タイプごとに編成されています。

  • 標準ポートレット記述子。 プロパティキーは、プリフィックスjavax.portletを使用します。

  • Liferay記述子記述子。 プロパティキーは、プリフィックスcom.liferay.portletを使用します。 Liferay 記述子は記述子ファイル名によってさらにグループ化されます。

    • liferay-display.xml
    • liferay-portlet.xml

標準のポートレット記述子マッピングが最初です。

ポートレット記述子のマッピング

注意: 簡潔にするために、 ポートレット XSD 4 から派生した XPath 表記が使用されています。

portlet.xml XPathOSGiポートレットサービスプロパティ
/portlet-app/container-runtime-optionportlet-appスコープではサポートされていません
/portlet-app/custom-portlet-modeサポートされていません
/portlet-app/custom-window-stateサポートされていません
/portlet-app/default-namespacejavax.portlet.default-namespace=<String>
/portlet-app/event-definitionjavax.portlet.event-definition=<QNameLocalPart>;<QNameURI>[;<PayloadType>][,<AliasQNameLocalPart>;<AliasQNameURI>] 2
/portlet-app/filter
/portlet-app/filter/init-param/name
/portlet-app/filter-mapping
3
javax.portlet.init-param.<name>=<value> 39
3
/portlet-app/public-render-parameterサポートされていません
/portlet-app/resource-bundleportlet-appスコープではサポートされていません
/portlet-app/security-constraintサポートされていません
/portlet-app/user-attributeサポートされていません
/portlet-app/versionjavax.portlet.version=<value>
/portlet-app/portlet/async-supportedjavax.portlet.async-supported=<boolean>
/portlet-app/portlet/cache-scopeサポートされていません
/portlet-app/portlet/container-runtime-optionjavax.portlet.container-runtime-option.<name>=<value> 2
/portlet-app/portlet/dependencyjavax.portlet.dependency=<name>;<scope>;<version> 26
/portlet-app/portlet/descriptionjavax.portlet.description=<String>
/portlet-app/portlet/display-namejavax.portlet.display-name=<String>
/portlet-app/portlet/expiration-cachejavax.portlet.expiration-cache=<int>
/portlet-app/portlet/init-param/namejavax.portlet.init-param.<name>=<value>
/portlet-app/portlet/listenerjavax.portlet.listener=<listener-class>;<ordinal> 28
/portlet-app/portlet/multipart-config/file-size-thresholdjavax.portlet.multipart.file-size-threshold=<Integer>
/portlet-app/portlet/multipart-config/locationjavax.portlet.multipart.location=<String>
/portlet-app/portlet/multipart-config/max-file-sizejavax.portlet.multipart.max-file-size=<Long>
/portlet-app/portlet/multipart-config/max-request-sizejavax.portlet.multipart.max-request-size=<Long>
/portlet-app/portlet/portlet-class1
/portlet-app/portlet/portlet-info/keywordsjavax.portlet.info.keywords=<String>
/portlet-app/portlet/portlet-info/short-titlejavax.portlet.info.short-title=<String>
/portlet-app/portlet/portlet-info/titlejavax.portlet.info.title=<String>
/portlet-app/portlet/portlet-name 10javax.portlet.name=<String> 10
/portlet-app/portlet/portlet-preferencesjavax.portlet.preferences=<String>
または
javax.portlet.preferences=classpath:<path_to_file_in_jar>
/portlet-app/portlet/portlet-preferences/preferences-validatorjavax.portlet.preferences-validator=<String> 1
/portlet-app/portlet/resource-bundlejavax.portlet.resource-bundle=<String>
/portlet-app/portlet/security-role-refjavax.portlet.security-role-ref=<String>[,<String>]2
/portlet-app/portlet/supported-localejavax.portlet.supported-locale=<String> 2
/portlet-app/portlet/supported-processing-eventjavax.portlet.supported-processing-event=<QNameLocalPart> または javax.portlet.supported-processing-event=<QNameLocalPart>;<QNameURI> 2
/portlet-app/portlet/supported-public-render-parameterjavax.portlet.supported-public-render-parameter=<String>2
/portlet-app/portlet/supported-publishing-eventjavax.portlet.supported-publishing-event=<QNameLocalPart> または javax.portlet.supported-publishing-event=<QNameLocalPart>;<QNameURI> 2
/portlet-app/portlet/supports/mime-typeサポートされていません
/portlet-app/portlet/supports/portlet-modejavax.portlet.portlet-mode=<mime-type>;<portlet-mode>[,<portlet-mode>]*
/portlet-app/portlet/supports/window-statejavax.portlet.window-state=<mime-type>;<window-state>[,<window-state>]*

Liferay記述子のマッピング

Liferayディスプレイ

liferay-display.xml XPathOSGiポートレットサービスプロパティ
/display/category[@name]com.liferay.portlet.display-category=<value>

Liferayポートレット

注意: 簡潔にするために、 Liferay Portlet 5 から派生した XPath 表記が使用されています。

liferay-portlet.xml XPathOSGi Liferayポートレットサービスプロパティ
/liferay-portlet-app/portlet/action-timeoutcom.liferay.portlet.action-timeout=<int>
/liferay-portlet-app/portlet/action-url-redirectcom.liferay.portlet.action-url-redirect=<boolean>
/liferay-portlet-app/portlet/activecom.liferay.portlet.active=<boolean>
/liferay-portlet-app/portlet/add-default-resourcecom.liferay.portlet.add-default-resource=<boolean>
/liferay-portlet-app/portlet/ajaxablecom.liferay.portlet.ajaxable=<boolean>
/liferay-portlet-app/portlet/application-typecom.liferay.portlet.application-type=full-page-application または com.liferay.portlet.application-type=widget2
/liferay-portlet-app/portlet/asset-renderer-factory3
/liferay-portlet-app/portlet/atom-collection-adapter3
/liferay-portlet-app/portlet/autopropagated-parameterscom.liferay.portlet.autopropagated-parameters=<String>2
/liferay-portlet-app/portlet/configuration-action-class3
/liferay-portlet-app/portlet/configuration-pathサポートされていません
/liferay-portlet-app/portlet/control-panel-entry-categorycom.liferay.portlet.control-panel-entry-category=<String>
/liferay-portlet-app/portlet/control-panel-entry-class3
/liferay-portlet-app/portlet/control-panel-entry-weightcom.liferay.portlet.control-panel-entry-weight=<double>
/liferay-portlet-app/portlet/css-class-wrappercom.liferay.portlet.css-class-wrapper=<String>
/liferay-portlet-app/portlet/custom-attributes-display3
/liferay-portlet-app/portlet/ddm-display3
/liferay-portlet-app/portlet/facebook-integrationサポートされていません
/liferay-portlet-app/portlet/footer-portal-csscom.liferay.portlet.footer-portal-css=<String>2
/liferay-portlet-app/portlet/footer-portal-javascriptcom.liferay.portlet.footer-portal-javascript=<String>2
/liferay-portlet-app/portlet/footer-portlet-csscom.liferay.portlet.footer-portlet-css=<String>2
/liferay-portlet-app/portlet/footer-portlet-javascriptcom.liferay.portlet.footer-portlet-javascript=<String>2
/liferay-portlet-app/portlet/friendly-url-mapper-class3
/liferay-portlet-app/portlet/friendly-url-mappingcom.liferay.portlet.friendly-url-mapping=<String>
/liferay-portlet-app/portlet/friendly-url-routescom.liferay.portlet.friendly-url-routes=<String>
/liferay-portlet-app/portlet/header-portal-csscom.liferay.portlet.header-portal-css=<String>2
/liferay-portlet-app/portlet/header-portal-javascriptcom.liferay.portlet.header-portal-javascript=<String>2
/liferay-portlet-app/portlet/header-portlet-csscom.liferay.portlet.header-portlet-css=<String>2
/liferay-portlet-app/portlet/header-portlet-javascriptcom.liferay.portlet.header-portlet-javascript=<String>2
/liferay-portlet-app/portlet/header-request-attribute-prefixcom.liferay.portlet.header-request-attribute-prefix=<String> 7
/liferay-portlet-app/portlet/header-timeoutheader-timeout=<int>
/liferay-portlet-app/portlet/iconcom.liferay.portlet.icon=<String>
/liferay-portlet-app/portlet/includecom.liferay.portlet.include=<boolean>
/liferay-portlet-app/portlet/indexer-class3
/liferay-portlet-app/portlet/instanceablecom.liferay.portlet.instanceable=<boolean>
/liferay-portlet-app/portlet/layout-cacheablecom.liferay.portlet.layout-cacheable=<boolean>
/liferay-portlet-app/portlet/maximize-editcom.liferay.portlet.maximize-edit=<boolean>
/liferay-portlet-app/portlet/maximize-helpcom.liferay.portlet.maximize-help=<boolean>
/liferay-portlet-app/portlet/open-search-class3
/liferay-portlet-app/portlet/parent-struts-pathcom.liferay.portlet.parent-struts-path=<String>
/liferay-portlet-app/portlet/partial-action-serve-resourcecom.liferay.portlet.partial-action-serve-resource=<boolean>
/liferay-portlet-app/portlet/permission-propagator3
/liferay-portlet-app/portlet/poller-processor-class3
/liferay-portlet-app/portlet/pop-message-listener-class3
/liferay-portlet-app/portlet/pop-up-printcom.liferay.portlet.pop-up-print=<boolean>
/liferay-portlet-app/portlet/portlet-data-handler-class3
/liferay-portlet-app/portlet/portlet-dependency-css-enabledcom.liferay.portlet.portlet-dependency-css-enabled=<boolean>
/liferay-portlet-app/portlet/portlet-dependency-javascript-enabledcom.liferay.portlet.dependency-javascript-enabled=<boolean>
/liferay-portlet-app/portlet/portlet-layout-listener-class3
/liferay-portlet-app/portlet/portlet-nameサポートされていません
/liferay-portlet-app/portlet/portlet-url-class3
/liferay-portlet-app/portlet/preferences-company-widecom.liferay.portlet.preferences-company-wide=<boolean>
/liferay-portlet-app/portlet/preferences-owned-by-groupcom.liferay.portlet.preferences-owned-by-group=<boolean>
/liferay-portlet-app/portlet/preferences-unique-per-layoutcom.liferay.portlet.preferences-unique-per-layout=<boolean>
/liferay-portlet-app/portlet/private-request-attributescom.liferay.portlet.private-request-attributes=<boolean>
/liferay-portlet-app/portlet/private-session-attributescom.liferay.portlet.private-session-attributes=<boolean>
/liferay-portlet-app/portlet/remoteableサポートされていません
/liferay-portlet-app/portlet/render-timeoutcom.liferay.portlet.render-timeout=<int>
/liferay-portlet-app/portlet/render-weightcom.liferay.portlet.render-weight=<int>
/liferay-portlet-app/portlet/requires-namespaced-parameterscom.liferay.portlet.requires-namespaced-parameters=<boolean>
/liferay-portlet-app/portlet/restore-current-viewcom.liferay.portlet.restore-current-view=<boolean>
/liferay-portlet-app/portlet/scheduler-entry3
/liferay-portlet-app/portlet/scopeablecom.liferay.portlet.scopeable=<boolean>
/liferay-portlet-app/portlet/show-portlet-access-deniedcom.liferay.portlet.show-portlet-access-denied=<boolean>
/liferay-portlet-app/portlet/show-portlet-inactivecom.liferay.portlet.show-portlet-inactive=<boolean>
/liferay-portlet-app/portlet/single-page-applicationcom.liferay.portlet.single-page-application=<boolean>
/liferay-portlet-app/portlet/social-activity-interpreter-class3
/liferay-portlet-app/portlet/social-request-interpreter-class3
/liferay-portlet-app/portlet/social-interactions-configuration3
/liferay-portlet-app/portlet/staged-model-data-handler-class3
/liferay-portlet-app/portlet/struts-pathcom.liferay.portlet.struts-path=<String>
/liferay-portlet-app/portlet/systemcom.liferay.portlet.system=<boolean>
/liferay-portlet-app/portlet/template-handler3
/liferay-portlet-app/portlet/trash-handler3
/liferay-portlet-app/portlet/url-encoder-class3
/liferay-portlet-app/portlet/use-default-templatecom.liferay.portlet.use-default-template=<boolean>
/liferay-portlet-app/portlet/user-notification-definitions3
/liferay-portlet-app/portlet/user-notification-handler-class3
/liferay-portlet-app/portlet/user-principal-strategycom.liferay.portlet.user-principal-strategy=<String>
/liferay-portlet-app/portlet/virtual-pathcom.liferay.portlet.virtual-path=<String>
/liferay-portlet-app/portlet/webdav-storage-class3
/liferay-portlet-app/portlet/webdav-storage-tokenwebdav-storage-token=<string> WebDavStorage OSGiサービスプロパティで宣言されています
/liferay-portlet-app/portlet/workflow-handler3
/liferay-portlet-app/portlet/xml-rpc-method-class3
  • [1] ポートレットは具体的なオブジェクトとして登録されます。

  • [2] これらのプロパティの倍数を使用できます。 これにより、値の配列が生成されます。

  • [3] このタイプは OSGi サービスとして登録されています。

  • [4] https://xmlns.jcp.org/xml/ns/portlet/portlet-app_3_0.xsd

  • [5] liferay-portlet-app_[バージョン].dtd

  • [6] 複数のjavax.portlet.dependencyプロパティを使用した例を以下に示します。

    旧:

    <portlet>
    	...
    	<dependency>
    		<name>jquery</name>
    		<scope>com.jquery</scope>
    		<version>2.1.1</version>
    	</dependency>
    	<dependency>
    		<name>jsutil</name>
    		<scope>com.mycompany</scope>
    		<version>1.0.0</version>
    	</dependency>
    	...
    </portlet>
    

    新:

    @Component(
        ...
        property = {
            ...
            "javax.portlet.dependency=jquery;com.jquery;2.1.1",
            "javax.portlet.dependency=jsutil;com.mycompany;1.0.0",
            ...
        }, service = Portlet.class
    )
    public class MyPortlet extends GenericPortlet {
        ...
    }
    
  • [7] com.liferay.portlet.header-request-attribute-prefixプロパティの例を以下に示します。

    旧:

    <portlet>
    	...
    	<header-request-attribute-prefix>com.mycompany</header-request-attribute-prefix>
    	...
    </portlet>
    

    新:

    @Component(
        property = {
            ...
            "javax.portlet.dependency=jsutil;com.mycompany;1.0.0",
            "com.liferay.portlet.header-request-attribute-prefix=com.mycompany",
            ...
        }, service = Portlet.class
    )
    public class MyPortlet extends GenericPortlet {
        ...
    }
    
  • [8] javax.portlet.listenerプロパティの例を以下に示します。

    旧:

    <portlet>
        ...
        <listener>
            <listener-class>com.mycompany.MyPortletURLGenerationListener</listener-class>
            <ordinal>1</ordinal>
        </listener>
        ...
    </portlet>
    

    新:

    @Component(
        property = {
            ...
            "javax.portlet.listener=com.mycompany.MyPortletURLGenerationListener;1",
            ...
        }, service = Portlet.class
    )
    public class MyPortlet extends GenericPortlet {
        ...
    }
    
  • [9] javax.portlet.init-paramプロパティは次のように宣言できます。

    @Component(
        ...
        property = {
            ...
            "javax.portlet.init-param.myInitParam=1234",
            ...
        }, service = PortletFilter.class
    )
    public class MyFilter implements RenderFilter {
        ...
    }
    
  • [10] Liferayはポートレットの名前に基づいて、各ポートレットのIDを作成します(すなわち、liferay-portlet.xmlportlet-name記述子またはjavax.portlet.name OSGiサービスのプロパティ)。 ポートレット名にはダッシュ、ピリオド、スペースを使用できますが、これらの文字やその他のJavaScriptの安全でない文字は、ポートレットIDに使用される名前の値から取り除かれます。 したがって、削除される文字を考慮して、ポートレット名を一意なものにしてください。 そうしないと、既にデプロイ済みのポートレットと同じIDのポートレットをデプロイしようとすると、ポートレットのデプロイが失敗し、Liferayは次のメッセージを記録します。

    Portlet id [portletId] is already in use