1689N/A * The contents of this file are subject to the terms of the 1689N/A * Common Development and Distribution License, Version 1.0 only 1689N/A * (the "License"). You may not use this file except in compliance 1689N/A * You can obtain a copy of the license at 1689N/A * See the License for the specific language governing permissions 1689N/A * and limitations under the License. 1689N/A * When distributing Covered Code, include this CDDL HEADER in each 1689N/A * file and include the License file at 1689N/A * add the following below this CDDL HEADER, with the fields enclosed 1689N/A * by brackets "[]" replaced with your own identifying information: 1689N/A * Portions Copyright [yyyy] [name of copyright owner] 3215N/A * Copyright 2008 Sun Microsystems, Inc. 1689N/A * This class implements the workflow result code. The workflow result code 1689N/A * contains an LDAP result code along with an LDAP error message. 1689N/A // The global error message. 1689N/A * Creates a new instance of a workflow result. By default the result code 1689N/A * is set to UNDEFINED and there is no error message. 1689N/A * Creates a new instance of a workflow result code and initializes it 1689N/A * with a result code and an error message. 1689N/A * @param resultCode the initial value for the result code 1689N/A * @param errorMessage the initial value for the error message 1689N/A * Elaborates a global result code. A workflow may execute an operation 1689N/A * on several subordinate workflows. In such case, the parent workflow 1689N/A * has to take into account all the subordinate result codes to elaborate 1689N/A * Sometimes, a referral result code has to be turned into a reference 1689N/A * entry. When such case is occurring the elaborateGlobalResultCode method 1689N/A * The global result code is elaborated as follows: 1689N/A * -----------+------------+------------+------------------------------- 1689N/A * new | current | resulting | 1689N/A * resultCode | resultCode | resultCode | action 1689N/A * -----------+------------+------------+------------------------------- 1689N/A * SUCCESS NO_SUCH_OBJ SUCCESS - 1689N/A * REFERRAL SUCCESS send reference entry to client 1689N/A * --------------------------------------------------------------------- 1689N/A * NO_SUCH_OBJ SUCCESS [unchanged] - 1689N/A * --------------------------------------------------------------------- 1689N/A * REFERRAL SUCCESS [unchanged] send reference entry to client 1689N/A * REFERRAL SUCCESS send reference entry to client 1689N/A * other [unchanged] send reference entry to client 1689N/A * --------------------------------------------------------------------- 1689N/A * REFERRAL other send reference entry to client 1689N/A * --------------------------------------------------------------------- 1689N/A * @param newResultCode the new result code to take into account 1689N/A * @param newErrorMessage the new error message associated to the new 1689N/A * @return <code>true</code> if a referral result code must be turned 1689N/A // if global result code has not been set yet then just take the new 1689N/A // Elaborate the new result code (see table in the description header). 1689N/A // global resultCode remains the same 1689N/A // global resultCode remains the same 1689N/A // global resultCode remains the same 1689N/A // Received other result codes 1689N/A // --------------------------- 3869N/A // Do nothing (we don't want to override the first error) 1689N/A * Returns the global result code. 1689N/A * @return the global result code. 1689N/A * Returns the global error message. 1689N/A * @return the global error message.