Class CrispHstServices
- java.lang.Object
-
- org.onehippo.cms7.crisp.hst.module.CrispHstServices
-
public class CrispHstServices extends Object
Convenient utility to allow easy access to the singletonResourceServiceBroker
in an application.Note: Each set of the static members of
org.hippoecm.hst.site.HstServices
in multiple wars has its ownComponentManager
. So, theComponentManager
of each application can be used to try to find the local CRISPResourceServiceBroker
component. If not found from the localComponentManager
, then it can try to find it fromHippoServiceRegistry
as fallback.
-
-
Field Summary
Fields Modifier and Type Field Description static String
MODULE_NAME
CRISP HST Addon Module name.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ResourceServiceBroker
getDefaultResourceServiceBroker()
Deprecated.UsegetDefaultResourceServiceBroker(ComponentManager)
instead.static ResourceServiceBroker
getDefaultResourceServiceBroker(ComponentManager componentManager)
Returns the singletonResourceServiceBroker
instance from eithercomponentManager
orHippoServiceRegistry
.static <T> T
getModuleComponent(String name)
Deprecated.UsegetModuleComponent(ComponentManager, String)
instead.static <T> T
getModuleComponent(ComponentManager componentManager, String componentName)
Returns a component registered in CRISP HST Addon Module'sComponentManager
.
-
-
-
Field Detail
-
MODULE_NAME
public static final String MODULE_NAME
CRISP HST Addon Module name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getModuleComponent
public static <T> T getModuleComponent(ComponentManager componentManager, String componentName)
Returns a component registered in CRISP HST Addon Module'sComponentManager
.- Parameters:
componentManager
- theComponentManager
that initialized the CRISP HST Addon Module, normally gotten fromHstServices.getComponentManager()
componentName
- component name- Returns:
- a component registered in CRISP HST Addon Module's
ComponentManager
-
getModuleComponent
@Deprecated public static <T> T getModuleComponent(String name)
Deprecated.UsegetModuleComponent(ComponentManager, String)
instead.Returns a component registered in CRISP HST Addon Module'sComponentManager
.- Parameters:
name
- a component bean name registered in CRISP HST Addon Module'sComponentManager
- Returns:
- a component registered in CRISP HST Addon Module's
ComponentManager
-
getDefaultResourceServiceBroker
public static ResourceServiceBroker getDefaultResourceServiceBroker(ComponentManager componentManager)
Returns the singletonResourceServiceBroker
instance from eithercomponentManager
orHippoServiceRegistry
.- Parameters:
componentManager
-ComponentManager
instance, normally gotten fromHstServices.getComponentManager()
- Returns:
- the singleton
ResourceServiceBroker
instance
-
getDefaultResourceServiceBroker
@Deprecated public static ResourceServiceBroker getDefaultResourceServiceBroker()
Deprecated.UsegetDefaultResourceServiceBroker(ComponentManager)
instead.Returns the singletonResourceServiceBroker
instance.- Returns:
- the singleton
ResourceServiceBroker
instance
-
-