org.jboss.managed.plugins.factory
Class StringRunStateMapper

java.lang.Object
  extended by org.jboss.managed.plugins.factory.StringRunStateMapper
All Implemented Interfaces:
RunStateMapper

public class StringRunStateMapper
extends Object
implements RunStateMapper

A RunStateMapper implementation that maps string based meta values to the RunState enum based on a Map of meta value to enum string.

Version:
$Revision: 84191 $
Author:
Scott.Stark@jboss.org

Constructor Summary
StringRunStateMapper()
           
StringRunStateMapper(String[] valueStrings, String[] enumStrings)
           
 
Method Summary
 RunState getRunState(ManagedProperty property, MetaValue value)
          Map from the given property meta value to a RunState
 Map<String,String> getValueMapping()
           
 void setValueMapping(Map<String,String> valueMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringRunStateMapper

public StringRunStateMapper()

StringRunStateMapper

public StringRunStateMapper(String[] valueStrings,
                            String[] enumStrings)
Method Detail

getValueMapping

public Map<String,String> getValueMapping()

setValueMapping

public void setValueMapping(Map<String,String> valueMapping)

getRunState

public RunState getRunState(ManagedProperty property,
                            MetaValue value)
Description copied from interface: RunStateMapper
Map from the given property meta value to a RunState

Specified by:
getRunState in interface RunStateMapper
Parameters:
property - - the property supplying the value
value - - the property meta value
Returns:
the RunState. This may be Unknown if the value could not be mapped to an known run state.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.