Class InstallManifest
- Direct Known Subclasses:
BaseDeviceManifest
,ChainedManifest
This class exists to decouple the installer logic from a given manifest implementation as manifests may evolve over time. So long as any future manifest can return this information, a device can continue to be updated.
Care must be taken such that old code can extract this data from future manifests, even when the manifest format changes, otherwise it will be impossible to update as the old code will not know how to determine what to install. This can be handled by defining this data in all manifest formats, even when it's artificially created by tooling and is technically redundant.
The proper way to use this class is for every future manifest to
extend it and regardless of internal format, populate the
installArtifacts
list with every artifact in the manifest.
This way the installer can create instances of this class for any
manifest json and retrieve the list of all artifacts without the
need to understand the particular manifest format.
DO NOT CHANGE THIS WITHOUT KNOWING WHAT YOU'RE DOING AS YOU WILL BREAK THE ABILITY TO MIGRATE TO NEW MANIFEST FORMATS!
If the manifest is a chained manifest, the deviceType
is optional (null means any device). A chained manifest must
specify nextManifestId
which is either another chained
manifest or the root manifest of the chain. A root manifest
will have a null nextManifestId
and a valid
deviceType
which ensures the manifest is compatible
with the device it is being installed onto.
installLayers
should return all layers in the manifest.
Layers are installed differently and thus need to be identified
separately from non-layer artifacts. installArtifacts
is a list of all non-layer artifacts in the manifest.
All manifests contain a top level map of properties. These are not used internally by kOS and exist to facilitate external tooling. There are several properties that can be used by convention:
- kos.install.summary: This should contain a message
suitable to display to a user that indicate what is contained
within the manifest. This may be shown during the install
process or as an indication of what is about to be installed.
This property name is available as
PROP_INSTALL_SUMMARY
. - kos.install.detail.*: These can contain additional
information to show to the user during the install process
in addition to the summary. This property prefix is available
as
PROP_INSTALL_DETAIL
.
- Version:
- 2023-10-01
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn detail properties which can be displayed to the user to indicate which is being installed with this manifest.Return the summary property which should contain information that indicates what is being installed with this manifest.void
setDeviceType
(String deviceType) void
setInstallArtifacts
(Set<BaseManifestArtifact> installArtifacts) void
setInstallLayers
(Set<BaseManifestArtifact> installLayers) void
setManifestType
(String manifestType) void
setNextManifestId
(String nextManifestId) void
setProperties
(Map<String, String> properties) Methods inherited from class com.tccc.kos.commons.manifest.DeviceManifestVersion
getVersion, setVersion
-
Field Details
-
PROP_INSTALL_SUMMARY
- See Also:
-
PROP_INSTALL_DETAIL
- See Also:
-
-
Constructor Details
-
InstallManifest
public InstallManifest()
-
-
Method Details
-
getInstallSummary
Return the summary property which should contain information that indicates what is being installed with this manifest. -
getInstallDetails
Return detail properties which can be displayed to the user to indicate which is being installed with this manifest. -
getDeviceType
-
getManifestType
-
getNextManifestId
-
getProperties
-
getInstallLayers
-
getInstallArtifacts
-
setDeviceType
-
setManifestType
-
setNextManifestId
-
setProperties
-
setInstallLayers
-
setInstallArtifacts
-