Class XWikiLink


  • @Deprecated(since="14.8RC1")
    public class XWikiLink
    extends Object
    Deprecated.
    link storage and indexing moved to Solr (implemented in xwiki-platform-search-solr-api)
    Represent the relation between a document using a link to an entity, and the used entity.
    • Constructor Detail

      • XWikiLink

        public XWikiLink()
        Deprecated.
        Default constructor.
      • XWikiLink

        public XWikiLink​(long docId)
        Deprecated.
        Initializes only the docId.
        Parameters:
        docId - the value of the docId
      • XWikiLink

        public XWikiLink​(long docId,
                         String link,
                         String fullName)
        Deprecated.
        Initializes the docId as well as the link (the used entity) and the fullName (the reference of the document using the entity). The type is initialized to "document" by default.
        Parameters:
        docId - the docId of the document using the entity
        link - the link of the used entity
        fullName - the full name of the document using the entity
      • XWikiLink

        @Unstable
        public XWikiLink​(long docId,
                         String link,
                         String fullName,
                         String type)
        Deprecated.
        Initializes the docId as well as the link (the used entity), the fullName (the reference of the document using the entity), and the type of the linked entity.
        Parameters:
        docId - the docId of the document using the entity
        link - the link of the used entity
        fullName - the full name of the document using the entity
        type - the type of the used entity
        Since:
        14.2RC1
    • Method Detail

      • getId

        @Unstable
        public long getId()
        Deprecated.
        Getter for id.
        Returns:
        the synthetic id of this deleted attachment. Uniquely identifies a link
        Since:
        14.2RC1
      • getDocId

        public long getDocId()
        Deprecated.
        Returns:
        the id of the document containing the link
      • setDocId

        public void setDocId​(long docId)
        Deprecated.
      • setLink

        public void setLink​(String link)
        Deprecated.
      • getLink

        public String getLink()
        Deprecated.
        Returns:
        the serialized document reference of the link target (compact form without the wiki part if it matches the current wiki)
      • getFullName

        public String getFullName()
        Deprecated.
        Returns:
        the serialized reference of the document which contains the link (without the wiki part)
      • setFullName

        public void setFullName​(String fullName)
        Deprecated.
      • setType

        @Unstable
        public void setType​(String type)
        Deprecated.
        Parameters:
        type - the type of the link (e.g., document or attachment)
        Since:
        14.2RC1
      • getType

        @Unstable
        public String getType()
        Deprecated.
        Returns:
        the type of the link (e.g., document or attachment)
        Since:
        14.2RC1
      • setAttachmentName

        @Unstable
        public void setAttachmentName​(String attachmentName)
        Deprecated.
        Parameters:
        attachmentName - the name of the attachment if the link is an attachment, null otherwise
        Since:
        14.2RC1
      • getAttachmentName

        @Unstable
        public String getAttachmentName()
        Deprecated.
        Returns:
        the name of the attachment if the link is an attachment, null otherwise
        Since:
        14.2RC1
      • equals

        public boolean equals​(Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object