com.openexchange.admin.rmi.dataobjects
Class ExtendableDataObject

java.lang.Object
  extended by com.openexchange.admin.rmi.dataobjects.EnforceableDataObject
      extended by com.openexchange.admin.rmi.dataobjects.ExtendableDataObject
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Context, Group, Resource, User

public abstract class ExtendableDataObject
extends EnforceableDataObject
implements Serializable, Cloneable

This class defines all those methods which make and object capable of being dynamically extended by other attributes.

To implement this in our class simply extend from this class.

Author:
d7
See Also:
Serialized Form

Constructor Summary
ExtendableDataObject()
           
 
Method Summary
 void addExtension(OXCommonExtension extension)
          Adds an extension to an object
 boolean equals(Object obj)
           
 Hashtable<String,OXCommonExtension> getAllExtensionsAsHash()
          Returns a Hashtable of all extensions with the name of the extensions as key
 OXCommonExtension getFirstExtensionByName(String extname)
          A convenience method for getting the first extension in a list of equal extension names.
 int hashCode()
           
 boolean isExtensionsok()
          Shows if an error occurred in any of the extensions of this object.
 boolean isExtensionsset()
          This method will be used in the future
 boolean removeExtension(OXCommonExtension extension)
          Removes the given extension from this object.
 void setExtensionsok(boolean extensionsok)
           
 String toString()
          
 
Methods inherited from class com.openexchange.admin.rmi.dataobjects.EnforceableDataObject
getMandatoryMembersChange, getMandatoryMembersCreate, getMandatoryMembersDelete, getMandatoryMembersRegister, getUnsetMembers, mandatoryChangeMembersSet, mandatoryCreateMembersSet, mandatoryDeleteMembersSet, mandatoryRegisterMembersSet, testMandatoryCreateFieldsNull
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendableDataObject

public ExtendableDataObject()
Method Detail

addExtension

public void addExtension(OXCommonExtension extension)
                  throws DuplicateExtensionException
Adds an extension to an object

Parameters:
extension - An OXCommonExtension object
Throws:
DuplicateExtensionException

getAllExtensionsAsHash

public Hashtable<String,OXCommonExtension> getAllExtensionsAsHash()
Returns a Hashtable of all extensions with the name of the extensions as key

Returns:
A Hashtable

getFirstExtensionByName

public OXCommonExtension getFirstExtensionByName(String extname)
A convenience method for getting the first extension in a list of equal extension names. The use of this method is not recommended because you won't get notifications how many extensions of the same name exist.

Parameters:
extname -
Returns:

isExtensionsok

public boolean isExtensionsok()
Shows if an error occurred in any of the extensions of this object. If you get true here everything is fine. Otherwise an error occurred and you have to go through all extensions to find out in which one this was happening

Returns:
A boolean value

isExtensionsset

public boolean isExtensionsset()
This method will be used in the future

Returns:

removeExtension

public boolean removeExtension(OXCommonExtension extension)
Removes the given extension from this object. Note that only the name of the Class is interesting here so you don't have to provide the exact Object but only an Object from the fitting type.

Parameters:
extension - An OXCommonExtension object specifying the extension to be removed
Returns:

setExtensionsok

public final void setExtensionsok(boolean extensionsok)

toString

public String toString()
Description copied from class: EnforceableDataObject

Overrides:
toString in class EnforceableDataObject

hashCode

public int hashCode()
Overrides:
hashCode in class EnforceableDataObject

equals

public boolean equals(Object obj)
Overrides:
equals in class EnforceableDataObject