Package org.openeai.config

Examples of org.openeai.config.PropertyConfig


  }

  public final void init(AppConfig aConfig) throws ScheduleIdStoreException {
    setAppConfig(aConfig);
    try {
      PropertyConfig pConfig = new PropertyConfig();
      pConfig = (PropertyConfig)getAppConfig().getObjectByType(pConfig.getClass().getName());
      setPath(pConfig.getProperties().getProperty("ScheduleIdPath",null));
      load();
    }
    catch (Exception e) {
      String errMessage = "Exception loading the FileSchedulIdStore.  Exception: " + e.getMessage();
      logger.fatal(errMessage, e);
View Full Code Here


   */
  public MockAddressValidationRequestCommand(CommandConfig cConfig) throws InstantiationException {
    super(cConfig);
   
    // Get and set the general properties for this command.
    PropertyConfig pConfig = new PropertyConfig();
    try {
      pConfig = (PropertyConfig)getAppConfig()
      .getObject("AddressValidationRequestCommandProperties");  
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      String errMsg = "Error retrieving a PropertyConfig object from " +
      "AppConfig: The exception is: " + eoce.getMessage();
      logger.fatal("[MockAddressValidationRequestCommand] " + errMsg);
      throw new InstantiationException(errMsg);
    }
    setProperties(pConfig.getProperties());
   
    // Initialize response document.
    XmlDocumentReader xmlReader = new XmlDocumentReader();
    try {
      logger.debug("[MockAddressValidationRequestCommand] " +
View Full Code Here

        "setting logger to be org.openeai.OpenEaiObject.logger.");
      logger = org.openeai.OpenEaiObject.logger;
    }
  
    // Get and set the general properties for this command.
    PropertyConfig pConfig = new PropertyConfig();
    try {
      pConfig = (PropertyConfig)getAppConfig()
        .getObject("I2sRequestCommandProperties");  
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      String errMsg = "Error retrieving a PropertyConfig object from " +
        "AppConfig: The exception is: " + eoce.getMessage();
      logger.fatal("[I2sRequestCommand] " + errMsg);
      throw new InstantiationException(errMsg);
    }
    setProperties(pConfig.getProperties());

    // Initialize response and provide documents.
    XmlDocumentReader xmlReader = new XmlDocumentReader();
    try {
      logger.debug("[I2sRequestCommand] " +
        "responseDocumentUri: " + getProperties()
        .getProperty("responseDocumentUri"));
      m_responseDoc = xmlReader.initializeDocument(getProperties()
        .getProperty("responseDocumentUri"), getOutboundXmlValidation());
      if (m_responseDoc == null) {
        String errMsg = "Missing 'responseDocumentUri' " +
          "property in the deployment descriptor.  Can't continue.";
        logger.fatal("[I2sRequestCommand] " + errMsg);
        throw new InstantiationException(errMsg);
      }
      logger.debug("[I2sRequestCommand] " +
        "provideDocumentUri: " + getProperties()
        .getProperty("provideDocumentUri"));
      m_provideDoc = xmlReader.initializeDocument(getProperties()
        .getProperty("provideDocumentUri"), getOutboundXmlValidation());
      if (m_provideDoc == null) {
        String errMsg = "Missing 'provideDocumentUri' " +
          "property in the deployment descriptor.  Can't continue.";
        logger.fatal("[I2sRequestCommand] " + errMsg);
        throw new InstantiationException(errMsg);
      }
    }
    catch (XmlDocumentReaderException e) {
      logger.fatal("[I2sRequestCommand] Error initializing" +
        " the primed documents.");
      e.printStackTrace();
      throw new InstantiationException(e.getMessage());
    }
   
    // Get the I2sRepositoryProperties from AppConfig.
    PropertyConfig i2spConfig = new PropertyConfig();
    try {
      i2spConfig = (PropertyConfig)getAppConfig()
        .getObject("I2sRepositoryProperties");
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      String errMsg = "Error retrieving PropertyConfig object from " +
        "AppConfig for the I2sRepositoryProperties. The exception is: " +
        eoce.getMessage();
      logger.fatal("[I2sRequestCommand] " + errMsg);
      throw new InstantiationException(errMsg);
    }
    Properties i2sRepositoryProps = i2spConfig.getProperties();

    // Determine which I2sRepository implementation to use.
    String repositoryClassName = i2sRepositoryProps
      .getProperty("repositoryClassName");
    if (repositoryClassName == null) {
View Full Code Here

    super(cConfig);

    // Get the general properties for this command.
    try {
      PropertyConfig pConfig = new PropertyConfig();
      pConfig = (PropertyConfig)getAppConfig().getObject("GeneralProperties");
      setProperties(pConfig.getProperties());
    }
    catch (EnterpriseConfigurationObjectException ecoe) {
      // An error occurred retreiving the general properties objects. Log it and
      // throw an exception.
      String errMsg = "An error occurred retrieving the general properties " +
View Full Code Here

  public FailureRequestCommand(CommandConfig cConfig) throws
    InstantiationException {
    super(cConfig);

    // Get and set the general properties for this command.
    PropertyConfig pConfig = new PropertyConfig();
    try {
      pConfig = (PropertyConfig)getAppConfig()
        .getObjectByType(pConfig.getClass().getName());  
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      String errMsg = "Error retrieving a PropertyConfig object from " +
        "AppConfig: The exception is: " + eoce.getMessage();
      throw new InstantiationException(errMsg);
    }
    setProperties(pConfig.getProperties());

    // Initialize the response document.
    XmlDocumentReader xmlReader = new XmlDocumentReader();
    try {
      m_responseDoc = xmlReader.initializeDocument(getProperties()
View Full Code Here

    boolean foundHandler = false;
    String mappingName = null;
    try {
      java.util.List handlerProperties = _appConfig.getObjectsLike("Handler");
      handlerLoop: for (int i=0; i<handlerProperties.size(); i++) {
        PropertyConfig p = (PropertyConfig)handlerProperties.get(i);
        LogService.log(LogService.INFO, "handler [" + i + "] " + p.getName());
        Properties props = p.getProperties();
        String handlerClassName = props.getProperty("handlerClassName",null);
        mappingName = p.getName();
        if (handlerClassName != null) {
          if (rd.getParameter(mappingName) != null) {           
            LogService.log(LogService.INFO, mappingName + " form variable maps to a known handler.");
            foundHandler = true;
            _styleSheet = props.getProperty("styleSheet", null);
            processHandler(mappingName, handlerClassName, props, rd);
            break handlerLoop;
          }
        }
        else {
          // error
          throw new UportalFormHandlerException("Missing 'handlerClassName' " +
            "property in the " + mappingName + " PropertyConfig object.");
        }
      }
    }
    catch (Exception e) {
      throw new UportalFormHandlerException(e.getMessage(), e);
    }
   
    if (foundHandler == false) {
      try {       
        PropertyConfig p = (PropertyConfig)_appConfig.getObject("defaultHandler");
        mappingName = p.getName();
        LogService.log(LogService.INFO, "using default handler " + mappingName);
        Properties props = p.getProperties();
        String handlerClassName = props.getProperty("handlerClassName",null);
        _styleSheet = props.getProperty("styleSheet", null);
        if (handlerClassName != null) {
          processHandler(mappingName, handlerClassName, props, rd);
        }
View Full Code Here

   */
  public PasswordValidationRequestCommand(CommandConfig cConfig) throws InstantiationException {
    super(cConfig);
   
    // Get and set the general properties for this command.
    PropertyConfig pConfig = new PropertyConfig();
    try {
      pConfig = (PropertyConfig)getAppConfig()
      .getObject("PasswordValidationRequestCommandProperties");  
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      String errMsg = "Error retrieving a PropertyConfig object from " +
      "AppConfig: The exception is: " + eoce.getMessage();
      logger.fatal("[PasswordValidationRequestCommand] " + errMsg);
      throw new InstantiationException(errMsg);
    }
    setProperties(pConfig.getProperties());
   
    try {
      // check from AppConfig resources needed during processing
      PasswordValidationQuerySpecification vpasswordQuery = (PasswordValidationQuerySpecification)getAppConfig().getObject("ValidPasswordQuerySpecification.v1_0");
    } catch (EnterpriseConfigurationObjectException e1) {
View Full Code Here

TOP

Related Classes of org.openeai.config.PropertyConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.