Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

recoin.group
Class ModuleView  view ModuleView download ModuleView.java

java.lang.Object
  extended byrecoin.group.ModuleView
All Implemented Interfaces:
Module, java.io.Serializable

public class ModuleView
extends java.lang.Object
implements Module, java.io.Serializable

A ModuleView implements the Module interface, but doesn't implement the runtime methods like prepareContainer 55 . It merely encapsulates information about the Module which can also be transmitted across a network, because a ModuleView implements the Serializable interface.
ModuleView objects are used, for example, by the administration web application to transport and store data about the Module.

Version:
0.2.9

Field Summary
protected  boolean activate
          The flag signaling whether this Module should be loaded on startup.
protected  boolean active
          The flag signaling the ready state of this Module.
protected  java.util.Vector components
          The Component objects that are contained in this Module.
protected  java.lang.String description
          A description of this Module.
protected  java.lang.String groupname
          The name of the Module's ModuleGroup.
protected  int id
          The unique ID.
(package private) static org.apache.log4j.Logger logger
          The logger for this class.
protected  java.lang.String name
          The name of this Module.
 
Constructor Summary
ModuleView(int id)
          Creates a new ModuleView with the specified ID.
ModuleView(Module module)
          Creates a new ModuleView based on the specified Module by copying its attributes.
 
Method Summary
 boolean activate()
          Method not implemented in this class!! Always returns false.
 void addComponent(Component component)
          Verifies that the specified Component is an instance of ComponentView.
 boolean equals(java.lang.Object o)
          Compares the specified Object to this ModuleView.
 boolean getActivateOnStartup()
          Returns the value of the activate field of this ModuleView.
 Component getComponent(int id)
          Returns the Component with the specified ID.
 int getComponentCount()
          Returns the number of Component objects contained in this Module.
 int[] getComponentIDs()
          Returns the IDs of the Component objects contained in this Module as an int array.
 java.util.Vector getComponents()
          Returns the Component objects of this Module.
 java.lang.String getDescription()
          Returns the description of this Module.
 ModuleGroup getGroup()
          Method not implemented in this class! Always returns NULL.
 java.lang.String getGroupname()
          Returns the name of the ModuleGroup.
 int getID()
          Returns the ID of this Module.
 java.lang.String getName()
          Returns the name of this Module.
 boolean isActive()
          Returns whether this Module has been successfully activated.
 java.util.Vector prepareContainer(recoin.container.RetrievalContainer container)
          Not implemented in this class! Always returns NULL.
 ComponentRunnable prepareContainer(recoin.container.RetrievalContainer container, recoin.system.session.ComponentOrder order)
          Not implemented in this class! Always returns NULL.
 ComponentRunnable prepareContainer(recoin.container.RetrievalContainer container, recoin.system.session.ComponentOrder order, ComponentRunnable runnable)
          Not implemented in this class! Always returns NULL.
 void removeComponent(Component component)
          Tries to remove the specified Component from this ModuleView.
 void setActivateOnStartup(boolean activate)
          Sets the value of the activate field of this ModuleView to the specified value.
 void setActive(boolean active)
          Sets the value of the active field of this Module to the specified value.
 void setDescription(java.lang.String description)
          Sets the description of this Module to the specified description.
 void setGroup(ModuleGroup group)
          Method not implemented in this class!
 void setName(java.lang.String name)
          Sets the name of this Module to the specified name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected int id
The unique ID.


activate

protected boolean activate
The flag signaling whether this Module should be loaded on startup.


active

protected boolean active
The flag signaling the ready state of this Module.


groupname

protected java.lang.String groupname
The name of the Module's ModuleGroup.


name

protected java.lang.String name
The name of this Module.


description

protected java.lang.String description
A description of this Module.


components

protected java.util.Vector components
The Component objects that are contained in this Module.


logger

static org.apache.log4j.Logger logger
The logger for this class.

Constructor Detail

