com.genesyslab.ail
Interface Switch

All Superinterfaces:
IdObject

public interface Switch
extends IdObject

Representation of a switch.


Nested Class Summary
static class Switch.Type
          Enum for the switch types.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject
IdObject.ObjectType
 
Method Summary
 java.util.Collection getAccessibleSwitches()
          Returns the accessible switches, that this switch can communicate with.
 java.lang.String getName()
          The name of this switch.
 java.lang.Integer getTenantId()
          Returns the identifier of the Tenant to which this switch beongs.
 Switch.Type getType()
          The type of this switch.
 boolean isCapable(Dn.Action action)
          Returns true if this switch is capable of doing this action.
 boolean isCapable(InteractionVoice.Action action)
          Returns true if this switch is capable of doing this action.
 boolean isWorkmodeCapable(Dn.Workmode workmode)
          Returns true if this switch is capable of handling this workmode.
 
Methods inherited from interface com.genesyslab.ail.IdObject
getId, getObjectType
 

Method Detail

getName

java.lang.String getName()
The name of this switch.


getType

Switch.Type getType()
The type of this switch.


isCapable

boolean isCapable(InteractionVoice.Action action)
Returns true if this switch is capable of doing this action.
It does not take into account a DN or interaction state. This method is provided for button hiding purpose. Buttons should be enabled according to the Possible.isPossible(com.genesyslab.ail.Enum) method, but you may not want to show a button that would always be disabled.
If this method returns false, InteractionVoice.isPossible on any interaction of any DN on this switch will always return false, for this action. You can therefore hide the button that corresponds to this action.

Note: If the T-Server is not started, calling this method can return a wrong result, as for example, with the switch A4400 for MUTE_ON and MUTE_OFF actions.

Parameters:
action - the action to check.
Returns:
true if the action is possible.

isCapable

boolean isCapable(Dn.Action action)
Returns true if this switch is capable of doing this action.
It does not take into account a DN state. This method is provided for button hiding purpose. Buttons should be enabled according to the Possible.isPossible(com.genesyslab.ail.Enum) method, but you may not want to show a button that would always be disabled.
If this method returns false, Dn.isPossible on any DN on this switch will always return false, for this action. You can therefore hide the button that corresponds to this action.

Note: If the T-Server is not started, calling this method can return a wrong result, as for example, with the switch A4400 for MUTE_ON and MUTE_OFF actions.

Parameters:
action - the action to check.
Returns:
true if the action is possible.

isWorkmodeCapable

boolean isWorkmodeCapable(Dn.Workmode workmode)
Returns true if this switch is capable of handling this workmode.


getAccessibleSwitches

java.util.Collection getAccessibleSwitches()
Returns the accessible switches, that this switch can communicate with.

Returns:
a collection of Switch.

getTenantId

java.lang.Integer getTenantId()
Returns the identifier of the Tenant to which this switch beongs.