com.techventus.server.voice.datatypes
Class Phone

java.lang.Object
  extended by com.techventus.server.voice.datatypes.Phone
All Implemented Interfaces:
java.lang.Comparable<Phone>

public class Phone
extends java.lang.Object
implements java.lang.Comparable<Phone>


Constructor Summary
Phone(int id, java.lang.String name, java.lang.String phoneNumber)
           
Phone(gvjava.org.json.JSONObject phonesJSON)
          saveMode is off
Phone(gvjava.org.json.JSONObject phonesJSON, boolean pSaveMode)
          Instantiates a new Phone Object.
 
Method Summary
 int compareTo(Phone o)
           
static Phone[] createArrayFromJsonObject(gvjava.org.json.JSONObject phonesJSON)
           
 int getBehaviorOnRedirect()
           
 java.lang.String getCarrier()
           
 int getCustomOverrideState()
           
 java.lang.String getFormattedNumber()
           
 int getId()
           
 java.lang.String getIncomingAccessNumber()
           
 java.lang.String getName()
           
 java.lang.String getPhoneNumber()
           
 int getPolicyBitmask()
           
 int getType()
           
 Wd getWd()
           
 We getWe()
           
 java.lang.String[] getWeekdayTimes()
           
 java.lang.String[] getWeekendTimes()
           
 boolean isActive()
           
 boolean isdEPRECATEDDisabled()
           
 boolean isEnabledForOthers()
           
 boolean isRedirectToVoicemail()
           
 boolean isScheduleSet()
           
 boolean isSmsEnabled()
           
 boolean isTelephonyVerified()
           
 boolean isVerified()
           
 boolean isVoicemailForwardingVerified()
           
 boolean isWeekdayAllDay()
           
 boolean isWeekendAllDay()
           
static java.lang.Object phonesArrayToJsonObject(Phone[] phones)
           
 void setActive(boolean active)
           
 void setBehaviorOnRedirect(int behaviorOnRedirect)
           
 void setCarrier(java.lang.String carrier)
           
 void setCustomOverrideState(int customOverrideState)
           
 void setdEPRECATEDDisabled(boolean dEPRECATEDDisabled)
           
 void setEnabledForOthers(boolean enabledForOthers)
           
 void setFormattedNumber(java.lang.String formattedNumber)
           
 void setId(int id)
           
 void setIncomingAccessNumber(java.lang.String incomingAccessNumber)
           
 void setName(java.lang.String name)
           
 void setPhoneNumber(java.lang.String phoneNumber)
           
 void setPolicyBitmask(int policyBitmask)
           
 void setRedirectToVoicemail(boolean redirectToVoicemail)
           
 void setScheduleSet(boolean scheduleSet)
           
 void setSmsEnabled(boolean smsEnabled)
           
 void setTelephonyVerified(boolean telephonyVerified)
           
 void setType(int type)
           
 void setVerified(boolean verified)
           
 void setVoicemailForwardingVerified(boolean voicemailForwardingVerified)
           
 void setWd(Wd wd)
           
 void setWe(We we)
           
 void setWeekdayAllDay(boolean weekdayAllDay)
           
 void setWeekdayTimes(java.lang.String[] weekdayTimes)
           
 void setWeekendAllDay(boolean weekendAllDay)
           
 void setWeekendTimes(java.lang.String[] weekendTimes)
           
 java.lang.String toJson()
          Make a JSON text of the Settings.
 gvjava.org.json.JSONObject toJsonObject()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Phone

public Phone(int id,
             java.lang.String name,
             java.lang.String phoneNumber)

Phone

public Phone(gvjava.org.json.JSONObject phonesJSON)
      throws gvjava.org.json.JSONException
saveMode is off

Parameters:
phonesJSON -
Throws:
gvjava.org.json.JSONException

Phone

public Phone(gvjava.org.json.JSONObject phonesJSON,
             boolean pSaveMode)
      throws gvjava.org.json.JSONException
Instantiates a new Phone Object.

Parameters:
phonesJSON - the JSON representation of the Phone object
pSaveMode - the Save Mode boolean
Throws:
gvjava.org.json.JSONException - the JSONException
Method Detail

createArrayFromJsonObject

public static final Phone[] createArrayFromJsonObject(gvjava.org.json.JSONObject phonesJSON)
                                               throws gvjava.org.json.JSONException
Throws:
gvjava.org.json.JSONException

toJson

public java.lang.String toJson()
Make a JSON text of the Settings. For compactness, no whitespace is added. If this would not result in a syntactically correct JSON text, then null will be returned instead.

Warning: This method assumes that the data structure is acyclical.

Returns:
a printable, displayable, portable, transmittable representation of the object, beginning with { (left brace) and ending with } (right brace).

toJsonObject

public gvjava.org.json.JSONObject toJsonObject()

phonesArrayToJsonObject

public static java.lang.Object phonesArrayToJsonObject(Phone[] phones)
                                                throws gvjava.org.json.JSONException
Parameters:
phones -
Returns:
Json Object
Throws:
gvjava.org.json.JSONException

isActive

public boolean isActive()
Returns:
the active

getBehaviorOnRedirect

public int getBehaviorOnRedirect()
Returns:
the behaviorOnRedirect

getCarrier

public java.lang.String getCarrier()
Returns:
the carrier

