public interface ComponentAddonFactory
ComponentAddonFactoryAdapter
for an adapter class to simplify implementation.Modifier and Type | Method and Description |
---|---|
Component |
createComponent(PositionInformation positionInformation,
Configuration configuration,
ConstructionContext constructionContext)
Creates an addon for the given configuration.
|
ComponentAddonUI<?> |
createComponentUI(java.lang.String typeIdentifier,
YouScopeClient client,
YouScopeServer server)
Returns a new UI to configure a component of the given type identifier.
|
ComponentMetadata<?> |
getComponentMetadata(java.lang.String typeIdentifier)
Returns the metadata (like human readable name) for a given configuration type.
|
java.lang.String[] |
getSupportedTypeIdentifiers()
Returns a list of all component type identifiers supported by this factory.
|
boolean |
isSupportingTypeIdentifier(java.lang.String typeIdentifier)
Returns true if this factory supports configurations with the given ID, false otherwise.
|
Component createComponent(PositionInformation positionInformation, Configuration configuration, ConstructionContext constructionContext) throws ConfigurationException, AddonException
positionInformation
- The position in the measurement hierarchy where the addon should be constructed.configuration
- The configuration of the addon.constructionContext
- The context of the construction, providing information and functionality in the construction of the addon.ConfigurationException
- Thrown if the configuration is invalid.AddonException
- Thrown if an error occurred during the construction.ComponentAddonUI<?> createComponentUI(java.lang.String typeIdentifier, YouScopeClient client, YouScopeServer server) throws AddonException
typeIdentifier
- The ID for which a configuration addon should be created.client
- Interface to allow the addon to communicate with the client.server
- Interface to the server.AddonException
- Thrown if configuration type identifier is not supported by this factory, or if any general error occured during the configuration addon creation.java.lang.String[] getSupportedTypeIdentifiers()
boolean isSupportingTypeIdentifier(java.lang.String typeIdentifier)
typeIdentifier
- The ID of the configuration for which it should be queried if this factory supports its construction.ComponentMetadata<?> getComponentMetadata(java.lang.String typeIdentifier) throws AddonException
typeIdentifier
- The type identifier of the configuration for which the metadata should be returned.AddonException
- Thrown if identifier is not supported by the addon.