Nuxeo Enterprise Platform 5.1

org.nuxeo.runtime.model.impl
Class ComponentInstanceImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.impl.ComponentInstanceImpl
All Implemented Interfaces:
Adaptable, ComponentContext, ComponentInstance, Extensible

public class ComponentInstanceImpl
extends Object
implements ComponentInstance

Author:
Bogdan Stefanescu

Field Summary
protected  Object instance
           
protected  RegistrationInfoImpl ri
           
 
Constructor Summary
protected ComponentInstanceImpl()
           
  ComponentInstanceImpl(RegistrationInfoImpl ri)
           
 
Method Summary
 void activate()
          Activates the implementation instance.
 void create()
           
 void deactivate()
          Deactivates the implementation instance.
 void destroy()
          Destroys this instance.
<T> T
getAdapter(Class<T> adapter)
          Returns an object which is an instance of the given class associated with this object.
 RuntimeContext getContext()
          Gets the runtime context attached to this instance.
 Object getInstance()
          Gets the actual component implementation instance.
 ComponentName getName()
          Gets the name of the component.
 Property getProperty(String property)
           
 String[] getPropertyNames()
           
 Object getPropertyValue(String property)
           
 Object getPropertyValue(String property, Object defValue)
           
 RuntimeContext getRuntimeContext()
           
 void registerExtension(Extension extension)
          Registers the given extension.
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected Object instance

ri

protected RegistrationInfoImpl ri
Constructor Detail

ComponentInstanceImpl

protected ComponentInstanceImpl()

ComponentInstanceImpl

public ComponentInstanceImpl(RegistrationInfoImpl ri)
                      throws Exception
Throws:
Exception
Method Detail

getInstance

public Object getInstance()
Description copied from interface: ComponentInstance
Gets the actual component implementation instance.

Specified by:
getInstance in interface ComponentInstance
Returns:
the component implementation instance

create

public void create()
            throws Exception
Throws:
Exception

destroy

public void destroy()
             throws Exception
Description copied from interface: ComponentInstance
Destroys this instance.

Specified by:
destroy in interface ComponentInstance
Throws:
Exception - if any error occurs

getContext

public RuntimeContext getContext()
Description copied from interface: ComponentInstance
Gets the runtime context attached to this instance.

Specified by:
getContext in interface ComponentInstance
Returns:
the runtime context

getName

public ComponentName getName()
Description copied from interface: ComponentInstance
Gets the name of the component.

Specified by:
getName in interface ComponentInstance
Returns:
the component name

activate

public void activate()
              throws Exception
Description copied from interface: ComponentInstance
Activates the implementation instance.

Specified by:
activate in interface ComponentInstance
Throws:
Exception - if any error occurs durring activation

deactivate

public void deactivate()
                throws Exception
Description copied from interface: ComponentInstance
Deactivates the implementation instance.

Specified by:
deactivate in interface ComponentInstance
Throws:
Exception - if any error occurs durring deactivation

registerExtension

public void registerExtension(Extension extension)
                       throws Exception
Description copied from interface: Extensible
Registers the given extension.

Specified by:
registerExtension in interface Extensible
Parameters:
extension - the extension to register
Throws:
Exception - if any error occurs

unregisterExtension

public void unregisterExtension(Extension extension)
                         throws Exception
Description copied from interface: Extensible
Unregisters the given extension.

Specified by:
unregisterExtension in interface Extensible
Parameters:
extension - the extension to unregister
Throws:
Exception - if any error occurs

getAdapter

public <T> T getAdapter(Class<T> adapter)
Description copied from interface: Adaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface Adaptable
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

getPropertyNames

public String[] getPropertyNames()
Specified by:
getPropertyNames in interface ComponentContext

getProperty

public Property getProperty(String property)
Specified by:
getProperty in interface ComponentContext

getRuntimeContext

public RuntimeContext getRuntimeContext()
Specified by:
getRuntimeContext in interface ComponentContext

getPropertyValue

public Object getPropertyValue(String property)
Specified by:
getPropertyValue in interface ComponentContext

getPropertyValue

public Object getPropertyValue(String property,
                               Object defValue)
Specified by:
getPropertyValue in interface ComponentContext

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.