| java.lang.Object com.sourcetap.sfa.replication.GenericReplicator
All known Subclasses: com.sourcetap.sfa.replication.EntityReplicator,
GenericReplicator | public class GenericReplicator (Code) | | This class is used for data replication.
author: John Nutting |
ACTION_DELETE | final public static int ACTION_DELETE(Code) | | Action - Delete
|
ACTION_ERROR | final public static int ACTION_ERROR(Code) | | Action - Error
|
ACTION_INSERT | final public static int ACTION_INSERT(Code) | | Action - Insert
|
ACTION_SKIP | final public static int ACTION_SKIP(Code) | | Action - Skip
|
ACTION_UPDATE | final public static int ACTION_UPDATE(Code) | | Action - Update
|
STATUS_CANCELED | final public static int STATUS_CANCELED(Code) | | Status - Canceled
|
STATUS_CONTINUE | final public static int STATUS_CONTINUE(Code) | | Status - Continue (success)
|
STATUS_ERROR | final public static int STATUS_ERROR(Code) | | Status - Error
|
localDelegator | protected GenericDelegator localDelegator(Code) | | Local delegator. This is used to connect to the local data base.
|
masterDelegator | protected GenericDelegator masterDelegator(Code) | | Master delegator. This is used to connect to the master data base.
|
GenericReplicator | public GenericReplicator()(Code) | | Constructor with no args.
|
getIsRegistered | public static boolean getIsRegistered(GenericDelegator delegator)(Code) | | Determines whether the local computer is registered for replication
author: John Nutting True if local node is registered for replication, false otherwise |
getLocalDelegator | public GenericDelegator getLocalDelegator()(Code) | | Gets the local delegator attribute.
author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Reference to the local delegator |
getMasterDelegator | public GenericDelegator getMasterDelegator()(Code) | | Gets the master delegator attribute.
author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Reference to the master delegator |
getNextSeqId | public static String getNextSeqId(String seqName, GenericDelegator delegator)(Code) | | Gets the next guaranteed unique seq id from the sequence with the given sequence name.
if the named sequence doesn't exist, it will be created. If the local computer is
registered as a replicated node, its node ID will be prepended onto the sequence to
ensure uniqueness across all nodes.
author: John Nutting Parameters: seqName - The name of the sequence to get the next seq id from The next sequence id for the given sequence name, with the replication node IDprepended if it exists. |
getReplNodeGenericValue | public GenericValue getReplNodeGenericValue(String replNodeId)(Code) | | Gets the ReplNode record for the current machine from the master data base.
Requires that the masterDelegator argument passed to the constructor is valid.
Alternatively, requires the setMasterDelegator method to have been called.
author: John Nutting GenericValue holding the replication node record for the local computerretrieved from the master data base. |
getReplNodeId | public static String getReplNodeId(GenericDelegator localDelegator)(Code) | | Gets the node ID under which the current machine is registered for replication
author: John Nutting Parameters: localDelegator - Generic delegator pointing to the local data base. Replication node ID of the local computer |
getReplNodeId | public String getReplNodeId()(Code) | | Gets the node ID under which the current machine is registered for replication
author: John Nutting Replication node ID of the local computer |
markNodeReplicated | public int markNodeReplicated(String replNodeId, String userPartyId)(Code) | | This method updates the node record in the master data base to indicate that a successful
replication has been completed.
author: John Nutting Parameters: masterDelegator - Delegator to connect to the master data base Parameters: replNodeId - Replication Node ID Parameters: userPartyId - The Party ID of the current user The status of the replication. Possible values: STATUS_CONTINUE, STATUS_ERROR,STATUS_CANCEL |
register | public String register(String replNodeName, String ownerId, boolean isActive, String userPartyId)(Code) | | Registers the local computer for replication. Assigns the next available node ID
to this computer, saves it in the system parameters in the local data base, and
creates a new record in the ReplNode table in the master data base.
Requires that the localDelegator and masterDelegator arguments passed to the
constructor are valid. Alternatively, requires the setLocalDelegator and
setMasterDelegator methods to have been called.
author: John Nutting Parameters: replNodeName - Name to be assigned to the new replication node Parameters: ownerId - The Contact ID of the user who will own the new replication node Parameters: isActive - Flag indicating whether the new replication node will participate in replication The new replication node ID assigned to this computer |
setLocalDelegator | public void setLocalDelegator(GenericDelegator delegator)(Code) | | Sets the local delegator attribute.
author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base |
setMasterDelegator | public void setMasterDelegator(GenericDelegator delegator)(Code) | | Sets the master delegator attribute.
author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base |
validateMasterLogin | public String validateMasterLogin(String enteredUserLoginId, String enteredPassword, UserInfo masterUserInfo)(Code) | | Looks in the master data base for the given login ID and password
Requires that the masterDelegator argument passed to the constructor is valid.
Alternatively, requires the setMasterDelegator method to have been called.
author: John Nutting Status. Possible values: STATUS_CONTINUE (Login ID and password are valid),STATUS_CANCEL (ID or password is not correct), or STATUS_ERROR. |
|
|