Class ContentSelector

java.lang.Object
com.atlassian.confluence.api.model.content.ContentSelector

@Internal public class ContentSelector extends Object
Identifies a Content instance with a specific status and version.
Since:
5.10
  • Field Details

  • Method Details

    • getId

      public ContentId getId()
    • getStatus

      public ContentStatus getStatus()
    • getVersion

      public int getVersion()
    • hasVersion

      public boolean hasVersion()
    • isEmpty

      public boolean isEmpty()
    • asCurrent

      public ContentSelector asCurrent()
      Returns a copy of this selector with status current and no version set. Use of this method should be preferred over getId() in cases where calling code specifically wants to ignore any status and version information that might be in the original selector.
    • from

      public static ContentSelector from(Content content)
    • fromId

      @Deprecated public static ContentSelector fromId(ContentId contentId)
      Deprecated.
      since 5.10. CRA-1305: to be removed prior to 6.0 release. Use from(Content) wherever possible.
      DANGER! Use of this method indicates that the caller doesn't require any status or version information to be used when resolving the Content instance specified by the returned selector. DO NOT USE: existing uses are only there temporarily as a means of keeping CRA-1300 scope down; CRA-1305 has been created to remove them.
    • builder

      public static ContentSelector.ContentSelectorBuilder builder()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object