Package org.wildfly.prospero.api
Class InstallationMetadata
java.lang.Object
org.wildfly.prospero.api.InstallationMetadata
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstallationMetadata(Path base, org.wildfly.channel.ChannelManifest manifest, ProsperoConfig prosperoConfig, GitStorage gitStorage, Optional<org.wildfly.prospero.metadata.ManifestVersionRecord> currentVersions, org.jboss.galleon.api.config.GalleonProvisioningConfig provisioningConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()exportMetadataBundle(Path location) org.eclipse.aether.artifact.Artifactfind(org.eclipse.aether.artifact.Artifact gav) static InstallationMetadatafromMetadataBundle(Path archiveLocation) read the metadata from an exported zip containing configuration filesList<org.eclipse.aether.artifact.Artifact>getChangesIn(SavedState savedState) getChangesToCurrent(SavedState savedState) org.jboss.galleon.api.config.GalleonProvisioningConfigorg.wildfly.channel.ChannelManifestOptional<org.wildfly.prospero.metadata.ManifestVersionRecord>org.jboss.galleon.api.config.GalleonProvisioningConfiggalleon configuration used to provision current state of the server.getSavedState(SavedState savedState) static InstallationMetadataloadInstallation(Path base) load the metadata of an existing installation.static InstallationMetadatanewInstallation(Path base, org.wildfly.channel.ChannelManifest manifest, ProsperoConfig prosperoConfig, Optional<org.wildfly.prospero.metadata.ManifestVersionRecord> currentVersions) create an in-memory installation metadata.voidrecordProvision(boolean overrideProsperoConfig) voidrecordProvision(boolean overrideProsperoConfig, boolean gitRecord) voidsetManifest(org.wildfly.channel.ChannelManifest resolvedChannel) voidupdateProsperoConfig(ProsperoConfig config) voidcheck if the provisioning definition is present.
-
Field Details
-
PROVISIONING_FILE_NAME
- See Also:
-
GALLEON_INSTALLATION_DIR
- See Also:
-
-
Constructor Details
-
InstallationMetadata
protected InstallationMetadata(Path base, org.wildfly.channel.ChannelManifest manifest, ProsperoConfig prosperoConfig, GitStorage gitStorage, Optional<org.wildfly.prospero.metadata.ManifestVersionRecord> currentVersions, org.jboss.galleon.api.config.GalleonProvisioningConfig provisioningConfig) throws MetadataException - Throws:
MetadataException
-
-
Method Details
-
loadInstallation
load the metadata of an existing installation. If the history is not available, it will be started.- Parameters:
base-- Returns:
- Throws:
MetadataException
-
newInstallation
public static InstallationMetadata newInstallation(Path base, org.wildfly.channel.ChannelManifest manifest, ProsperoConfig prosperoConfig, Optional<org.wildfly.prospero.metadata.ManifestVersionRecord> currentVersions) throws MetadataException create an in-memory installation metadata. No information is recorded untilrecordProvision(boolean)is called.- Parameters:
base-manifest-prosperoConfig-currentVersions- - manifest versions used to provision the installation- Returns:
- Throws:
MetadataException
-
fromMetadataBundle
public static InstallationMetadata fromMetadataBundle(Path archiveLocation) throws IOException, MetadataException read the metadata from an exported zip containing configuration files- Parameters:
archiveLocation- path to the exported zip- Returns:
- Throws:
IOExceptionMetadataException
-
exportMetadataBundle
- Throws:
IOException
-
getManifest
public org.wildfly.channel.ChannelManifest getManifest() -
getGalleonProvisioningConfig
public org.jboss.galleon.api.config.GalleonProvisioningConfig getGalleonProvisioningConfig() -
recordProvision
- Throws:
MetadataException
-
recordProvision
public void recordProvision(boolean overrideProsperoConfig, boolean gitRecord) throws MetadataException - Throws:
MetadataException
-
updateProvisioningConfiguration
check if the provisioning definition is present. If not add it to the history- Throws:
MetadataException
-
getRevisions
- Throws:
MetadataException
-
getSavedState
- Throws:
MetadataException
-
getChangesIn
- Throws:
MetadataException
-
getChangesToCurrent
- Throws:
MetadataException
-
setManifest
public void setManifest(org.wildfly.channel.ChannelManifest resolvedChannel) -
getArtifacts
-
find
public org.eclipse.aether.artifact.Artifact find(org.eclipse.aether.artifact.Artifact gav) -
getProsperoConfig
-
updateProsperoConfig
- Throws:
MetadataException
-
getManifestVersions
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getRecordedProvisioningConfig
public org.jboss.galleon.api.config.GalleonProvisioningConfig getRecordedProvisioningConfig()galleon configuration used to provision current state of the server.- Returns:
-