Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.model.impl
Class RegistrationInfoImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.impl.RegistrationInfoImpl
All Implemented Interfaces:
Serializable, RegistrationInfo

public class RegistrationInfoImpl
extends Object
implements RegistrationInfo

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.nuxeo.runtime.model.RegistrationInfo
ACTIVATED, ACTIVATING, DEACTIVATING, REGISTERED, RESOLVED, UNREGISTERED
 
Constructor Summary
RegistrationInfoImpl()
           
RegistrationInfoImpl(ComponentName name)
          Useful when dynamically registering components
 
Method Summary
 void activate()
           
 void attach(ComponentManagerImpl manager)
          Attach to a manager - this method must be called after all registration fields are initialized.
 void checkExtensions()
           
 void deactivate()
           
 void destroy()
           
 boolean equals(Object obj)
           
 String getBundle()
          Get the owner bundle symbolic name of that component.
 ComponentInstance getComponent()
          Gets the component instance or null if the component was not yet activated.
 RuntimeContext getContext()
          Gets the runtime context that created this registration info.
 String getDocumentation()
          Gets any comments on this component.
 ExtensionPointImpl getExtensionPoint(String name)
           
 ExtensionPoint[] getExtensionPoints()
          Gets the defined extension points.
 Extension[] getExtensions()
          Gets the extensions contributed by this component.
 String getImplementation()
          Give the class name for the component implementation if this is a java component
 ComponentManager getManager()
          Gets the component manager.
 ComponentName getName()
          Gets the name of the component.
 Map<String,Property> getProperties()
          Gets the component properties.
 String[] getProvidedServiceNames()
          Gets the list of provided services or null if no service is provided.
 Set<ComponentName> getRequiredComponents()
          Gets the list of the required components.
 ServiceDescriptor getServiceDescriptor()
           
 int getState()
          Gets the component state.
 Version getVersion()
          Gets the component version.
 URL getXmlFileUrl()
          Retrieve the URL of the XML file used to declare the component
 int hashCode()
           
 boolean isActivated()
          Checks whether this component is activated.
 boolean isDisabled()
          Whether this component is disabled.
 boolean isDisposed()
           
 boolean isPersistent()
          Whether or not this registration is persisted by the user (not part of a real bundle).
 boolean isResolved()
          Checks whether this component is resolved (i˙e˙ all its dependencies are satisfied).
 void notifyApplicationStarted()
          Notify the component instance that the Nuxeo application started
 void reload()
          Reload the underlying component if reload is supported
 void resolve()
           
 void restart()
           
 void setContext(RuntimeContext rc)
           
 void setPersistent(boolean isPersistent)
          Set the persistent flag on this registration
 String toString()
           
 void unresolve()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegistrationInfoImpl

public RegistrationInfoImpl()

RegistrationInfoImpl

public RegistrationInfoImpl(ComponentName name)
Useful when dynamically registering components

Parameters:
name - the component name
Method Detail

attach

public void attach(ComponentManagerImpl manager)
Attach to a manager - this method must be called after all registration fields are initialized.

Parameters:
manager -

setContext

public void setContext(RuntimeContext rc)

isDisabled

public boolean isDisabled()
Description copied from interface: RegistrationInfo
Whether this component is disabled. For now this is used only for persistent components.

Specified by:
isDisabled in interface RegistrationInfo
Returns:

isPersistent

public final boolean isPersistent()
Description copied from interface: RegistrationInfo
Whether or not this registration is persisted by the user (not part of a real bundle).

Specified by:
isPersistent in interface RegistrationInfo
Returns:
true if persisted, false otherwise

setPersistent

public void setPersistent(boolean isPersistent)
Description copied from interface: RegistrationInfo
Set the persistent flag on this registration

Specified by:
setPersistent in interface RegistrationInfo

destroy

public void destroy()

isDisposed

public final boolean isDisposed()

getExtensionPoints

public ExtensionPoint[] getExtensionPoints()
Description copied from interface: RegistrationInfo
Gets the defined extension points.

Specified by:
getExtensionPoints in interface RegistrationInfo
Returns:
the defined extension points

