org.identityconnectors.common.Version.getVersion()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.identityconnectors.common.Version.getVersion()方法的一些代码示例,展示了Version.getVersion()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getVersion()方法的具体详情如下:
包路径:org.identityconnectors.common.Version
类名称:Version
方法名:getVersion

Version.getVersion介绍

[英]Returns this version as a string.
[中]以字符串形式返回此版本。

代码示例

代码示例来源:origin: net.tirasa.connid/connector-framework

public String toString() {
    if (ceilingVersion != null) {
      StringBuilder sb = new StringBuilder();
      sb.append(isFloorInclusive ? LEFT_CLOSED : LEFT_OPEN);
      sb.append(floorVersion.getVersion()).append(ENDPOINT_DELIMITER).append(
          ceilingVersion.getVersion());
      sb.append(isCeilingInclusive ? RIGHT_CLOSED : RIGHT_OPEN);
      return sb.toString();
    } else {
      return floorVersion.getVersion();
    }
  }
}

代码示例来源:origin: Tirasa/ConnId

public String toString() {
    if (ceilingVersion != null) {
      StringBuilder sb = new StringBuilder();
      sb.append(isFloorInclusive ? LEFT_CLOSED : LEFT_OPEN);
      sb.append(floorVersion.getVersion()).append(ENDPOINT_DELIMITER).append(
          ceilingVersion.getVersion());
      sb.append(isCeilingInclusive ? RIGHT_CLOSED : RIGHT_OPEN);
      return sb.toString();
    } else {
      return floorVersion.getVersion();
    }
  }
}

代码示例来源:origin: Evolveum/midpoint

@Override
public String getFrameworkVersion() {
  Version version = FrameworkUtil.getFrameworkVersion();
  if (version == null) {
    return null;
  }
  return version.getVersion();
}

代码示例来源:origin: Tirasa/ConnId

@SuppressWarnings("unchecked")
@Override
public void start(BundleContext context) throws Exception {
  LOG.debug("ConnId OSGi Extender - Starting");
  OsgiConnectorInfoManagerImpl manager = new OsgiConnectorInfoManagerImpl();
  connectorWatcher = new BundleWatcher<>(context, new ConnectorManifestScanner(
      FrameworkUtil.getFrameworkVersion()), manager);
  connectorWatcher.start();
  Hashtable<String, String> prop = new Hashtable<>();
  prop.put("ConnectorBundle-FrameworkVersion", FrameworkUtil.getFrameworkVersion().getVersion());
  connectorInfoManager = context.registerService(new String[] {
    ConnectorInfoManager.class.getName(), ConnectorEventPublisher.class.getName() }, manager, prop);
  LOG.debug("ConnId OSGi Extender - Started");
}

代码示例来源:origin: Tirasa/ConnId

"Bundle " + parsed.getLocation() + " requests an unrecognized framework version "
    + frameworkVersion + " but available is "
    + FrameworkUtil.getFrameworkVersion().getVersion();
throw new ConfigurationException(message);

代码示例来源:origin: org.connid/connid-framework-internal

/**
 * Parses the manifest.
 * @return The manifest. Note that the classes/classloaders will
 * not be populated yet. That is to be done at a higher-level.
 * @throws ConfigurationException If there were any structural problems.
 */
public ConnectorBundleManifest parse() throws ConfigurationException {
  String frameworkVersion = getRequiredAttribute(ATT_FRAMEWORK_VERSION);
  String bundleName = getRequiredAttribute(ATT_BUNDLE_NAME);
  String bundleVersion =getRequiredAttribute(ATT_BUNDLE_VERSION);
  if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) {
    String message = "Bundle " + _fileName + " requests an unrecognized " +
        "framework version " + frameworkVersion + " but available is " +
        FrameworkUtil.getFrameworkVersion().getVersion();
    throw new ConfigurationException(message);
  }
  ConnectorBundleManifest rv = new ConnectorBundleManifest();
  rv.setFrameworkVersion(frameworkVersion);
  rv.setBundleName(bundleName);
  rv.setBundleVersion(bundleVersion);
  return rv;
}

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

/**
 * Parses the manifest.
 *
 * @return The manifest. Note that the classes/classloaders will not be populated yet. That is to be done at a
 * higher-level.
 * @throws ConfigurationException if there were any structural problems.
 */
public ConnectorBundleManifest parse() throws ConfigurationException {
  String frameworkVersion = getRequiredAttribute(ATT_FRAMEWORK_VERSION);
  String bundleName = getRequiredAttribute(ATT_BUNDLE_NAME);
  String bundleVersion = getRequiredAttribute(ATT_BUNDLE_VERSION);
  if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) {
    String message =
        "Bundle " + fileName + " requests an unrecognized " + "framework version "
        + frameworkVersion + " but available is "
        + FrameworkUtil.getFrameworkVersion().getVersion();
    throw new ConfigurationException(message);
  }
  ConnectorBundleManifest rv = new ConnectorBundleManifest();
  rv.setFrameworkVersion(frameworkVersion);
  rv.setBundleName(bundleName);
  rv.setBundleVersion(bundleVersion);
  return rv;
}

代码示例来源:origin: Tirasa/ConnId

/**
 * Parses the manifest.
 *
 * @return The manifest. Note that the classes/classloaders will not be populated yet. That is to be done at a
 * higher-level.
 * @throws ConfigurationException if there were any structural problems.
 */
public ConnectorBundleManifest parse() throws ConfigurationException {
  String frameworkVersion = getRequiredAttribute(ATT_FRAMEWORK_VERSION);
  String bundleName = getRequiredAttribute(ATT_BUNDLE_NAME);
  String bundleVersion = getRequiredAttribute(ATT_BUNDLE_VERSION);
  if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) {
    String message =
        "Bundle " + fileName + " requests an unrecognized " + "framework version "
        + frameworkVersion + " but available is "
        + FrameworkUtil.getFrameworkVersion().getVersion();
    throw new ConfigurationException(message);
  }
  ConnectorBundleManifest rv = new ConnectorBundleManifest();
  rv.setFrameworkVersion(frameworkVersion);
  rv.setBundleName(bundleName);
  rv.setBundleVersion(bundleVersion);
  return rv;
}

相关文章