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.
 
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()
           
 Cog getState()
           
 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
 void setState(Cog newState)
           
 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.

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

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