public class StorageFormatUserRewriter extends Object
UserKeys as components
of UserResourceIdentifiers. This is required when importing content containing UserKeys from one
Confluence installation into another, where the user keys may be different.| Modifier and Type | Class and Description |
|---|---|
static class |
StorageFormatUserRewriter.RewriteResult
Represents the results of the content rewrite operation.
|
| Constructor and Description |
|---|
StorageFormatUserRewriter(XmlEventReaderFactory xmlEventReaderFactory,
XmlOutputFactory xmlOutputFactory,
Unmarshaller<UserResourceIdentifier> userResourceIdentifierUnmarshaller,
Marshaller<UserResourceIdentifier> userResourceIdentifierMarshaller) |
| Modifier and Type | Method and Description |
|---|---|
StorageFormatUserRewriter.RewriteResult |
rewriteUserKeysInContent(String importedStorageFormat,
com.google.common.base.Function<com.atlassian.sal.api.user.UserKey,com.atlassian.sal.api.user.UserKey> userKeyTranslator,
ConversionContext conversionContext)
Deprecated.
since 7.0.1. Use
transformUserKeysInContent(String, Function, ConversionContext) |
StorageFormatUserRewriter.RewriteResult |
transformUserKeysInContent(String importedStorageFormat,
Function<com.atlassian.sal.api.user.UserKey,com.atlassian.sal.api.user.UserKey> userKeyTranslator,
ConversionContext conversionContext)
Rewrites any
UserKeys in UserResourceIdentifiers in the supplied storage format content, by
using the supplied function to map on userkey to another. |
public StorageFormatUserRewriter(XmlEventReaderFactory xmlEventReaderFactory, XmlOutputFactory xmlOutputFactory, Unmarshaller<UserResourceIdentifier> userResourceIdentifierUnmarshaller, Marshaller<UserResourceIdentifier> userResourceIdentifierMarshaller)
@Deprecated public StorageFormatUserRewriter.RewriteResult rewriteUserKeysInContent(String importedStorageFormat, com.google.common.base.Function<com.atlassian.sal.api.user.UserKey,com.atlassian.sal.api.user.UserKey> userKeyTranslator, ConversionContext conversionContext) throws XMLStreamException, XhtmlException, IOException
transformUserKeysInContent(String, Function, ConversionContext)UserKeys in UserResourceIdentifiers in the supplied storage format content, by
using the supplied function to map on userkey to another. If a given userkey cannot be translated, the original
userkey will be written unmodified.userKeyTranslator - The function that translates one userkey to anotherMap of the userkey translations used for this content. Untranslated userkeys will be represented as null values.XMLStreamExceptionXhtmlExceptionIOExceptionpublic StorageFormatUserRewriter.RewriteResult transformUserKeysInContent(String importedStorageFormat, Function<com.atlassian.sal.api.user.UserKey,com.atlassian.sal.api.user.UserKey> userKeyTranslator, ConversionContext conversionContext) throws XMLStreamException, XhtmlException, IOException
UserKeys in UserResourceIdentifiers in the supplied storage format content, by
using the supplied function to map on userkey to another. If a given userkey cannot be translated, the original
userkey will be written unmodified.userKeyTranslator - The function that translates one userkey to anotherMap of the userkey translations used for this content. Untranslated userkeys will be represented as null values.XMLStreamExceptionXhtmlExceptionIOExceptionCopyright © 2003–2022 Atlassian. All rights reserved.