Oracle Waveset 8.1.1 Deployment Reference

conditions

This value contains a set of AttributeConditions that specify particular attributes, their expected values, and a comparison operator. AttribueConditions can be specified in three ways:

Table 2–23 Values of conditions Attribute

Value Format  

Description  

Map 

As a map containing <MapEntry> elements, each <MapEntry> element contains the attribute name to be matched as the key and the value to be matched as the value. (The operator is assumed to be “equals”.) If more than one attrname/value pair is specified, they will be logically and’ed together.

Example 

<Map>
<MapEntry key=’memberObjectGroups’ value=’Top’/>
</Map>

map 

As a map with no <MapEntry> elements, the first entry is the name of a queryable attribute supported by this type of object. The second entry is the value an object of this type must have for the associated queryable attribute to be returned. (The operator is assumed to be “equals”.)

If more than one attrname/value pairs is specified, they will be logically and’ed together. 

Example 

<map><s>memberObjectGroups</s>

<ref>waveset.organizations</ref>

</map>

list 

As a list of AttributeCondition objects. If more than one AttributeCondition is specified, they will be logically and’ed together. You must use this form if you must specify an operator other than ”equals’.

Example 

<list>

<newclass= ’com.waveset.object.AttributeCondition’>

<s>MemberObjectGroups</s>

<s>equals</s>

<ref>waveset.organization</ref>

</new>

</list>

Using the conditions Attribute

You can specify a list of one or more object type-specific query attribute conditions to filter the list of names returned by certain FormUtil methods. (These methods include methods that take an options map as an argument.) You can specify these query attribute conditions as a query option whose key is conditions and whose value can be specified as either a map or list of AttributeConditions.

Examples: Using the condition Attribute to Filter Names

The following examples illustrate the use of the conditions attribute to apply additional filters to the list of names returned by a FormUtil method that takes an options map as an argument. This example uses conditions to specify that only resources that support container object groups of type LDAP should be returned.


Example 2–12 First Example of Using the conditions Attribute


<Field name=’waveset.resources’>
   <Display class=’MultiSelect’ action=’true’>
...
      <Property name=’allowedValues’>
         <invoke class=’com.waveset.ui.FormUtil’ name=’getUnassignedResources’>
            <ref>:display.session</ref>
            <map>
               <s>currentRoles</s>
               <ref>waveset.roles</ref>
               <s>currentResourceGroups</s>
               <ref>waveset.applications</ref>
               <s>current</s>
               <ref>waveset.original.resources</ref>
               <s>conditions</s>
               <map>
                  <s>supportsContainerObjectTypes</s>
                  <s>true</s>
                  <s>type</s>
                  <s>LDAP</s>
               </map>
            </map>
         </invoke>
      </Property>
   </Display>
</Field>

This second example requests resources that support container objects where the resource has a name that starts with ldap. Note that the value for the queryable attributes are compared case-sensitive.


Example 2–13 Second Example of Using the conditions Attribute


<Field name=’orgResource’>
   <Display class=’Select’ action=’true’>
...
      <Property name=’allowedValues’>
         <invoke class=’com.waveset.ui.FormUtil’ 
                  name=’getResourcesSupportingContainerObjectTypes’>
            <ref>:display.session</ref>
            <map>
               <s>conditions</s>
               <list>
                  <new class=’com.waveset.object.AttributeCondition’>
                     <s>name</s>
                     <s>starts with</s>
                     <s>ldap</s>
                  </new>
               </list>
            </map>
         </invoke>
      </Property>
   </Display>
</Field>

Third Example of Using the conditions Attribute


<Field name=’accounts[Lighthouse].capabilities’>
   <Display class=’MultiSelect’>
         ...
     <Property name=’allowedValues’>
        <invoke class=’com.waveset.ui.FormUtil’
           name=’getUnassignedCapabilities’>
           <ref>:display.session</ref>
           <ref>waveset.original.capabilities</ref>
             <map>
             <s>conditions</s>
               <list>
                  <new class=’com.waveset.object.AttributeCondition’>
                    <s>name</s>
                    <s>starts with</s>
                    <s>bulk</s>
                  </new>
               </list>
             </map>
        </invoke>
     </Property>
   </Display>
</Field>