org.objectweb.fractal.gui.model
Interface Interface

All Known Subinterfaces:
ClientInterface, ServerInterface
All Known Implementing Classes:
BasicClientInterface, BasicInterface, BasicServerInterface, SharedClientInterface, SharedInterface, SharedServerInterface

public interface Interface

A component interface.


Field Summary
static long MANDATORY_INTERFACE_NOT_BOUND
          A status flag indicating that this mandatory interface is not bound.
static long NAME_ALREADY_USED
          A status flag indicating that the interface's name is already used by another interface.
static long NAME_MISSING
          A status flag indicating that the interface's name is missing.
static long OK
          The status flags corresponding to a valid interface.
static long SIGNATURE_CLASS_INVALID
          A status flag indicating that the Java interface designated by the interface's signature is invalid.
static long SIGNATURE_CLASS_NOT_FOUND
          A status flag indicating that the Java interface designated by the interface's signature cannot be found.
static long SIGNATURE_MISSING
          A status flag indicating that the interface's signature is 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.
 

Field Detail

OK

public static final long OK
The status flags corresponding to a valid interface.

See Also:
Constant Field Values

NAME_MISSING

public static final long NAME_MISSING
A status flag indicating that the interface's name is missing.

See Also:
Constant Field Values

NAME_ALREADY_USED

public static final long NAME_ALREADY_USED
A status flag indicating that the interface's name is already used by another interface.

See Also:
Constant Field Values

SIGNATURE_MISSING

public static final long SIGNATURE_MISSING
A status flag indicating that the interface's signature is missing.

See Also:
Constant Field Values

SIGNATURE_CLASS_NOT_FOUND

public static final long SIGNATURE_CLASS_NOT_FOUND
A status flag indicating that the Java interface designated by the interface's signature cannot be found.

See Also:
Constant Field Values

SIGNATURE_CLASS_INVALID

public static final long SIGNATURE_CLASS_INVALID
A status flag indicating that the Java interface designated by the interface's signature is invalid.

See Also:
Constant Field Values

MANDATORY_INTERFACE_NOT_BOUND

public static final long MANDATORY_INTERFACE_NOT_BOUND
A status flag indicating that this mandatory interface is not bound.

See Also:
Constant Field Values
Method Detail

getOwner

public Component getOwner()
Returns the component that owns this interface.

Returns:
the component that owns this interface.

getStatus

public long getStatus()
Returns the status of this 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:
setStatus(long)

setStatus

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

Parameters:
status - the new status of this interface.
See Also:
getStatus()

getName

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

Returns:
the name of this interface.
See Also:
setName(java.lang.String)

setName

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

Parameters:
name - the new interface name.
See Also:
getName()

getSignature

public java.lang.String getSignature()
Returns the signature of this interface.

Returns:
the signature of this interface.
See Also:
setSignature(java.lang.String)

setSignature

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

Parameters:
signature - the new interface signature.
See Also:
getSignature()

isInternal

public boolean isInternal()
Returns true if this interface is an internal interface.

Returns:
true if this interface is an internal interface, false otherwise.

isOptional

public boolean isOptional()
Returns the contingency of this interface.

Returns:
true if this interface is optional, false otherwise.

setIsOptional

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

Parameters:
isOptional - the new interface contingency.

isCollection

public boolean isCollection()
Returns the cardinality of this interface.

Returns:
true if this interface is a collection interface, false otherwise.

setIsCollection

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

Parameters:
isCollection - the new interface cardinality.

getMasterCollectionInterface

public Interface getMasterCollectionInterface()
Returns the master collection interface of this 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()
Returns the slave collection interfaces of this 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()
Returns the complementary interface of this interface.

Returns:
the complementary interface of this interface.

getMasterInterface

public Interface getMasterInterface()
Return the master interface of this interface.

Returns:
the master interface of this interface, or null if this interface is not an interface of a slave component.