net.wimpi.pim.contact.basicimpl
Class OrganizationImpl

java.lang.Object
  |
  +--net.wimpi.pim.contact.basicimpl.OrganizationImpl
All Implemented Interfaces:
Organization, java.io.Serializable

public class OrganizationImpl
extends java.lang.Object
implements Organization

A basic and simple implementation of an Organization.

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger
See Also:
Serialized Form

Field Summary
protected  java.lang.String m_Name
           
protected  java.util.List m_Units
           
protected  java.lang.String m_Url
           
 
Constructor Summary
OrganizationImpl()
           
 
Method Summary
 void addUnit(java.lang.String unit)
          Adds a given unit to this Organization.
 Image getLogo()
          Returns the logo associated with this Organization.
 java.lang.String getName()
          Returns the name of this Organization.
 java.lang.String getUnit(int index)
          Returns the unit at the given index.
 int getUnitCount()
          Returns the number of set units.
 java.lang.String getUnitsList()
           
 java.lang.String getURL()
          Returns the URL associated with this Organization.
 boolean hasLogo()
          Tests if this Organization has a logo associated.
 java.lang.String[] listUnits()
          Returns all units of this Organization.
 java.lang.String removeUnit(int index)
          Removes the unit at the given index.
 void setLogo(Image logo)
          Sets the logo associated with this Organization.
 void setName(java.lang.String name)
          Sets the name of this Organization.
 java.lang.String setUnit(int index, java.lang.String unit)
          Sets the unit at the given index, returning the replaced one.
 void setUnitsList(java.lang.String list)
           
 void setURL(java.lang.String url)
          Sets the URL associated with this Organization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Name

protected java.lang.String m_Name

m_Url

protected java.lang.String m_Url

m_Units

protected java.util.List m_Units
Constructor Detail

OrganizationImpl

public OrganizationImpl()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Organization
Returns the name of this Organization.

Specified by:
getName in interface Organization
Returns:
the name as String.

setName

public void setName(java.lang.String name)
Description copied from interface: Organization
Sets the name of this Organization.

Specified by:
setName in interface Organization
Parameters:
name - the name as String.

getURL

public java.lang.String getURL()
Description copied from interface: Organization
Returns the URL associated with this Organization.

Specified by:
getURL in interface Organization
Returns:
the URL as String.

setURL

public void setURL(java.lang.String url)
Description copied from interface: Organization
Sets the URL associated with this Organization.

Specified by:
setURL in interface Organization
Parameters:
url - the URL as String.

getUnitsList

public java.lang.String getUnitsList()

setUnitsList

public void setUnitsList(java.lang.String list)

getUnit

public java.lang.String getUnit(int index)
                         throws java.lang.IndexOutOfBoundsException
Description copied from interface: Organization
Returns the unit at the given index.

Specified by:
getUnit in interface Organization
Parameters:
index - the index as int.
Returns:
the unit as String.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

setUnit

public java.lang.String setUnit(int index,
                                java.lang.String unit)
Description copied from interface: Organization
Sets the unit at the given index, returning the replaced one.

Specified by:
setUnit in interface Organization
Parameters:
index - the index as int.
unit - the unit to be set as String.
Returns:
the former unit at the index as String.

listUnits

public java.lang.String[] listUnits()
Description copied from interface: Organization
Returns all units of this Organization.

Specified by:
listUnits in interface Organization
Returns:
the units as String[].

addUnit

public void addUnit(java.lang.String unit)
Description copied from interface: Organization
Adds a given unit to this Organization.

Specified by:
addUnit in interface Organization
Parameters:
unit - the unit as String.

removeUnit

public java.lang.String removeUnit(int index)
                            throws java.lang.IndexOutOfBoundsException
Description copied from interface: Organization
Removes the unit at the given index.

Specified by:
removeUnit in interface Organization
Parameters:
index - the index as int.
Returns:
the removed unit as String.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

getUnitCount

public int getUnitCount()
Description copied from interface: Organization
Returns the number of set units.

Specified by:
getUnitCount in interface Organization
Returns:
the number of units as int.

getLogo

public Image getLogo()
Description copied from interface: Organization
Returns the logo associated with this Organization.

Specified by:
getLogo in interface Organization
Returns:
the logo as Image.

setLogo

public void setLogo(Image logo)
Description copied from interface: Organization
Sets the logo associated with this Organization.

Specified by:
setLogo in interface Organization
Parameters:
logo - the logo as Image.

hasLogo

public boolean hasLogo()
Description copied from interface: Organization
Tests if this Organization has a logo associated.

Specified by:
hasLogo in interface Organization
Returns:
true if it has a logo, false otherwise.


Copyright © 2001-2003 jpim team.