de.janrufmonitor.framework.rules
Interface IRule


public interface IRule

This interface must be implemented by a rule object. A rule simply consists of a service name (the service the rule is assigned to, a MSN and a CIP.

Author:
Thilo Brandt

Method Summary
 ICip getCip()
          Gets the CIP object of the rule
 IPhonenumber[] getExcludePhonenumbers()
          Gets the excluded phonenumbers to which this rule applies to
 IMsn getMsn()
          Gets the MSN object of the rule
 String getName()
          Gets the name of this rule.
 IPhonenumber[] getPhonenumbers()
          Gets the phonenumbers to which this rule applies to
 String getServiceID()
          Gets the ID of the service the rule is assigned to.
 String getTimeslot()
          Gets the timeslot this rule is valid in.
 boolean isActive()
          Gets the status of this rule
 boolean isValid()
          Checks if the rule is valid
 void setActive(boolean active)
          Set the status of this rule
 void setCip(ICip cip)
          Sets the CIP object of the rule
 void setExcludePhonenumbers(IPhonenumber[] phones)
          Sets the excluded phonenumbers to which this rule applies to
 void setMsn(IMsn msn)
          Sets the MSN object of the rule
 void setName(String name)
          Sets the name of this rule.
 void setPhonenumbers(IPhonenumber[] phones)
          Sets the phonenumbers to which this rule applies to
 void setService(String serviceID)
          Sets the ID of the service the rule is assigned to.
 void setTimeslot(String ts)
          Sets the timeslot this rule is valid in.
 

Method Detail

setName

void setName(String name)
Sets the name of this rule.

Parameters:
name -

getName

String getName()
Gets the name of this rule.

Returns:

isValid

boolean isValid()
Checks if the rule is valid

Returns:
true if it is valid, false if not.

setService

void setService(String serviceID)
Sets the ID of the service the rule is assigned to.

Parameters:
serviceID - the servcie ID of the assigned service

setMsn

void setMsn(IMsn msn)
Sets the MSN object of the rule

Parameters:
msn - MSN to be set

setCip

void setCip(ICip cip)
Sets the CIP object of the rule

Parameters:
msn - CIP to be set

getServiceID

String getServiceID()
Gets the ID of the service the rule is assigned to.

Returns:
service ID

getMsn

IMsn getMsn()
Gets the MSN object of the rule

Returns:
MSN object

getCip

ICip getCip()
Gets the CIP object of the rule

Returns:
CIP object

setActive

void setActive(boolean active)
Set the status of this rule

Parameters:
active - falg to determine if rule is active

isActive

boolean isActive()
Gets the status of this rule

Returns:
true if rule is active, false if not

setPhonenumbers

void setPhonenumbers(IPhonenumber[] phones)
Sets the phonenumbers to which this rule applies to

Parameters:
phones - phonenumbers to which this rule applies to

getPhonenumbers

IPhonenumber[] getPhonenumbers()
Gets the phonenumbers to which this rule applies to

Returns:
phonenumbers

getExcludePhonenumbers

IPhonenumber[] getExcludePhonenumbers()
Gets the excluded phonenumbers to which this rule applies to

Returns:
phonenumbers

setExcludePhonenumbers

void setExcludePhonenumbers(IPhonenumber[] phones)
Sets the excluded phonenumbers to which this rule applies to

Parameters:
phones - phonenumbers to which this rule applies to

getTimeslot

String getTimeslot()
Gets the timeslot this rule is valid in.

Returns:
string containing the encoded timeslots

setTimeslot

void setTimeslot(String ts)
Sets the timeslot this rule is valid in.

Parameters:
ts - encoded timeslot data


Copyright © 2010 by Thilo Brandt. All Rights Reserved.