Class FSInstallState
java.lang.Object
org.apache.jackrabbit.vault.packaging.registry.impl.FSInstallState
Internal (immutable) state object for a package to cache and pass the relevant metadata around.
-
Constructor Summary
ConstructorsConstructorDescriptionFSInstallState(@NotNull PackageId pid, @NotNull FSPackageStatus status, @NotNull Path filePath) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @Nullable FSInstallStateParsesInstallStatefrom metafile.static @Nullable FSInstallStatefromStream(InputStream in, String systemId) ParsesInstallStatefrom metafile.longgetSize()inthashCode()booleanvoidsave(OutputStream out) Persists the installState to a metadatafilevoidPersists the installState to a metadatafiletoString()withDependencies(Set<Dependency> dependencies) withExternal(boolean external) withFilter(WorkspaceFilter filter) withInstallTime(Long installTime) withProperties(Properties properties) withSize(long size) withSubPackages(Map<PackageId, SubPackageHandling.Option> subPackages)
-
Constructor Details
-
FSInstallState
public FSInstallState(@NotNull @NotNull PackageId pid, @NotNull @NotNull FSPackageStatus status, @NotNull @NotNull Path filePath)
-
-
Method Details
-
withExternal
-
withDependencies
-
withSubPackages
-
withInstallTime
-
withSize
-
withFilter
-
withProperties
-
fromFile
ParsesInstallStatefrom metafile.- Parameters:
metaFile- The meta file.- Returns:
- Install state or null if file is not metafile format
- Throws:
IOException- in case root tag is correct but structure not parsable as expected
-
fromStream
@Nullable public static @Nullable FSInstallState fromStream(InputStream in, String systemId) throws IOException ParsesInstallStatefrom metafile.- Parameters:
in- The input streamsystemId- the id of the stream- Returns:
- Install state or null if file is not metafile format
- Throws:
IOException- in case root tag is correct but structure not parsable as expected
-
save
Persists the installState to a metadatafile- Parameters:
file- The files to save the state to- Throws:
IOException- if an error occurs.
-
save
Persists the installState to a metadatafile- Parameters:
out- Outputsteam to write to.- Throws:
IOException- if an error occurs.
-
getInstallationTime
-
getSubPackages
-
getPackageId
-
getFilePath
-
isExternal
public boolean isExternal() -
getStatus
-
getDependencies
-
getSize
public long getSize() -
getFilter
-
getProperties
-
hashCode
public int hashCode() -
equals
-
toString
-