Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

The add-type command. Creating StarTeam custom components.

The add-type command. Creating StarTeam custom components.

The add-type command is used to create a custom component on the server.

The syntax of the command is 

add-property -xmlFile <pathToPropertyDefinitionXmlFile> | -xml <property definition xml string> { -verify} -s "user[:password]@host:port" [ -epwdfile "pathToPasswordFile"]

Note that either -xmlFile or -xml must be specified, but not both. 

The optional test -verify checks the syntax of the xml, but does not create the component.

The xml is different for each property type, and must obey the custom component syntax  (schema examples below). When created, the custom component is an aggregate of the properties described in its schema.

Creating components through the command line provides an alternative to creating them through the Server Administration Tool. Ideally, the server will be in exclusive administration mode when creating components

An example of component definition XML below.

<?xml version="1.0" encoding="utf-8"  standalone="no"?>

<ComponentDefinition version="1.1">

<Component name="afooComponentEx">

<ClassDisplayName default="afooComponentEx"></ClassDisplayName>

<ComponentType>1</ComponentType>

<Descriptor>aTimenSpan</Descriptor>

<PrimaryDescriptor>aStringnThing</PrimaryDescriptor>

<Descriptor>aPrincipalID</Descriptor>

  <Properties>

    <Property name="anInteger">

    <DisplayName default="bar"></DisplayName>

    <Type>1</Type>

    <DefaultValue>10</DefaultValue>

    </Property>

 

    <Property name="aLongInteger">

    <DisplayName default="aLongInteger"></DisplayName>

    <Type>16</Type>

    <DefaultValue>19</DefaultValue>

    </Property>

 

    <Property name="aDouble">

    <DisplayName default="aDouble"></DisplayName>

    <Type>6</Type>

    <DefaultValue>33.45</DefaultValue>

    </Property>

 

    <Property name="aDatenTime">

    <DisplayName default="aDatenTime"></DisplayName>

    <Type>7</Type>

    <IgnoreTime>0</IgnoreTime>

    </Property>

 

    <Property name="aDateIgnorTime">

    <DisplayName default="aDateIgnorTime"></DisplayName>

    <Type>7</Type>

    <IgnoreTime>1</IgnoreTime>

    </Property>

 

    <Property name="aTimenSpan">

    <DisplayName default="aTimenSpan"></DisplayName>

    <Type>15</Type>

    <DefaultValue>7.0</DefaultValue>

    <Units>4.0</Units>

    </Property>

 

    <Property name="aBoolean">

    <DisplayName default="aBoolean"></DisplayName>

    <Type>14</Type>

    <DefaultValue>"TRUE"</DefaultValue>

    </Property>

 

    <Property name="aStringnThing">

    <DisplayName default="aStringnThing"></DisplayName>

    <Type>8</Type>

    <Length>512</Length>

    <DefaultValue>a stitch in time</DefaultValue>

    </Property>

 

    <Property name="anArrayOIDs">

    <DisplayName default="anArrayOIDs"></DisplayName>

   <Type>13</Type>

    <Length>500</Length>

     <ExternClassName>Group</ExternClassName>

    </Property>

 

    <Property name="aPrincipalID">

    <DisplayName default="aPrincipalID"></DisplayName>

    <Type>4</Type>

    <ExternClassName>User</ExternClassName>

    </Property>

 

    <Property name="aBucketOBits">

    <DisplayName default="aBucketOBits"></DisplayName>

    <Type>17</Type>

    </Property>

 

    <Property name="aSetOPieces">

    <DisplayName default="aSetOPieces"></DisplayName>

    <Type>2</Type>

    <DefaultValue>100</DefaultValue>

    <DefaultValue>101</DefaultValue>

    <Flags multiselect="true"  supportsProcessRules="false"/>

      <Enum code="100">

      <EnumName default="Windows"></EnumName>

      <ParentCode>-1</ParentCode>

      <Order>100</Order>

      <Flags selectable="true" isClosedState="false"/>

      </Enum>

      <Enum code="101">

      <EnumName default="Linux"></EnumName>

      <ParentCode>-1</ParentCode>

      <Order>101</Order>

      <Flags selectable="true" isClosedState="false"/>

      </Enum>

    </Property>

 

  </Properties>

</Component>

</ComponentDefinition>

  <Property name="anInteger">

    <DisplayName default="bar"></DisplayName>

    <Type>1</Type>

    <DefaultValue>10</DefaultValue>

    </Property>

 

    <Property name="aLongInteger">

    <DisplayName default="aLongInteger"></DisplayName>

    <Type>16</Type>

    <DefaultValue>19</DefaultValue>

    </Property>

 

    <Property name="aDouble">

    <DisplayName default="aDouble"></DisplayName>

    <Type>6</Type>

    <DefaultValue>33.45</DefaultValue>

    </Property>

 

    <Property name="aDatenTime">

    <DisplayName default="aDatenTime"></DisplayName>

    <Type>7</Type>

    <IgnoreTime>0</IgnoreTime>

    </Property>

 

    <Property name="aDateIgnorTime">

    <DisplayName default="aDateIgnorTime"></DisplayName>

    <Type>7</Type>

    <IgnoreTime>1</IgnoreTime>

    </Property>

 

    <Property name="aTimenSpan">

    <DisplayName default="aTimenSpan"></DisplayName>

    <Type>15</Type>

    <DefaultValue>7.0</DefaultValue>

    <Units>4.0</Units>

    </Property>

 

    <Property name="aBoolean">

    <DisplayName default="aBoolean"></DisplayName>

    <Type>14</Type>

    <DefaultValue>"TRUE"</DefaultValue>

    </Property>

 

    <Property name="aStringnThing">

    <DisplayName default="aStringnThing"></DisplayName>

    <Type>8</Type>

    <Length>512</Length>

    <DefaultValue>a stitch in time</DefaultValue>

    </Property>

 

    <Property name="anArrayOIDs">

    <DisplayName default="anArrayOIDs"></DisplayName>

    <Type>13</Type>

    <Length>500</Length>

     <ExternClassName>Group</ExternClassName>

    </Property>

 

    <Property name="aPrincipalID">

    <DisplayName default="aPrincipalID"></DisplayName>

    <Type>4</Type>

    <ExternClassName>User</ExternClassName>

    </Property>

 

    <Property name="aBucketOBits">

    <DisplayName default="aBucketOBits"></DisplayName>

    <Type>17</Type>

    </Property>

 

    <Property name="aSetOPieces">

    <DisplayName default="aSetOPieces"></DisplayName>

    <Type>2</Type>

    <DefaultValue>100</DefaultValue>

    <DefaultValue>101</DefaultValue>

    <Flags multiselect="true"  supportsProcessRules="false"/>

      <Enum code="100">

      <EnumName default="Windows"></EnumName>

      <ParentCode>-1</ParentCode>

      <Order>100</Order>

      <Flags selectable="true" isClosedState="false"/>

      </Enum>

      <Enum code="101">

      <EnumName default="Linux"></EnumName>

      <ParentCode>-1</ParentCode>

      <Order>101</Order>

      <Flags selectable="true" isClosedState="false"/>

      </Enum>

    </Property>

 

  </Properties>

</Component>

</ComponentDefinition>

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2016-09-26 17:55
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.