Class ContentSelector


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

      • 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.
      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object