com.anwrt.anycontent.extensions.content
Class ContentExtensionPoint

java.lang.Object
  extended bycom.anwrt.anycontent.plugin.ExtensionPoint
      extended bycom.anwrt.anycontent.extensions.content.ContentExtensionPoint

public class ContentExtensionPoint
extends ExtensionPoint

This class is in charge of handling content extension point.
This point handles the pool of availables content.


Constructor Summary
ContentExtensionPoint()
           
 
Method Summary
 void configure(Configuration configuration)
          Configure this extension point.
 void configureExtension(java.lang.String pluginName, java.lang.String pluginId, Configuration configuration)
          Add an extension to this point.
 ContentType getContent(java.lang.String id)
          Get the content with an id
 void initialize()
          Method called at the end of the initialization process.
 boolean isSingle()
          Returns wether this extension point is single
 
Methods inherited from class com.anwrt.anycontent.plugin.ExtensionPoint
getId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentExtensionPoint

public ContentExtensionPoint()
Method Detail

isSingle

public boolean isSingle()
Description copied from class: ExtensionPoint
Returns wether this extension point is single

Specified by:
isSingle in class ExtensionPoint
Returns:
true if this extension point is single

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Description copied from class: ExtensionPoint
Configure this extension point.
This method is called only once at initialisation time.
The configuration always look like :

<extension id="AAA" class="BBB">
  <!-- XML content to be handled by a specific implementation -->
</extension>

Overrides:
configure in class ExtensionPoint
Parameters:
configuration - the Configuration containing all needed data for this ExtensionPoint to initialize
Throws:
ConfigurationException

configureExtension

public void configureExtension(java.lang.String pluginName,
                               java.lang.String pluginId,
                               Configuration configuration)
                        throws ConfigurationException
Description copied from class: ExtensionPoint
Add an extension to this point. Each implementation knows the meaning of the given configuration.

Specified by:
configureExtension in class ExtensionPoint
Parameters:
configuration - the information about the extension to be added
pluginName - Unique identifier for the plugin hosting the extension (equals to the directory name)
pluginId - Unique plugin identifier (unique for a given pluginName)
Throws:
ConfigurationException

initialize

public void initialize()
Description copied from class: ExtensionPoint
Method called at the end of the initialization process.
At this time, all extensions have been added (through configureExtension())

Specified by:
initialize in class ExtensionPoint

getContent

public ContentType getContent(java.lang.String id)
Get the content with an id

Parameters:
id - Id of the content to retrieve
Returns:
The content with this id, or null if no content with this id have been configured.


Copyright © 2006 Anyware Technologies. All Rights Reserved.