Class NPMResolvedPackageNameUtil

java.lang.Object
com.liferay.frontend.js.loader.modules.extender.npm.NPMResolvedPackageNameUtil

public class NPMResolvedPackageNameUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    get(jakarta.servlet.http.HttpServletRequest httpServletRequest)
    Get the NPM resolved package name associated to the current portlet.
    static String
    get(jakarta.servlet.ServletContext servletContext)
    Get the NPM resolved package name associated to the bundle containing the given servlet context.
    static void
    set(jakarta.servlet.ServletContext servletContext, String npmResolvedPackageName)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NPMResolvedPackageNameUtil

      public NPMResolvedPackageNameUtil()
  • Method Details

    • get

      public static String get(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Get the NPM resolved package name associated to the current portlet. The current portlet is inferred from the portletResource parameter or the ServletContext associated to the given request.
      Parameters:
      httpServletRequest -
      Throws:
      UnsupportedOperationException - if the associated bundle does not contain AMD modules
    • get

      public static String get(jakarta.servlet.ServletContext servletContext)
      Get the NPM resolved package name associated to the bundle containing the given servlet context.
      Parameters:
      servletContext -
      Throws:
      UnsupportedOperationException - if the associated bundle does not contain AMD modules
    • set

      public static void set(jakarta.servlet.ServletContext servletContext, String npmResolvedPackageName)