org.jboss.portal.server
Class ServerObject

java.lang.Object
  extended by org.jboss.portal.server.kernel.BaseService
      extended by org.jboss.portal.server.ServerObject
All Implemented Interfaces:
PluginContainer, Registration, Service
Direct Known Subclasses:
Application, Component, Instance, Page, Portal, PortalServer, Window

public abstract class ServerObject
extends BaseService
implements Service, Registration, PluginContainer

A common base for portal objects that live in a portal container.


Field Summary
protected  org.apache.log4j.Logger log
          Logger.
protected  java.lang.String name
          Node name.
protected  java.util.Map plugins
          Dependant plugins.
 
Fields inherited from class org.jboss.portal.server.kernel.BaseService
ctx
 
Constructor Summary
ServerObject(java.lang.String name)
           
 
Method Summary
 void addDependsOnMe(ServiceImplementation implementation)
          Add a service depending on this one.
 void addIDependOn(ServiceImplementation implementation)
          Add a service it depends on.
 void addPlugin(java.lang.String key, Plugin plugin)
           
 void create()
          Create.
 ServerObjectContext createContext()
          Create and returns a context object.
 ServerURL createURL()
          Create a new URL for that will target this object.
 void destroy()
          Destroy.
 ServerObjectID getID()
          Return an ID that uniquely identify this portal object.
abstract  ServerObjectMetaData getMetaData()
          Return the meta data for that object.
 java.lang.String getName()
          Return the name.
 Plugin getPlugin(java.lang.String key)
           
 java.util.Set getPluginKeySet()
           
abstract  PortalServer getServer()
          Return the container this object belongs to.
 java.lang.Object invoke(Invocation invocation)
          Invoke on this object.
 void removeDependsOnMe(ServiceImplementation implementation)
          Remove a service depending on this one.
 void removeIDependOn(ServiceImplementation implementation)
          Remove a service it depends on.
 void removePlugin(java.lang.String key)
           
 void start()
          Start.
 void stop()
          Stop.
 
Methods inherited from class org.jboss.portal.server.kernel.BaseService
registered, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.portal.server.kernel.Registration
registered, unregister
 

Field Detail

name

protected final java.lang.String name
Node name.


log

protected final org.apache.log4j.Logger log
Logger.


plugins

protected java.util.Map plugins
Dependant plugins.

Constructor Detail

ServerObject

public ServerObject(java.lang.String name)
Throws:
java.lang.IllegalArgumentException - if the component name is null
Method Detail

getMetaData

public abstract ServerObjectMetaData getMetaData()
Return the meta data for that object.


getID

public ServerObjectID getID()
Return an ID that uniquely identify this portal object.


getServer

public abstract PortalServer getServer()
Return the container this object belongs to.


getName

public java.lang.String getName()
Return the name.


createContext

public ServerObjectContext createContext()
                                  throws java.lang.UnsupportedOperationException
Create and returns a context object.

Returns:
a context object
Throws:
java.lang.UnsupportedOperationException - if the object does not support contextualization

addIDependOn

public void addIDependOn(ServiceImplementation implementation)
Description copied from interface: Registration
Add a service it depends on.

Specified by:
addIDependOn in interface Registration
Overrides:
addIDependOn in class BaseService

removeIDependOn

public void removeIDependOn(ServiceImplementation implementation)
Description copied from interface: Registration
Remove a service it depends on.

Specified by:
removeIDependOn in interface Registration
Overrides:
removeIDependOn in class BaseService

addDependsOnMe

public void addDependsOnMe(ServiceImplementation implementation)
Description copied from interface: Registration
Add a service depending on this one.

Specified by:
addDependsOnMe in interface Registration
Overrides:
addDependsOnMe in class BaseService

removeDependsOnMe

public void removeDependsOnMe(ServiceImplementation implementation)
Description copied from interface: Registration
Remove a service depending on this one.

Specified by:
removeDependsOnMe in interface Registration
Overrides:
removeDependsOnMe in class BaseService

addPlugin

public void addPlugin(java.lang.String key,
                      Plugin plugin)
Specified by:
addPlugin in interface PluginContainer

removePlugin

public void removePlugin(java.lang.String key)
Specified by:
removePlugin in interface PluginContainer

getPlugin

public Plugin getPlugin(java.lang.String key)
Specified by:
getPlugin in interface PluginContainer

getPluginKeySet

public java.util.Set getPluginKeySet()
Specified by:
getPluginKeySet in interface PluginContainer

create

public void create()
            throws java.lang.Exception
Description copied from interface: Service
Create.

Specified by:
create in interface Service
Overrides:
create in class BaseService
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from interface: Service
Start.

Specified by:
start in interface Service
Overrides:
start in class BaseService
Throws:
java.lang.Exception

stop

public void stop()
Description copied from interface: Service
Stop.

Specified by:
stop in interface Service
Overrides:
stop in class BaseService

destroy

public void destroy()
Description copied from interface: Service
Destroy.

Specified by:
destroy in interface Service
Overrides:
destroy in class BaseService

invoke

public java.lang.Object invoke(Invocation invocation)
Invoke on this object.


createURL

public ServerURL createURL()
Create a new URL for that will target this object.