- CFML Reference User Guide
- ColdFusion functions
- ColdFusion functions by category
- Functions a-b
- Abs
- ACos
- AddSOAPRequestHeader
- AddSOAPResponseHeader
- AjaxLink
- AjaxOnLoad
- ApplicationStop
- ArrayAppend
- ArrayAvg
- ArrayClear
- ArrayContains
- ArrayContainsNoCase
- ArrayDelete
- ArrayDeleteAt
- ArrayDeleteNoCase
- ArrayEach
- ArrayFilter
- ArrayFind
- ArrayFindAll
- ArrayFindAllNoCase
- ArrayFindNoCase
- ArrayInsertAt
- ArrayIsDefined
- ArrayIsEmpty
- ArrayLen
- ArrayMap
- ArrayMax
- ArrayMin
- ArrayNew
- ArrayPrepend
- ArrayReduce
- ArrayResize
- ArraySet
- ArraySetMetadata
- ArraySlice
- ArraySort
- ArraySum
- ArraySwap
- ArrayToList
- Asc
- ASin
- Atn
- AuthenticatedContext
- AuthenticatedUser
- BinaryDecode
- BinaryEncode
- BitAnd
- BitMaskClear
- BitMaskRead
- BitMaskSet
- BitNot
- BitOr
- BitSHLN
- BitSHRN
- BitXor
- BooleanFormat
- Abs
- Functions-c-d
- CacheGet
- CacheGetAllIds
- CacheGetMetadata
- CacheGetProperties
- CacheGetSession
- CacheIdExists
- CachePut
- CacheRegionExists
- CacheRegionNew
- CacheRegionRemove
- CacheRemove
- CacheRemoveAll
- CacheSetProperties
- CallStackDump
- CallStackGet
- CanDeSerialize
- Canonicalize
- CanSerialize
- Ceiling
- CharsetDecode
- CharsetEncode
- Chr
- CJustify
- Compare
- CompareNoCase
- Cos
- CreateDate
- CreateDateTime
- CreateObject
- CreateObject: .NET object
- CreateObject: COM object
- CreateObject: component object
- CreateObject: CORBA object
- CreateObject: Java or EJB object
- CreateObject: web service object
- CreateODBCDate
- CreateODBCDateTime
- CreateODBCTime
- CreateSignedJWT
- CreateEncryptedJWT
- CreateTime
- CreateTimeSpan
- CreateUUID
- CSRFGenerateToken
- CSRFVerifyToken
- DateAdd
- DateCompare
- DateConvert
- DateDiff
- DateFormat
- DatePart
- DateTimeFormat
- Day
- DayOfWeek
- DayOfWeekAsString
- DayOfYear
- DaysInMonth
- DaysInYear
- DE
- DecimalFormat
- DecodeForHTML
- DecodeFromURL
- DecrementValue
- Decrypt
- DecryptBinary
- DeleteClientVariable
- Deserialize
- DeserializeJSON
- DeserializeXML
- DirectoryCopy
- DirectoryCreate
- DirectoryDelete
- DirectoryExists
- DirectoryList
- DirectoryRename
- DollarFormat
- DotNetToCFType
- Duplicate
- Functions-e-g
- EncodeForCSS
- EncodeForDN
- EncodeForHTML
- EncodeForHTMLAttribute
- EncodeForJavaScript
- EncodeForLDAP
- EncodeForURL
- EncodeForXML
- EncodeForXMLAttribute
- EncodeForXpath
- Encrypt
- EncryptBinary
- EntityDelete
- EntityLoad
- EntityLoadByExample
- EntityLoadByPK
- EntityMerge
- EntityNew
- EntityReload
- EntitySave
- EntityToQuery
- Evaluate
- Exp
- ExpandPath
- FileClose
- FileCopy
- FileDelete
- FileExists
- FileGetMimeType
- FileIsEOF
- FileMove
- FileOpen
- FileRead
- FileReadBinary
- FileReadLine
- FileSeek
- FileSetAccessMode
- FileSetAttribute
- FileSetLastModified
- FileSkipBytes
- FileUpload
- FileUploadAll
- FileWrite
- FileWriteLine
- Find
- FindNoCase
- FindOneOf
- FirstDayOfMonth
- Fix
- Floor
- FormatBaseN
- GeneratePBKDFKey
- GenerateSecretKey
- GetApplicationMetadata
- GetAuthUser
- GetBaseTagData
- GetBaseTagList
- GetBaseTemplatePath
- GetClientVariablesList
- GetComponentMetaData
- GetContextRoot
- GetCPUUsage
- GetCurrentTemplatePath
- GetDirectoryFromPath
- GetEncoding
- GetException
- GetFileFromPath
- GetFileInfo
- GetFreeSpace
- GetFunctionCalledName
- GetFunctionList
- GetGatewayHelper
- GetHttpRequestData
- GetHttpTimeString
- GetK2ServerDocCount
- GetK2ServerDocCountLimit
- GetLocale
- GetLocaleDisplayName
- GetLocalHostIP
- GetMetaData
- GetMetricData
- GetPageContext
- GetPrinterInfo
- GetPrinterList
- GetProfileSections
- GetProfileString
- GetReadableImageFormats
- GetSafeHTML
- GetSAMLAuthRequest
- GetSAMLLogoutRequest
- GenerateSAMLSPMetadata
- GetSOAPRequest
- GetSOAPRequestHeader
- GetSOAPResponse
- GetSOAPResponseHeader
- GetSystemFreeMemory
- GetSystemTotalMemory
- GetTempDirectory
- GetTempFile
- GetTemplatePath
- GetTickCount
- GetTimeZoneInfo
- GetToken
- GetTotalSpace
- GetUserRoles
- GetVFSMetaData
- GetWriteableImageFormats
- Functions-h-im
- Hash
- HMac
- Hour
- HQLMethods
- HTMLCodeFormat
- HTMLEditFormat
- IIf
- ImageAddBorder
- ImageBlur
- ImageClearRect
- ImageCopy
- ImageCreateCaptcha
- ImageCrop
- ImageDrawArc
- ImageDrawBeveledRect
- ImageDrawCubicCurve
- ImageDrawLine
- ImageDrawLines
- ImageDrawOval
- ImageDrawPoint
- ImageDrawQuadraticCurve
- ImageDrawRect
- ImageDrawRoundRect
- ImageDrawText
- ImageFlip
- ImageGetBlob
- ImageGetBufferedImage
- ImageGetEXIFMetadata
- ImageGetEXIFTag
- ImageGetHeight
- ImageGetIPTCMetadata
- ImageGetIPTCTag
- ImageGetMetadata
- ImageGetWidth
- ImageGrayscale
- ImageInfo
- ImageMakeColorTransparent
- ImageMakeTranslucent
- ImageNegative
- ImageNew
- ImageOverlay
- ImagePaste
- ImageRead
- ImageReadBase64
- ImageResize
- ImageRotate
- ImageRotateDrawingAxis
- ImageScaleToFit
- ImageSetAntialiasing
- ImageSetBackgroundColor
- ImageSetDrawingColor
- ImageSetDrawingStroke
- ImageSetDrawingTransparency
- ImageSharpen
- ImageShear
- ImageShearDrawingAxis
- ImageTranslate
- ImageTranslateDrawingAxis
- ImageWrite
- ImageWriteBase64
- ImageXORDrawingMode
- Functions-in-k
- IncrementValue
- InputBaseN
- Insert
- Int
- InvalidateOauthAccesstoken
- Invoke
- InitSAMLAuthRequest
- InitSAMLLogoutRequest
- InvokeCFClientFunction
- IsArray
- IsAuthenticated
- IsAuthorized
- IsBinary
- IsBoolean
- IsClosure
- IsCustomFunction
- IsDate
- IsDateObject
- IsDDX
- IsDebugMode
- IsDefined
- IsImage
- IsImageFile
- IsInstanceOf
- IsIPv6
- IsJSON
- IsK2ServerABroker
- IsK2ServerDocCountExceeded
- IsK2ServerOnline
- IsLeapYear
- IsLocalHost
- IsNull
- IsNumeric
- IsNumericDate
- IsObject
- isOnline
- IsPDFArchive
- IsPDFFile
- IsPDFObject
- IsProtected
- IsQuery
- isSamlLogoutResponse
- isSafeHTML
- IsSimpleValue
- IsSOAPRequest
- IsSpreadsheetFile
- IsSpreadsheetObject
- IsStruct
- IsUserInAnyRole
- IsUserInRole
- IsUserLoggedIn
- IsValid
- IsValidOauthAccesstoken
- IsWDDX
- IsXML
- IsXmlAttribute
- IsXmlDoc
- IsXmlElem
- IsXmlNode
- IsXmlRoot
- JavaCast
- JSStringFormat
- Functions-l
- LCase
- Left
- Len
- ListAppend
- ListChangeDelims
- ListContains
- ListContainsNoCase
- ListDeleteAt
- ListEach
- ListFilter
- ListFind
- ListFindNoCase
- ListFirst
- ListGetAt
- ListInsertAt
- ListLast
- ListLen
- ListMap
- ListPrepend
- ListQualify
- ListReduce
- ListRemoveDuplicates
- ListRest
- ListSetAt
- ListSort
- ListToArray
- ListValueCount
- ListValueCountNoCase
- LJustify
- Location
- Log
- Log10
- LSCurrencyFormat
- LSDateFormat
- LSDateTimeFormat
- LSEuroCurrencyFormat
- LSIsCurrency
- LSIsDate
- LSIsNumeric
- LSNumberFormat
- LSParseCurrency
- LSParseDateTime
- LSParseEuroCurrency
- LSParseNumber
- LSTimeFormat
- LTrim
- Functions-m-r
- Max
- Mid
- Min
- Minute
- Month
- MonthAsString
- Now
- NumberFormat
- ObjectEquals
- ObjectLoad
- ObjectSave
- OnWSAuthenticate
- ORMClearSession
- ORMCloseAllSessions
- ORMCloseSession
- ORMEvictCollection
- ORMEvictEntity
- ORMEvictQueries
- ORMExecuteQuery
- ORMFlush
- ORMFlushall
- ORMGetSession
- ORMGetSessionFactory
- ORMIndex
- ORMIndexPurge
- ORMReload
- ORMSearch
- ORMSearchOffline
- ParagraphFormat
- ParameterExists
- ParseDateTime
- Pi
- PrecisionEvaluate
- ProcessSAMLResponse
- ProcessSAMLLogoutRequest
- Quarter
- PreserveSingleQuotes
- QueryAddColumn
- QueryAddRow
- QueryConvertForGrid
- QueryExecute
- QueryFilter
- QueryGetResult
- QueryGetRow
- QueryKeyExists
- QueryMap
- QueryNew
- QueryReduce
- QuerySetCell
- QuotedValueList
- QueryEach
- Rand
- Randomize
- RandRange
- ReEscape
- REFind
- REFindNoCase
- ReleaseComObject
- REMatch
- REMatchNoCase
- RemoveCachedQuery
- RemoveChars
- RepeatString
- Replace
- ReplaceList
- ReplaceNoCase
- REReplace
- REReplaceNoCase
- RestDeleteApplication
- RestSetResponse
- RestInitApplication
- Reverse
- Right
- RJustify
- Round
- RTrim
- Functions-s
- Second
- SendGatewayMessage
- SendSAMLLogoutResponse
- Serialize
- SerializeJSON
- SerializeXML
- SessionInvalidate
- SessionRotate
- SessionGetMetaData
- SessionInvalidate
- SessionRotate
- SetDay
- SetEncoding
- SetHour
- SetLocale
- SetMonth
- SetProfileString
- SetVariable
- SetYear
- Sgn
- Sin
- Sleep
- SpanExcluding
- SpanIncluding
- SpreadsheetAddAutoFilter
- SpreadsheetAddColumn
- SpreadsheetAddFreezePane
- SpreadsheetAddImage
- SpreadsheetAddInfo
- SpreadsheetAddPageBreaks
- SpreadsheetAddRow
- SpreadsheetAddRows
- SpreadsheetAddSplitPane
- SpreadsheetCreateSheet
- SpreadsheetDeleteColumn
- SpreadsheetDeleteColumns
- SpreadsheetDeleteRow
- SpreadsheetDeleteRows
- SpreadsheetFormatCell
- SpreadsheetFormatColumn
- SpreadsheetFormatCellRange
- SpreadsheetFormatColumn
- SpreadsheetFormatColumns
- SpreadsheetFormatRow
- SpreadsheetFormatRows
- SpreadsheetGetCellComment
- SpreadsheetGetCellFormula
- SpreadsheetGetCellValue
- SpreadsheetGetColumnCount
- SpreadsheetInfo
- SpreadsheetMergeCells
- SpreadsheetNew
- SpreadsheetRead
- SpreadsheetReadBinary
- SpreadsheetRemoveSheet
- SpreadsheetSetActiveSheet
- SpreadsheetSetActiveSheetNumber
- SpreadsheetSetCellComment
- SpreadsheetSetCellFormula
- SpreadsheetSetCellValue
- SpreadsheetSetColumnWidth
- SpreadsheetSetFooter
- SpreadsheetSetHeader
- SpreadsheetSetRowHeight
- SpreadsheetShiftColumns
- SpreadsheetShiftRows
- SpreadsheetWrite
- Sqr
- StripCR
- StructAppend
- StructClear
- StructCopy
- StructCount
- StructDelete
- StructEach
- StructFilter
- StructFind
- StructFindKey
- StructFindValue
- StructGet
- StructGetMetadata
- StructInsert
- StructIsEmpty
- StructKeyArray
- StructKeyExists
- StructKeyList
- StructMap
- StructNew
- StructReduce
- StructSetMetadata
- StructSort
- StructToSorted
- StructUpdate
- StoreSetMetadata
- StoreGetACL
- StoreGetMetadata
- StoreAddACL
- StoreSetACL
- Functions-t-z
- Tan
- ThreadJoin
- ThreadTerminate
- Throw
- TimeFormat
- ToBase64
- ToBinary
- ToScript
- ToString
- Trace
- Transactionandconcurrency
- TransactionCommit
- TransactionRollback
- TransactionSetSavePoint
- Trim
- UCase
- URLDecode
- URLEncodedFormat
- URLSessionFormat
- Val
- ValueList
- VerifyClient
- Week
- Wrap
- WriteDump
- WriteLog
- WriteOutput
- WSGetAllChannels
- WSGetSubscribers
- WSPublish
- WSSendMessage
- XmlChildPos
- XmlElemNew
- XmlFormat
- XmlGetNodeType
- XmlNew
- XmlParse
- XmlSearch
- XmlTransform
- XmlValidate
- Year
- YesNoFormat
- ColdFusion Tags
- ColdFusion tag summary
- ColdFusion tags by category
- Application framework tags
- Communications tags
- Database manipulation tags
- Data output tags
- Debugging tags
- Exception handling tags
- Extensibility tags
- File management tags
- Flow-control tags
- Forms tags
- Internet Protocol tags
- Page processing tags
- Security tags
- Variable manipulation tags
- Other tags
- Tags a-b
- Tags c
- Tags f
- cffeed
- cffile
- cffile action = "append"
- cffile action = "copy"
- cffile action = "delete"
- cffile action = "move"
- cffile action = "read"
- cffile action = "readBinary"
- cffile action = "rename"
- cffile action = "upload"
- cffile action = "uploadAll"
- cffile action = "write"
- cffileupload
- cffinally
- cfflush
- cfform
- cfformgroup
- cfformitem
- cfftp
- cfftp: Connection: file and directory operations
- cfftp: Opening and closing FTP server connections
- cfftp : Opening and closing secure FTP server connections
- cfftp action = "listDir"
- cffunction
- Tags g-h
- Tags i
- Tags j-l
- cfjava
- cflayout
- cflayoutarea
- cfldap
- cflocation
- cflock
- cflog
- cflogin
- cfloginuser
- cflogout
- cfloop
- cfloop : conditional loop
- cfloop : index loop
- cfloop : looping over a COM collection or structure
- cfloop : looping over a date or time range
- cfloop : looping over a list, a file, or an array
- cfloop : looping over a query
- Tags m-o
- cfmail
- cfmailparam
- cfmailpart
- cfmap
- cfmapitem
- cfmediaplayer
- cfmenu
- cfmenuitem
- cfmessagebox
- cfmodule
- cfNTauthenticate
- cfoauth
- cfobject
- cfobject: .NET object
- cfobject: COM object
- cfobject: component object
- cfobject: CORBA object
- cfobject: Java or EJB object
- cfobject: web service object
- cfobjectcache
- cfoutput
- Tags p-q
- Tags r-s
- Tags t
- Tags u-z
- CFML Reference
- Reserved words and variables
- Ajax JavaScript functions
- Ajax JavaScript functions
- Function summary Ajax
- ColdFusion.Ajax.submitForm
- ColdFusion.Autosuggest.getAutosuggestObject
- ColdFusion.Layout.enableSourceBind
- ColdFusion.MessageBox.getMessageBoxObject
- ColdFusion.ProgressBar.getProgressBarObject
- ColdFusion.MessageBox.isMessageBoxDefined
- JavaScriptFunctionsinColdFusion9Update1
- ColdFusion ActionScript functions
- ColdFusion mobile functions
- Application.cfc reference
- Script functions implemented as CFCs
- ColdFusion Flash Form style reference
- Styles valid for all controls
- Styles for cfform
- Styles for cfformgroup with horizontal or vertical type attributes
- Styles for box-style cfformgroup elements
- Styles for cfformgroup with accordion type attribute
- Styles for cfformgroup with tabnavigator type attribute
- Styles for cfformitem with hrule or vrule type attributes
- Styles for cfinput with radio, checkbox, button, image, or submit type attributes
- Styles for cftextarea tag and cfinput with text, password, or hidden type attributes
- Styles for cfselect with size attribute value of 1
- Styles for cfselect with size attribute value greater than 1
- Styles for cfcalendar tag and cfinput with dateField type attribute
- Styles for the cfgrid tag
- Styles for the cftree tag
- ColdFusion Flash Form Style Reference
- ColdFusion event gateway reference
- ColdFusion Event Gateway reference
- addEvent
- CFEvent
- CFEventclass
- Constructor
- Gateway development interfaces and classes
- getStatus
- setCFCPath
- setCFCMethod
- getOriginatorID
- getLogger
- getBuddyList
- getBuddyInfo
- IM gateway message sending commands
- IM Gateway GatewayHelper class methods
- onIncomingMessage
- onIMServerMessage
- onBuddyStatus
- onAddBuddyResponse
- onAddBuddyRequest
- IM Gateway CFC incoming message methods
- IM gateway methods and commands
- CFML CFEvent structure
- warn
- info
- setOriginatorID
- data command
- submit Multi command
- submit command
- setGatewayType
- setGatewayID
- setData
- setCFCListeners
- outgoingMessage
- getStatusTimeStamp
- numberOfMessagesReceived
- numberOfMessagesSent
- removeBuddy
- removeDeny
- removePermit
- setNickName
- setPermitMode
- setStatus
- SMS Gateway CFEvent structure and commands
- SMS Gateway incoming message CFEvent structure
- getStatusAsString
- getProtocolName
- getPermitMode
- getPermitList
- getNickName
- getName
- getDenyList
- getCustomAwayMessage
- getQueueSize
- getMaxQueueSize
- getHelper
- getGatewayType
- getGatewayServices
- getGatewayID_1
- getGatewayID
- getData
- getCFCTimeout
- setCFCTimeout
- getCFCPath
- getCFCMethod
- GatewayServices class
- Gateway interface
- GatewayHelper interface
- addPermit
- addDeny
- addBuddy
- error
- debug
- Logger class
- stop
- start
- CFML event gateway SendGatewayMessage data parameter
- restart
- fatal
- SMS gateway message sending commands
- ColdFusion C++ CFX Reference
- ColdFusion Java CFX reference
- WDDX JavaScript Objects
- Cloud services
- ColdFusion and GCP Storage
- ColdFusion and GCP Firestore
- ColdFusion and GCP PubSub
- ColdFusion and Amazon S3
- ColdFusion and DynamoDB
- ColdFusion and Amazon SQS
- ColdFusion and Amazon SNS
- ColdFusion and MongoDB
- ColdFusion and Azure Blob
- ColdFusion and Azure Service Bus
- Multi-cloud storage services
- Multi-cloud RDS databases
- ColdFusion and Azure Cosmos DB
In ColdFusion (2018 release), script functions implemented as CFCs are deprecated in ColdFusion.
Function summary
The following table lists the script functions and the equivalent ColdFusion tag.
Function |
Equivalent ColdFusion Tag |
---|---|
dbinfo |
cfdbinfo |
imap |
cfimap |
pop |
cfpop |
ldap |
cfldap |
feed |
cffeed |
dbinfo
Description
Used in CFScript to retrieve information about a data source such as database details, tables, queries, procedures, foreign keys, indexes, and version information about the database, driver, and JDBC.
Syntax
Mode |
Syntax |
---|---|
Creating the service |
new dbinfo() or createObject("component", "dbinfo"); |
Executing the service action |
dbinfoService.action_method(attribute-value_pair); |
Initializing the attributes |
See Initializing the attributes below. |
Getting the CFC properties |
See Getting the CFC Properties below. |
Working with the data returned |
data=dbinfoService.action_method(attribute-value_pair);writedump(data); |
Properties
datasource |
dbname |
name |
password |
pattern |
table |
username |
All attributes supported by the tag cfdbinfo can be used as attribute-value pairs. For example,
<cfdbinfo userName="myUserName"> |
can be used as
dbinfoService.setUserName("myUserName"); |
For details, see the Attributes section for the cfdbinfo tag.
See also
History
ColdFusion 9.0.1: Added this function.
Methods
The following dbinfo types are available as methods. All methods have similar arguments and syntax.
dbnames
tables
columns
version
procedures
foriegnkeys
index
Description
All methods correspond to the type of information supported by the tag cfdbinfo. For details of each method, see the relevant section for the tag cfdbinfo in ColdFusion 9 CFML Reference.
Returns
All methods return a query object.
Syntax
dbinfoService.methodName(attribute-value pair);
Arguments
All attributes supported by the tag cfdbinfo.
- setAttributes, getAttributes, clearAttributes, clear, setProperties, getProperties, clearProperties, and clearProperties. For details, see Methods common to all functions.
Usage
This function corresponds to the tag cfdbinfo. For details, see the Usage section for the tag cfdbinfo.
Example
<cfscript> |
imap
Description
Used in CFScript to query an IMAP server to retrieve and manage mails within multiple folders.
Syntax
Mode |
Syntax |
---|---|
Creating the service |
new imap(); or createObject("component", "imap"); |
Initializing the attributes |
See Initializing the attributes below. |
Executing the service action |
imapService.methodName(_attribute-value_pair_) |
Getting the CFC properties |
See Getting the CFC Properties below. |
Working with returned data |
imapResult=imapService.action_method(_attribute-value_pair_); |
Properties
attachmentpath |
connection |
folder |
generateuniquefilenames |
maxrows |
messagenumber |
name |
newfolder |
password |
port |
recurse |
secure |
server |
startrow |
stoponerror |
timeout |
uid |
username |
|
|
All attributes supported by the tag cfimap can be used as attribute-value pairs. For example,
<cfimap action="open" connection = "myconnection"> |
can be used as
imapService = new imap(server="myimapserver",username="myusername",password="mypassword",port= |
Note: If connection properties such as server, username, password, port, and secure are specified either during initialization or when open method is called, a connection is created implicitly. Therefore, you need not specify the properties for further actions. If sandbox security is turned on, the directory referred to by the property attachmentPath must be given the required permission. By default, the temp directory is used. |
For details of the attributes, see the Attributes section for the tag cfimap.
See also
History
ColdFusion 9.0.1: Added this function.
Methods
The following imap actions are available as methods. All methods have similar arguments and syntax.
getAll
delete
open
close
markRead
createFolder
deleteFolder
renameFolder
listAllFolders
moveMail
getHeaderOnly
Description
All methods correspond to the type of information supported by the tag cfimap. For details of each method, see the relevant section of cfimap in the ColdFusion 9 CFML Reference.
Returns
A query object for methods getAll, getHeaderOnly, and listAllFolders. Else, nothing.
Syntax
imapService.methodName(attribute-value pair);
Arguments
All attributes supported by the tag cfimap.
- setAttributes, getAttributes, clearAttributes, clear, setProperties, getProperties, and clearProperties. For details, see Methods common to all functions.
Usage
This function corresponds to the tag cfimap. See the Usage section for cfimap in the ColdFusion 9 CFML Reference for details.
Example
<cfscript> |
pop
Description
Used in CFScript to retrieve or delete e-mail messages from a POP mail server.
Syntax
Mode |
Syntax |
---|---|
Creating the service |
new pop(); or createObject("component", "pop"); |
Initializing the attributes |
See Initializing the attributes below. |
Executing the service action |
popService.action_method(_attribute-value_pair_); |
Getting the CFC properties |
See Getting the CFC Properties below. |
Working with data returned |
popresult = popService.action_method (attribute-value pair); where popresult is a query object if the action_method is getAll or getHeaderOnly. For any other method, nothing is returned. |
Properties
server |
attachmentPath |
debug |
|
---|---|---|---|
generateUniqueFilenames |
maxRows |
messageNumber |
name |
password |
port |
startRow |
timeout |
uid |
username |
|
|
All attributes supported by the tag cfpop can be used as attribute-value pairs. For example,
<cfpop server = "#form.popserver# " action = "getHeaderOnly" name = "GetHeaders"> |
can be used as
popHeaders = popService.getHeaderOnly(server="#form.popserver#"); |
Note: name is a required attribute in cfpop, but not in CFScript. |
See also
History
ColdFusion 9.0.1: Added this function.
Methods
The following pop actions are available as methods. All methods have similar arguments and syntax.
getHeaderOnly
getAll
delete
Description
All methods correspond to the type of information supported by the tag cfpop. For details of each method, see the relevant section of cfpop in the ColdFusion 9 CFML Reference.
Returns
All methods except delete returns a query object.
Syntax
popService.methodName(attribute-value pair)
Arguments
All attributes supported by the tag cfpop.
- setAttributes, getAttributes, clearAttributes, clear, setProperties, getProperties, and clearProperties. For details, see Methods common to all functions.
Usage
This function corresponds to the tag cfpop. For usage details, see the Usage section for cfpop__.
Example
<cfscript> |
ldap
Description
Used in CFScript to provide an interface to a Lightweight Directory Access Protocol (LDAP) directory server, such as the Netscape Directory Server.
Syntax
Mode |
Syntax |
---|---|
Creating the service |
new ldap(); or createObject("component", "ldap"); |
Initializing the attributes |
See Initializing the attributes below. |
Executing the service action |
ldapService.action_method(attribute-value pair); |
Getting the CFC properties |
See Getting the CFC Properties below. |
Working with data |
ldapresult = ldapService.query(attribute-value pair).For other methods, nothing is returned. |
Properties
server |
attributes |
delimiter |
|
---|---|---|---|
dn |
filter |
maxRows |
modifyType |
name |
password |
port |
rebind |
referral |
returnAsBinary |
scope |
secure |
separator |
sort |
sortcontrol |
start |
startRow |
timeout |
userName |
|
All attributes supported by the tag cfldap can be used as attribute-value pairs. For example,
<cfldap action="add" server="ldap.uconn.edu"> |
can be used as
ldapService.add(server="ldap.uconn.edu"); |
For details, see the Attributes section for the tag cfldap.
Methods
The following ldap actions are available as methods. All methods have similar arguments and syntax.
query
add
modify
modifyDn
delete
Description
All methods correspond to the actions supported by the tag cfldap. For details of each method, see the relevant section of cfldap in the ColdFusion 9 CFML Reference.
Returns
If method is query, returns a query object. Else, none.
Syntax
ldapService.methodName(attribute-value pair)
Arguments
All attributes supported by the tag cfldap.
- setAttributes. For details, see Methods common to all functions
- getAttributes, clearAttributes, clear, setProperties, getProperties, and clearProperties. For details, see Methods common to all functions.
setLdapAttributes
Description
Sets the property attributes.
Returns
Nothing
Syntax
ldapService.setLdapAttributes(attribute-value);
Arguments
A string that contains the value of the property attributes.
getLdapAttributes
Description
Gets the property attributes.
Returns
A string that contains the value of the property attributes.
Syntax
myattributes = ldapService.getLdapAttributes(__);
See also
History
ColdFusion 9.0.1: Added this function.
Usage
This function corresponds to the tag cfldap. For usage details, see the Usage section for cfldap.
Example
<cfscript> |
feed
Description
Used in CFScript to read or create an RSS or Atom syndication feed. This service reads RSS versions 0.90, 0.91, 0.92, 0.93, 0.94, 1.0, and 2.0, and Atom 0.3 or 1.0. It can create RSS 2.0 or Atom 1.0 feeds.
Syntax
Mode |
Syntax |
---|---|
Creating the service |
new feed() or createObject("component" "feed") |
Initializing the attributes |
See Initializing the attributes below. |
Executing the service action |
feedService.action_method(attribute-value_pair) |
Getting the CFC properties |
See Getting the CFC Properties below. |
Working with the data returned |
|
Properties
columnMap |
enclosureDir |
escapeChar |
ignoreEnclosureError |
name (optional in CFScript) |
outputFile |
overwrite |
overwriteEnclosure |
properties (optional in CFScript) |
proxyPassword |
proxyPort |
proxyServer |
proxyUser |
query (optional in CFScript) |
source |
timeout |
useragent |
xmlvar (optional in CFScript) |
|
|
All attributes supported by the tag cffeed can be used as attribute-value pairs. For example,
<cffeed action="read" source="http://googleblog.blogspot.com/atom.xml" |
can be used as
feedservice.read(source="http://googleblog.blogspot.com/atom.xml", |
See also
History
ColdFusion 9.0.1: Added this function.
Methods
create
Description
Creates an RSS 2.0 or Atom 1.0 feed XML document and saves it in a variable, writes it to a file, or both.
Returns
String representing the xmlvar
Syntax
feedService.create (attribute-value pair);
Arguments
All attributes supported by the tag cffeed.
read
Description
Parses an RSS or Atom feed from a URL or an XML file and saves it in a structure or query. You can also get feed metadata in a separate structure.
Returns
Struct with the following keys:
- name
- query
- properties
xmlvar
Syntax
feedService.read (attribute-value pair);
Arguments
All attributes supported by the tag cffeed.
- setAttributes, getAttributes, clearAttributes, clear, setProperties, getProperties, and clearProperties. For details, see Methods common to all functions Methods common to all functions.
getFeedProperties
Description
Returns the value of the property properties.
Returns
Struct or error (if property is not set)
Syntax
feedService.getFeedProeprties()
Arguments
None
setFeedProperties
Description
Sets the value of the property properties.
Returns
Nothing
Syntax
feedService.setFeedProperties()
Arguments
properties struct
Usage
This service corresponds to the tag cffeed. For usage, see Usage section for cffeed.
Example
<cfscript> |
Methods common to all functions
The following methods are common to all script functions:
setAttributes
Description
Sets attributes for the function.
Returns
Nothing
Syntax
service_name.setAttributes (attribute-value pair);
Arguments
All attributes supported by the equivalent tag.
getAttributes
Description
Gets the attributes set for the function.
Returns
Returns a struct with all or some attribute values.
Syntax
service_name.get_Attributes_ (attributelist);
Arguments
A comma-separated list of attributes. If no list is specified, all defined attributes are returned.
clearAttributes
Description
Removes all attributes added for the function.
Returns
Nothing
Syntax
_service_name.clearAttributes(_attribute_list);
Arguments
A comma-separated list of attributes.
clear
Description
Removes all attributes added for the function.
Returns
Nothing
Syntax
service_name.clear();
Arguments
None
clearProperties
Description
Removes all properties added for the function.
Returns
Nothing
Syntax
service_name.clearProperties(attribute_list);
Arguments
If nothing is specified, all properties are cleared.
setProperties
Description
Sets properties for the function.
Returns
Nothing
Syntax
service_name.setproperties (attribute-value pair);
Arguments
All attributes supported by the equivalent tag.
getProperties
Description
Gets the properties set for the function.
Returns
Returns a struct with all or some attribute values.
Syntax
service_name.getproperties (attributelist);
Arguments
A comma-separated list of attributes. If no list is specified, all defined attributes are returned.
Initializing the attributes
You can initialize the attributes using one of the following ways:
- service_name=new dbinfo(attribute-value pair)
- service_name=new dbinfo().init(attribute-value pair)
- service_name.setAttributes(_attribute-value pair_)
- service_name.setA_ttributeName_(attribute_value)
- service_name.action_method(attribute-value_pair)
- service_name.setProperties (attribute_value)
Getting the CFC Properties
Get the CFC properties using one of the following ways:
- service_name.getAttributeName(attributelist)
- service_name.getProperties (attributelist)
- service_name.getAttributes(attributelist)