Class DocumentReference

    • Field Detail

      • TYPE_PROVIDER

        public static final Type TYPE_PROVIDER
        The Type for a Provider<DocumentReference>.
        Since:
        7.2M1
    • Constructor Detail

      • DocumentReference

        public DocumentReference​(EntityReference reference)
        Special constructor that transforms a generic entity reference into a DocumentReference. It checks the validity of the passed reference (ie correct type and correct parent).
        Parameters:
        reference - the reference to convert
        Throws:
        IllegalArgumentException - if the passed reference is not a valid document reference
      • DocumentReference

        protected DocumentReference​(EntityReference reference,
                                    EntityReference oldReference,
                                    EntityReference newReference)
        Clone an DocumentReference, but replace one of the parent in the chain by a new one.
        Parameters:
        reference - the reference that is cloned
        oldReference - the old parent that will be replaced
        newReference - the new parent that will replace oldReference in the chain
        Since:
        3.3M2
      • DocumentReference

        public DocumentReference​(EntityReference reference,
                                 Locale locale)
        Clone the provided reference and change the Locale.
        Parameters:
        reference - the reference to clone
        locale - the new locale for this reference, if null, locale is removed
        Throws:
        IllegalArgumentException - if the passed reference is not a valid document reference
      • DocumentReference

        public DocumentReference​(String wikiName,
                                 String spaceName,
                                 String pageName)
        Create a new Document reference from wiki, space and page name.
        Parameters:
        wikiName - the name of the wiki containing the document, must not be null
        spaceName - the name of the space containing the document, must not be null
        pageName - the name of the document
      • DocumentReference

        public DocumentReference​(String wikiName,
                                 String spaceName,
                                 String pageName,
                                 Locale locale)
        Create a new Document reference from wiki name, space name, page name and locale.
        Parameters:
        wikiName - the name of the wiki containing the document, must not be null
        spaceName - the name of the space containing the document, must not be null
        pageName - the name of the document
        locale - the locale of the document reference, may be null
      • DocumentReference

        public DocumentReference​(String wikiName,
                                 String spaceName,
                                 String pageName,
                                 String language)
        Create a new Document reference from wiki name, space name, page name and language. This is an helper function during transition from language to locale, it will be deprecated ASAP.
        Parameters:
        wikiName - the name of the wiki containing the document, must not be null
        spaceName - the name of the space containing the document, must not be null
        pageName - the name of the document
        language - the language of the document reference, may be null
      • DocumentReference

        public DocumentReference​(String wikiName,
                                 List<String> spaceNames,
                                 String pageName)
        Create a new Document reference from wiki name, spaces names and page name.
        Parameters:
        wikiName - the name of the wiki containing the document, must not be null
        spaceNames - an ordered list of the names of the spaces containing the document from root space to last one, must not be null
        pageName - the name of the document
      • DocumentReference

        public DocumentReference​(String wikiName,
                                 List<String> spaceNames,
                                 String pageName,
                                 Locale locale)
        Create a new Document reference from wiki name, spaces names, page name and locale.
        Parameters:
        wikiName - the name of the wiki containing the document, must not be null
        spaceNames - an ordered list of the names of the spaces containing the document from root space to last one, must not be null
        pageName - the name of the document reference
        locale - the locale of the document reference, may be null
      • DocumentReference

        public DocumentReference​(String pageName,
                                 SpaceReference parent)
        Create a new Document reference from document name and parent space.
        Parameters:
        pageName - the name of the document
        parent - the parent space for the document
      • DocumentReference

        public DocumentReference​(LocalDocumentReference localDocumentReference,
                                 WikiReference wikiReference)
        Create a new Document reference from local document reference and wiki reference.
        Parameters:
        localDocumentReference - the document reference without the wiki reference
        wikiReference - the wiki reference
        Since:
        5.1M1
      • DocumentReference

        public DocumentReference​(String pageName,
                                 SpaceReference parent,
                                 Locale locale)
        Create a new Document reference from document name, parent space and locale.
        Parameters:
        pageName - the name of the document
        parent - the parent space for the document
        locale - the locale of the document reference, may be null
      • DocumentReference

        public DocumentReference​(String pageName,
                                 EntityReference parent,
                                 Map<String,​Serializable> parameters)
        Parameters:
        pageName - the name of the document
        parent - the parent space for the document
        parameters - parameters for this reference, may be null
        Since:
        10.6RC1
      • DocumentReference

        public DocumentReference​(EntityReference reference,
                                 EntityReference parent)
        Clone an DocumentReference, but use the specified parent for its new parent.
        Parameters:
        reference - the reference to clone
        parent - the new parent to use
        Since:
        10.8RC1