org.postgresql.pljava.management
Class SQLDeploymentDescriptor
java.lang.Object
org.postgresql.pljava.management.SQLDeploymentDescriptor
public class SQLDeploymentDescriptor
extends java.lang.Object
This class deals with parsing and executing the deployment descriptor as
defined in ISO/IEC 9075-13:2003. It has the following format:
<descriptor file> ::=
SQLActions <left bracket> <right bracket> <equal sign>
{ [ <double quote> <action group> <double quote>
[ <comma> <double quote> <action group> <double quote> ] ] }
<action group> ::=
<install actions>
| <remove actions>
<install actions> ::=
BEGIN INSTALL [ <command> <semicolon> ]... END INSTALL
<remove actions> ::=
BEGIN REMOVE [ <command> <semicolon> ]... END REMOVE
<command> ::=
<SQL statement>
| <implementor block>
<SQL statement> ::= <SQL token>...
<implementor block> ::=
BEGIN <implementor name> <SQL token>... END <implementor name>
<implementor name> ::= <identifier>
<SQL token> ::= an SQL lexical unit specified by the term "<token>" in
Subclause 5.2, "<token>" and "<separator>", in ISO/IEC 9075-2.
SQLDeploymentDescriptor(String descImage, String implementorName) - Parses the deployment descriptor
descImage using
implementorName as discriminator for implementor specific
blocks.
|
void | install(Connection conn) - Executes the
INSTALL actions.
|
void | remove(Connection conn) - Executes the
REMOVE actions.
|
String | toString() - Returns the original image.
|
SQLDeploymentDescriptor
public SQLDeploymentDescriptor(String descImage,
String implementorName)
throws ParseException
Parses the deployment descriptor
descImage
using
implementorName
as discriminator for implementor specific
blocks. The install and remove blocks are remembered for later execution
with calls to
install()
and
remove()
.
descImage
- The image to parseimplementorName
- The discriminator to use for implementor blocks
install
public void install(Connection conn)
throws SQLException
Executes the INSTALL
actions.
conn
- The connection to use for the execution.
remove
public void remove(Connection conn)
throws SQLException
Executes the REMOVE
actions.
conn
- The connection to use for the execution.
toString
public String toString()
Returns the original image.
Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \
Distributed under the terms shown in COPYRIGHT