|Constructor and Description|
|Modifier and Type||Method and Description|
Marshal the supplied
public StorageUserResourceIdentifierMarshaller(XmlStreamWriterTemplate xmlStreamWriterTemplate)
public Streamable marshal(UserResourceIdentifier userResourceIdentifier, ConversionContext conversionContext) throws XhtmlException
UserResourceIdentifierto storage format. Depending on the information contained in the identifier, the output will contain either a
UserKey(preferred), or a username (if no UserKey available).
If the marshaller detects that the
UserResourceIdentifier was originally initialised from a username
rather than a UserKey (i.e. pre-user-rename storage format), then it will set a flag in the
ConversionContext to record the fact that the identifier was migrated from one format to another. This
flag can then be interrogated by calling the
userResourceIdentifier- The identifier to be marshalled.
conversionContext- the conversion context in which to record the migration flag
Streamablecontaining the marshalled identifier.
XhtmlException- if an error occurs during marshalling
public boolean wasMigrationPerformed(ConversionContext conversionContext)
ConversionContextthat was previously used to perform a migration, determine if that context contains information that indicates whether a "migration" was performed. What constitutes a migration is implementation-dependent.
conversionContext- the context used for the migration
ConversionContextcontains a flag indicating that a
UserResourceIdentifierwas migrated from "old" to "new" storage format in this context, false othewrwise.
Copyright © 2003–2017 Atlassian. All rights reserved.