Package com.webmethods.portal.system
Class BaseComponent
java.lang.Object
com.webmethods.portal.system.BaseComponent
- All Implemented Interfaces:
IComponent
,IConstants
,IInitializable
- Direct Known Subclasses:
Handler
,TaskIndexEngineFactoryInitializer
BaseComponent is a simple base class that performs only default implementation of the
IComponent
interface-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IComponentData
This won't be cached in the future, once we have the MetadataService on-line.protected IComponentProvider
TheIComponentProvider
that is the 'container' for this componentprotected boolean
is this initialized?protected IURI
A default implementation of a uriFields inherited from interface com.webmethods.portal.system.IConstants
ALL_CRITERIA, CATEGORY_TAG, CLASS, COMPONENT_TAG, COMPONENTS_TAG, CONFIG, CONFIG_FILE, CONFIG_TAG, CRITERION, DATACHANNEL_NONE, DEFAULT, DEFAULT_JAVA_HEAP_SIZE, DELIV_METHOD, DESCRIPTION, EMPTY_STRING, ENABLED, FALSE, FOLDER_TYPE, FORWARD_SLASH, FRAMEWORK_ACCESS_MODEL, FRAMEWORK_DEV_MODE, FRAMEWORK_EDITOR_CONFIG, FRAMEWORK_JAVA_COMMAND_LINE, FRAMEWORK_JAVA_COMPILER, FRAMEWORK_JAVA_HEAP_SIZE, GROUPID, ID_NAME, INFO, INIT_FILE, INIT_FILE_ENABLED, INIT_ONLY_MODE, LIBRARY_MODE, NAME, NOTIFICATION_IDS, OWNERID, PAGE_SIZE, PARAM_STRING, PERMISSIVE_MODEL, PHASE_TAG, PHASEINFO_TAG, PHASES_TAG, PROVIDER_TAG, PROVIDERS_TAG, REMOTE_OBJECT_BODY, RESOURCE_URI, RESTRICTIVE_MODEL, SPACE, START_INDEX, SYSTEM_PATH_CLASSES, SYSTEM_PATH_CONFIG, SYSTEM_PATH_DATA, SYSTEM_PATH_DEPLOY, SYSTEM_PATH_HOME, SYSTEM_PATH_INSTALL, SYSTEM_PATH_LIB, SYSTEM_PATH_LOGS, SYSTEM_PATH_PREFIX, SYSTEM_PATH_SCRIPTS, SYSTEM_PATH_SYSTEMLIB, SYSTEM_PATH_TEMPCLASSES, SYSTEM_PATH_WEBINF, SYSTEM_PATH_WEBROOT, TAG_BR, TEXT_HTML, TEXT_IPL, TEXT_PLAIN, TEXT_XML, TRUE, TYPE, URL_NAME, VALUE, XTYPE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Activation of OSGi declaritive serviceprotected void
bindGlobalProvider
(IGlobalProvider globalProvider) protected void
Deactivation of OSGi declaritive serviceGets the data from the IComponent TODO instead of caching them_componentData
, this will be looked up insteadGet the common name of this componentget the provider that provided this componentprotected IGlobalProvider
getURI()
This is a simplistic implementation that appends the component provider's name with our name TODO make a real implementationvoid
init
(IComponentData componentData, String phase) Initialize the component with the appropriate componentDataboolean
isInitialized
(int phase) check to see if object has been initializedvoid
setComponentData
(IComponentData componentData) This should only be used by IComponentProviders and only under extreme caution TODO instead of caching them_componentData
, this will be looked up insteadvoid
setComponentProvider
(IComponentProvider componentProvider) This should only be used by IComponentProviders and only under extreme cautionvoid
shutdown()
Allows your component to shutdown This will clear the data structures, so do your work first
-
Field Details
-
m_componentData
This won't be cached in the future, once we have the MetadataService on-line. Instead we'll cache the componentData's ID, and we can re-lookup as necessary. This will ensure that we always have fresh componentData. Alternatively, we can subscribe for changes to componentData -
m_componentProvider
TheIComponentProvider
that is the 'container' for this component -
m_isInitialized
protected boolean m_isInitializedis this initialized? -
m_uri
A default implementation of a uri- See Also:
-
-
Constructor Details
-
BaseComponent
public BaseComponent()
-
-
Method Details
-
activate
Activation of OSGi declaritive service- Parameters:
config
- the configuration properties of the OSGi service- Throws:
InitializationException
- if activation fails
-
deactivate
protected void deactivate()Deactivation of OSGi declaritive service -
init
Initialize the component with the appropriate componentData- Specified by:
init
in interfaceIInitializable
- Parameters:
componentData
- which contains enough information for this component to initializephase
- the name of the current phase- Throws:
InitializationException
- See Also:
-
shutdown
public void shutdown()Allows your component to shutdown This will clear the data structures, so do your work first- Specified by:
shutdown
in interfaceIInitializable
- See Also:
-
isInitialized
public boolean isInitialized(int phase) check to see if object has been initialized- Specified by:
isInitialized
in interfaceIComponent
- Parameters:
phase
- optional for multi-phase init, pass IPhase.UNK_PHASE to ignore- Returns:
- true if initialized, false otherwise
-
getComponentName
Get the common name of this component- Specified by:
getComponentName
in interfaceIComponent
- Returns:
- the identifying name of this component
-
getComponentData
Gets the data from the IComponent TODO instead of caching them_componentData
, this will be looked up instead- Specified by:
getComponentData
in interfaceIComponent
- Returns:
- a
IComponentData
-
setComponentData
This should only be used by IComponentProviders and only under extreme caution TODO instead of caching them_componentData
, this will be looked up instead- Specified by:
setComponentData
in interfaceIComponent
-
getComponentProvider
get the provider that provided this component- Specified by:
getComponentProvider
in interfaceIComponent
- Returns:
- the managing
IComponentProvider
-
setComponentProvider
This should only be used by IComponentProviders and only under extreme caution- Specified by:
setComponentProvider
in interfaceIComponent
-
getURI
This is a simplistic implementation that appends the component provider's name with our name TODO make a real implementation- Specified by:
getURI
in interfaceIComponent
- Returns:
-
bindGlobalProvider
-
getGlobalProvider
- See Also:
-