Class ContentId
- java.lang.Object
-
- com.atlassian.confluence.api.model.content.id.ContentId
-
- All Implemented Interfaces:
Comparable<ContentId>
- Direct Known Subclasses:
AttachmentContentId
public class ContentId extends Object implements Comparable<ContentId>
Identifies aContentinstance.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
ContentSelectorshould be used instead.- See Also:
ContentSelector
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longasLong()intcompareTo(ContentId other)static ContentIddeserialise(String id)booleanequals(Object o)inthashCode()booleanisSet()static ContentIdof(long id)static ContentIdof(ContentType type, long id)Deprecated.since 6.10.0 useof(long)Stringserialise()StringtoString()static ContentIdvalueOf(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:
compareToin interfaceComparable<ContentId>
-
-