org.postgresql.pljava.management

Class 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.

Constructor Summary

SQLDeploymentDescriptor(String descImage, String implementorName)
Parses the deployment descriptor descImage using implementorName as discriminator for implementor specific blocks.

Method Summary

void
install(Connection conn)
Executes the INSTALL actions.
void
remove(Connection conn)
Executes the REMOVE actions.
String
toString()
Returns the original image.

Constructor Details

SQLDeploymentDescriptor

public SQLDeploymentDescriptor(String descImage,
                               String implementorName)
            throws ParseException
Parameters:
descImage - The image to parse
implementorName - The discriminator to use for implementor blocks

Method Details

install

public void install(Connection conn)
            throws SQLException
Executes the INSTALL actions.
Parameters:
conn - The connection to use for the execution.

remove

public void remove(Connection conn)
            throws SQLException
Executes the REMOVE actions.
Parameters:
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