public interface DocumentImporterAPI
Modifier and Type | Interface and Description |
---|---|
static interface |
DocumentImporterAPI.RequirementPersister
Callback returned by DocumentImporterAPI to create requirements inside of a document.
|
Modifier and Type | Method and Description |
---|---|
ImportResults |
importDocument(DocumentId documentId,
String title,
com.atlassian.confluence.user.ConfluenceUser user,
Consumer<DocumentImporterAPI.RequirementPersister> callback)
Import a document.
|
ImportResults importDocument(@Nonnull DocumentId documentId, @Nonnull String title, @Nonnull com.atlassian.confluence.user.ConfluenceUser user, @Nonnull Consumer<DocumentImporterAPI.RequirementPersister> callback) throws PermissionException
documentId
- the id of the document. It must not have a versionId, it must be the current/active document.
Its ID can be an attachment id, the idea is to have a unique number so it's searchable.title
- the document title, just for information, when we return errors to the useruser
- the user who's importing. Only used when we notify Jira about the changes.callback
- a consumer of DocumentImporterAPI.RequirementPersister
.PermissionException
- if an import was attempted in a space where the user doesn't have edit permissions.Copyright © 2022 Requirement Yogi. All rights reserved.