Package org.projectnessie.model
Class ContentKey
- java.lang.Object
-
- org.projectnessie.model.ContentKey
-
- Direct Known Subclasses:
ImmutableContentKey
@Immutable public abstract class ContentKey extends Object
Key for the content of an object.For URL encoding, embedded periods within a segment are replaced with zero byte values before passing in a url string.
-
-
Constructor Summary
Constructors Constructor Description ContentKey()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ContentKeyfromPathString(String encoded)Convert from path encoded string to normal string.abstract @NotNull @Size(min=1) List<String>getElements()StringgetName()NamespacegetNamespace()Returns the namespace that is always consisting of the first N-1 elements fromgetElements().static ContentKeyof(String... elements)static ContentKeyof(List<String> elements)static ContentKeyof(Namespace namespace, String name)StringtoPathString()Convert this key to a url encoded path string.StringtoString()protected voidvalidate()
-
-
-
Method Detail
-
getNamespace
@Redacted public Namespace getNamespace()
Returns the namespace that is always consisting of the first N-1 elements fromgetElements().- Returns:
- A
Namespaceinstance that is always consisting of the first N-1 elements fromgetElements().
-
getName
@Redacted public String getName()
-
of
public static ContentKey of(Namespace namespace, String name)
-
of
public static ContentKey of(String... elements)
-
of
public static ContentKey of(List<String> elements)
-
validate
@Check protected void validate()
-
fromPathString
public static ContentKey fromPathString(String encoded)
Convert from path encoded string to normal string.- Parameters:
encoded- Path encoded string- Returns:
- Actual key.
-
toPathString
public String toPathString()
Convert this key to a url encoded path string.- Returns:
- String encoded for path use.
-
-