Packagecoldfusion.service
Classpublic class BasicService
InheritanceBasicService Inheritance InternalConfig
Implements IEventDispatcher, IMXMLObject
Subclasses Chart, Document, Image, Ldap, Mail, Pdf, Pop

This is the base class for all the proxy classes that are responsible for interacting with the different ColdFusion services such as image or pdf. The common communication logic that invoves capturing server connection and information and making the Remote Object call is all abstracted out here.



Public Properties
 PropertyDefined By
  action : String
BasicService
Public Methods
 MethodDefined By
  
The constructor that takes in the source cfc on the ColdFusion side resposible for the service
BasicService
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Implementation for the IEventDispatcher interface begins
BasicService
  
BasicService
  
BasicService
  
Implementation for the IEventDispatcher interface ends
BasicService
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
BasicService
  
BasicService
Protected Methods
 MethodDefined By
  
call(... args):void
This function is called by all the sub class that extend the BasicService to make a call to the ColdFusion service.
BasicService
  
This function is the defualt implementation which creates a ColdFusionServiceResultEvent from the result Event without modifying the result.
BasicService
  
[static] This is a utility function that converts, user input which comes in the form of array of key value pairs.
BasicService
  
[static] This is a utility function that converts, user input which comes in the form of array of key value pairs, with each value again being an a key value pair.
BasicService
Events
 Event Summary Defined By
  Dispatched when a ColdFusion service call fails.BasicService
  Dispatched when a ColdFusion service call returns successfully.BasicService
Property Detail
actionproperty
public var action:String

Constructor Detail
BasicService()Constructor
public function BasicService(source:String)

The constructor that takes in the source cfc on the ColdFusion side resposible for the service

Parameters
source:String
Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Implementation for the IEventDispatcher interface begins

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

call()method 
protected function call(... args):void

This function is called by all the sub class that extend the BasicService to make a call to the ColdFusion service.

Parameters

... args

convertResultInEvent()method 
protected function convertResultInEvent(event:ResultEvent):ColdFusionServiceResultEvent

This function is the defualt implementation which creates a ColdFusionServiceResultEvent from the result Event without modifying the result. If any service proxy class needs to modify the result, then such a serive proxy class will override this function and return the modified ColdFusionServiceResult event.

Parameters

event:ResultEvent

Returns
ColdFusionServiceResultEvent
convertToArrayOfServiceElement()method 
protected static function convertToArrayOfServiceElement(input:Array):Array

This is a utility function that converts, user input which comes in the form of array of key value pairs. For some operations on the service, the ColdFusion service expects an Array, with each induvidual Array element being a key value pair. The key being the operation/attribute and the value being the value of that attribute. So the attributes set by user is converted to that format in this function which returns an array of ServiceElement

Parameters

input:Array

Returns
Array
convertToArrayOfServiceElementCollection()method 
protected static function convertToArrayOfServiceElementCollection(input:Array):Array

This is a utility function that converts, user input which comes in the form of array of key value pairs, with each value again being an a key value pair. For some operations such as the batchoperation on the Image service, the ColdFusion service expects an Array, with each induvidual Array element being a key value pair. The key being the operation and the value being an array of key value pairs of the different attributes corresponding to that operation. So the attributes set by user is converted to that format in this function which returns an array

Parameters

input:Array

Returns
Array
dispatchEvent()method 
public function dispatchEvent(evt:Event):Boolean

Parameters

evt:Event

Returns
Boolean
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Parameters

type:String

Returns
Boolean
initialized()method 
public function initialized(doctest:Object, id:String):void

Implementation for the IEventDispatcher interface ends

Parameters

doctest:Object
 
id:String

removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

willTrigger()method 
public function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean
Event Detail
fault Event
Event Object Type: coldfusion.service.events.ColdFusionServiceFaultEvent
property ColdFusionServiceFaultEvent.type = coldfusion.service.events.ColdFusionServiceFaultEvent.FAULT

Dispatched when a ColdFusion service call fails.

Defines the value of the Type property of a ColdFusionServiceFaultEvent object.
result Event  
Event Object Type: coldfusion.service.events.ColdFusionServiceResultEvent
property ColdFusionServiceResultEvent.type = coldfusion.service.events.ColdFusionServiceResultEvent.RESULT

Dispatched when a ColdFusion service call returns successfully.

The RESULT event type.