Class ServicelayerUtils


  • public final class ServicelayerUtils
    extends java.lang.Object
    Central internal utils for service layer.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void enforceBeanScope​(org.springframework.context.ApplicationContext ctx, java.lang.String beanName, java.lang.String scope)
      Test if a given bean is registered with a specified scope.
      static org.springframework.context.ApplicationContext getApplicationContext()
      Returns hybris platform application context.
      static boolean isSystemInitialized()  
      static boolean isSystemNotInitialized()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getApplicationContext

        public static org.springframework.context.ApplicationContext getApplicationContext()
        Returns hybris platform application context. Please note that this will always start the hybris platform.
      • enforceBeanScope

        public static void enforceBeanScope​(org.springframework.context.ApplicationContext ctx,
                                            java.lang.String beanName,
                                            java.lang.String scope)
        Test if a given bean is registered with a specified scope. This method either returns or throws a ConfigurationException.
        Parameters:
        ctx - ApplicationContext, must be instanceof AbstractApplicationContext
        beanName - the name of the bean to test
        scope - the scope to test
        Throws:
        ConfigurationException - if either the context was no AbstractApplicationContext or the bean was not registered with given scope.
      • isSystemInitialized

        public static boolean isSystemInitialized()
      • isSystemNotInitialized

        public static boolean isSystemNotInitialized()