Tools Guide
Chapter 15 SilverCmd Reference
This chapter describes the SilverCmd utilities, in alphabetical order. It discusses the purpose, syntax, and arguments for each utility. It also describes how to run SilverCmd and presents the associated security and authentication issues. It includes the following sections:
About SilverCmd
SilverStream's command line tool, SilverCmd, provides a way to perform SilverStream operations without accessing the SilverStream Designer. You can use SilverCmd to automate many of the tasks associated with managing the components of a SilverStream application, or to incorporate application objects built outside of the SilverStream Designer.
The following table summarizes the commands available through SilverCmd along with the server permissions required to execute them.
Command
|
Description
|
Required permission
|
AddDatabase
|
Registers (or adds) a database with the specified server.
|
Modify server settings
|
Build
|
Compiles the specified SilverStream application components.
|
Read/Write
|
ClearDefaultURL
|
Clears a database or server default URL
|
Modify (on application database or SilverMaster database for server default)
|
ComGen
|
Generates COM-access classes from a COM Typelib.
|
None
|
ConvertEJB
|
Converts an EJB1.0-compliant JAR file to an EJB1.1-compliant JAR file
|
None
|
CreatePackage
|
Creates Java packages in the Objects directory.
|
Write
|
Delete
|
Deletes the specified application components from the server.
|
Write
|
DeployEJB
|
Deploys an EJB 1.1 JAR to the specified server.
|
Write
|
DeployJSP
|
Uploads a JSP JAR file to the specified server and deploys it on that server.
|
Write
|
ExportSource
|
Copies the Java source file for a business object or a package to the specified location on disk.
|
Read
|
ImportClass
|
Imports .class files to the server as business objects.
|
Write
|
ImportMedia
|
Imports a media object, such as an image or sound, to the server.
|
Write
|
ImportPage
|
Imports a static HTML page to the SilverStream Server, optionally associating a set of URLs with the page.
|
Write
|
ImportSource
|
Copies a Java source file to the Objects directory of the SilverStream Server.
|
Write
|
JSPCompiler
|
Translates a JSP page to a Java servlet.
|
None
|
ModifyTableList
|
Defines the set of database tables available to the SilverStream Server for a specific database.
|
Modify server settings
|
Prefs
|
Updates various compiler settings for the SilverStream Designer.
|
None
|
Publish
|
Publishes items from one database or server to another.
|
Read (for the source database)
Write (for the destination database)
|
PublishFromFile
|
Copies items from a location on disk to the specified server and database.
Only items copied to disk using PublishToFile can be uploaded.
|
Write
|
PublishToFile
|
Copies Java source files for any SilverStream application component (for example, forms, views, and media) and its design metadata (if desired) from a server to a specified location on disk.
Use in conjunction with PublishFromFile when you want to copy the application components, as a complete unit, from one SilverStream Server to another.
|
Read
|
RebuildJAR
|
Rebuilds SilverStream-generated JAR files
|
Read/Write
|
RemoveDatabase
|
Removes a database from the server's list of accessible databases.
|
Modify server settings
|
ServerState
|
Tests whether the server is running or shuts down the server.
|
Modify server settings for shutdown
Read Server Settings for isrunning
|
SetDefaultURL
|
Sets a database or server's default URL
|
Modify (on application database or SilverMaster database for server default)
|
SetSecurity
|
Sets read, write, protect, select, and execute security on the specified application objects.
|
Set Permissions
|
SetUserGroupInfo
|
Creates, deletes, and sets properties for SilverStream users and groups.
|
Modify Server Settings
|
SourceControl
|
Performs source control tasks.
|
Read/Write
|
ValidateEJB
|
Validates the deployment descriptor within a specified EJB JAR file.
|
None
|
Running SilverCmd
SilverCmd is located in the SilverStream\bin directory. If you will be using SilverCmd frequently, consider adding SilverStream\bin to your system path for convenience.
Executing SilverCmd from the command prompt
To run SilverCmd from the command prompt, use this syntax:
SilverCmd command arguments
SilverCmd arguments
The following table describes the arguments you can specify with SilverCmd.
Argument
|
Description
|
-? or -h
|
Provides general usage information for SilverCmd
For usage on an individual command, specify the command followed by the -? argument like this:
SilverCmd command -?
Usage messages that include brackets [ ] indicate that the element within the bracket is optional
|
-i
|
Ignore errors and proceed
When SilverCmd encounters an error, it stops execution, generates detailed error messages explaining the failure, and displays the messages in the command prompt window
If you specify -i, SilverCmd ignores the errors and continues execution
|
-U and -P
|
Specifies a username and password combination for SilverStream authentication
SilverStream uses all of the standard SilverStream security mechanisms as though the user were executing the command from the SilverStream design environment or the management console
If you run SilverCmd in execute mode, you can specify a different -U and -P per command
See the chapter on security in the Administrator's Guide for more information about supplying these values for each supported security realm
|
Running SilverCmd in execute mode
You can run one or more SilverCmds from a file. This is called execute mode. To run in execute mode, use this syntax:
SilverCmd Execute command-file
The valid arguments are:
Argument
|
Description
|
command-file
|
A text file of commands structured so that each command is on its own line and so that each command contains the appropriate arguments.
NOTE Do not specify the SilverCmd keyword on each line in the command-file. SilverCmd is only specified at the command line when running in execute mode.
There are no restrictions on the set of commands that you can perform from the same file. For example, you can create a file that uploads two classes, rebuilds a JAR file, publishes a database, and sets security.
You can give the command-file any extension. However, SilverStream's install automatically creates a SilverCmd file association for files with an extension of .scd
The commands execute in the order in which they appear in the file. Running from a batch file is almost exactly like repeatedly calling SilverCmd, except that when you run SilverCmd in execute mode, you can avoid any performance penalty associated with starting SilverCmd repeatedly.
To ignore errors from particular commands and proceed with the commands that follow, specify -i after the file name as shown here:
SilverCmd Execute command-file -i
Certain commands also allow you to specify -i. When used this way, -i means to continue on error within the set of operations that this command does, for example:
SetSecurity localhost mydb -f myfile.xml -i
You can specify -U and -P at the command-line and once for each command within the file. If you do not specify the -U and -P for each command, then the one specified at the command line is used. If you specify both, then the one in the file is takes precedence.
|
Logging messages to a file
By default, SilverCmd logs informational messages, warnings and errors to the command window. You can write the messages to a file using the standard redirect symbol (>). For example,
SilverCmd Execute command-file -i > SilverCmd.log
SilverCmd RebuildJAR localhost Examples3 myJar > SilverCmd.log
Using input files
Some commands require an input file (specified using the -f option); for other commands it is optional and provided as a convenience. For example, the AddDatabase command requires that you supply the database name, the database type, the username, the password, and the JDBC driver in an input file. The Delete command does not require an input file. You can delete a single item at the command line, or you can specify a list of items to delete within an input file.
Regardless of whether the command requires the input file, or allows its use as a convenience, the input file must be in XML format.
You do not need to be an XML expert to create input files. SilverStream supplies sample XML files for each of the commands. These samples are located in the SilverStream\DTDs directory. You can, in most cases, copy the file and customize it for your own use.
SilverStream also supplies a DTD for each input file. The samples include a commented reference to the DTD. You can uncomment the DTD statement and add the path (SilverStream\DTDs) to it to ensure that your input files are valid and well-formed. For more information, see the chapter on XML in the Programmer's Guide.
The examples and DTDs include are self-documenting. Refer to them for the most up-to-date input file requirements.
Some values can be specified at both the command line and within an input file. If values are specified in both locations, the command line values take precedence.
The following table lists the DTD and sample input files for each SilverCmd command.
AddDatabase
Registers a SQL database with the specified SilverStream Server.
Syntax
SilverCmd AddDatabase server[:port] -f file [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target server
|
-f file
|
Specifies the input file containing the database and connection information
If -s is also specified, the XML file must contain a System Tables node describing the connection information for the database containing the system tables
|
options
|
Specifies any operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-s
|
Indicates that you want to store SilverStream's system tables in a different database than the one you are adding
If you want to store the system tables in a different database, the input file must include a System Tables node that specifies the database name and connection information for the different database
|
-U and -P
|
User name and password for SilverStream authentication
|
?
|
Displays the usage message
|
AddDatabase Input file
The AddDatabase command expects the input file to use the add_database.DTD located in the SilverStream/DTDs directory. It includes nodes for the following:
Entry
|
Description
|
Database name
|
Specifies the fully qualified database name
|
Username & Password
|
Specifies the user account used by the SilverStream Server when accessing this database
The account must have read/write permissions for the database
|
Platform
|
Specifies the vendor name for the database, for example, Oracle, DB2, or Sybase System 11.
See the
Valid Database Connection Types section for more information
|
Driver set
|
Specifies the driver type for the database
Each database type has a default connection type. If you do not specify a value, SilverStream assumes this type.
If you are using a value that is not in the list of database type/connection type values you must specify "Other JDBC Driver". When you specify "Other JDBC Driver", you must also specify:
-
The fully-qualified package name for the JDBC driver
-
The JDBC URL which tells the driver where to connect to the specified database
-
The URL attributes which include properties like cache size
This syntax is driver-dependent.
|
The following nodes are optional.
Entry
|
Description
|
Table list
|
Specifies a subset of the tables that should be made available to the SilverStream Server
You can modify this value later using the ModifyTableList command or the SilverStream Designer
The table list can include the table names (which must exactly match the names in the database), or you can use the % to match zero or more characters, or the _ to match any single character
|
System tables
|
Stores SilverStream's system tables in a different database than the one you are adding
This section must include the following information about the database where you want to store the system tables: the database, the username, the password, the database platform and the driver set or the LDS key
This entry is required when you specify the -s argument at the command line; otherwise it is ignored
|
AddDatabase input file example
The following example shows how to construct an input file that adds SilverStream's Examples3 database. It does not include specifications for table lists or separate storage of system tables. See the add_database_sample.xml file in the SilverStream DTDs directory for more information on the format you must use to specify this information.
<obj_DatabaseOptions>
<obj_MainDatabase>
<obj_ConnectionOptions>
<DatabaseName>Examples3</DatabaseName>
<Username>dba</Username>
<Password>sql</Password>
<Platform>Sybase Adaptive Server Anywhere 6</Platform>
<DriverSet>SilverStream JDBC-ODBC bridge</DriverSet>
</obj_ConnectionOptions>
</obj_MainDatabase>
</obj_DatabaseOptions>
Valid Database Connection Types
To connect to a database, the SilverStream Server needs the combination of:
-
Platform name. Identifies the vendor and version of the database. For example, Oracle 7 or Microsoft SQL Server 7.
-
Driver set. Identifies the database driver. It must include the package name so the server can locate it.
or
-
LDS key. The logical data source key. You can use this in place of the platform name and driver set.
SilverStream has already defined strings that resolve to these values. See the add_database_sample.xml for the complete listing of valid values.
Build
Compiles the items in an entire database, a directory within the database, or a named item within a directory. You can only build the items located in the Forms, Pages, Views, and Objects directories.
During a build, SilverStream:
-
Copies the specified item (or set of items) from the server to the following directory on the local disk: SilverStream/compilecache/server/database/source
-
Compiles the objects (using the Java compiler specified in the Designer's preferences file). Generates warning messages for items that cannot be compiled.
-
Saves (or uploads) the successfully compiled items (.CLASS files) back to the server.
Syntax
SilverCmd Build server[:port] database [item] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target SilverStream database
|
item
|
Specifies the name of a single item to build. It must include the SilverStream directory. For example:
SilverCmd Build localhost Examples3_EJB Forms/frmAccountType
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Specifies username and password for SilverStream authentication
|
-c
|
Removes any .CLASS files from the compile cache directory on the local machine before executing the current command
For example, if you are building the Forms directory of your Examples database, SilverCmd removes the .CLASS files from the directory:
SilverStream\host\database\classes\com\sssw\gen\forms
|
-f file
|
Specifies an input file that contains the list of items to build
The input file format is based on the ItemList DTD
The file name must include a string array of item names. The file can have any extension and can reside in any directory that is accessible to SilverCmd. For example, you can specify
SilverCmd Build localhost examples3 -f c:\build_sample.xml
|
-i
|
Continues on error
|
BuildJspJar
Deploys JavaServer Pages (JSPs) authored outside SilverStream to a SilverStream server. This command combines the capabilities of the JSPCompiler and DeployJSP SilverCmd utilities into a single command.
BuildJspJar performs these tasks:
-
Compiles the JSP(s) to .java files.
-
Compiles the .java files to .class files.
-
Builds the JAR file for deployment.
-
Builds the XML deployment descriptor file.
-
Deploys the JSP(s) to the SilverStream server.
Syntax
SilverCmd BuildJspJar server[:port] database rootDir -u baseURLList [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream server
|
database
|
Specifies the name of the target SilverStream database
|
rootDir
|
Specifies the root directory for the Web site that will be deployed to SilverStream. You do not need to list the files you want to deploy individually because the BuildJspJar command uses the root directory for the site to determine which files will be deployed.
|
-u baseURLList
|
One or more base URLs for the JAR. If you specify multiple JAR files, the JARs must be separated by semicolons (;).
Each URL you specify provides the root context for the JAR file. The complete URL required to access a JSP page in a JAR must specify the package name and JSP page as well. For example, suppose you deploy a JAR to the myDatabase database on your local machine and the JAR contains a page called test.jsp in the mypackage package. In this case, if you specify jsptests/jspurl as the URL for the JAR, the full URL required to access the page is:
http://localhost/myDatabase/jsptests/jspurl/mypackage/test.jsp
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Specifies a username for SilverStream authentication
|
-U and -P
|
Specifies a password for SilverStream authentication
|
-n
|
Optional name for the created JAR. If you do not specify this option, the name for the JAR file defaults to temp.jar.
|
-j
|
Optional list of JAR dependencies. If the JSP JAR references objects in other JAR files, specify the names of these JAR files by using the -j option. If you specify multiple JAR files, the JARs must be separated by semicolons (;).
|
ClearDefaultURL
Clears the default URL for a database or server.
Syntax
SilverCmd ClearDefaultURL server[:port] [database] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream server
|
database
|
Specifies the target SilverStream database
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Specifies username and password for SilverStream authentication
|
ComGen
Generates COM-access classes from a COM Typelib.
Syntax
SilverCmd ComGen typelib_path [options]
The valid arguments are:
Argument
|
Description
|
typelib_path
|
The type library for the COM component. The type library can be a separate .TLB file, or a resource that is linked into the .DLL or .EXE.
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-l
|
Lists all registered type libraries on your system.
This option does not generate any code.
|
-d <dir>
|
Output directory
The output directory is the root directory under which the package directory tree is created.
|
-p <pkg>
|
Output package
The Java package name for the generated classes
|
ConvertEJB
Converts EJB 1.0 serialized deployment descriptors to EJB 1.1 XML deployment descriptors.
Syntax
SilverCmd ConvertEJB OldEjbJarPath [NewEjbJarPath] [options]
The valid arguments are:
Arguments
|
Description
|
OldEjbJarPath
|
Specifies the path for the existing EJB 1.0 JAR file
|
NewEjbJarPath
|
Specifies the path for newly created EJB 1.1 JAR file
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-v
|
Prints verbose output to the command window
|
CreatePackage
Creates a Java package of the specified name in the Objects directory of the target database.
Syntax
SilverCmd CreatePackage server:[port] database package [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target database
|
package
|
Specifies the name of the package to create
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Specifies a username and password for SilverStream authentication
|
This example creates the package com.myco.foo in the mydb database on the localhost server:
SilverCmd CreatePackage localhost mydb com.myco.foo
Delete
Deletes the named component(s) from the specified database and server.
Syntax
SilverCmd Delete server[:port] database [item] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name and optionally the port of the target SilverStream Server
|
database
|
Specifies the name of the target database
|
item
|
Specifies the name of the item to delete.
To delete a form, page, or view, specify:
<dir>/itemname
where <dir> is Forms, Pages, or Views
To delete a business object, specify:
Objects/<packagename>/itemname
To delete a media item, specify:
Media/<dir>/itemname
where <dir> is Jars, Images, Sounds or General
To delete multiple items, use the -f <file>.
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message.
|
-f <file>
|
Specifies an input file that contains the list of items to delete
The input file format is based on the ItemList DTD
See the delete_sample.xml file in the DTDs directory for an example
The file name must include a string array of item names. The file can have any extension and can reside in any directory that is accessible to SilverCmd.
|
-U and -P
|
Specifies the username and password for SilverStream authentication
|
-r
|
Recursively delete children of packages
|
DeployEJB
Deploys an EJB JAR on the named SilverStream Server.
The EJB JAR must already exist on the server before running this command. See
ImportMedia for information on importing an externally created EJB JAR file to the server.
Syntax
SilverCmd DeployEJB server[:port] database ejbJar [ejbDeployedJar] [ejbRemoteJar] -f file [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target database
|
ejbJar
|
Specifies the name of the EJB JAR to deploy
The JAR should contain the Enterprise JavaBean classes, the home and remote interfaces for each EJB in the JAR, a deployment descriptor and any supporting components (utility classes, images, and so forth)
|
ejbDeployedJar
|
Specifies the name for the deployed JAR created by the command. If this argument is not specified, SilverCmd generates a default name by appending Deployed to the current name (for example, xxxDeployed.JAR)
If a JAR of this name already exists on the server, you must specify the -o parameter to overwrite it
|
ejbRemoteJar
|
Specifies the name to use for the remote JAR created by this command
If this argument is not specified, SilverCmd generates a default name by appending Remote to the current name (for example, xxxRemote.JAR)
If a JAR of this name already exists on the server, you must specify the -o parameter to overwrite it
If this argument is given, it supersedes the name specified in the input file
The remote JAR file is only generated if the input file specifies that the JAR should be enabled.
|
-f <file>
|
Specifies the input file that contains the additional deployment information
See the deploy_ejb.DTD and the deploy_ejb_sample.XML file in the SilverStream/DTDs directory for information about how this file should be structured
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for server authentication
|
-o
|
If an ejbDeployedJar or ejbRemoteJar argument is given and the JAR exists on the server, this flag forces the JAR to be overwritten
|
-r path
|
Create a copy of the generated remote JAR on the local drive in the directory path given
The JAR will have the same name as the remote JAR generated on the server
|
If only one argument is given following the ejbJar, it is assumed to be the ejbDeployedJar argument.
DeployJSP
Uploads a JSP JAR file to the specified server and deploys it on that server.
Syntax
SilverCmd DeployJSP server[:port] database jspJarFile -f file [options]
The valid arguments are:
Argument
|
Description
|
server
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target database
|
jspJarFile
|
Specifies the name of the JSP JAR to deploy
The JAR should contain the compiled JSP classes and any supporting components (utility classes, images, and so forth)
|
-f <file>
|
Specifies the input XML file that specifies URLs and dependency JAR files
See the deploy_jsp.DTD and the deploy_jsp_sample.XML file in the SilverStream/DTDs directory for information about how this file should be structured
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-o
|
If the JAR exists on the server, this flag forces the JAR to be overwritten
|
ExportSource
Copies the .JAVA source file of a single business object from a SilverStream application database to the specified location on disk as a text file.
Syntax
SilverCmd ExportSource server[:port] database [classname] [javafile] [is-file] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the source SilverStream Server
|
database
|
Specifies the name of the source database
|
classname
|
Specifies the name of the class to export
|
javafile
|
Specifies the name of the local file
If you do not specify a fully qualified filename, ExportSource creates the file in the current working directory
|
is-file
|
Specifies a file that will be populated by ExportSource
The resulting file is in XML format and includes the metadata required to recreate the object on a SilverStream Server using the ImportSource command
For example, if the object is a triggered business object, it includes the metadata about the trigger and the object's lifetime
If it does not exist, SilverCmd creates it
If you do not specify this file for a triggered business object, you must manually create the import options file when you want to re-import the object
It is not necessary to specify this option for non-triggered business objects because they do not have any associated metadata
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Options
|
Description
|
-?
|
Displays the usage message
|
-f file
|
Specifies the file name of an input file
This input file can contain the item or directory to export as well as the export source and options files
|
-U and -P
|
Username and password for SilverStream authentication
|
-o
|
Specifies that ExportSource should overwrite the javafile if it already exists on disk
|
ImportClass
Copies Java .CLASS files to the Objects directory of the specified database.
You can use ImportClass to copy any kind of Java class including utility classes and SilverStream's triggered objects. You cannot use this command to import the class files for any other type of SilverStream object (such as forms, views, or pages).
To import some types of triggered business object, you must provide additional information about the object's trigger. For example, a mail triggered business object requires data about the mail account to which it responds; a servlet requires the URL specification, and so on. Values for mail and table listeners can be specified at the command line; all others must be specified within the input file. Values specified at the command line (specifically, the -t, -m, and -p options) override settings in the input file.
Syntax
SilverCmd ImportClass server[:port] database classfile [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name and optionally the port number of the target SilverStream Server
|
database
|
Specifies the name of the target SilverStream database
|
classfile
|
Specifies the name of the class file to import
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-f file
|
Specifies the file name of the input file that contains the metadata information about the object you are importing
It is used only if the object is a triggered business object
See the import.dtd and the import_sample.xml files in the SilverStream/DTDs directory for more information
|
-m account
|
Specifies the mail account if loading an AgiMailListener object
Overrides input file specifications
|
-o
|
Specifies that ImportClass should overwrite the class file if it already exists on the server
|
-p
|
Makes the object a server-lifetime object; that is, it is instantiated once, not for each event
Objects are event-lifetime by default
|
-t table
|
Specifies a database table name if loading an AgiTableListener object
Overrides input file specifications
|
-U and -P
|
Specifies the username and password for SilverStream authentication
|
Server, cluster, and invoked business object do not take any arguments.
ImportMedia
Imports objects to the appropriate Media subdirectory on the SilverStream Server. The objects can include: images, standard JARs, EJB JARs, and sounds.
NOTE You cannot modify imported JARs using the SilverStream Jar Designer. You must make any modifications to the JAR file before importing it into SilverStream.
Importing JARs that contain references to files in other JARs
If the JAR that you are importing (the primary JAR) includes references to files in other JARs (the referenced JARs), you must do the following before you can import it:
-
Import the JARs containing the referenced files (the referenced JARs).
-
Extract the manifest of the primary JAR (making sure that the path on extract matches the manifest's path within the JAR).
-
Add the Class-path attribute to the manifest of the primary JAR.
For more information on the Class-path attribute, see the chapter on the JAR Designer in the online Tools Guide.
-
Update the primary JAR with the new manifest file.
-
Import the primary JAR.
-
Once imported, you must add the primary JAR and the referenced JARs to the Jar Files list of any clients wishing to access the primary JAR.
When the primary JAR already has a manifest
If the primary JAR file already contains a manifest file, you only have to:
-
Import the JARs containing the referenced files (the referenced JARs).
-
Import the primary JAR.
-
Once imported, you must add the primary JAR and the referenced JARs to the Jar Files list of any clients wishing to access the primary JAR.
Syntax
SilverCmd ImportMedia server[:port] database fileOrDir...[options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target SilverStream database into which you want to import the media files
|
fileOrDir...
|
Specifies the name of the file to import or the directory whose files are to be imported
You can supply multiple files or directories at the command line
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for authentication
|
-i
|
Continue on error
|
-j
|
Import all specified files or the contents of all directories as JAR files regardless of their extension
|
-o
|
If the media object exists on the server, this flag forces it to be overwritten
|
-r
|
For specified directories, recurse into the subdirectories
|
ImportPage
Imports a static HTML page to a SilverStream database. You can optionally associate the HTML page with one or more URLs.
Syntax
SilverCmd ImportPage server[:port] database htmlfile [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server and optionally a port number
|
database
|
Specifies the name of the target SilverStream database
|
htmlfile
|
Specifies the name of the HTML file to import
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-e <URLElements>
|
Specifies a semi-colon separated list of database-relative URLs to associate with the HTML file
|
-o
|
Specifies that ImportPage should overwrite an existing HTML file of the same name if necessary
|
ImportSource
Imports .Java files to the business objects directory of the specified database and server.
You can use ImportSource to copy source code for utility, EJB, and SilverStream's triggered objects. You cannot use this command to import the source for any other type of SilverStream object (such as forms, views, or pages).
To import triggered business objects, you must provide additional information about the object's trigger. For example, a mail triggered business object requires data about the mail account to which it should respond; a servlet requires the URL specification, and so on. Values for mail and table listeners can be specified either at the command line or in the input file; all others must be specified within the input file. Values specified at the command line (specifically, the -t, -m, and -p options) override settings in input file. You can also set or modify these values once the object is imported.
Syntax
SilverCmd ImportSource server[:port] database javafile [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target SilverStream database
|
javafile
|
Specifies the location and name of the Java file to import
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-f file
|
Specifies an input file. When importing a triggered business object, this file can contain metadata about the business object. For example, if the Java file represents a mail triggered business object, the input file can contain the mail account name, and the object's lifetime
|
-k
|
Specifies that ImportSource should not overwrite existing metadata if class already exists on the server
|
-m account
|
Specifies a mail account for AgiMailListeners
|
-o
|
Specifies that ImportSource should overwrite the source file if it already exists on the server
|
-p
|
Specifies whether the object is a server-lifetime object (true) or an event lifetime object (false). False is the default.
This is only valid for triggered business objects
|
-t table
|
Specifies a database table name for AgiTableListener
|
JSPCompiler
Translates a JSP page to a Java servlet.
Syntax
SilverCmd JSPCompiler jspfile | xmldoc jspfiles... [options]
The valid arguments are:
Argument
|
Description
|
jspfile
|
The name of the JSP file you want to process
|
xmldoc
|
The name of the XML document you want to process
|
jspfiles...
|
The name(s) of additional JSP files to process (in a space-separated list)
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-d <dir>
|
Generates debugging output
|
-p <pkg>
|
Specifies a fully-qualified package name
|
-r <root>
|
Specifies the application root location. This option is used only when compiling a page that contains a JSP include directive with a relative URL that starts with a `/'
|
-v
|
Validates the XML document
|
ModifyTableList
Defines the set of tables available to SilverStream for a specified database. The ModifyTableList command requires an input file to specify the table names.
Syntax
SilverCmd ModifyTableList server[:port] database -f file [options]
The valid arguments are:
Argument
|
Definition
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the database whose table list you want to modify
|
-f <file>
|
Specifies a file containing the names of the database tables
See the modify_table_list.xml file for an example.
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
Specifying tables in the input file
Your input file specifies the tables that you want to include or to make accessible to SilverStream. The input file can include either a list of individual table names to include, a list of table name patterns, or a combination.
When you specify a pattern, you can use the "%" symbol to match any number of characters, and the "_" character to specify that you want to match any one character.
Prefs
Updates the following compiler settings in the Designer preferences file:
-
Compiler name and directory
-
Compiler flags
-
Compile cache directory
-
SilverStream debug flags
The preferences file contains additional information that is not settable from the Prefs command line. Any compiler values that are not specified via the command line or in the input file are left unchanged in the preferences file. To change any other settings, for example, the default browser, you must use the Edit>Preferences menu option from the Main Designer. See the Main Designer in the online Tools Guide for more information on changing these settings.
NOTE You should stop the Designer before executing the Prefs command. If the Designer is running, the changes will not take effect.
Syntax
SilverCmd Prefs [options]
The valid options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-a flags
|
Sets the compiler-specific flags. It must be a quoted string.
If compiler flags start with a dash (-), eliminate the space between the "-a" and the flags. For example,
SilverCmd Prefs -c SymCafe "-a-nodeprecated
-noinline"
|
-c name
|
Sets the compiler type. The value can only be one of the following:
SymCafe
MSJ++
SunJavac
PowerJ
|
-d dir
|
Sets the compiler's directory
|
-f file
|
Specifies an input file that contains the new compiler preferences
If you specify preferences in both the input file and at the command line, the command line preferences take precedence
See the prefs_sample.xml file in the SilverStream/DTDs directory for an example that shows how to create one of these files
|
-g true/false
|
Turns debugging information on or off
Debug is off by default
|
-l
|
Lists existing preferences to the console
|
-s file
|
Saves existing preferences to the specified file
|
-t dir
|
Sets the compile-cache directory
|
Setting Debug Flags
The DebugFlags option is not a directive to the compiler, but to SilverStream. It specifies whether or not AgfForm.debugPrint() should print. An existing preferences file, might list the value as zero or one, but when you set this flag, you should always set it to a Boolean value (true or false). You cannot change the debug flags option at the command line. You must set it via the XML file specified using the -f option.
Publish
Publishes items from one database or server to another.
Syntax
SilverCmd Publish sourceserver[:port] sourcedatabase targetserver[:port] targetdatabase -f file [options]
The valid arguments are:
Argument
|
Definition
|
sourceserver[:port]
|
Specifies the name of the source SilverStream Server
|
sourcedatabase
|
Specifies the name of the source database
|
targetserver[:port]
|
Specifies the name of the target SilverStream Server
|
targetdatabase
|
Specifies the name of the target database
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
-a
|
Publishes the contents of the database
|
-f file
|
Specifies the name of a file that specifies the publish list
You can only specify -f when -a is not specified
|
-c
|
Forces an overwrite of read-only items in the destination database
This setting is ignored when the destination database is not part of source control
|
-s
|
Specifies that the Publish should strip design information from the items published
|
PublishFromFile
Publishes SilverStream components from the specified directory on disk to the appropriate directory on the specified SilverStream server and database. You can only publish items that were downloaded using PublishToFile (not exported) from a SilverStream Server because they must be in the expected file format. SilverCmd places the objects in the appropriate server directory. For example, forms are uploaded to the forms directory, pages to the page directory and so on.
See SilverCmd
PublishToFile for more information.
If you are publishing items without their .CLASS files, you must build the objects after uploading them.
Syntax
SilverCmd PublishFromFile server[:port] database [fileorDir] [options]
The valid arguments are:
Argument
|
Definition
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target database
|
fileorDir
|
Specifies the source file or directory to publish
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
-f file
|
Specifies an input file which contains the list of items to upload
The file should be in the format specified by the FileList.DTD in the SilverStream/DTDs directory
|
-s
|
Specifies that SilverStream should copy items from the specified directory recursively
|
PublishToFile
Downloads the components of an application database from the server to a specified location on disk, or to the current working directory if no directory is specified.
The PublishToFile operation maintains the server's directory structure for the items it downloads. For example, if you specify that the items be downloaded to the C:\test directory, SilverCmd downloads forms to the c:\test\Forms, pages to the c:\test\Pages, and business objects to the c:\test\Objects and so on.
You might use PublishToFile in conjunction with PublishFromFile when you want to transfer application components indirectly between servers. Suppose, for example, that you have created an application that you want to install (not Publish) on another server. You would use PublishToFile to obtain all of the application's files including all of the necessary components (such as Java code, metadata information, and associated data such as HTML for pages, etc.). You might then create a script that runs the SilverCmd PublishFromFile command to put them on the target server.
Syntax
SilverCmd PublishToFile server[:port] database [item] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target database
|
item
|
The name of a single item to publish
Specifications include:
For forms, views, or pages, use:
<dir>/itemname
For business objects, use:
Objects/<packagename>/itemname
For items in the Media directory:
Media/<dir>/itemname
where <dir> can be: Jars, Images, Sounds, or General
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
-c
|
Specifies that the download should exclude the CLASS files
|
-d <dir>
|
Specifies the output directory. SilverCmd creates the directory if it does not exist.
|
-f
|
Specifies an input file that contains a list of items to download.
|
-s
|
Specifies that SilverStream should strip the design metadata and the Java source code
|
-x
|
Specifies that the download should be in XML format instead of binary. Binary is the default
Binary format is more compact, and faster to read and write, than XML format. If you were building an installer (by downloading the objects, and then using Upload at install-time to install them), you might want to use binary format.
|
RebuildJAR
Rebuilds SilverStream-generated JAR files.
You might use RebuildJAR when certain components of your application that are part of a JAR have changed or when you want to insert new packages or business objects into your JAR. For example, you might have changed a GIF or added a new package as a subpackage. The RebuildJAR operation discards the old items and inserts the new ones. You might think of RebuildJAR as "edit existing JAR and save changes."
You cannot use RebuildJar to add or remove objects from the JAR. RebuildJAR takes the most recent versions of the objects that exist in the current JAR. This means that for specific items, such as "Forms/form1" or "Views/view1", the newer versions of these items, if any, replace the existing ones. For directories, such as "Forms", "Views" etc, only the items that were in those directories at the time of the JAR's creation, will be reinserted. This is not so for packages, whose contents are dynamically regenerated each time you rebuild. For example, if the user adds any new classes to a package, they will get inserted into the JAR, older versions of existing classes substituted for newer ones, and any deletions reflected in warning messages.
Restrictions
You cannot rebuild JAR files that were not created using the SilverStream JAR Designer.
Syntax
SilverCmd RebuildJAR server[:port] database jarfile [options]
The valid arguments are:
Argument
|
Definition
|
server[:port]
|
Specifies the name of the source SilverStream Server
|
database
|
Specifies the name of the source database
|
jarfile
|
Specifies the name of the JAR file to rebuild
|
options
|
Specifies operating criteria for the command
|
RebuildJar supports the following options:
Options
|
Description
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
RemoveDatabase
Removes the database from the server's list of accessible databases.
Syntax
SilverCmd RemoveDatabase server[:port] database [options]
The valid arguments are:
Argument
|
Definition
|
server[:port]
|
Specifies the name of the source SilverStream Server
|
database
|
Specifies the name of the source database
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Print the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
ServerState
Manages the server's state. Use it to shut down a server or test whether the server is currently running. You can, for example, use this from an installation script.
Syntax
SilverCmd ServerState server[:port] action [options]
The valid arguments are:
Argument
|
Definition
|
server[:port]
|
The name of the source SilverStream Server
|
action
|
Specifies one of the following:
isrunning - Returns an exit code that indicates if the server is running or not. The exit code 0 means that the server is running; returns 1 otherwise. Must be run as part of a batch file or script.
shutdown - Gracefully shuts down the SilverStream Server
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
-d
|
Deactivate the target server
|
-r
|
Restart the target server
|
SetDefaultURL
Sets the default URL for a database or server.
Syntax
SilverCmd SetDefaultURL server[:port] [database] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the target SilverStream server and optionally the port number
|
database
|
Specifies the target SilverStream database
|
options
|
Specifies operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Specifies username and password for SilverStream authentication
|
-e
|
Specifies a server-relative or database-relative URL
This shows a server-relative URL:
Examples3/SilverStream/pages/page1.html
This shows a database-relative URL:
localhost/Pages/page1.html
|
SetSecurity
Sets Read, Write, Protect, Select, and Execute security permissions on the SilverStream Server, a database, a directory, or one or more objects. Certain permission types are applicable only for certain types of items. For example, the Select permission is only applicable to tables.
You can also set permissions on the Security directory of a server. The Read permission on this resource rules who can have access to user and group information such as lists of users and groups and user/group properties. The Protect permission rules who can set the permissions on the Security directory.
Syntax
SilverCmd SetSecurity server[:port] [database] -f file [options]
The valid arguments are:
Argument
|
Definition
|
server[:port]
|
Specifies the name of the SilverStream Server
|
[database]
|
Specifies the name of the database
Do not specify this value when setting server permissions
|
-f [file]
|
Specifies the fully qualified name for an input file whose contents specify the security permissions information
|
options
|
Specifies the operating criteria for the command
|
The valid options are:
Option
|
Definition
|
-?
|
Displays the usage message
|
-U and -P
|
Specifies username and password for SilverStream authentication
|
-i
|
Continue on error
|
SetUserGroupInfo
Creates and deletes SilverStream users and groups; adds users to groups; sets properties for both.
Syntax
SilverCmd SetUserGroupInfo server[:port]
[action action-parameters] [options]
The valid arguments are:
Argument
|
Description
|
server[:port}
|
Specifies the name of the SilverStream Server
|
[action]
|
Specifies the action to perform, for example, CreateUser or DeleteUser
|
[action-parameters]
|
Specifies any special operating criteria for the action
The valid parameters are listed in a later section
|
options
|
Specifies operating criteria for the command
|
The SetUserGroupInfo options are:
Option
|
Description
|
-?
|
Displays the usage message
|
-U and -P
|
Username and password for SilverStream authentication
|
-f file
|
Specifies the file name of a file containing data for the SetUserGroupInfo command
|
-i
|
Continues on error
This is valid in batch mode only
|
The SetUserGroupInfo actions are:
Action
|
Description
|
AddUserToGroup
|
Adds a user to a SilverStream security group
|
CreateGroup
|
Creates a SilverStream security group
|
CreateUser
|
Creates a SilverStream user or certificate
|
DeleteGroup
|
Deletes a SilverStream group from the server
|
DeleteUser
|
Deletes a SilverStream user from the server
|
DeleteUserFromGroup
|
Deletes a SilverStream user from the specified SilverStream group
|
SetGroupProperties
|
Specifies properties for an existing SilverStream group
|
SetUserProperties
|
Specifies properties for an existing SilverStream user
|
The AddUserToGroup Action
Adds an existing user from a known security realm (for example, NT) to an existing SilverStream security group.
Syntax
SilverCmd SetUserGroupInfo server[:port] AddUserToGroup "username" "groupname" [options]
The action-parameters are:
Action-parameter
|
Description
|
username
|
Specifies the name of the user to add. The name must be in a valid login format
See the chapter on security in the Administrator's Guide for more information about supplying these values for the security realms
|
groupname
|
Specifies the name of the SilverStream group to which you want to add the user
If the name includes spaces, it must be quoted
|
Example
This example shows how to adds the NT user "admin" to the SilverStream group "Admins".
SilverCmd SetUserGroupInfo localhost AddUserToGroup ntDomain1\admin Admins
This example shows how to add the NT user "admin" to the SilverStream group "Our NT Administrators".
SilverCmd SetUserGroupInfo localhost AddUserToGroup ntDomain1\admin "Our NT Administrators"
The CreateGroup Action
Creates a SilverStream security group for the specified server.
Syntax
SilverCmd SetUserGroupInfo server[:port] CreateGroup -g "groupname" [-d "description"]
The valid arguments are:
Argument
|
Description
|
-g groupname
|
Specifies the name of the group
This value is required
|
-d description
|
Specifies a description for the group. This value is optional. If the description includes spaces, it must be enclosed in quotes.
|
Example
The following examples show how to create three different SilverStream groups; one called Developers, one called Our Administrators, and one called Finance.
SilverCmd SetUserGroupInfo localhost CreateGroup -g "Developers" -d "Research and Development Group"
SilverCmd SetUserGroupInfo localhost CreateGroup -g "Our Administrators" -d "Our Admins" -l
SilverCmd SetUserGroupInfo http://myserver CreateGroup -g "Finance"
The CreateUser Action
Creates a SilverStream user by specifying a username/password or a certificate user.
Syntax
SilverCmd SetUserGroupInfo server[:port] CreateUser -u "username" [-p "password"] [-n "full name"] [-d "description"]
or
SilverCmd SetUserGroupInfo server[:port] CreateUser
-c client-certificate-file
The valid arguments are:
Argument
|
Description
|
-c client-certificate-file
|
Specifies the client certificate file
|
-d description
|
Specifies a description for the user. If the description includes spaces, it must be enclosed in quotes. This value is optional.
|
-n name
|
Specifies the user's full name. If the name includes spaces, it must be enclosed in quotes. This value is optional.
|
-p password
|
Specifies the user's SilverStream password. This value is optional.
Note that this value is different than the -U and -P (uppercase) parameters used for authenticating the user running SilverCmd.
|
-u username
|
Specifies the name by which the new user will be known to SilverStream. This value is required except when specifying a client certificate file.
Note that this value is different than the -U and -P (uppercase) parameters used for authenticating the user running SilverCmd.
|
Examples
This example shows how to create a new user.
SilverCmd SetUserGroupInfo http://myserver CreateUser -u "user1" -p "password" -n "John Brown" -d "Applications Developer"
SilverCmd SetUserGroupInfo localhost CreateUser -u "user1" -n "John Brown"
SilverCmd SetUserGroupInfo localhost CreateUser -u "user1"
This example shows how to create a certificate user, given a client certificate file.
SilverCmd SetUserGroupInfo localhost CreateUser -c c:\certs\ClientCert1.cer
The DeleteGroup Action
Deletes a SilverStream group.
Syntax
SilverCmd SetUserGroupInfo server[:port] DeleteGroup "groupname"
The valid arguments are:
Argument
|
Description
|
groupname
|
Specifies the name of the group to delete
|
For example,
SilverCmd SetUserGroupInfo localhost DeleteGroup "TestGroup"
The DeleteUser Action
Deletes a SilverStream user.
Syntax
SilverCmd SetUserGroupInfo server[:port] DeleteUser "username"
The valid arguments are:
Argument
|
Description
|
username
|
Specifies the name of the user to delete
|
For example,
SilverCmd SetUserGroupInfo http://myserver DeleteUser testUser1
To delete a certificate user:
SilverCmd SetUserGroupInfo localhost DeleteUser "CERT\\Jack Brown, DigitalID Class 1 - Microsoft Full Service, VeriSign, Inc. (28f52c889e8d6d8cf21d932d9b71z705)"
You must specify the complete distinguished name of the certificate user.
The constant CERT\\ must be prepended to the distinguished name in order to disambiguate it. CERT means Certificate Security Realm.
The \\ signifies a security authority that is not present in this case.
With NT, for example, the name would look something like
NT\domainname\user1
With Certificate Security Realm, no authorities are specified.
You can, specify the default security realm (via the SMC or by setting the AgiAdmServer.PROP_DEFAULT_SECURITY_REALM property on the server object). If you set the default to "Certificate Security Realm" (for example, by setting the property value to "CERT"), then there would be no need for the "CERT\\" part because it would be assumed by default.
The DeleteUserFromGroup Action
Deletes a user from a SilverStream group.
Syntax
SilverCmd SetUserGroupInfo server[:port] DeleteUserFromGroup "username" "groupname"
The valid arguments are:
Argument
|
Description
|
username
|
Specifies the name of the user that you want to delete from the group
|
groupname
|
Specifies the name of the SilverStream group from which you want to delete the user
|
For example,
SilverCmd SetUserGroupInfo localhost DeleteUserFromGroup ntDomain1\admin Admins
Using SetGroupProperties
Sets properties for a SilverStream group. Any properties that are not specified retain their original values.
Syntax
SilverCmd SetUserGroupInfo server[:port] SetGroupProperties
-g "groupname" [-d "description" -l "is locksmith"]
The valid arguments are:
Argument
|
Description
|
-g groupname
|
Specifies the name of the group
This is a required argument
|
-d description
|
Provides a description of the group. This is an optional argument
|
-l islocksmith
|
Specifies the locksmith value which may be true or false
You may set "is locksmith" on any type of group, not just SilverStream groups
You can only grant locksmith privileges if you have them, for example, if you are a locksmith
The value "true" means "grant the privilege" and "false" means "revoke the privilege"
|
Examples
SilverCmd SetUserGroupInfo myserver SetGroupProperties -g testGroup -d "This is a test group"
SilverCmd SetUserGroupInfo myserver SetGroupProperties -g "Our Administrators" -l false
The SetUserProperties Action
Modifies properties for a SilverStream or certificate user. Any values that are not specified are not modified.
Syntax
SilverCmd SetUserGroupInfo server[:port] SetUserProperties -u "username" -p "password" -n "full name" [-d "description"] [-l "is locksmith"]
or
SilverCmd SetUserGroupInfo server[:port] SetUserProperties -c "certificate-file" [-l "is locksmith"]
The valid arguments are:
Argument
|
Description
|
-c certificate-file
|
Specifies the certificate file for updating the certificate users
This is a required value for certificate files and is not settable
|
-d description
|
Provides a description of the user
|
-l is-locksmith
|
Specifies the locksmith privilege value
You can give locksmith privileges to any type of user, not just SilverUser or CertificateUser
You can only grant locksmith privileges if you have them, for example, if you are a locksmith
The value "true" means "grant the privilege" and "false" means "revoke the privilege"
|
-n name
|
Specifies a full name for the user
|
-p password
|
Specifies a new password for the user
|
-u username
|
Specifies the username for the user whose properties you want to change. This value is required and is not settable
|
For example,
SilverCmd SetUserGroupInfo localhost SetUserProperties -u "jsmith"
-p "new password" -l false
SilverCmd SetUserGroupInfo localhost SetUserProperties -u "jsmith" -n "Jonathan H. Smith"
SilverCmd SetUserGroupInfo localhost SetUserProperties -u "jsmith" -d "Principal Engineer" -p "new pwd"
SourceControl
Performs source control tasks.
Before you can run the SourceControl command, you must have one of the SilverStream supported source control software packages installed and your SilverStream application database set up to use it. You cannot set up a database for source control using the SourceControl command line tool. See SilverStream Source Control in the online Tools Guide for setup information.
Syntax
SilverCmd SourceControl server[:port] database action [item] [options]
The valid arguments are:
Argument
|
Description
|
server[:port]
|
Specifies the name of the target SilverStream Server
|
database
|
Specifies the name of the target database that contains your SilverStream application components
This database must already be configured to use a source control system
|
item
|
Specifies the name of the SilverStream application object on which you want to perform the source control operation
The name must be specified using the SilverStream Server's directory structure, for example:
Forms/formname or Media/Jars/jarname.
To work with multiple items, you must specify them in an input file which you specify using the -f file argument
|
action
|
Specifies the source control action to execute. Valid values are:
Get, Checkin, Checkout and Undocheckout.
These values are not case-sensitive
|
options
|
Specifies operating criteria for the action
If you supply an option that is not valid for the current action, SilverCmd executes the action and ignores any invalid options
See below for more information on the valid options
|
You can customize the source control operation (Get, Checkin, and so on) using the options described in the following table.
Option
|
Description
|
-?
|
Displays the SourceControl usage message
|
-U username and -P password
|
Username and password for SilverStream authentication
|
-c comment
|
Specifies the comment to use for Checkin operations. The text must be in quotes. For example,
SilverCmd SourceControl Checkin -c "This is a comment" localhost Examples3 Forms/myForm
This option is only valid for Checkin operations
|
-d date
|
Gets an object checked in on a specific date
Valid formats are:
-d 4/4/98
-d 4/4/1998
-d 1998-4-4
-d "4/4/98 3:33 pm"
-d "4/4/98 15:33"
-d "1998-4-4 15:33:33"
You can use "." or "-" in place of "/" anywhere in the date portion. The month/day order is determined by the current locale. Two-digit years are handled appropriately ("98" means 1998, "02" means 2002).
This option is only valid with Get operations.
|
-f file
|
The name of the input file that specifies the items on which to perform the source control operation. This is useful when you want to perform an operation on multiple files.
|
-l label
|
Gets an object that has the specified label. The label must be in quotes. For example,
SilverCmd SourceControl Get -l "Version 3.0 Beta" localhost Examples3 Forms/myForm
|
-p password
|
Specifies the source control password. This must match the password exactly as configured in your source control system.
The username cannot be specified on the command line, it must be set in the Source Control Settings dialog.
If your source control access was set up to save your password, then you do not need to supply one. You can check the Source Control settings from the Designer by choosing Source>Source Control Settings
SilverCmd generates an error message if the -p option is required, but not specified.
|
-v version
|
Gets an object by its source control version.
|
-o
|
Confirms an action that will overwrite an existing file; for example, an Undocheckout of any file, or a Get of a checked out file.
SilverCmd fails if the specified operation will overwrite an existing file and the -y option is not specified.
|
The following example illustrates how to checkin a form called frmCasting:
SilverCmd SourceControl Checkin -c "updated code in FormActivate event"localhost Examples3 Forms/frmCasting
ValidateEJB
Validates the deployment descriptor within the specified EJB JAR file. It reports any deployment descriptor problems, missing application assembly components, and class-related problems. The problems are written to the command window by default.
You might want to use this command if you are building your own EJB JAR and its descriptor outside of the SilverStream IDE and want to verify that the descriptor is correct before importing the JAR to the SilverStream Server.
Syntax
SilverCmd ValidateEJB ejbJarFile [options]
The valid arguments are:
Argument
|
Description
|
ejbJarFile
|
The EJB JAR file whose beans are to be validated
|
The valid options are:
Option
|
Description
|
-?
|
Displays the SourceControl usage message
|
-c max
|
Maximum number of catastrophic errors allowed per bean
The default is one
|
-t max
|
Maximum number of fatal errors allowed per bean
The default is five
|
-n max
|
Maximum number of non-fatal errors allowed per bean
The default is ten
|
-w max
|
Maximum number of warnings allowed per bean
The default is 15
|
If -c, -t, -n, or -w is not specified, then the default maximum for the given type of error is used.
If a numeric value is specified for the switch, then SilverStream allows up to that many errors of the given type per bean and stops validating the bean if the limit is reached. If the string value of "all" is specified for the switch, then the SilverStream will register all the errors of the given type.
Copyright © 2000, SilverStream Software, Inc. All rights
reserved.