title: Liferay: get PortletID and companyID from init()
body: <p>Maybe trough PortletConfig in init(PortletConfig)</p>
  
  <p>The thing is that using </p>
  
  <pre><code>((PortletConfigImpl) portletConfig).getPortletId();
  </code></pre>
  
  <p>is not allowed anymore because adding portal-impl.jar in package.properties gives throws an exception when trying to execute build ant target, saying that this is not allowed anymore</p>
  
  <p>For companyID I directly have no idea where to start. I am using currently </p>
  
  <pre><code>long companyId = CompanyLocalServiceUtil.getCompanies().get(0).getCompanyId();
  </code></pre>
  
  <p>but as soon as I got more than one company it will fail</p>
  
  <p>If only I could get Portlet object somehow, I think it would be enough to get both portletId and companyId</p>