com.example.customerservice.flow
Class CustomersByNameGlobalTransformer

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.webservice.AbstractWebServiceClientTransformer<I,O>
              extended by adams.flow.webservice.AbstractWebServiceClientTransformerWithGlobalTransformer<String,String>
                  extended by com.example.customerservice.flow.CustomersByNameGlobalTransformer
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, SizeOfHandler, GlobalTransformerSupport<String,String>, WebServiceClient, WebServiceClientConsumer<String>, WebServiceClientProducer<String>, Serializable

public class CustomersByNameGlobalTransformer
extends AbstractWebServiceClientTransformerWithGlobalTransformer<String,String>

Simple client for querying customer names and post-processing the names with a global transformer.

Version:
$Revision: 5347 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  String m_CustomerName
          the name of the customers to look up.
protected  List<Customer> m_Customers
          the list of customers that were obtained from webservice.
protected  String m_ProvidedCustomerName
          the provided customer name.
 
Fields inherited from class adams.flow.webservice.AbstractWebServiceClientTransformerWithGlobalTransformer
m_ActualTransformer, m_Transformer
 
Fields inherited from class adams.flow.webservice.AbstractWebServiceClientTransformer
m_Owner
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
CustomersByNameGlobalTransformer()
           
 
Method Summary
 Class[] accepts()
          Returns the classes that are accepted input.
 String customerNameTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  void doQuery()
          Queries the webservice.
 Class[] generates()
          Returns the classes that this processor generates.
 String getCustomerName()
          Returns the customer name to look up.
 String getResponseData()
          Returns the response data, if any.
protected  URL getWsdlLocation()
          Returns the WSDL location.
 String globalInfo()
          Returns a string describing the object.
 boolean hasResponseData()
          Checks whether there is any response data to be collected.
 void setCustomerName(String value)
          Sets the customer name to look up.
 void setRequestData(String value)
          Sets the data for the request, if any.
 
Methods inherited from class adams.flow.webservice.AbstractWebServiceClientTransformerWithGlobalTransformer
applyTransformer, getTransformer, preQuery, setTransformer, transformerTipText
 
Methods inherited from class adams.flow.webservice.AbstractWebServiceClientTransformer
cleanUp, getOwner, postQuery, query, setOwner
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_CustomerName

protected String m_CustomerName
the name of the customers to look up.


m_ProvidedCustomerName

protected String m_ProvidedCustomerName
the provided customer name.


m_Customers

protected List<Customer> m_Customers
the list of customers that were obtained from webservice.

Constructor Detail

CustomersByNameGlobalTransformer

public CustomersByNameGlobalTransformer()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractWebServiceClientTransformerWithGlobalTransformer<String,String>

setCustomerName

public void setCustomerName(String value)
Sets the customer name to look up.

Parameters:
value - the name

getCustomerName

public String getCustomerName()
Returns the customer name to look up.

Returns:
the name

customerNameTipText

public String customerNameTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

accepts

public Class[] accepts()
Returns the classes that are accepted input.

Returns:
the classes that are accepted, null if no input

setRequestData

public void setRequestData(String value)
Sets the data for the request, if any.

Parameters:
value - the request data

getWsdlLocation

protected URL getWsdlLocation()
Returns the WSDL location.

Specified by:
getWsdlLocation in class AbstractWebServiceClientTransformer<String,String>
Returns:
the location

doQuery

protected void doQuery()
                throws Exception
Queries the webservice.

Specified by:
doQuery in class AbstractWebServiceClientTransformer<String,String>
Throws:
Exception - if accessing webservice fails for some reason

generates

public Class[] generates()
Returns the classes that this processor generates.

Returns:
the classes, null if no output

hasResponseData

public boolean hasResponseData()
Checks whether there is any response data to be collected.

Returns:
true if data can be collected
See Also:
getResponseData()

getResponseData

public String getResponseData()
Returns the response data, if any.

Returns:
the response data


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.