org.objectweb.fractal.gui.model
Class BasicInterface

java.lang.Object
  extended byorg.objectweb.fractal.gui.model.BasicInterface
All Implemented Interfaces:
Interface
Direct Known Subclasses:
BasicClientInterface, BasicServerInterface

public abstract class BasicInterface
extends java.lang.Object
implements Interface

Abstract implementation of the Interface interface.


Field Summary
protected  Interface complementaryItf
          The complementary interface of this interface.
protected  Interface masterCollectionItf
          The master collection interface of this interface, or null if this interface is not a slave collection interface.
protected  BasicComponent owner
          The component that owns this interface.
protected  java.util.List slaveCollectionItfs
          The slave collection interfaces of this master collection interface.
 
Fields inherited from interface org.objectweb.fractal.gui.model.Interface
MANDATORY_INTERFACE_NOT_BOUND, NAME_ALREADY_USED, NAME_MISSING, OK, SIGNATURE_CLASS_INVALID, SIGNATURE_CLASS_NOT_FOUND, SIGNATURE_MISSING
 
Method Summary
 Interface getComplementaryInterface()
          Returns the complementary interface of this interface.
 Interface getMasterCollectionInterface()
          Returns the master collection interface of this interface.
 Interface getMasterInterface()
          Return the master interface of this interface.
 java.lang.String getName()
          Returns the name of this interface.
 Component getOwner()
          Returns the component that owns this interface.
 java.lang.String getSignature()
          Returns the signature of this interface.
 java.util.List getSlaveCollectionInterfaces()
          Returns the slave collection interfaces of this interface.
 long getStatus()
          Returns the status of this interface.
 boolean isCollection()
          Returns the cardinality of this interface.
 boolean isInternal()
          Returns true if this interface is an internal interface.
 boolean isOptional()
          Returns the contingency of this interface.
 void setIsCollection(boolean isCollection)
          Sets the cadrinality of this interface.
 void setIsOptional(boolean isOptional)
          Sets the contingency of this interface.
 void setName(java.lang.String name)
          Sets the name of this interface.
 void setSignature(java.lang.String signature)
          Sets the signature of this interface.
 void setStatus(long status)
          Sets the status of this interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected BasicComponent owner
The component that owns this interface.


masterCollectionItf

protected Interface masterCollectionItf
The master collection interface of this interface, or null if this interface is not a slave collection interface.


slaveCollectionItfs

protected java.util.List slaveCollectionItfs
The slave collection interfaces of this master collection interface. This list is a list of Interface objects. It is empty if this interface is not a master collection interface.


complementaryItf

protected Interface complementaryItf
The complementary interface of this interface.

Method Detail

getOwner

public Component getOwner()
Description copied from interface: Interface
Returns the component that owns this interface.

Specified by:
getOwner in interface Interface
Returns:
the component that owns this interface.

getStatus

public long getStatus()
Description copied from interface: Interface
Returns the status of this interface.

Specified by:
getStatus in interface Interface
Returns:
the status flags of this interface. Each flag, i.e., each bit of the returned value is independent from the other, and indicates an error if it is set.
See Also:
Interface.setStatus(long)

setStatus

public void setStatus(long status)
Description copied from interface: Interface
Sets the status of this interface. This method is reserved for model providers, and must not be called by model users.

Specified by:
setStatus in interface Interface
Parameters:
status - the new status of this interface.
See Also:
Interface.getStatus()

getName

public java.lang.String getName()
Description copied from interface: Interface
Returns the name of this interface.

Specified by:
getName in interface Interface
Returns:
the name of this interface.
See Also:
Interface.setName(java.lang.String)

setName

public void setName(java.lang.String name)
Description copied from interface: Interface
Sets the name of this interface. This method notifies the configuration listeners, via the interfaceNameChanged method.

Specified by:
setName in interface Interface
Parameters:
name - the new interface name.
See Also:
Interface.getName()

getSignature

public java.lang.String getSignature()
Description copied from interface: Interface
Returns the signature of this interface.

Specified by:
getSignature in interface Interface
Returns:
the signature of this interface.
See Also:
Interface.setSignature(java.lang.String)

setSignature

public void setSignature(java.lang.String signature)
Description copied from interface: Interface
Sets the signature of this interface. This method notifies the configuration listeners, via the interfaceSignatureChanged method.

Specified by:
setSignature in interface Interface
Parameters:
signature - the new interface signature.
See Also:
Interface.getSignature()

isInternal

public boolean isInternal()
Description copied from interface: Interface
Returns true if this interface is an internal interface.

Specified by:
isInternal in interface Interface
Returns:
true if this interface is an internal interface, false otherwise.

isOptional

public boolean isOptional()
Description copied from interface: Interface
Returns the contingency of this interface.

Specified by:
isOptional in interface Interface
Returns:
true if this interface is optional, false otherwise.

setIsOptional

public void setIsOptional(boolean isOptional)
Description copied from interface: Interface
Sets the contingency of this interface. This method notifies the configuration listeners, via the interfaceContingencyChanged method.

Specified by:
setIsOptional in interface Interface
Parameters:
isOptional - the new interface contingency.

isCollection

public boolean isCollection()
Description copied from interface: Interface
Returns the cardinality of this interface.

Specified by:
isCollection in interface Interface
Returns:
true if this interface is a collection interface, false otherwise.

setIsCollection

public void setIsCollection(boolean isCollection)
Description copied from interface: Interface
Sets the cadrinality of this interface. This method notifies the configuration listeners, via the interfaceCardinalityChanged method.

Specified by:
setIsCollection in interface Interface
Parameters:
isCollection - the new interface cardinality.

getMasterCollectionInterface

public Interface getMasterCollectionInterface()
Description copied from interface: Interface
Returns the master collection interface of this interface.

Specified by:
getMasterCollectionInterface in interface Interface
Returns:
the master collection interface of this interface, or null if this interface is not a slave collection interface.

getSlaveCollectionInterfaces

public java.util.List getSlaveCollectionInterfaces()
Description copied from interface: Interface
Returns the slave collection interfaces of this interface.

Specified by:
getSlaveCollectionInterfaces in interface Interface
Returns:
an unmodifiable list of the slave collection interfaces of this interface. This list is empty if this interface is not a master collection interface.

getComplementaryInterface

public Interface getComplementaryInterface()
Description copied from interface: Interface
Returns the complementary interface of this interface.

Specified by:
getComplementaryInterface in interface Interface
Returns:
the complementary interface of this interface.

getMasterInterface

public Interface getMasterInterface()
Description copied from interface: Interface
Return the master interface of this interface.

Specified by:
getMasterInterface in interface Interface
Returns:
the master interface of this interface, or null if this interface is not an interface of a slave component.