Esempio n. 1
0
  /**
   * loadCache is called automatically on startup of the cache factory, as a result of implementing
   * the CacheLoader interface. This should be used to load any data that needs loading, and to set
   * up variables.
   *
   * @throws InitializationException
   */
  @Override
  public void loadCache(String ResourceName, String CacheName) throws InitializationException {
    // Variable definitions
    String tmpValue;

    // Get the number of key fields (the rest are treated as results)
    tmpValue =
        PropertyUtils.getPropertyUtils()
            .getDataCachePropertyValueDef(ResourceName, CacheName, "KeyFields", "None");
    if (tmpValue.equals("None")) {
      // We will use calculate the default assuming 1 result field
      KeyFormFactor = 0;
    } else {
      try {
        KeyFormFactor = Integer.parseInt(tmpValue);
      } catch (NumberFormatException nfe) {
        message =
            "KeyFields entry for cache <"
                + getSymbolicName()
                + "> not numeric. Found value <"
                + tmpValue
                + ">";
        OpenRate.getOpenRateFrameworkLog().error(message);
        throw new InitializationException(message, getSymbolicName());
      }
    }

    // Now perform the base initialisation
    super.loadCache(ResourceName, CacheName);
  }
Esempio n. 2
0
  /**
   * loadCache is called automatically on startup of the cache factory, as a result of implementing
   * the CacheLoader interface. This should be used to load any data that needs loading, and to set
   * up variables.
   *
   * @param ResourceName The name of the resource to load for
   * @param CacheName The name of the cache to load for
   * @throws InitializationException
   */
  @Override
  public void loadCache(String ResourceName, String CacheName) throws InitializationException {
    String tmpHelper;

    // load the value of the invalidate duplicates setting
    tmpHelper =
        PropertyUtils.getPropertyUtils()
            .getDataCachePropertyValueDef(
                ResourceName, CacheName, SERVICE_INVALIDATE_DUPLICATE, "False");

    // process it
    processControlEvent(SERVICE_INVALIDATE_DUPLICATE, true, tmpHelper);

    // load the value of the invalidate duplicates setting
    tmpHelper =
        PropertyUtils.getPropertyUtils()
            .getDataCachePropertyValueDef(
                ResourceName, CacheName, SERVICE_DATE_FORMAT, internalDateFormat);

    // Initialise the conversion object
    conv.setInputDateFormat(tmpHelper);

    // Do the parent processing
    super.loadCache(ResourceName, CacheName);
  }
Esempio n. 3
0
  /**
   * registerClientManager registers the client module to the ClientManager class which manages all
   * the client modules available in this OpenRate Application.
   *
   * <p>registerClientManager registers this class as a client of the ECI listener and publishes the
   * commands that the plug in understands. The listener is responsible for delivering only these
   * commands to the plug in.
   */
  @Override
  public void registerClientManager() throws InitializationException {
    // Set the client reference and the base services first
    super.registerClientManager();

    // Register services for this Client
    ClientManager.getClientManager()
        .registerClientService(
            getSymbolicName(), SERVICE_INVALIDATE_DUPLICATE, ClientManager.PARAM_NONE);
  }
Esempio n. 4
0
  /**
   * registerClientManager registers the client module to the ClientManager class which manages all
   * the client modules available in this OpenRate Application.
   *
   * <p>registerClientManager registers this class as a client of the ECI listener and publishes the
   * commands that the plug in understands. The listener is responsible for delivering only these
   * commands to the plug in.
   *
   * @throws OpenRate.exception.InitializationException
   */
  @Override
  public void registerClientManager() throws InitializationException {
    // Set the client reference and the base services first
    super.registerClientManager();

    // Register services for this Client
    ClientManager.getClientManager()
        .registerClientService(getSymbolicName(), SERVICE_GROUP_COUNT, ClientManager.PARAM_DYNAMIC);
    ClientManager.getClientManager()
        .registerClientService(
            getSymbolicName(), SERVICE_OBJECT_COUNT, ClientManager.PARAM_DYNAMIC);
    ClientManager.getClientManager()
        .registerClientService(getSymbolicName(), SERVICE_DUMP_MAP, ClientManager.PARAM_DYNAMIC);
  }