<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Asset Publisher OSGI Configuration</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111198540" />
  <subtitle>Asset Publisher OSGI Configuration</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111198540</id>
  <updated>2026-04-07T05:02:16Z</updated>
  <dc:date>2026-04-07T05:02:16Z</dc:date>
  <entry>
    <title>RE: Asset Publisher OSGI Configuration</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111201761" />
    <author>
      <name>Minhchau Dang</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111201761</id>
    <updated>2018-10-13T02:14:13Z</updated>
    <published>2018-10-13T02:14:13Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;Mounir Hallab:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;I want to set the default selected asset type to Web Content
        Article. I found AssetPublisherPortletInstanceConfiguration
        class in asset-publisher-web module, but it doesnt contain much
        config attributes.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;In theory, the way you would do this is to change the default value
  for the &lt;code&gt;classNameIds&lt;/code&gt; preference on the asset publisher
  portlet, which you would do by overriding the
  &lt;code&gt;javax.portlet.preferences&lt;/code&gt; component property (see David
  Nebinger's blog on &lt;a href="community.liferay.com/fr/blogs/-/blogs/overriding-component-properties"&gt;Overriding
    Component Properties&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;You can debug the code &lt;a href="https://github.com/liferay/liferay-portal/blob/7.1.0-ga1/modules/apps/static/portal-osgi-web/portal-osgi-web-portlet-tracker/src/main/java/com/liferay/portal/osgi/web/portlet/tracker/internal/PortletTracker.java#L826-L845"&gt;PortletTracker&lt;/a&gt;
  to see what it's expecting. At a glance, it either wants a path to
  some XML file in a bundle fragment for
  &lt;code&gt;com.liferay.asset.publisher.web&lt;/code&gt;, or it wants the property
  to be set to the full XML string. Coincidentally, you can see an
  example of the former in a lot of the portlets that extend asset
  publisher portlet (&lt;a href="https://github.com/liferay/liferay-portal/blob/7.1.0-ga1/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/portlet/HighestRatedAssetsPortlet.java#L45"&gt;HighestRatedAssetsPortlet&lt;/a&gt;,
    &lt;a href="https://github.com/liferay/liferay-portal/blob/7.1.0-ga1/modules/apps/asset/asset-publisher-web/src/main/resources/META-INF/portlet-preferences/highest-rated-assets-default-portlet-preferences.xml"&gt;highest-rated-assets-default-portlet-preferences.xml&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;As a warning, because the portlet preference ultimately corresponds
  to the classNameId for the &lt;code&gt;JournalArticle&lt;/code&gt; model, the
  value you set in the configuration would need to change in every
  environnment, because that value is probably going to end up different
  in every environment.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Minhchau Dang</dc:creator>
    <dc:date>2018-10-13T02:14:13Z</dc:date>
  </entry>
  <entry>
    <title>Asset Publisher OSGI Configuration</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111198539" />
    <author>
      <name>Mounir Hallab</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111198539</id>
    <updated>2018-10-12T15:31:15Z</updated>
    <published>2018-10-12T15:31:15Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there a way to configure Asset publisher portlet by OSGI ?&lt;/p&gt;
&lt;p&gt;I want to set the default selected asset type to Web Content Article.
  I found AssetPublisherPortletInstanceConfiguration class in
  asset-publisher-web module, but it doesnt contain much config attributes.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;</summary>
    <dc:creator>Mounir Hallab</dc:creator>
    <dc:date>2018-10-12T15:31:15Z</dc:date>
  </entry>
</feed>