getComponent

public ComponentInstance getComponent()
Description copied from interface: RegistrationInfo
Gets the component instance or null if the component was not yet activated.

Specified by:
getComponent in interface RegistrationInfo
Returns:
the component instance

reload

public void reload()
            throws Exception
Reload the underlying component if reload is supported

Throws:
Exception

getName

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

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

getProperties

public Map<String,Property> getProperties()
Description copied from interface: RegistrationInfo
Gets the component properties.

Specified by:
getProperties in interface RegistrationInfo
Returns:
the component properties

getExtensionPoint

public ExtensionPointImpl getExtensionPoint(String name)

getState

public int getState()
Description copied from interface: RegistrationInfo
Gets the component state.

Specified by:
getState in interface RegistrationInfo
Returns:
the component state

getExtensions

public Extension[] getExtensions()
Description copied from interface: RegistrationInfo
Gets the extensions contributed by this component.

Specified by:
getExtensions in interface RegistrationInfo
Returns:
the contributed extensions

getRequiredComponents

public Set<ComponentName> getRequiredComponents()
Description copied from interface: RegistrationInfo
Gets the list of the required components.

Specified by:
getRequiredComponents in interface RegistrationInfo
Returns:
the required components

getContext

public RuntimeContext getContext()
Description copied from interface: RegistrationInfo
Gets the runtime context that created this registration info.

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

getBundle

public String getBundle()
Description copied from interface: RegistrationInfo
Get the owner bundle symbolic name of that component. If null the default owner is used.

Specified by:
getBundle in interface RegistrationInfo
Returns:

getVersion

public Version getVersion()
Description copied from interface: RegistrationInfo
Gets the component version.

Specified by:
getVersion in interface RegistrationInfo

getDocumentation

public String getDocumentation()
Description copied from interface: RegistrationInfo
Gets any comments on this component.

Specified by:
getDocumentation in interface RegistrationInfo

toString

public String toString()
Overrides:
toString in class Object

getManager

public ComponentManager getManager()
Description copied from interface: RegistrationInfo
Gets the component manager.

Specified by:
getManager in interface RegistrationInfo
Returns:
the component manager

restart

public void restart()
             throws Exception
Throws:
Exception

notifyApplicationStarted

public void notifyApplicationStarted()
                              throws Exception
Description copied from interface: RegistrationInfo
Notify the component instance that the Nuxeo application started

Specified by:
notifyApplicationStarted in interface RegistrationInfo
Throws:
Exception

activate

public void activate()
              throws Exception
Throws:
Exception

deactivate

public void deactivate()
                throws Exception
Throws:
Exception

resolve

public void resolve()
             throws Exception
Throws:
Exception

unresolve

public void unresolve()
               throws Exception
Throws:
Exception

isActivated

public boolean isActivated()
Description copied from interface: RegistrationInfo
Checks whether this component is activated.

Specified by:
isActivated in interface RegistrationInfo
Returns:
true if the component is activated, false otherwise

isResolved

public boolean isResolved()
Description copied from interface: RegistrationInfo
Checks whether this component is resolved (i˙e˙ all its dependencies are satisfied).

Specified by:
isResolved in interface RegistrationInfo
Returns:
true if the component is resolved, false otherwise

getProvidedServiceNames

public String[] getProvidedServiceNames()
Description copied from interface: RegistrationInfo
Gets the list of provided services or null if no service is provided.

Specified by:
getProvidedServiceNames in interface RegistrationInfo
Returns:
an array containing the service class names or null if no service are provided

getServiceDescriptor

public ServiceDescriptor getServiceDescriptor()

getImplementation

public String getImplementation()
Description copied from interface: RegistrationInfo
Give the class name for the component implementation if this is a java component

Specified by:
getImplementation in interface RegistrationInfo
Returns:
class name

checkExtensions

public void checkExtensions()

getXmlFileUrl

public URL getXmlFileUrl()
Description copied from interface: RegistrationInfo
Retrieve the URL of the XML file used to declare the component

Specified by:
getXmlFileUrl in interface RegistrationInfo
Returns:
the XML file URL

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.