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)
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)
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
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.storageFormatReader
- Supplies the input storage formatstorageFormatWriter
- The rewritten storage format will be written to thisuserKeyTranslator
- The function that translates one userkey to anotherconversionContext
- Map
of the userkey translations used for this content. Untranslated userkeys will be represented as null values.XMLStreamException
XhtmlException
IOException
Copyright © 2003–2015 Atlassian. All rights reserved.