public class StorageFormatUserRewriter extends Object
UserKey
s as components
of UserResourceIdentifier
s. This is required when importing content containing UserKey
s 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
UserKey s in UserResourceIdentifier s 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)
UserKey
s in UserResourceIdentifier
s 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.XMLStreamException
XhtmlException
IOException
public 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
UserKey
s in UserResourceIdentifier
s 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.XMLStreamException
XhtmlException
IOException
Copyright © 2003–2020 Atlassian. All rights reserved.