// Path: common/src/main/java/com/nortal/jroad/enums/XRoadProtocolVersion.java
// public enum XRoadProtocolVersion {
// 
//   V2_0("2.0", "xtee", "http://x-tee.riik.ee/xsd/xtee.xsd"),
//   V3_0("3.0", "xrd", "http://x-rd.net/xsd/xroad.xsd"),
//   V3_1("3.1", "xrd", "http://x-road.ee/xsd/x-road.xsd"),
//   V4_0("4.0", "xrd", "http://x-road.eu/xsd/xroad.xsd");
// 
//   private final String code;
//   private final String namespacePrefix;
//   private final String namespaceUri;
// 
//   private XRoadProtocolVersion(String code, String namespacePrefix, String namespaceUri) {
//     this.code = code;
//     this.namespaceUri = namespaceUri;
//     this.namespacePrefix = namespacePrefix;
//   }
// 
//   public String getCode() {
//     return code;
//   }
// 
//   public String getNamespacePrefix() {
//     return namespacePrefix;
//   }
// 
//   public String getNamespaceUri() {
//     return namespaceUri;
//   }
// 
//   public static XRoadProtocolVersion getValueByVersionCode(String code) {
//     for (XRoadProtocolVersion version : XRoadProtocolVersion.values()) {
//       if (version.getCode().equals(code)) {
//         return version;
//       }
//     }
//     return null;
//   }
// 
//   public static XRoadProtocolVersion getValueByNamespaceURI(String uri) {
//     for (XRoadProtocolVersion version : XRoadProtocolVersion.values()) {
//       if (version.getNamespaceUri().startsWith(uri)) {
//         return version;
//       }
//     }
//     return null;
//   }
// 
// }


import com.nortal.jroad.client.enums.XroadObjectType;
import com.nortal.jroad.enums.XRoadProtocolVersion;
import java.io.Serializable;
package com.nortal.jroad.client.service.configuration;


/**
 * @author Aleksei Bogdanov (aleksei.bogdanov@nortal.com)
 * @author Lauri Lättemäe (lauri.lattemae@nortal.com) - protocol 4.0
 */
// TODO Lauri: konfi võiks kuidagi paremini lahendatud olla
public interface XRoadServiceConfiguration extends Serializable {
  /**
   * Returns an URL of institutions security server, typically in form of
   * <code>http://minu_turvaserver/cgi-bin/consumer_proxy</code>.
   */
  String getSecurityServer();

  /**
   * Returns name/prefix of the X-Tee database where the service-to-be-invoked resides.
   */
  String getDatabase();

  /**
   * Returns name/prefix of the X-Tee database, which is actually specified in the WSDL of the service.
   */
  String getWsdlDatabase();

  /** Returns identifier of the person/entity who will be invoking the service */
  String getIdCode();

  /** Returns name of file (or document) related to the service invokation. */
  String getFile();

  /** Returns the service-to-be-invoked version. */
  String getVersion();

  /** Returns the name of the (service's) <code>method</code> that will be called. */
  String getMethod();

  /**
   * Returns database xroad protocol version - by default v4
   */
// Path: common/src/main/java/com/nortal/jroad/enums/XRoadProtocolVersion.java
// public enum XRoadProtocolVersion {
// 
//   V2_0("2.0", "xtee", "http://x-tee.riik.ee/xsd/xtee.xsd"),
//   V3_0("3.0", "xrd", "http://x-rd.net/xsd/xroad.xsd"),
//   V3_1("3.1", "xrd", "http://x-road.ee/xsd/x-road.xsd"),
//   V4_0("4.0", "xrd", "http://x-road.eu/xsd/xroad.xsd");
// 
//   private final String code;
//   private final String namespacePrefix;
//   private final String namespaceUri;
// 
//   private XRoadProtocolVersion(String code, String namespacePrefix, String namespaceUri) {
//     this.code = code;
//     this.namespaceUri = namespaceUri;
//     this.namespacePrefix = namespacePrefix;
//   }
// 
//   public String getCode() {
//     return code;
//   }
// 
//   public String getNamespacePrefix() {
//     return namespacePrefix;
//   }
// 
//   public String getNamespaceUri() {
//     return namespaceUri;
//   }
// 
//   public static XRoadProtocolVersion getValueByVersionCode(String code) {
//     for (XRoadProtocolVersion version : XRoadProtocolVersion.values()) {
//       if (version.getCode().equals(code)) {
//         return version;
//       }
//     }
//     return null;
//   }
// 
//   public static XRoadProtocolVersion getValueByNamespaceURI(String uri) {
//     for (XRoadProtocolVersion version : XRoadProtocolVersion.values()) {
//       if (version.getNamespaceUri().startsWith(uri)) {
//         return version;
//       }
//     }
//     return null;
//   }
// 
// }


// Path: client-transport/src/main/java/com/nortal/jroad/client/service/configuration/XRoadServiceConfiguration.java
import com.nortal.jroad.client.enums.XroadObjectType;
import com.nortal.jroad.enums.XRoadProtocolVersion;
import java.io.Serializable;

package com.nortal.jroad.client.service.configuration;


/**
 * @author Aleksei Bogdanov (aleksei.bogdanov@nortal.com)
 * @author Lauri Lättemäe (lauri.lattemae@nortal.com) - protocol 4.0
 */
// TODO Lauri: konfi võiks kuidagi paremini lahendatud olla
public interface XRoadServiceConfiguration extends Serializable {
  /**
   * Returns an URL of institutions security server, typically in form of
   * <code>http://minu_turvaserver/cgi-bin/consumer_proxy</code>.
   */
  String getSecurityServer();

  /**
   * Returns name/prefix of the X-Tee database where the service-to-be-invoked resides.
   */
  String getDatabase();

  /**
   * Returns name/prefix of the X-Tee database, which is actually specified in the WSDL of the service.
   */
  String getWsdlDatabase();

  /** Returns identifier of the person/entity who will be invoking the service */
  String getIdCode();

  /** Returns name of file (or document) related to the service invokation. */
  String getFile();

  /** Returns the service-to-be-invoked version. */
  String getVersion();

  /** Returns the name of the (service's) <code>method</code> that will be called. */
  String getMethod();

  /**
   * Returns database xroad protocol version - by default v4
   */
  XRoadProtocolVersion getProtocolVersion();