Last update: 2011-06-23

org.proteios.core
Class NameableUtil

java.lang.Object
  extended by org.proteios.core.NameableUtil

public class NameableUtil
extends Object

Utility methods that will make it easier to implement the Nameable interface, including data validation.

Version:
2.0
Author:
Nicklas
See Also:
Nameable

Constructor Summary
NameableUtil()
           
 
Method Summary
static void setDescription(NameableData nameableData, String description)
          Set the description of a NameableData object.
static void setName(NameableData nameableData, String name)
          Set the name of a NameableData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameableUtil

public NameableUtil()
Method Detail

setName

public static void setName(NameableData nameableData,
                           String name)
                    throws InvalidDataException
Set the name of a NameableData object.

Throws:
InvalidDataException - If the name is null or is longer than Nameable.MAX_NAME_LENGTH constant

setDescription

public static void setDescription(NameableData nameableData,
                                  String description)
                           throws InvalidDataException
Set the description of a NameableData object.

Throws:
InvalidDataException - If the description is longer than Nameable.MAX_DESCRIPTION_LENGTH constant

Last update: 2011-06-23