Package dev.sigstore.tuf
Class TrustedMetaStore
- java.lang.Object
-
- dev.sigstore.tuf.TrustedMetaStore
-
public class TrustedMetaStore extends java.lang.ObjectLocal storage for local state of TUF metadata.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearMetaDueToKeyRotation()java.util.Optional<Root>findRoot()java.util.Optional<Snapshot>findSnapshot()java.util.Optional<Targets>findTargets()java.util.Optional<Timestamp>findTimestamp()java.lang.StringgetIdentifier()A generic string for identifying the local store in debug messages.RootgetRoot()SnapshotgetSnapshot()TargetsgetTargets()TimestampgetTimestamp()static TrustedMetaStorenewTrustedMetaStore(MetaStore metaStore)voidsetRoot(Root root)voidsetSnapshot(Snapshot snapshot)voidsetTargets(Targets targets)voidsetTimestamp(Timestamp timestamp)
-
-
-
Method Detail
-
newTrustedMetaStore
public static TrustedMetaStore newTrustedMetaStore(MetaStore metaStore)
-
getIdentifier
public java.lang.String getIdentifier()
A generic string for identifying the local store in debug messages. A file system based implementation might return the path being used for storage, while an in-memory store may just return something like 'in-memory'.
-
setRoot
public void setRoot(Root root) throws java.io.IOException
- Throws:
java.io.IOException
-
getRoot
public Root getRoot() throws java.io.IOException
- Throws:
java.io.IOException
-
findRoot
public java.util.Optional<Root> findRoot() throws java.io.IOException
- Throws:
java.io.IOException
-
setTimestamp
public void setTimestamp(Timestamp timestamp) throws java.io.IOException
- Throws:
java.io.IOException
-
getTimestamp
public Timestamp getTimestamp() throws java.io.IOException
- Throws:
java.io.IOException
-
findTimestamp
public java.util.Optional<Timestamp> findTimestamp() throws java.io.IOException
- Throws:
java.io.IOException
-
setSnapshot
public void setSnapshot(Snapshot snapshot) throws java.io.IOException
- Throws:
java.io.IOException
-
getSnapshot
public Snapshot getSnapshot() throws java.io.IOException
- Throws:
java.io.IOException
-
findSnapshot
public java.util.Optional<Snapshot> findSnapshot() throws java.io.IOException
- Throws:
java.io.IOException
-
setTargets
public void setTargets(Targets targets) throws java.io.IOException
- Throws:
java.io.IOException
-
getTargets
public Targets getTargets() throws java.io.IOException
- Throws:
java.io.IOException
-
findTargets
public java.util.Optional<Targets> findTargets() throws java.io.IOException
- Throws:
java.io.IOException
-
clearMetaDueToKeyRotation
public void clearMetaDueToKeyRotation() throws java.io.IOException- Throws:
java.io.IOException
-
-