org.opengroupware.jogi.connect.xmlrpc
Class XmlRpcPhone

java.lang.Object
  extended byjava.util.Observable
      extended byorg.opengroupware.jogi.connect.xmlrpc.XmlRpcBaseDocument
          extended byorg.opengroupware.jogi.connect.xmlrpc.XmlRpcPhone
All Implemented Interfaces:
Phone

public class XmlRpcPhone
extends XmlRpcBaseDocument
implements Phone

This Class represents one Phone entry with its entities: info, number, telephoneId, type

Author:
Andreas Rath (teddius) E-Mail: arath@htu.tugraz.at, Walter Christian

Field Summary
static java.lang.String PHONE_ID
           
static java.lang.String PHONE_INFO
           
static java.lang.String PHONE_NUMBER
           
static java.lang.String PHONE_TYPE
           
 
Fields inherited from class org.opengroupware.jogi.connect.xmlrpc.XmlRpcBaseDocument
content_, id_, KEY_ID
 
Constructor Summary
protected XmlRpcPhone(java.util.Map phone)
          Creates a new phone object out of a given Map.
 
Method Summary
protected  boolean checkNewContent(java.util.Map new_content_map)
          Checks if the supplied content is valid.
 java.lang.String getId()
          Get the id of this phone object.
 java.lang.String getInfo()
          Get the info which is associated with this phone object.
 java.lang.String getNumber()
          Get the number for this phone object.
 java.lang.String getType()
          Get the type of this phone object.
 void setInfo(java.lang.String info)
          Set the info for this telephone object.
 void setNumber(java.lang.String number)
          Set the number.
 void setType(java.lang.String type)
          Set the new type of this phone object.
 
Methods inherited from class org.opengroupware.jogi.connect.xmlrpc.XmlRpcBaseDocument
fireNotify, getContent, getString, put, setContent
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PHONE_INFO

public static final java.lang.String PHONE_INFO
See Also:
Constant Field Values

PHONE_NUMBER

public static final java.lang.String PHONE_NUMBER
See Also:
Constant Field Values

PHONE_ID

public static final java.lang.String PHONE_ID
See Also:
Constant Field Values

PHONE_TYPE

public static final java.lang.String PHONE_TYPE
See Also:
Constant Field Values
Constructor Detail

XmlRpcPhone

protected XmlRpcPhone(java.util.Map phone)
Creates a new phone object out of a given Map. The Map is a result returned after an remote call to the OpenGroupware Server.

Parameters:
phone - A result returned by an OpenGroupware remote call which represents a phone.
Throws:
IllegalArgumentExcepetion - If the phone Argument was null or the phone Element does not contain the necesarry data.
Method Detail

getId

public java.lang.String getId()
                       throws OgoException,
                              ConnectionException
Description copied from interface: Phone
Get the id of this phone object. The id is unique for all telephones in all objects.

Specified by:
getId in interface Phone
Overrides:
getId in class XmlRpcBaseDocument
Throws:
OgoException
ConnectionException

getInfo

public java.lang.String getInfo()
                         throws OgoException,
                                ConnectionException
Description copied from interface: Phone
Get the info which is associated with this phone object.

Specified by:
getInfo in interface Phone
Returns:
The info.
Throws:
OgoException
ConnectionException

getNumber

public java.lang.String getNumber()
                           throws OgoException,
                                  ConnectionException
Description copied from interface: Phone
Get the number for this phone object. For example 0043-676-1212431.

Specified by:
getNumber in interface Phone
Returns:
The number.
Throws:
OgoException
ConnectionException

getType

public java.lang.String getType()
                         throws OgoException,
                                ConnectionException
Description copied from interface: Phone
Get the type of this phone object. See the list for currently supported and available types.

Specified by:
getType in interface Phone
Returns:
The type of this phone object.
Throws:
OgoException
ConnectionException

setInfo

public void setInfo(java.lang.String info)
             throws OgoException,
                    ConnectionException
Description copied from interface: Phone
Set the info for this telephone object.

Specified by:
setInfo in interface Phone
Parameters:
info - The info to set for this phone object.
Throws:
OgoException
ConnectionException

setNumber

public void setNumber(java.lang.String number)
               throws OgoException,
                      ConnectionException
Description copied from interface: Phone
Set the number. You can use any format you want for setting the number.

Specified by:
setNumber in interface Phone
Parameters:
number - The new number.
Throws:
OgoException
ConnectionException

setType

public void setType(java.lang.String type)
             throws OgoException,
                    ConnectionException
Description copied from interface: Phone
Set the new type of this phone object. See the list above for currently supported and available types.

Specified by:
setType in interface Phone
Parameters:
type - The new type for this phone object.
Throws:
OgoException
ConnectionException

checkNewContent

protected boolean checkNewContent(java.util.Map new_content_map)
Checks if the supplied content is valid. A Phone object is considered valid if it has an telephoneId and a type entry in the map.

Specified by:
checkNewContent in class XmlRpcBaseDocument
Parameters:
new_content_map - The new contents returned by a remote call from which the telephone data should be initialized.
Returns:
true if the supplied data was valid. Otherwise false


Copyright © 2003 ogojogi Project, All Rights Reserved.