|
Project: stp | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectcom.ibm.rational.stp.client.samples.CreateRecordCommand
public class CreateRecordCommand
A sample CM API application that demonstrates the use of the API to create or update a ClearQuest record in a command line context.
The first argument is either the type of the record to be created or the name of a record to be modified. Standard CM API selector syntax must be used. The target user database must be specified in the repo field, but the domain and the namespace fields may be omitted as they are understood to be cq and record, respectively. The command-line options supported are
Field Summary | |
---|---|
private static javax.wvcm.PropertyNameList |
FIELD_METAPROPERTIES
Generally useful field meta-properties |
private static CqProvider |
g_provider
The CqProvider instance used by the class |
private static String |
g_repo
The database in which the record will be created determined from the command line inputs |
static javax.wvcm.PropertyRequestItem.PropertyRequest |
RECORD_REQUEST
Property request for retrieving the user-friendly name of a resource |
Constructor Summary | |
---|---|
CreateRecordCommand()
|
Method Summary | |
---|---|
static void |
main(String[] args)
Creates a new record using field values specified on the command line |
(package private) static com.ibm.rational.wvcm.stp.StpLocation |
normalize(com.ibm.rational.wvcm.stp.StpLocation.Namespace namespace,
String name)
Creates an StpLocation given a partial specification of its selector |
static CqRecord |
run(String[] args,
javax.wvcm.PropertyRequestItem.PropertyRequest wanted)
Creates a new record using field values specified on the command line |
private static Object |
showValue(String pad,
Object value)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final javax.wvcm.PropertyNameList FIELD_METAPROPERTIES
public static final javax.wvcm.PropertyRequestItem.PropertyRequest RECORD_REQUEST
private static CqProvider g_provider
private static String g_repo
Constructor Detail |
---|
public CreateRecordCommand()
Method Detail |
---|
static com.ibm.rational.wvcm.stp.StpLocation normalize(com.ibm.rational.wvcm.stp.StpLocation.Namespace namespace, String name) throws javax.wvcm.WvcmException
name
- A String containing at least the name field of the selectornamespace
- The namespace required by context
javax.wvcm.WvcmException
- if the specified location is malformed.public static void main(String[] args) throws Exception
args
- An array of String objects, each containing a command option
or command option argument as described in the class overview
comments.
Exception
- If things go wrong.public static CqRecord run(String[] args, javax.wvcm.PropertyRequestItem.PropertyRequest wanted) throws Exception
args
- An array of String objects, each containing a command option
or command option argument as described in the class overview
comments.wanted
- Target properties to be included in the returned proxy.
Must include USER_FRIENDLY_LOCATION
Exception
- If things go wrong.private static Object showValue(String pad, Object value)
|
Generated Fri 13-May-2011 09:35 AM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |