(file) Return to NULLValuesforCIMValue.htm CVS log (file) (dir) Up to [Pegasus] / pegasus / doc / WorkPapers

  1 karl  1.1 <html>
  2           
  3           <head>
  4           <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  5           <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  6           <meta name="ProgId" content="FrontPage.Editor.Document">
  7           <title>Pegasus Project Working Paper</title>
  8           </head>
  9           
 10           <body>
 11           
 12           <H1 align="center">Pegasus Project Working Paper</H1>
 13           
 14           <H1 align="center">Implementing NULL CIMValue Attribute</H1>
 15           
 16           <b>AUTHORS:</b>&nbsp;Karl Schopmeyer
 17           <p><font size="1">Last Update <!--webbot bot="Timestamp" startspan
 18           S-Type="EDITED" S-Format="%A, %B %d, %Y %I:%M %p" -->Monday, June 18, 2001 10:24 AM<!--webbot
 19           bot="Timestamp" i-CheckSum="42649" endspan -->
 20           </font></p>
 21           <p>Revision Status</p>
 22 karl  1.1 <table border="1" width="80%">
 23             <tr>
 24               <td width="25%">Revision</td>
 25               <td width="25%">Date</td>
 26               <td width="25%">Author(s)</td>
 27               <td width="25%">Reason</td>
 28             </tr>
 29             <tr>
 30               <td width="25%">1.0</td>
 31               <td width="25%">18 June 2001</td>
 32               <td width="25%">K. Schopmeyer</td>
 33               <td width="25%">&nbsp;</td>
 34             </tr>
 35             <tr>
 36               <td width="25%">&nbsp;</td>
 37               <td width="25%">&nbsp;</td>
 38               <td width="25%">&nbsp;</td>
 39               <td width="25%">&nbsp;</td>
 40             </tr>
 41             <tr>
 42               <td width="25%">&nbsp;</td>
 43 karl  1.1     <td width="25%">&nbsp;</td>
 44               <td width="25%">&nbsp;</td>
 45               <td width="25%">&nbsp;</td>
 46             </tr>
 47             <tr>
 48               <td width="25%">&nbsp;</td>
 49               <td width="25%">&nbsp;</td>
 50               <td width="25%">&nbsp;</td>
 51               <td width="25%">&nbsp;</td>
 52             </tr>
 53           </table>
 54           
 55           <h2>Introduction</h2>
 56           
 57           <font SIZE="2">
 58           <p>In reviewing the changes needed to enable the property list, it was noted
 59           that the <i>CIM Operations over HTTP</i> specification clearly states that the
 60           possible definitions for proertylist are:</p>
 61           <ol>
 62             <li>NULL - implies that the respond contains all properties.</li>
 63             <li>Empty list - reply with no parameters</li>
 64 karl  1.1   <li>Properties listed - Respond with the properties contained in the list.</li>
 65           </ol>
 66           <p>Further, NULL is the default if the propertylist parameter is not included in
 67           the request. However we are today defining an empty array as the default. In
 68           fact, we do not have the concept of NULL.</p>
 69           <p>The concept of NULL is defined in the document <i>CIM Operations over HTTP</i>
 70           specificaion as follows</p>
 71           <blockquote>
 72             <p>This notation uses the NULL qualifier to indicate parameters whose values
 73             may be specified as NULL in a method call. A NULL (unassigned) value for a
 74             parameter is specified by an &lt;IPARAMVALUE&gt; element with no subelement.
 75             For parameters which do not possess the NULL qualifier, the CIM Client MUST
 76             specify a value for the parameter by including a suitable subelement for the
 77             &lt;IPARAMVALUE&gt; element for that parameter.</p>
 78           </blockquote>
 79           <p>NULL is referenced in the CIM specification as follows</p>
 80           </font><b><i><font FACE="Times New Roman" SIZE="2" COLOR="#000080">
 81           <blockquote>
 82             <p>4.11.6 </font><font FACE="Times New Roman" SIZE="2">NULL</p>
 83           </font></i></b><font FACE="Times New Roman" SIZE="2">
 84           <p>All types can be initialized to the predefined constant NULL, which indicates
 85 karl  1.1 no value has been provided. The details of the internal implementation of the
 86           NULL value are not mandated by this document.</font> <font SIZE="2">Thus we have
 87           to be able to support the concept of NULL on any CIM type and in particular to
 88           values.</p>
 89           </blockquote>
 90           <p>It would appear that we need to implement the concept of NULL in general on
 91           CIMValue to be compliant with the CIM specifications. Doing this will allow us
 92           to then correctly implement the NULL in the property list also. In effect, this
 93           becomes a qualifier on each CIMValue</p>
 94           <p>The areas that we appear to have to change include the following:</p>
 95           <ol>
 96             <li>Add NULL attribute to the basic CIMValue definition.</li>
 97             <li>Add methods to set and test for NULL (setNull, setNotNull, isNull) to
 98               CIMValue class.</li>
 99             <li>Add the decoding for &lt;IPARMVALUE&gt; with no subelement as the decode
100               to NULL value</li>
101             <li>Add the encoding of NULL indicator on a CIMValue as &lt;IPARMVALUE&gt;
102               with no subelement.</li>
103             <li>Modify the set CIMValue functions -While the setNull, etc. functions can
104               be important, the real key to making use of the NULL is through the get and
105               set functions.&nbsp;&nbsp; Any time a new CIMValue object is created without
106 karl  1.1     putting a value it in, it, it should be set NULL.&nbsp; Any time a value is
107               set in a CIMValue, the NULL attribute should be unset.</li>
108             <li>Modify the get CIMValue functions - Any time an attempt is made to access
109               a CIMValue, the value returned must depend on the state of the NULL
110               attribute.&nbsp; Since there is no value if NULL is set, we cannot return a
111               value to the requestor if NULL is set.&nbsp; Since all possible values can
112               be returned (ex. on a Boolean CIMValue, the only possible values returned
113               are true and false), the most logical way to inform the requester that a
114               CIMValue is NULL is through an exception.&nbsp; This is also probably the
115               technique that causes the minimal distrubance to existing code.&nbsp;
116               THerefore, we need to throw an exception on each CIMValue get if the NULL
117               attribute is set.</li>
118             <li>Modify the propertylist processing to use NULL correctly</li>
119             <li>The compiler. Not sure what Bob is doing with NULL initialization
120               now?&nbsp; However, apparently NULL is the default setting for values and in
121               addition NULL as a property setting is specifically allowed.</li>
122             <li>Clients that have been created to account for NULL in a number of cases.</li>
123           </ol>
124           <p>NOTE: There has been some discussion of the possibility of adding the concept
125           of&nbsp; UNKNOWN to CIMValue in addition to NULL.&nbsp; However, this is not in
126           any of the specifications today and we see not reason to consider it further
127 karl  1.1 unless it is proposed as an extension to the CIM Specification.</p>
128           </font>
129           
130           <p>---END OF DOCUMENT--</p>
131           
132           </body>
133           
134           </html>

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2