Class ContentId
- java.lang.Object
-
- com.atlassian.confluence.api.model.content.id.ContentId
-
- All Implemented Interfaces:
Comparable<ContentId>
- Direct Known Subclasses:
AttachmentContentId
@ExperimentalApi public class ContentId extends Object implements Comparable<ContentId>
Identifies aContent
instance.Within the Confluence API, an instance of this id class should only refer to the latest version of a piece of content, regardless of that content's status or version. The id should not point directly to a database object with a particular status or version - when a reference with a status or version is required a
ContentSelector
should be used instead.- See Also:
ContentSelector
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
asLong()
int
compareTo(ContentId other)
static ContentId
deserialise(String id)
boolean
equals(Object o)
int
hashCode()
boolean
isSet()
static ContentId
of(long id)
static ContentId
of(ContentType type, long id)
Deprecated.since 6.10.0 useof(long)
String
serialise()
String
toString()
static ContentId
valueOf(String id)
Don't use this method - it's just for Jersey QueryParam automatic conversion.
-
-
-
Field Detail
-
UNSET
public static final ContentId UNSET
-
-
Method Detail
-
deserialise
public static ContentId deserialise(String id) throws BadRequestException
- Throws:
BadRequestException
-
of
@Deprecated public static ContentId of(ContentType type, long id)
Deprecated.since 6.10.0 useof(long)
-
of
public static ContentId of(long id)
- Since:
- 6.10.0
-
serialise
public String serialise()
-
asLong
public long asLong()
-
isSet
public boolean isSet()
-
valueOf
public static ContentId valueOf(String id) throws BadRequestException
Don't use this method - it's just for Jersey QueryParam automatic conversion. (see https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e1889)Use
deserialise(String)
instead.- Throws:
BadRequestException
-
compareTo
public int compareTo(ContentId other)
- Specified by:
compareTo
in interfaceComparable<ContentId>
-
-