com.waveset.provision
Class ProvisionResult

java.lang.Object
  extended bycom.waveset.provision.ProvisionResult

public class ProvisionResult
extends java.lang.Object

A utility class providing methods for the construction of the WavesetResult object returned by the provisioning engine. Called by the provisioning engine as it updates resources, may also be called by view handlers to pre-populate the result with certain special attributes.


Field Summary
static java.lang.String code_id
           
static java.lang.String SECRET_TEXT
          The string we display for encrypted values.
 
Constructor Summary
ProvisionResult()
           
 
Method Summary
static boolean accountPasswordChanged(java.lang.String acctname, WavesetResult res)
          Utility to dig through the WavesetResult returned by the checkin of a User or Password view, looking for signs that the Lighthouse account password was changed.
static void addAdapterResults(WavesetResult master, ResourceInfo info)
          Incrementally add an attribute result to a table.
static void addLighthouseResult(WavesetResult result, java.lang.String username, java.lang.String attribute, java.lang.Object value)
          Add one row to a Lighthouse table within a WavesetResult.
static void addLighthouseResults(WavesetResult result, GenericObject view)
          Given the update.accounts[Lighthouse] view, convert the change map into a result table.
static void addResult(ResourceOp op, ResultTable table, java.lang.String attribute, java.lang.Object value, boolean isSecret)
          Incrementally add a row to an existing result table.
static void addResult(ResultTable table, java.lang.String attribute, java.lang.Object value, boolean isSecret)
          Incrementally add a row to an existing result table.
static void addResult(ResultTable table, java.lang.String attribute, java.lang.Object oldValue, java.lang.Object value, boolean isSecret, boolean isUpdate)
          Incrementally add a row to an existing result table.
static ResourceResult getLighthouseResult(WavesetResult result)
          Locate an existing ResourceResult for the Lighthouse user.
static GenericObject getResourceRetryInfo(GenericObject retryInfo, ResourceOp op)
          Exposes the retry information.
static ResourceResult getResult(WavesetResult master, ResourceInfo info)
          Locate a ResourceResult for an account identified with a ResourceInfo.
static ResourceResult getResult(WavesetResult master, java.lang.String resourceName, java.lang.String accountId)
          Locate a ResourceResult object for a particular account within the master provisioning result object.
static ResultTable getResultTable(ResourceResult rr)
          Locate the previously prepared ResultTable buried inside the ResourceResult.
static ResultTable getResultTable(WavesetResult master, ResourceInfo info)
           
static void prepareResourceResults(ProvisionContext context)
          Prepare resource results.
static void setResourceRetryInfo(ProvisioningOptions options, GenericObject resourceRetryInfo, ResourceOp op)
          Adds the resource retryInfo for the specified ResourceOp into the ProvisioningOptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

SECRET_TEXT

public static final java.lang.String SECRET_TEXT
The string we display for encrypted values.

See Also:
Constant Field Values
Constructor Detail

ProvisionResult

public ProvisionResult()
Method Detail

getResult

public static ResourceResult getResult(WavesetResult master,
                                       java.lang.String resourceName,
                                       java.lang.String accountId)
Locate a ResourceResult object for a particular account within the master provisioning result object. Create one if one does not already exist.


getResult

public static ResourceResult getResult(WavesetResult master,
                                       ResourceInfo info)
Locate a ResourceResult for an account identified with a ResourceInfo.


getResultTable

public static ResultTable getResultTable(ResourceResult rr)
Locate the previously prepared ResultTable buried inside the ResourceResult.


getResultTable

public static ResultTable getResultTable(WavesetResult master,
                                         ResourceInfo info)

addResult

public static void addResult(ResultTable table,
                             java.lang.String attribute,
                             java.lang.Object value,
                             boolean isSecret)
Incrementally add a row to an existing result table. This should only be called for a 3 column create table.


addResult

public static void addResult(ResourceOp op,
                             ResultTable table,
                             java.lang.String attribute,
                             java.lang.Object value,
                             boolean isSecret)
Incrementally add a row to an existing result table. This variant takes a ResourceOp to tell us whether it is a create or update, and indirectly provides access to the old value.


addResult

public static void addResult(ResultTable table,
                             java.lang.String attribute,
                             java.lang.Object oldValue,
                             java.lang.Object value,
                             boolean isSecret,
                             boolean isUpdate)
Incrementally add a row to an existing result table. This may add rows to either a 3 column create table or a 4 column update table. You must pass the ResourceOp in. Shares some


prepareResourceResults

public static void prepareResourceResults(ProvisionContext context)
                                   throws WavesetException
Prepare resource results. After filtering the OP list, create a ResourceResult for each operation and install them into the master WavesetResult.

This was originally done at the end of buildOps but was deferred until prepare(). This prevents clutter in the WavesetResult for things we decided not to do. We may be building OPs just to check policies.

We're also now depending on this being done AFTER a call to overrideResourceAttributes has been made so we can add the modified resource attributes to the table.

Throws:
WavesetException

addAdapterResults

public static void addAdapterResults(WavesetResult master,
                                     ResourceInfo info)
                              throws WavesetException
Incrementally add an attribute result to a table. This was originally used only for the Lighthouse result, but can also now be used to display side effect attributes returned by the adapter when an account is created.

Throws:
WavesetException

getResourceRetryInfo

public static GenericObject getResourceRetryInfo(GenericObject retryInfo,
                                                 ResourceOp op)
Exposes the retry information. Added for IDMX Provisioning.


setResourceRetryInfo

public static void setResourceRetryInfo(ProvisioningOptions options,
                                        GenericObject resourceRetryInfo,
                                        ResourceOp op)
Adds the resource retryInfo for the specified ResourceOp into the ProvisioningOptions. This is used by IDMX to reconstruct the retryInfo from what's stored in the Transaction.


getLighthouseResult

public static ResourceResult getLighthouseResult(WavesetResult result)
Locate an existing ResourceResult for the Lighthouse user. Create one if it does not exist.


addLighthouseResult

public static void addLighthouseResult(WavesetResult result,
                                       java.lang.String username,
                                       java.lang.String attribute,
                                       java.lang.Object value)
Add one row to a Lighthouse table within a WavesetResult.


addLighthouseResults

public static void addLighthouseResults(WavesetResult result,
                                        GenericObject view)
Given the update.accounts[Lighthouse] view, convert the change map into a result table. Called by WorkflowServices when we convert the view back to a WSUser prior to reprovisioning.


accountPasswordChanged

public static boolean accountPasswordChanged(java.lang.String acctname,
                                             WavesetResult res)
Utility to dig through the WavesetResult returned by the checkin of a User or Password view, looking for signs that the Lighthouse account password was changed.

I don't think it needs to be said again that the WavesetResult sucks. This would be SOO much easier if this were a GenericObject. Currently used only by two JSPs in the end-user GUI to see if they can clear the expired password warning, should instead leave something easier to test in the result.