Java Plug-ins (deprecated)
The extension method described in this chapter is deprecated and you should avoid using it for new development.
To creating Java plug-ins you need Java programming skills and knowledge of:
The Swing GUI component kit
The Escenic content model
StudioPlugin can be used to create standard
You can use a plug-in based on
StudioPlugin for a wide
range of purposes. A
StudioPlugin may be an "invisible"
component that runs entirely in the background, but it may also add menu
items to the
user interface and display its own user interface components (dialogs,
messages and so on). The plug-in starts up and terminates together with
During its life, it communicates with
Note that any
StudioPlugins you write must adhere
strictly to Swing's event dispatch thread (EDT)
conventions, as described
Failure to do so may cause Content Studio to become unresponsive.
The main classes involved in writing a plug-in are:
The plug-in class itself. You create a plug-in by extending this class.
The SPI class that creates
StudioPlugininstances. You extend this class to create an SPI class that creates instances of your plug-in.
All plug-ins communicate with Content Studio via this class.
getContext()method that returns a
StudioContexthas methods the plug-in can use to subscribe to various events and to gain access to various components of the Content Studio session.
addLifeCycleListener(): This method adds a
getContentEditorContainer(): This method returns a
getContentService(): This method returns a
getUser(): This method returns a
Contentobject containing information about the current user.
execute(): This method can be used to execute code encapsulated in
This class provides plug-ins with a means of listening for and reacting to important events in a session's life cycle such as
This object is a container for all the editors opened in a Content Studio session. You can use this object to get access to all the editors in a session. It also has an
addEditorListener()method that adds an
ContentEditorContainer. Note that this object is not available until Content Studio is completely initialized, so you should always access it via the
userSessionStartedevent (see the example code in Writing a Basic Plug-in).
This class provides plug-ins with a means of listening for and reacting to editor events such as
This object provides access to content items. It also has an
addContentListener()method that adds a
This class provides plug-ins with a means of listening for and reacting to content item events such as
This class is a container for any time-consuming tasks that a plug-in performs. You must use this class to wrap any actions that are potentially time-consuming, such as disk reads or accessing Internet resources. You create a task by extending
PluginTaskand execute it using
StudioContext.execute(). For further information, see Making a Plug-in Task.
For detailed information about the classes listed, see the javadoc
documentation in your