Interface IComponentProvider
- All Superinterfaces:
IComponent
,IInitializable
,IURIResolver
- All Known Subinterfaces:
IAuditManager
,IAuthManager
,IBizPolicyManager
,IBundleManager
,ICacheManager
,IClassManager
,IClusterPartitionProvider
,IClusterProvider
,ICommandManager
,IContentManager
,IContextProvider
,IDirSystem
,IDispatchManager
,IErrorManager
,IGdprConfigService
,IGlobalProvider
,IInstallProvider
,ILanguagePackManager
,ILicenseProvider
,IMailUtil
,IManager
,IMechanicsManager
,IMetaContext
,IMetaManager
,IPhaseProvider
,IPortletApplication
,IPortletContainer
,IPortletProvider
,IPortletWebManager
,IPresentationManager
,IPropertyEditorManager
,ISessionManager
,ITaskSystem
,IThingComponentProvider
,ITOTPConfigService
,IUserPrivacyService
,IVersionProvider
,IWebApplication
,IWebAppRuntimeConfigManager
The IComponentProvider interfaces manages IComponent
s
An IComponentProvider is an IComponent
but unique in a couple of ways:
First, IComponentProvider are NOT dynamically deployable. But IComponent
s are dynamically deployable.
Second, IComponentProvider are exposed via PortalSystem.getComponentProvider(java.lang.String)
. IComponent
s are only
exposed by their IComponentProvider.
Typically, only system level developers will write new IComponentProvider
s.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Attr for component data to specify the application namestatic final String
static final String
static final String
static final String
Deprecated.static final String
Deprecated.useIComponentNames
insteadstatic final String
Deprecated.useIComponentNames
insteadstatic final String
Some common named constants forIComponentProvider
static final String
Deprecated.useIComponentNames
insteadstatic final String
Deprecated.useIComponentNames
insteadstatic final String
Deprecated.useIComponentNames
insteadstatic final String
static final String
Deprecated.useIComponentNames
insteadstatic final String
Deprecated.useIComponentNames
instead -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the specific component existsgetComponent
(IComponentData componentData) Retrieve anIComponent
based on the data that describes it.getComponent
(IInitializableComponentData initializableComponentData) Retrieve anIComponent
from an IInitializableComponentDatagetComponent
(String componentName) Retrieve anIComponent
by name.Should only be overriden when implmenting a customIComponentProvider
and not called externally.Map<String,
? extends IComponent> Get the currently registered componentsRetrieve the defaultIComponent
.default org.slf4j.Logger
Deprecated.void
initDeferredWebAppComponents
(String webAppName) This component should initialize components for the specified webapp that were deferred during server startup.Lookup an object in this provider namespace.registerComponent
(IInitializableComponentData initializableComponentData, boolean shouldFireEvents) Register a new component with this IComponentProviderreloadComponent
(IComponentData componentData, boolean shouldFireEvents) Reloads the component based upon the componentData.reloadComponent
(String componentClassName, boolean shouldFireEvents) Reloads the component.void
unregisterComponent
(IComponentData componentData, boolean shouldFireEvents) Unregister the component and remove itsIComponentData
void
This is a special function that is only called at initial portal bootstrap time.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
Methods inherited from interface com.webmethods.portal.system.IURIResolver
acquireURI, acquireURI
-
Field Details
-
ATTR_BEG_QUERY
- See Also:
-
ATTR_MID_QUERY
- See Also:
-
ATTR_END_QUERY
- See Also:
-
COMPONENTS_QUERY
Some common named constants forIComponentProvider
- See Also:
-
PHASE_PROVIDER
- See Also:
-
ATTR_APP_NAME
Attr for component data to specify the application name- See Also:
-
METACONTEXT_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
MECH_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
CACHE_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
INSTALL_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
SEARCH_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
POLICY_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
COMMAND_PROVIDER
Deprecated.useIComponentNames
instead- See Also:
-
BIZPOLICY_MANAGER
Deprecated.useIComponentNames
instead- See Also:
-
-
Method Details
-
getComponent
Retrieve anIComponent
by name. This certainly won't be adequate for allIComponentProvider
s. DifferentIComponentProvider
s should provide more specific lookup mechanisms.- Parameters:
componentName
- identifies the component- Returns:
- the
IComponent
if found, NULL otherwise
-
getComponent
Retrieve anIComponent
based on the data that describes it.- Parameters:
componentData
-- Returns:
- the
IComponent
if found, NULL otherwise - Throws:
PortalException
-
getComponent
IComponent getComponent(IInitializableComponentData initializableComponentData) throws PortalException Retrieve anIComponent
from an IInitializableComponentData- Parameters:
initializableComponentData
-- Returns:
- the
IComponent
if found, NULL otherwise - Throws:
PortalException
-
getDefaultComponent
Retrieve the defaultIComponent
. Note, this might not be valid for all IComponentProviders- Returns:
- the default
IComponent
for this IComponentProvider. Maybe NULL - Throws:
PortalException
-
getComponents
Map<String,? extends IComponent> getComponents()Get the currently registered components- Returns:
- a map of
IComponent
s
-
lookup
Lookup an object in this provider namespace.- Parameters:
objectURI
- theIURI
of a portal resource.- Returns:
- a reference to the object in the system, or null if such object exists
- Throws:
PortalException
-
exists
Checks if the specific component exists- Parameters:
objectURI
-- Returns:
- Throws:
PortalException
-
registerComponent
IComponent registerComponent(IInitializableComponentData initializableComponentData, boolean shouldFireEvents) throws PortalException Register a new component with this IComponentProvider- Parameters:
initializableComponentData
- is enough data needed to register a new component, but doesn't describe a valid component- Returns:
- the new
IComponent
- Throws:
PortalException
-
unregisterComponent
void unregisterComponent(IComponentData componentData, boolean shouldFireEvents) throws PortalException Unregister the component and remove itsIComponentData
- Parameters:
componentData
-- Throws:
PortalException
-
reloadComponent
IComponent reloadComponent(IComponentData componentData, boolean shouldFireEvents) throws PortalException Reloads the component based upon the componentData.- Parameters:
componentData
- is theIComponentData
shouldFireEvents
- true if you want events to be fired. Should be false if you are already handling an event- Returns:
- the reloaded
IComponent
- Throws:
PortalException
-
reloadComponent
IComponent reloadComponent(String componentClassName, boolean shouldFireEvents) throws PortalException Reloads the component. This typically occurrs in response to aClassUpdateEvent
- Parameters:
componentClassName
- is the className of the new componentshouldFireEvents
- true if you want events to be fired. Should be false if you are already handling an event- Returns:
- the reloaded
IComponent
- Throws:
PortalException
-
getLogger
Deprecated. -
upgradeComponentDataFromBootstrapComponentData
This is a special function that is only called at initial portal bootstrap time.
We've transitioned from
PortalSystem.BOOTSTRAP_STATE
toPortalSystem.INITIALIZING_STATE
. Some IComponentProvider's need to upgrade theirIComponent
's toIComponentData
- Throws:
PortalException
-
getComponentQueryString
String getComponentQueryString()Should only be overriden when implmenting a custom
IComponentProvider
and not called externally.Override this for a different xml queryString This is important when loading your
IComponent
s from an xml file. However this only applies at bootstrap mode, or if your IComponentProvider isn't derived fromIThingComponentProvider
. It also applies if we're installing new components- Returns:
- a xpath like
COMPONENTS_QUERY
-
initDeferredWebAppComponents
This component should initialize components for the specified webapp that were deferred during server startup.
-
IComponentNames
instead