getCustomOverrideState

public int getCustomOverrideState()
Returns:
the customOverrideState

isdEPRECATEDDisabled

public boolean isdEPRECATEDDisabled()
Returns:
the dEPRECATEDDisabled

isEnabledForOthers

public boolean isEnabledForOthers()
Returns:
the enabledForOthers

getFormattedNumber

public java.lang.String getFormattedNumber()
Returns:
the formattedNumber

getId

public int getId()
Returns:
the id

getIncomingAccessNumber

public java.lang.String getIncomingAccessNumber()
Returns:
the incomingAccessNumber

getName

public java.lang.String getName()
Returns:
the name

getPhoneNumber

public java.lang.String getPhoneNumber()
Returns:
the phoneNumber

getPolicyBitmask

public int getPolicyBitmask()
Returns:
the policyBitmask

isRedirectToVoicemail

public boolean isRedirectToVoicemail()
Returns:
the redirectToVoicemail

isScheduleSet

public boolean isScheduleSet()
Returns:
the scheduleSet

isSmsEnabled

public boolean isSmsEnabled()
Returns:
the smsEnabled

isTelephonyVerified

public boolean isTelephonyVerified()
Returns:
the telephonyVerified

getType

public int getType()
Returns:
the type

isVerified

public boolean isVerified()
Returns:
the verified

isVoicemailForwardingVerified

public boolean isVoicemailForwardingVerified()
Returns:
the voicemailForwardingVerified

getWd

public Wd getWd()
Returns:
the wd

getWe

public We getWe()
Returns:
the we

isWeekdayAllDay

public boolean isWeekdayAllDay()
Returns:
the weekdayAllDay

getWeekdayTimes

public java.lang.String[] getWeekdayTimes()
Returns:
the weekdayTimes

isWeekendAllDay

public boolean isWeekendAllDay()
Returns:
the weekendAllDay

getWeekendTimes

public java.lang.String[] getWeekendTimes()
Returns:
the weekendTimes

setActive

public void setActive(boolean active)
Parameters:
active - the active to set

setBehaviorOnRedirect

public void setBehaviorOnRedirect(int behaviorOnRedirect)
Parameters:
behaviorOnRedirect - the behaviorOnRedirect to set

setCarrier

public void setCarrier(java.lang.String carrier)
Parameters:
carrier - the carrier to set

setCustomOverrideState

public void setCustomOverrideState(int customOverrideState)
Parameters:
customOverrideState - the customOverrideState to set

setdEPRECATEDDisabled

public void setdEPRECATEDDisabled(boolean dEPRECATEDDisabled)
Parameters:
dEPRECATEDDisabled - the dEPRECATEDDisabled to set

setEnabledForOthers

public void setEnabledForOthers(boolean enabledForOthers)
Parameters:
enabledForOthers - the enabledForOthers to set

setFormattedNumber

public void setFormattedNumber(java.lang.String formattedNumber)
Parameters:
formattedNumber - the formattedNumber to set

setId

public void setId(int id)
Parameters:
id - the id to set

setIncomingAccessNumber

public void setIncomingAccessNumber(java.lang.String incomingAccessNumber)
Parameters:
incomingAccessNumber - the incomingAccessNumber to set

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

setPhoneNumber

public void setPhoneNumber(java.lang.String phoneNumber)
Parameters:
phoneNumber - the phoneNumber to set

setPolicyBitmask

public void setPolicyBitmask(int policyBitmask)
Parameters:
policyBitmask - the policyBitmask to set

setRedirectToVoicemail

public void setRedirectToVoicemail(boolean redirectToVoicemail)
Parameters:
redirectToVoicemail - the redirectToVoicemail to set

setScheduleSet

public void setScheduleSet(boolean scheduleSet)
Parameters:
scheduleSet - the scheduleSet to set

setSmsEnabled

public void setSmsEnabled(boolean smsEnabled)
Parameters:
smsEnabled - the smsEnabled to set

setTelephonyVerified

public void setTelephonyVerified(boolean telephonyVerified)
Parameters:
telephonyVerified - the telephonyVerified to set

setType

public void setType(int type)
Parameters:
type - the type to set

setVerified

public void setVerified(boolean verified)
Parameters:
verified - the verified to set

setVoicemailForwardingVerified

public void setVoicemailForwardingVerified(boolean voicemailForwardingVerified)
Parameters:
voicemailForwardingVerified - the voicemailForwardingVerified to set

setWd

public void setWd(Wd wd)
Parameters:
wd - the wd to set

setWe

public void setWe(We we)
Parameters:
we - the we to set

setWeekdayAllDay

public void setWeekdayAllDay(boolean weekdayAllDay)
Parameters:
weekdayAllDay - the weekdayAllDay to set

setWeekdayTimes

public void setWeekdayTimes(java.lang.String[] weekdayTimes)
Parameters:
weekdayTimes - the weekdayTimes to set

setWeekendAllDay

public void setWeekendAllDay(boolean weekendAllDay)
Parameters:
weekendAllDay - the weekendAllDay to set

setWeekendTimes

public void setWeekendTimes(java.lang.String[] weekendTimes)
Parameters:
weekendTimes - the weekendTimes to set

compareTo

public int compareTo(Phone o)
Specified by:
compareTo in interface java.lang.Comparable<Phone>