Package net.sf.xbus.base.core.config

Examples of net.sf.xbus.base.core.config.Configuration


   */
  private List getParameters() throws XException
  {
    Vector parameters = new Vector();

    Configuration config = Configuration.getInstance();

    String parameter = config.getValueOptional(Constants.CHAPTER_SYSTEM,
        mDestination.getName(), "Parameter1");
    int i = 1;
    while (parameter != null)
    {
      i++;
      parameter = mDestination.replaceAllMarkers(parameter)[0];
      parameters.add(parameter);
      parameter = config.getValueOptional(Constants.CHAPTER_SYSTEM,
          mDestination.getName(), "Parameter" + i);
    } // while (parameter != null)
    return parameters;
  } // getParameters()
View Full Code Here


    if (!mOpen)
    {
      /*
       * Connect to the FTP Server
       */
      Configuration config = Configuration.getInstance();
      String host = config
          .getValue(CHAPTER_LDAPCONNECTION, mName, "Host");
      int port = config.getValueAsIntOptional(CHAPTER_LDAPCONNECTION,
          mName, "Port");
      String baseDN = config.getValue(CHAPTER_LDAPCONNECTION, mName,
          "BaseDN");
      String rootDN = config.getValueOptional(CHAPTER_LDAPCONNECTION,
          mName, "RootDN");
      String password = config.getValueOptional(CHAPTER_LDAPCONNECTION,
          mName, "Password");

      /*
       * Set up the initial context
       */
 
View Full Code Here

   *         the configuration
   * @throws XException if something goes wrong
   */
  public SearchControls getSearchControls() throws XException
  {
    Configuration config = Configuration.getInstance();
    int scope = getScope();
    long countlim = config.getValueAsIntOptional(CHAPTER_LDAPCONNECTION,
        mName, "CountLimit");
    if (countlim < 0)
    {
      countlim = 0;
    }

    int timelim = config.getValueAsIntOptional(CHAPTER_LDAPCONNECTION,
        mName, "TimeLimit");
    if (timelim < 0)
    {
      timelim = 0;
    }
View Full Code Here

      Message destinationMessage) throws XException
  {
    /*
     * First search if there is a special transformer for the two systems.
     */
    Configuration config = Configuration.getInstance();
    String transformerClassShortname = config.getValueOptional(
        "Transformer", source.getName(), destination
            .getName());
    if (transformerClassShortname == null)
    {
    transformerClassShortname = config.getValueOptional(
        "Transformer", getSection(source, sourceMessage), destination
            .getName());
    }

    /*
     * If not, take the standard transformer from xbus.conf
     */
    config = Configuration.getInstance("xbus");
    if (transformerClassShortname == null)
    {
      transformerClassShortname = config.getValue("Transformer",
          sourceMessage.getShortname(), destinationMessage
              .getShortname());
    }

    String transformerClass = Configuration.getClass("Transformer",
View Full Code Here

   */
  public Object transform(Object inObject, XBUSSystem source,
      XBUSSystem destination, Message destinationMessage)
      throws XException
  {
    Configuration config = Configuration.getInstance();

    String xslFile = config.getValue("XSLTStylesheet", source.getName(),
        destination.getName());

    xslFile = new StringBuffer(XSL_LOCATION).append(xslFile).toString();

    return transformXML((String) inObject, xslFile, destinationMessage);
View Full Code Here

    Hashtable receivers = new Hashtable();
    String systemName = null;
    String receiver = null;
    Vector systems = null;

    Configuration config = Configuration.getInstance();

    // nested 'for'loop traverses for searching all systems
    // be read (terates over the elements of an array)
    for (int i = 0; i < args.size(); i++)
    {
      systemName = (String) args.elementAt(i);
      receiver = config.getValue(Constants.CHAPTER_SYSTEM, systemName,
          "Receiver");
      if (receiver.endsWith("Thread"))
      {
        throw new XException(Constants.LOCATION_INTERN,
            Constants.LAYER_TECHNICAL,
View Full Code Here

   *
   * @return the response of the called method
   */
  public Object call() throws XException
  {
    Configuration config = Configuration.getInstance();
    String classname = config.getValue(Constants.CHAPTER_SYSTEM,
        mDestination.getName(), "Class");

    Object callObject = ReflectionSupport.createObject(classname);

    String methodname = getMethodName(mFunction);
View Full Code Here

   * @param function which method is called may depend on the given function
   * @return name of the method
   */
  private String getMethodName(String function) throws XException
  {
    Configuration config = Configuration.getInstance();
    String retString = config.getValueOptional(Constants.CHAPTER_SYSTEM,
        mDestination.getName(), "Method");
    if (retString == null)
    {
      retString = config.getValue(Constants.CHAPTER_SYSTEM,
        mDestination.getName(), "Method." + function);
    }
    return retString;
  }
View Full Code Here

      }

      /*
       * Test if the connection must be encrypted.
       */
      Configuration config = Configuration.getInstance();
      boolean forceSSL = config.getValueAsBooleanOptional(
          Constants.CHAPTER_SYSTEM, mSource.getName(), "ForceSSL");
      if ((!req.isSecure()) && (forceSSL))
      {
        Trace.error("System " + mSource.getName()
            + " accepts only SSL connections");
View Full Code Here

   * @param system name of the system under which the parameters are stored
   * @throws XException if something goes wrong
   */
  public FileReceiverConfiguration(String system) throws XException
  {
    Configuration config = Configuration.getInstance();
    mResolution = retrieveResolution(config, system);
    mOnError = retrieveOnError(config, system);
    mConfigFilename = config.getValue(Constants.CHAPTER_SYSTEM, system,
        Constants.KEY_FILENAME);
    mEncoding = retrieveEncoding(system);
    mLineLength = config.getValueAsIntOptional(Constants.CHAPTER_SYSTEM,
        system, "RecordLineLength");
    mMaxLineLength = config.getValueAsIntOptional(Constants.CHAPTER_SYSTEM,
        system, "MaxLineLength");
  }
View Full Code Here

TOP

Related Classes of net.sf.xbus.base.core.config.Configuration

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.