com.partnersoft.data
Class Namer

java.lang.Object
  extended by com.partnersoft.data.Namer
All Implemented Interfaces:
Coggable, ObjectNamer, ObjectTransform

public class Namer
extends java.lang.Object
implements ObjectNamer

An ObjectTransform that generates a String name from a source object, using a string template.

Author:
Paul Reavis Copyright 2001 Partner Software, Inc. All rights reserved.

Constructor Summary
Namer()
          Create a new Namer.
Namer(java.lang.String template)
           
 
Method Summary
 java.util.Set getRequiredPaths()
           
 Cog getState()
           
 java.lang.String getTemplate()
          Gets the value of template
 void setState(Cog newState)
           
 void setTemplate(java.lang.String argTemplate)
          Sets the value of template
 java.lang.Object transform(java.lang.Object source)
          Our one method; this transforms one object into another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Namer

public Namer()
Create a new Namer.


Namer

public Namer(java.lang.String template)
Method Detail

getState

public Cog getState()
Specified by:
getState in interface Coggable

setState

public void setState(Cog newState)
Specified by:
setState in interface Coggable

transform

public java.lang.Object transform(java.lang.Object source)
Description copied from interface: ObjectTransform
Our one method; this transforms one object into another. Transformation must be nondestructive, but may produce a derived product that is still affected by changes to the original, so beware.

Specified by:
transform in interface ObjectTransform

getRequiredPaths

public java.util.Set getRequiredPaths()
Specified by:
getRequiredPaths in interface ObjectNamer

getTemplate

public java.lang.String getTemplate()
Gets the value of template

Returns:
the value of template

setTemplate

public void setTemplate(java.lang.String argTemplate)
Sets the value of template

Parameters:
argTemplate - Value to assign to this.template