net.wimpi.pim.contact.basicimpl
Class GenericExtension

java.lang.Object
  |
  +--net.wimpi.pim.contact.basicimpl.GenericExtension
All Implemented Interfaces:
Extension, java.io.Serializable
Direct Known Subclasses:
SimpleExtension

public abstract class GenericExtension
extends java.lang.Object
implements Extension

Class implementing a generic Extension.

This class can be derived to simplify implementation of extensions for the developer, as it is not required write an ItemHandler for this type of extensions.

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

Field Summary
protected  java.lang.String m_Identifier
           
protected  java.util.Map m_Parameters
           
protected  java.lang.String m_Value
           
 
Constructor Summary
GenericExtension(java.lang.String identifier)
          Creates a new GenericExtension instance.
 
Method Summary
abstract  GenericExtension createExtension()
          Returns a new GenericExtension.
 java.lang.String getIdentifier()
          Returns the identifier for this Extension.
 java.util.Map getParameters()
          Returns the parameters of this GenericExtension.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns the parameter values of the parameter with the given name.
 java.lang.String getValue()
          Returns the value of this GenericExtension.
 java.lang.String[] listParameters()
          Returns a list of all parameter names.
 void setParameters(java.util.Map parameters)
          Sets the parameters of this GenericExtension.
 void setValue(java.lang.String value)
          Sets the value of this GenericExtension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Identifier

protected java.lang.String m_Identifier

m_Value

protected java.lang.String m_Value

m_Parameters

protected java.util.Map m_Parameters
Constructor Detail

GenericExtension

public GenericExtension(java.lang.String identifier)
Creates a new GenericExtension instance.

Parameters:
identifier - the identifier for the extension.
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Description copied from interface: Extension
Returns the identifier for this Extension.

Specified by:
getIdentifier in interface Extension
Returns:
the identifier as String.

getValue

public java.lang.String getValue()
Returns the value of this GenericExtension.

Returns:
the value as String.

setValue

public void setValue(java.lang.String value)
Sets the value of this GenericExtension.

Parameters:
value - a value as String.

getParameters

public java.util.Map getParameters()
Returns the parameters of this GenericExtension.

Returns:
the parameters as Map.

setParameters

public void setParameters(java.util.Map parameters)
Sets the parameters of this GenericExtension.

Parameters:
parameters - the parameters as Map.

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns the parameter values of the parameter with the given name.

Parameters:
name - a parameter name.
Returns:
the parameter values as String[].

listParameters

public java.lang.String[] listParameters()
Returns a list of all parameter names.

Returns:
the parameter names as String[].

createExtension

public abstract GenericExtension createExtension()
Returns a new GenericExtension.

Returns:
a new instance of the implementing class.


Copyright © 2001-2003 jpim team.