ModuleView

public ModuleView(int id)
Creates a new ModuleView with the specified ID.


ModuleView

public ModuleView(Module module)
Creates a new ModuleView based on the specified Module by copying its attributes. Any Component objects contained in the specified Module will be transformed into ComponentView objects to maintain serializability.

Method Detail

getDescription

public java.lang.String getDescription()
Returns the description of this Module.

Specified by:
getDescription in interface Module

setDescription

public void setDescription(java.lang.String description)
Sets the description of this Module to the specified description.

Specified by:
setDescription in interface Module

getName

public java.lang.String getName()
Returns the name of this Module.

Specified by:
getName in interface Module

setName

public void setName(java.lang.String name)
Sets the name of this Module to the specified name.

Specified by:
setName in interface Module

getComponentIDs

public int[] getComponentIDs()
Returns the IDs of the Component objects contained in this Module as an int array.

Specified by:
getComponentIDs in interface Module

getComponentCount

public int getComponentCount()
Returns the number of Component objects contained in this Module.

Specified by:
getComponentCount in interface Module

getComponents

public java.util.Vector getComponents()
Returns the Component objects of this Module.

Specified by:
getComponents in interface Module

getID

public int getID()
Returns the ID of this Module.

Specified by:
getID in interface Module

getGroupname

public java.lang.String getGroupname()
Returns the name of the ModuleGroup.

Specified by:
getGroupname in interface Module

getGroup

public ModuleGroup getGroup()
Method not implemented in this class! Always returns NULL.

Specified by:
getGroup in interface Module

setGroup

public void setGroup(ModuleGroup group)
Method not implemented in this class!

Specified by:
setGroup in interface Module

getComponent

public Component getComponent(int id)
Returns the Component with the specified ID. The method returns NULL if no Component with the specified ID can be found.

Specified by:
getComponent in interface Module

getActivateOnStartup

public boolean getActivateOnStartup()
Returns the value of the activate field of this ModuleView.

Specified by:
getActivateOnStartup in interface Module

setActivateOnStartup

public void setActivateOnStartup(boolean activate)
Sets the value of the activate field of this ModuleView to the specified value.

Specified by:
setActivateOnStartup in interface Module

activate

public boolean activate()
Method not implemented in this class!! Always returns false.

Specified by:
activate in interface Module

isActive

public boolean isActive()
Returns whether this Module has been successfully activated.

Specified by:
isActive in interface Module

setActive

public void setActive(boolean active)
Sets the value of the active field of this Module to the specified value.

Specified by:
setActive in interface Module

prepareContainer

public java.util.Vector prepareContainer(recoin.container.RetrievalContainer container)
Not implemented in this class! Always returns NULL.

Specified by:
prepareContainer in interface Module

prepareContainer

public ComponentRunnable prepareContainer(recoin.container.RetrievalContainer container,
                                          recoin.system.session.ComponentOrder order)
Not implemented in this class! Always returns NULL.

Specified by:
prepareContainer in interface Module

prepareContainer

public ComponentRunnable prepareContainer(recoin.container.RetrievalContainer container,
                                          recoin.system.session.ComponentOrder order,
                                          ComponentRunnable runnable)
Not implemented in this class! Always returns NULL.

Specified by:
prepareContainer in interface Module

addComponent

public void addComponent(Component component)
Verifies that the specified Component is an instance of ComponentView. If so, it is added to this ModuleView.

Specified by:
addComponent in interface Module

removeComponent

public void removeComponent(Component component)
Tries to remove the specified Component from this ModuleView. If the Component was removed successfully, the Component's setInitiated 55 method is called with a parameter of false.

Specified by:
removeComponent in interface Module

equals

public boolean equals(java.lang.Object o)
Compares the specified Object to this ModuleView. If the Object is an instance of ModuleView and if its fields equal this ModuleView's fields, the method returns true.

Specified by:
equals in interface Module