本文整理了Java中org.identityconnectors.common.Version.getVersion()
方法的一些代码示例,展示了Version.getVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getVersion()
方法的具体详情如下:
包路径:org.identityconnectors.common.Version
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!