Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class RpcValIniDbUpdater

java.lang.Object
  extended by com.pcube.apps.engage.policy.RpcValIniDbUpdater

public class RpcValIniDbUpdater
extends java.lang.Object

Comment for RpcValIniDbUpdater


Constructor Summary
RpcValIniDbUpdater(java.lang.String dcAddress, int rpcPort)
           
 
Method Summary
 boolean valIniDBUpdate(java.lang.Object[][] values)
          Insert a values.ini mapping into the database for a particular SE IP.
 boolean valIniDBUpdate(java.lang.String seIP, java.lang.String seValIni)
          Insert a values.ini string into the database for a particular SE IP.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcValIniDbUpdater

public RpcValIniDbUpdater(java.lang.String dcAddress,
                          int rpcPort)
                   throws java.lang.Exception
Parameters:
dcAddress -
rpcPort -
Throws:
java.lang.Exception
Method Detail

valIniDBUpdate

public boolean valIniDBUpdate(java.lang.Object[][] values)
                       throws java.sql.SQLException,
                              com.pcube.management.common.WrapperException
Insert a values.ini mapping into the database for a particular SE IP. This method connects to the database, authenticates, creates the Crystal Reports table if necessary, and inserts mapping row by row into the table. If the SE IP already exists in the table, its rows are removed first. Failure to insert will result in false return value. In case of an SQL error (e.g. failure to connect to the DB), the appropriate exception wil be raised.

Parameters:
values - An array representing the values.ini mapping with the following structure: each row has 4 fields: Field Name Description SE_IP (String) Identification of SE box where these values were applied VALUE_TYPE (Integer) Key/Value family type (e.g. service=1, package=2, etc…) VALUE_KEY (String) Key name (e.g. “Gold”, “Silver”, “Adult Browsing”, etc…) VALUE (Integer) Numeric reference
Returns:
true iff the insertion was successful
Throws:
java.sql.SQLException - in case of DB error
com.pcube.management.common.WrapperException
See Also:
ValIniDbAdapter.valIniDBUpdate(java.lang.Object[][])

valIniDBUpdate

public boolean valIniDBUpdate(java.lang.String seIP,
                              java.lang.String seValIni)
                       throws java.sql.SQLException,
                              com.pcube.management.common.WrapperException
Insert a values.ini string into the database for a particular SE IP. This method connects to the database, authenticates, creates the requested table if necessary, and inserts the two string fields into the table. If the SE IP already exists in the table, its row is updated. Failure to insert will result in false return value. In case of an SQL error (e.g. failure to connect to the DB), the appropriate exception wil be raised.

Parameters:
seIP - IP Address for which this values.ini is inserted
seValIni - The text of this SE's values.ini
Returns:
true iff the insertion was successful
Throws:
com.pcube.management.common.WrapperException
java.sql.SQLException - in case of DB error
See Also:
ValIniDbAdapter.valIniDBUpdate(java.lang.String, java.lang.String)

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.