com.genesyslab.ail
Interface DnFunction

All Superinterfaces:
IdObject, Possible

public interface DnFunction
extends Possible

The "physical" operations and states of a DN.
This class is a set of features that can be available independently depending on the switch capabilities.


Nested Class Summary
static class DnFunction.Action
          Enum for the possible actions.
static class DnFunction.Status
          Enum for the status of the feature.
static class DnFunction.Type
          Enum for the available features or DN functions.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject
IdObject.ObjectType
 
Method Summary
 void addDnFunctionListener(DnFunctionListener listener)
          Adds a listener.
 void cancelForward(java.util.Map reasons, java.util.Map extensions)
          Cancels the Forward on the associated DN.
 Dn getDn()
          Returns the associated DN object.
 DnFunction.Status getDNDStatus()
          Returns the Status of the current DND function.
 java.lang.String getForwardNumber()
          If the Forward is active, returns the destination number.
 DnFunction.Status getForwardStatus()
          Returns the status of the current Forward function.
 DnFunction.Status getHookStatus()
          Returns the status of the current Hook function.
 void removeDnFunctionListener(DnFunctionListener listener)
          Removes a listener.
 void setDNDOff(java.util.Map reasons, java.util.Map extensions)
          Sets the Do Not Disturb feature to Off.
 void setDNDOn(java.util.Map reasons, java.util.Map extensions)
          Sets the Do Not Disturb feature to on.
 void setForward(java.lang.String number, java.util.Map reasons, java.util.Map extensions)
          Sets the Forward on the associated DN.
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 
Methods inherited from interface com.genesyslab.ail.IdObject
getId, getObjectType
 

Method Detail

getDn

Dn getDn()
Returns the associated DN object.

Returns:
the associated DN, never null.

getDNDStatus

DnFunction.Status getDNDStatus()
Returns the Status of the current DND function.

Note: Status.ON means here that an Event DNDOn has been received. Status.OFF means that an Event DNDOff has been received.


getHookStatus

DnFunction.Status getHookStatus()
Returns the status of the current Hook function.

Note: Status.ON means here that an Event OnHook has been received. Status.OFF means that an Event OffHook has been received.


getForwardStatus

DnFunction.Status getForwardStatus()
Returns the status of the current Forward function.


getForwardNumber

java.lang.String getForwardNumber()
If the Forward is active, returns the destination number.


setDNDOn

void setDNDOn(java.util.Map reasons,
              java.util.Map extensions)
              throws RequestFailedException
Sets the Do Not Disturb feature to on.

Parameters:
reasons - Additional information associated with this action. Or null if no reason is provided.
extensions - Additional switch-specific information that has to be transmitted with this request. Or null if no extension is provided.
Throws:
RequestFailedException - if the request could not be completed.

setDNDOff

void setDNDOff(java.util.Map reasons,
               java.util.Map extensions)
               throws RequestFailedException
Sets the Do Not Disturb feature to Off.

Parameters:
reasons - Additional information associated with this action. Or null if no reason is provided.
extensions - Additional switch-specific information that has to be transmitted with this request. Or null if no extension is provided.
Throws:
RequestFailedException - if the request could not be completed.

setForward

void setForward(java.lang.String number,
                java.util.Map reasons,
                java.util.Map extensions)
                throws RequestFailedException
Sets the Forward on the associated DN.

Parameters:
number - the target DN of the Forward.
reasons - Additional information associated with this action. Or null if no reason is provided.
extensions - Additional switch-specific information that has to be transmitted with this request. Or null if no extension is provided.
Throws:
RequestFailedException - if the request could not be completed.

cancelForward

void cancelForward(java.util.Map reasons,
                   java.util.Map extensions)
                   throws RequestFailedException
Cancels the Forward on the associated DN.

Parameters:
reasons - Additional information associated with this action. Or null if no reason is provided.
extensions - Additional switch-specific information that has to be transmitted with this request. Or null if no extension is provided.
Throws:
RequestFailedException - if the request could not be completed.

addDnFunctionListener

void addDnFunctionListener(DnFunctionListener listener)
Adds a listener.


removeDnFunctionListener

void removeDnFunctionListener(DnFunctionListener listener)
Removes a listener.