phing-tasks-system
[ class tree: phing-tasks-system ] [ index: phing-tasks-system ] [ all elements ]

Class: CreoleTask

Source Location: /tasks/ext/creole/CreoleTask.php

Class Overview

ProjectComponent
   |
   --Task
      |
      --CreoleTask

Handles Creole configuration needed by SQL type tasks.


Author(s):

Version:

  • $Revision: 526 $

Copyright:

  • � 2001,2002 THYRELL. All rights reserved

Methods


Child classes:

CreoleSQLExecTask
Executes a series of SQL statements on a database using Creole.

Inherited Variables

Inherited Methods

Class: Task

Task::getDescription()
Returns the textual description of the task
Task::getLocation()
Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages.
Task::getOwningTarget()
Returns the owning target of this task.
Task::getRegisterSlot()
Returns a name
Task::getRuntimeConfigurableWrapper()
Returns the wrapper object for runtime configuration
Task::getTaskName()
Returns the name of task, used only for log messages
Task::getTaskType()
Returns the name of the task under which it was invoked, usually the XML tagname
Task::init()
Called by the parser to let the task initialize properly.
Task::log()
Provides a project level log event to the task.
Task::main()
Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.
Task::maybeConfigure()
Configure this task if it hasn't been done already.
Task::perform()
Perfrom this task
Task::setDescription()
Sets a textual description of the task
Task::setLocation()
Sets the location within the buildfile this task occurs. Called by the parser to set location information.
Task::setOwningTarget()
Sets the owning target this task belongs to.
Task::setRuntimeConfigurableWrapper()
Sets the wrapper object this task should use for runtime configurable elements.
Task::setTaskName()
Sets the name of this task for log messages
Task::setTaskType()
Sets the type of the task. Usually this is the name of the XML tag

Class: ProjectComponent

ProjectComponent::getProject()
Returns a reference to current project
ProjectComponent::log()
Logs a message with the given priority.
ProjectComponent::setProject()
References the project to the current component.

Class Details

[line 37]
Handles Creole configuration needed by SQL type tasks.



Tags:

author:  Hans Lellelid <hans@xmpl.org> (Phing)
author:  Tim Stephenson <tim.stephenson@sybase.com> (Ant)
author:  Nick Chalko <nick@chalko.com> (Ant)
author:  Michael McCallum <gholam@xtra.co.nz> (Ant)
author:  Jeff Martin <jeff@custommonkey.org> (Ant)
version:  $Revision: 526 $
copyright:  � 2001,2002 THYRELL. All rights reserved
abstract:  


[ Top ]


Class Methods


method getConnection [line 159]

Connection getConnection( )

Creates a new Connection as using the driver, url, userid and password specified.

The calling method is responsible for closing the connection.




Tags:

return:  the newly created connection.
throws:  BuildException if the UserId/Password/Url is not set or there is no suitable driver or the driver fails to load.
access:  protected


[ Top ]

method getLoaderMap [line 148]

void getLoaderMap( )



Tags:

access:  protected


[ Top ]

method getPassword [line 238]

Returns getPassword( )

Gets the password.



Tags:

return:  a String
access:  public


[ Top ]

method getUrl [line 214]

Returns getUrl( )

Gets the url.



Tags:

return:  a String
access:  public


[ Top ]

method getUserId [line 222]

Returns getUserId( )

Gets the userId.



Tags:

return:  a String
access:  public


[ Top ]

method init [line 87]

void init( )

Initialize CreoleTask.

This method includes any necessary Creole libraries and triggers appropriate error if they cannot be found. This is not done in header because we may want this class to be loaded w/o triggering an error.




Overrides Task::init() (Called by the parser to let the task initialize properly.)

[ Top ]

method isAutocommit [line 206]

Returns isAutocommit( )

Gets the autocommit.



Tags:

return:  a boolean
access:  public


[ Top ]

method isCaching [line 198]

void isCaching( $value)



Tags:

access:  public


Parameters:

   $value  

[ Top ]

method setAutocommit [line 135]

void setAutocommit( autocommit $autocommit)

Auto commit flag for database connection; optional, default false.



Tags:

access:  public


Parameters:

autocommit   $autocommit   The autocommit to set

[ Top ]

method setCaching [line 100]

void setCaching( $enable $enable)

Caching loaders / driver. This is to avoid

getting an OutOfMemoryError when calling this task multiple times in a row; default: true




Tags:

access:  public


Parameters:

$enable   $enable  

[ Top ]

method setDriver [line 117]

void setDriver( string $driver)

Set the Creole driver to be used.



Tags:

access:  public


Parameters:

string   $driver   driver class name

[ Top ]

method setPassword [line 126]

void setPassword( password $password)

Sets the password; required.



Tags:

access:  public


Parameters:

password   $password   The password to set

[ Top ]

method setUrl [line 108]

void setUrl( url $url)

Sets the database connection URL; required.



Tags:

access:  public


Parameters:

url   $url   The url to set

[ Top ]

method setUserid [line 230]

void setUserid( userId $userId)

Set the user name for the connection; required.



Tags:

access:  public


Parameters:

userId   $userId   The userId to set

[ Top ]

method setVersion [line 144]

void setVersion( version $version)

Sets the version string, execute task only if rdbms version match; optional.



Tags:

access:  public


Parameters:

version   $version   The version to set

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:50:40 +0200 by phpDocumentor 1.4.3