Package nl.gx.webmanager.wcb
Interface ComponentType
-
- All Known Subinterfaces:
DojoComponentType
,ElementComponentType
,FormComponentType
,FormFragmentComponentType
,FormLogicProviderComponentType
,LanguagePackComponentType
,MediaItemComponentType
,PageMetaDataComponentType
,PanelComponentType
,PresentationComponentType
,ProfileProviderComponentType
,SearchFacetComponentType
,ServiceComponentType
,ServletComponentType
- All Known Implementing Classes:
ComponentTypeBase
,DojoComponentTypeImpl
,ElementComponentTypeImpl
,FormComponentTypeImpl
,MediaItemComponentTypeImpl
,PageMetaDataComponentTypeImpl
,PanelComponentTypeImpl
,PresentationComponentTypeImpl
,ProfileProviderComponentTypeImpl
,SearchFacetComponentTypeImpl
,ServiceComponentTypeImpl
,ServletComponentTypeImpl
public interface ComponentType
Interface for any component that wishes to register a new componentType in the GX WebManager framework.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkComponentDefinition(ComponentDefinition componentDefinition)
Check whether a componentDefinition is valid for this componentType.void
deployResources(ComponentDefinition componentDefinition)
Deploys the necessary resources for a component.void
enableComponentForAllWebsites(ComponentDefinition componentDefinition)
Enables a component for all websites.Component
getComponent(String id)
Get a registered component by id.int
getComponentCount()
Get the number of registered components for this componentType.String
getComponentInterface()
Return the component interface this componentType provides.Component[]
getComponents()
Get an array of registered component for this componentType.String
getComponentTypeInterface()
Returns the componentType interface this componentType publishes.boolean
installComponent(ComponentDefinition componentDefinition)
Invoked when a component of this component type is installed.boolean
installComponent(ComponentDefinition componentDefinition, Component component)
Installs a component of this component type.boolean
purgeComponent(ComponentDefinition componentDefinition)
Deletes the content created by instances of the component type.boolean
startComponent(Component component)
Starts an installed component.boolean
stopComponent(Component component)
Stops an installed component.boolean
uninstallComponent(ComponentDefinition componentDefinition)
Uninstalls a component.boolean
updateComponent(ComponentDefinition componentDefinition)
Updates a component.
-
-
-
Method Detail
-
getComponentTypeInterface
String getComponentTypeInterface()
Returns the componentType interface this componentType publishes.- Returns:
- identifier for provided type
-
getComponentInterface
String getComponentInterface()
Return the component interface this componentType provides.- Returns:
- identifier for provided type
-
checkComponentDefinition
boolean checkComponentDefinition(ComponentDefinition componentDefinition)
Check whether a componentDefinition is valid for this componentType.- Parameters:
componentDefinition
- definition of a component that is validated- Returns:
- a boolean value indicating whether the componentDefinition is valid
-
getComponent
Component getComponent(String id)
Get a registered component by id.- Parameters:
id
- Unique identifier representing the component- Returns:
- an array of registered component for this componentType.
-
getComponents
Component[] getComponents()
Get an array of registered component for this componentType.- Returns:
- an array of registered component for this componentType.
-
getComponentCount
int getComponentCount()
Get the number of registered components for this componentType.- Returns:
- the number of registered component for this componentType.
-
installComponent
boolean installComponent(ComponentDefinition componentDefinition)
Invoked when a component of this component type is installed. The component type implements installation logic that is applicable for all components of this type and then invokes onInstall to allow inherited component types to implement additional logic. The onInstall callback method is only invoked if the generic component installation logic was successful.- Parameters:
componentDefinition
- Definition of the component that is to be installed- Returns:
- true if the component was successfully installed
-
installComponent
boolean installComponent(ComponentDefinition componentDefinition, Component component)
Installs a component of this component type. The component type implements installation logic that is applicable for all components of this type and then invokes onInstall to allow inherited component types to implement additional logic. The onInstall callback method is only invoked if the generic component installation logic was successful.- Parameters:
componentDefinition
- Definition of the component that is to be installedcomponent
- Component that is to be installed- Returns:
true
if the component was successfully installed
-
updateComponent
boolean updateComponent(ComponentDefinition componentDefinition)
Updates a component.- Parameters:
componentDefinition
- Definition of the component that is to be installed- Returns:
- true if the component was successfully updated
-
purgeComponent
boolean purgeComponent(ComponentDefinition componentDefinition)
Deletes the content created by instances of the component type.- Parameters:
componentDefinition
- Definition of the component that is to be purged- Returns:
- true if the component was successfully purged
-
uninstallComponent
boolean uninstallComponent(ComponentDefinition componentDefinition)
Uninstalls a component. Uninstalling means all files and objects instantiated by the component's definition are deleted.- Parameters:
componentDefinition
- Definition of the component that is to be uninstalled- Returns:
- true if the component was successfully uninstalled
-
startComponent
boolean startComponent(Component component)
Starts an installed component.- Parameters:
component
- Component that should be started- Returns:
- true if the component was successfully started
-
stopComponent
boolean stopComponent(Component component)
Stops an installed component.- Parameters:
component
- Component that should be stopped- Returns:
- true if the component was successfully stopped
-
enableComponentForAllWebsites
void enableComponentForAllWebsites(ComponentDefinition componentDefinition)
Enables a component for all websites.- Parameters:
componentDefinition
- theComponentDefinition
of the component that is enabled
-
deployResources
void deployResources(ComponentDefinition componentDefinition)
Deploys the necessary resources for a component. This should deploy all resources that are removed on a restart of an installation, for instance mediaitem icons.- Parameters:
componentDefinition
- theComponentDefinition
of the component that is enabled
-
-