@Component public class ManifestVersionInfoSource extends Object implements VersionInfoSource, org.springframework.context.ApplicationContextAware
Constructor and Description |
---|
ManifestVersionInfoSource() |
Modifier and Type | Method and Description |
---|---|
VersionInfo[] |
getVersionInformation(VersionInfo filter)
Retrieves version information from all manifests that are available at classpath.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public VersionInfo[] getVersionInformation(@Nullable VersionInfo filter)
The filter is also an instance of VersionInfo
, but its fields are expected to contain regular
expressions instead of plain values.
Each available version entry is matched against patterns in the filter (field-by-field).
If any of the fields does not match, the version entry is excluded from the result.
If the filter is null
, all entries are returned.
If a field in the filter is set to null
, then all values are allowed.
getVersionInformation
in interface VersionInfoSource
filter
- the filter used to remove invalid or unwanted entries.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.