4Suite™ API Documentation

# ► Module Ft.Server.Client.Commands

This command is a client that provides access to a 4Suite repository and RDF model from the command line. The repository must exist and must be accessible via a 4Suite RPC server.

Classes: GeneralCommandLineApp |  |  |  | Fields: g_commands, g_options

## Modules

Add | This command is used to create a certain type of relationship between two objects in a 4Suite repository. See the help message for one of the subcommands for details.
Agent | This command will set a default username, password hash, hostname and port in an environment variable in a new shell so that you do not need to provide this info for subsequent invocations of 4ss command-line scripts. The username and password must be valid for the repository server on the given host and port. This command is an alternative to the login command.
CommandUtil | Functions used by various '4ss' command implementations.
Create | This command will create a resource in a 4Suite repository. It requires a subcommand specifying which type of resource to create. See the help message for one of the subcommands for specific usage info.
Delete | This command will delete from a 4Suite repository all resources with paths matching a given pattern. The pattern may contain shell-style wildcards as supported by Python's fnmatch module (but you probably have to escape them from being matched by your own shell first). If necessary, you will be prompted first for credentials and access info to connect to the repository. Aliases are normally traversed, so in order to delete an Alias, use the --no-traverse option.
Export | This command will export an application from a 4Suite repository, creating a setup.xml file and a mirror of the application's resources as files on the local filesystem. The application is assumed to be all resources in a particular container (including descendant containers). The user doing the export must have read access to all of the files in the container. If necessary, you will be prompted first for credentials and access info to connect to the repository.
Fetch | This command retrieves the content of a resource from a 4Suite repository. It requires a subcommand specifying which type of resource to fetch. See the help message for one of the subcommands for specific usage info.
Install | This command reads a 4Suite repository application's setup XML file from the local filesystem and uses it to install, update or remove the application in a repository. If necessary, you will be prompted first for credentials and access info to connect to the repository.
List | This command lists information about sets of certain types of resources in a 4Suite repository. A subcommand specifying which type of resource to list is required. See the help message for a subcommand for specific usage info.
Login | This command will associate a password hash, hostname and port with a username, storing the info in a password file on the local filesystem. Subsequent invocations of 4ss command-line scripts can then automatically look up access info for connecting to a repository. The location of the password file is determined by the FTSS_PASSWORD_FILE environment variable. If not set, then the location is assumed to be a file named '.4ss.passwd' in the directory determined by the environment variable HOME (on Unix) or HOMEPATH (on Windows), or the environment variable WINDIR (on Windows) (one must be set). If the password file does not exist, it will be created when the first entry is stored. The location must be writable by the user invoking the command. At this time, this command does NOT verify that the username, password hash, hostname and port combination is valid; no repository connection is made.
Passwd | This command sets a 4Suite repository User's password. It will first prompt for the new password to set. Then it will attempt to connect to the repository and change the password, prompting first for credentials and access info if necessary. The user accessing the repository must have write access on the User resource for which the password is being modified.
Rdf | This command allows one to perform basic operations on the 4Suite RDF model. It requires a subcommand specifying what operation is desired. See the help message for each subcommand for specific usage info.
Remove | This command is used to delete a certain type of relationship between two objects in a 4Suite repository. See the help message for one of the subcommands for details.
Render | This command will use 4xslt to render a source document with an XSLT stylesheet. Both the source and stylesheet must exist in a 4Suite repository, although the source document can be a virtual document such as the metadata XML for any resource in the repository. If necessary, you will be prompted first for credentials and access info to connect to the repository.
Set | This command sets properties, such as access permissions or arbitrary user data, for a resource in a 4Suite repository. A subcommand specifying which type of property to set is required. See the help message for a subcommand for specific usage info.
Update | This command will replace the content of an existing resource in a 4Suite repository, reading in the new content from a file on the local filesystem, for example. A subcommand specifying which type of resource to update is required. See the help message for a subcommand for specific usage info.

## Classes

class GeneralCommandLineApp(Ft.Lib.CommandLine.CommandLineApp.CommandLineApp)

### Methods

__init__(self)
run(*args, **kwords)

### Methods inherited from class Ft.Lib.CommandLine.CommandLineApp.CommandLineApp

gen_command_tree, gen_usage, get_help_doc_info, parse_command_line, validate_arguments, validate_options

### Methods inherited from class Ft.Lib.CommandLine.Command.Command

break_parent_relationship, build_parent_relationship, flatten_command_tree, run_command

### Fields

g_commands = [<module 'Ft.Server.Client.Commands.Add' from 'bu...6-2.4/Ft/Server/Client/Commands/Add/__init__.py'>, <module 'Ft.Server.Client.Commands.Agent' from '...-p2-i386-2.4/Ft/Server/Client/Commands/Agent.py'>, <module 'Ft.Server.Client.Commands.Create' from ....4/Ft/Server/Client/Commands/Create/__init__.py'>, <module 'Ft.Server.Client.Commands.Delete' from ...p2-i386-2.4/Ft/Server/Client/Commands/Delete.py'>, <module 'Ft.Server.Client.Commands.Export' from ...p2-i386-2.4/Ft/Server/Client/Commands/Export.py'>, <module 'Ft.Server.Client.Commands.Fetch' from '...2.4/Ft/Server/Client/Commands/Fetch/__init__.py'>, <module 'Ft.Server.Client.Commands.Install' from...2-i386-2.4/Ft/Server/Client/Commands/Install.py'>, <module 'Ft.Server.Client.Commands.List' from 'b...-2.4/Ft/Server/Client/Commands/List/__init__.py'>, <module 'Ft.Server.Client.Commands.Login' from '...-p2-i386-2.4/Ft/Server/Client/Commands/Login.py'>, <module 'Ft.Server.Client.Commands.Passwd' from ...p2-i386-2.4/Ft/Server/Client/Commands/Passwd.py'>, <module 'Ft.Server.Client.Commands.Rdf' from 'bu...6-2.4/Ft/Server/Client/Commands/Rdf/__init__.py'>, <module 'Ft.Server.Client.Commands.Render' from ...p2-i386-2.4/Ft/Server/Client/Commands/Render.py'>, <module 'Ft.Server.Client.Commands.Remove' from ....4/Ft/Server/Client/Commands/Remove/__init__.py'>, <module 'Ft.Server.Client.Commands.Set' from 'bu...6-2.4/Ft/Server/Client/Commands/Set/__init__.py'>, <module 'Ft.Server.Client.Commands.Update' from ....4/Ft/Server/Client/Commands/Update/__init__.py'>]
g_options = [[[--username=<USER>] | [--anonymous]], [--password=<PASSWORD>], [--port=<PORT>], [--host=<HOST>]]