org.mule.transformer.simple
Class StringToBoolean

java.lang.Object
  extended by org.mule.transformer.AbstractTransformer
      extended by org.mule.transformer.simple.StringToBoolean
All Implemented Interfaces:
AnnotatedObject, MuleContextAware, Disposable, Initialisable, NameableObject, NamedObject, MessageProcessor, Converter, DiscoverableTransformer, Transformer, EndpointAware

public class StringToBoolean
extends AbstractTransformer
implements DiscoverableTransformer

ByteArrayToSerializable converts a serialized object to its object representation


Field Summary
 
Fields inherited from class org.mule.transformer.AbstractTransformer
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
 
Fields inherited from interface org.mule.api.transformer.Converter
DEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTING
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
StringToBoolean()
           
 
Method Summary
 Object doTransform(Object src, String encoding)
           
 int getPriorityWeighting()
          If two or more discoverable transformers are equal, this value can be used to select the correct one
 void setPriorityWeighting(int priorityWeighting)
          If 2 or more discoverable transformers are equal, this value can be used to select the correct one
 void setReturnDataType(DataType<?> type)
          Sets the expected return type for the transformed data.
 
Methods inherited from class org.mule.transformer.AbstractTransformer
dispose, generateTransformerName, getAnnotation, getAnnotations, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setAnnotations, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, toString, transform, transform, unregisterSourceType, unregisterSourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transformer.Transformer
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, transform, transform
 
Methods inherited from interface org.mule.api.processor.MessageProcessor
process
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.NameableObject
setName
 
Methods inherited from interface org.mule.api.NamedObject
getName
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.endpoint.EndpointAware
setEndpoint
 

Constructor Detail

StringToBoolean

public StringToBoolean()
Method Detail

doTransform

public Object doTransform(Object src,
                          String encoding)
                   throws TransformerException
Specified by:
doTransform in class AbstractTransformer
Throws:
TransformerException

setReturnDataType

public void setReturnDataType(DataType<?> type)
Description copied from interface: Transformer
Sets the expected return type for the transformed data. If the transformed data is not of this class type a TransformerException will be thrown.

This method supersedes Transformer.getReturnClass() because it allows Generics information to be associated with the return type of the transformer

Specified by:
setReturnDataType in interface Transformer
Overrides:
setReturnDataType in class AbstractTransformer
Parameters:
type - the expected return type for this transformer

getPriorityWeighting

public int getPriorityWeighting()
Description copied from interface: Converter
If two or more discoverable transformers are equal, this value can be used to select the correct one

Specified by:
getPriorityWeighting in interface Converter
Returns:
the priority weighting for this transformer. This is a value between Converter.MIN_PRIORITY_WEIGHTING and Converter.MAX_PRIORITY_WEIGHTING.

setPriorityWeighting

public void setPriorityWeighting(int priorityWeighting)
Description copied from interface: Converter
If 2 or more discoverable transformers are equal, this value can be used to select the correct one

Specified by:
setPriorityWeighting in interface Converter
Parameters:
priorityWeighting - the priority weighting for this transformer. This is a value between Converter.MIN_PRIORITY_WEIGHTING and Converter.MAX_PRIORITY_WEIGHTING.


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.