Class ChainedManifestBuilder
java.lang.Object
com.tccc.kos.commons.manifest.chained.ChainedManifestBuilder
Builder to simplify the process of building a
ChainedManifest
.- Version:
- 2024-04-10
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddArtifact
(String section, BaseManifestArtifact artifact) Add an artifact to the named section.void
addInstallDetail
(String detail) Add akos.install.detail.*
property.addSection
(String section) Create a section with the specified name if it doesn't already exist.build()
Build theChainedManifest
from the current builder state.getName()
getProperty
(String key) Return the value of a previously set property.void
setDeviceType
(String deviceType) Set the deviceType of the manifest.void
setInstallSummary
(String summary) Set thekos.install.summary
.Set the name of this manifest.setNextManifestId
(String nextManifestId) Set the id of the next manifest in the chain.setProperty
(String key, String val) Add a property to the manifest.
-
Field Details
-
REASON_errNoNextManifestId
- See Also:
-
REASON_errNoName
- See Also:
-
REASON_errNoIdentifier
- See Also:
-
REASON_errNoMiniHash
- See Also:
-
REASON_errNoHash
- See Also:
-
REASON_errInvalidSize
- See Also:
-
-
Constructor Details
-
ChainedManifestBuilder
public ChainedManifestBuilder()
-
-
Method Details
-
setNextManifestId
Set the id of the next manifest in the chain. EveryChainedManifest
must reference another manifest until finally reaching aDeviceManifest
. -
setDeviceType
Set the deviceType of the manifest. If set, this must match the deviceType of the underlyingDeviceManifest
or else the chain is invalid. This does not need to be set. The value in setting this is if the chained manifest will be provided to another upstream process and it requires deviceType information but has no other way to determine it. It is perfectly fine for all chained manifests to have no deviceType set as the entire chain will then have the deviceType specified in theDeviceManifest
. -
setName
Set the name of this manifest. The name is used byChainedSectionRef
to refer to a given manifest in the chain. This will be shared with partners so they can create references to sections in this manifest. Every manifest in a chain must have a unique name. -
setProperty
Add a property to the manifest. Properties are not used by kOS but provides a way to propagate information to upstream tools. These are available for developer use. -
getProperty
Return the value of a previously set property. -
setInstallSummary
Set thekos.install.summary
. This provides short summary of what the manifest is going to install. This may be displayed during the install process depending on the ui implementation. This should be limited to something short, such as a version string. -
addInstallDetail
Add akos.install.detail.*
property. This can be used to add additional information shown with the install summary, such as information about a single component. Details should be short, but multiple details can be added. There is no guarantee that details will be displayed in the same order they ware added. -
addSection
Create a section with the specified name if it doesn't already exist. -
addArtifact
Add an artifact to the named section. Creates the section if needed. -
build
Build theChainedManifest
from the current builder state. Once called this will always return the same manifest. -
getNextManifestId
-
getDeviceType
-
getName
-