com.partnersoft.data
Class SplittingNamer

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

public class SplittingNamer
extends java.lang.Object
implements ObjectNamer

A transform that generates a String name for an object by first generating a group name, then then looking up another transform in a Map, then running that. It can of course be nested further. A default is provided if all else fails.

Author:
Paul Reavis Copyright 2002 Partner Software, Inc.

Constructor Summary
SplittingNamer()
          Create a new SplittingNamer.
SplittingNamer(Cog newState)
           
 
Method Summary
 ObjectNamer getDefaultNamer()
          Gets the value of defaultNamer
 Naming getGroupNamers()
          Gets the value of groupNamers
 java.lang.String getGroupNameTemplate()
          Gets the value of groupNameTemplate
 java.util.Set getRequiredPaths()
           
 void setDefaultNamer(ObjectNamer argDefaultNamer)
          Sets the value of defaultNamer
 void setGroupNamers(Naming argGroupNamers)
          Sets the value of groupNamers
 void setGroupNameTemplate(java.lang.String argGroupNameTemplate)
          Sets the value of groupNameTemplate
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 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

SplittingNamer

public SplittingNamer()
Create a new SplittingNamer.


SplittingNamer

public SplittingNamer(Cog newState)
Method Detail

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

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

getGroupNameTemplate

public java.lang.String getGroupNameTemplate()
Gets the value of groupNameTemplate

Returns:
the value of groupNameTemplate

setGroupNameTemplate

public void setGroupNameTemplate(java.lang.String argGroupNameTemplate)
Sets the value of groupNameTemplate

Parameters:
argGroupNameTemplate - Value to assign to this.groupNameTemplate

getGroupNamers

public Naming getGroupNamers()
Gets the value of groupNamers

Returns:
the value of groupNamers

setGroupNamers

public void setGroupNamers(Naming argGroupNamers)
Sets the value of groupNamers

Parameters:
argGroupNamers - Value to assign to this.groupNamers

getDefaultNamer

public ObjectNamer getDefaultNamer()
Gets the value of defaultNamer

Returns:
the value of defaultNamer

setDefaultNamer

public void setDefaultNamer(ObjectNamer argDefaultNamer)
Sets the value of defaultNamer

Parameters:
argDefaultNamer - Value to assign to this.defaultNamer