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-property command. Expanding the schema of a type with custom properties

The add-property command. Expanding the schema of a type with custom properties

The add-property command supports creating custom properties on an existing type. 

The syntax of the command is 

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

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

The xml is different for each property type, and must obey the custom component syntax  (schema examples below). Note that after the command completes, the server automatically prepends Usr_ to the property name.

Creating properties through the command line provides an alternative to creating them through the Cross Platform Client. Ideally, the server will be in exclusive administration mode when creating properties, so that all other users will not be affected. Property creation is slow and expensive, since the database schema and metadata change, the database view member table has to be filled with the appropriate defaults, etc.

examples of property definiton XML for various property meta-types

  <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>

 

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:56
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.