com.partnersoft.scripting
Class ScriptedNamer

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

public class ScriptedNamer
extends java.lang.Object
implements ObjectNamer

An ObjectNamer that uses a script to generate the results.

Copyright 2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
ScriptedNamer(Script script)
           
 
Method Summary
 java.util.Set getRequiredPaths()
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 java.lang.Object transform(java.lang.Object victim)
          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

ScriptedNamer

public ScriptedNamer(Script script)
Method Detail

getRequiredPaths

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

transform

public java.lang.Object transform(java.lang.Object victim)
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

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Returns:
Cog representing the internal state of this object