|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implemented by objects that manage publishing.
Field Summary | |
static int |
DEFAULT_MODE
Option for the publish method. |
static int |
PACKAGE_CONTENTS_RECURSIVE
Option for the publish method. |
static int |
RUNTIME_ONLY
Option for the publish method. |
Method Summary | |
void |
commitChanges()
Finish the process of publishing tables by committing the changes. |
void |
publish(Enumeration elements,
int options,
AgiAdmDatabase destinationDB)
Publish a set of elements to a particular database. |
String |
publishTables(AgiAdmDatabase sourceDB,
AgiAdmDatabase destinationDB)
Attempt to publish tables from the source database to the destination database. |
Field Detail |
public static final int DEFAULT_MODE
publish
method.
Tells the publish method to work in the
default mode, that is, to publish both the metadata and the runtime items.public static final int RUNTIME_ONLY
publish
method.
Tells the Publish Manager to "strip" meta data,
that is, to publish runtime items only.public static final int PACKAGE_CONTENTS_RECURSIVE
publish
method.
Tells the Publish Manager to publish the contents of
a package recursively.
Use only when publishing packages.
Method Detail |
public void publish(Enumeration elements, int options, AgiAdmDatabase destinationDB) throws AgoUnrecoverableSystemException, AgoSecurityException
elements
- items to be published: an enumeration of AgiAdmDesignElements and/or
AgiAdmDirectory of the type PACKAGEoptions
- publish optionsdestinationDB
- the destination databaseHashtable info = new Hashtable(); info.put(AgiAdmServer.INFO_DATABASE_NAME, "sourceDB");
// Specify the items to be published. Vector items = new Vector(); AgiAdmDesignElement form = (AgiAdmDesignElement)server.getElement( "myForm", AgiAdmDesignElement.FORM, info); AgiAdmDesignElement view = (AgiAdmDesignElement)server.getElement( "myView", AgiAdmDesignElement.VIEW, info); items.addElement(form); items.addElement(view);
// Specify the destination database. AgiAdmDatabase destDB = (AgiAdmDatabase)server.getElement( "destinationDB", AgiAdmDatabase.DATABASE, null);
// Publish the selected items. pubMgr.publish(items.elements(), AgiAdmPublishMgr.DEFAULT_MODE, destDB);
AgiAdmPublishMgr.RUNTIME_ONLY
,
AgiAdmPublishMgr.PACKAGE_CONTENTS_RECURSIVE
,
publishTables()
public String publishTables(AgiAdmDatabase sourceDB, AgiAdmDatabase destinationDB) throws AgoUnrecoverableSystemException, AgoSecurityException
sourceDB
- the source database where the tables residedestinationDB
- the destination database// Get a Publish Manager object. AgiAdmPublishMgr pubMgr = AgAdmin.getPublishMgrObject();
// Get a source database. AgiAdmDatabase sourceDB = (AgiAdmDatabase)server.getElement( "source", AgiAdmDatabase.DATABASE, null);
// Get a destination database. AgiAdmDatabase destDB = (AgiAdmDatabase)server.getElement( "destination", AgiAdmDatabase.DATABASE, null);
// Publish the tables from source to destination. String analysis = pubMgr.publishTables( sourceDB,destinationDB);
// ... // Display the analysis string and ask the user if it's OK to proceed // and actually publish the tables. // ... pubMgr.commitChanges();
AgiAdmPublishMgr.commitChanges()
public void commitChanges() throws AgoUnrecoverableSystemException, AgoSecurityException
This method must be called after publishTables so that the changes are committed.
// Get a Publish Manager object. AgiAdmPublishMgr pubMgr = AgAdmin.getPublishMgrObject();
// Get a source database. AgiAdmDatabase sourceDB = (AgiAdmDatabase)server.getElement( "source", AgiAdmDatabase.DATABASE, null);
// Get a destination database. AgiAdmDatabase destDB = (AgiAdmDatabase)server.getElement( "destination", AgiAdmDatabase.DATABASE, null);
// Publish the tables from source to destination. String analysis = pubMgr.publishTables( sourceDB,destinationDB);
// ... // Display the analysis string and ask the user if it's OK to proceed // and actually publish the tables. // ... pubMgr.commitChanges();
publishTables()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |