Package com.atlassian.bamboo.migration
Class MapperUtil
- java.lang.Object
-
- com.atlassian.bamboo.migration.MapperUtil
-
public class MapperUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringGENERIC_XML_CREATIONDATEstatic StringGENERIC_XML_IDstatic StringGENERIC_XML_MODIFICATIONDATEstatic StringGENERIC_XML_OID
-
Constructor Summary
Constructors Constructor Description MapperUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddElementIfNotBlank(@NotNull org.dom4j.Element element, @NotNull String elementName, boolean value)static voidaddElementIfNotBlank(@NotNull org.dom4j.Element element, @NotNull String elementName, int value)static voidaddElementIfNotBlank(@NotNull org.dom4j.Element element, @NotNull String elementName, long value)static voidaddElementIfNotBlank(@NotNull org.dom4j.Element element, @NotNull String elementName, String value)static <T extends com.atlassian.core.bean.EntityObject>
TcreateFakeObject(@NotNull Class<T> objectClass, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor)static voidexportDefaults(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @Nullable Object object)static voidexportDefaults(Object object, org.dom4j.Element element)static <T,I extends T>
Consumer<T>exportXmlConsumer(@NotNull BambooStAXMappingHelperAbstractImpl<T,I> mapper, @NotNull org.codehaus.staxmate.out.SMOutputElement rootElement, ExportDetailsBean exportDetailsBean)static <T,I extends T>
Consumer<T>exportXmlFunction(@NotNull BambooStAXMappingHelperAbstractImpl<T,I> mapper, @NotNull org.codehaus.staxmate.out.SMOutputElement rootElement, ExportDetailsBean exportDetailsBean)static voidimportDefaults(@Nullable Object object, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor)static booleanmatchesElement(@NotNull BambooStAXMappingHelperAbstractImpl mapper, @NotNull String elementName)static booleanmatchesElement(@NotNull BambooStAXMappingListHelperAbstractImpl mapper, @NotNull String elementName)static @Nullable DateparseDateElement(@Nullable String dateString)static @Nullable DateparseDateElement(org.codehaus.staxmate.in.SMInputCursor inputCursor)static @Nullable DateparseDateElement(org.dom4j.Element element)
-
-
-
Field Detail
-
GENERIC_XML_ID
public static final String GENERIC_XML_ID
- See Also:
- Constant Field Values
-
GENERIC_XML_OID
public static final String GENERIC_XML_OID
- See Also:
- Constant Field Values
-
GENERIC_XML_CREATIONDATE
public static final String GENERIC_XML_CREATIONDATE
- See Also:
- Constant Field Values
-
GENERIC_XML_MODIFICATIONDATE
public static final String GENERIC_XML_MODIFICATIONDATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addElementIfNotBlank
public static void addElementIfNotBlank(@NotNull @NotNull org.dom4j.Element element, @NotNull @NotNull String elementName, String value)
-
addElementIfNotBlank
public static void addElementIfNotBlank(@NotNull @NotNull org.dom4j.Element element, @NotNull @NotNull String elementName, boolean value)
-
addElementIfNotBlank
public static void addElementIfNotBlank(@NotNull @NotNull org.dom4j.Element element, @NotNull @NotNull String elementName, int value)
-
addElementIfNotBlank
public static void addElementIfNotBlank(@NotNull @NotNull org.dom4j.Element element, @NotNull @NotNull String elementName, long value)
-
exportDefaults
public static void exportDefaults(Object object, org.dom4j.Element element) throws IllegalArgumentException, ParseException
- Parameters:
object-element-- Throws:
IllegalArgumentExceptionParseException
-
exportDefaults
public static void exportDefaults(@NotNull @NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @Nullable @Nullable Object object) throws XMLStreamException- Throws:
XMLStreamException
-
importDefaults
public static void importDefaults(@Nullable @Nullable Object object, @NotNull @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws XMLStreamException- Throws:
XMLStreamException
-
parseDateElement
@Nullable public static @Nullable Date parseDateElement(org.dom4j.Element element)
-
parseDateElement
@Nullable public static @Nullable Date parseDateElement(org.codehaus.staxmate.in.SMInputCursor inputCursor) throws XMLStreamException
- Throws:
XMLStreamException
-
createFakeObject
public static <T extends com.atlassian.core.bean.EntityObject> T createFakeObject(@NotNull @NotNull Class<T> objectClass, @NotNull @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws XMLStreamException, IllegalAccessException, InstantiationException
-
parseDateElement
@Nullable public static @Nullable Date parseDateElement(@Nullable @Nullable String dateString)
-
matchesElement
public static boolean matchesElement(@NotNull @NotNull BambooStAXMappingHelperAbstractImpl mapper, @NotNull @NotNull String elementName) throws XMLStreamException- Throws:
XMLStreamException
-
matchesElement
public static boolean matchesElement(@NotNull @NotNull BambooStAXMappingListHelperAbstractImpl mapper, @NotNull @NotNull String elementName) throws XMLStreamException- Throws:
XMLStreamException
-
exportXmlFunction
public static <T,I extends T> Consumer<T> exportXmlFunction(@NotNull @NotNull BambooStAXMappingHelperAbstractImpl<T,I> mapper, @NotNull @NotNull org.codehaus.staxmate.out.SMOutputElement rootElement, ExportDetailsBean exportDetailsBean)
-
exportXmlConsumer
public static <T,I extends T> Consumer<T> exportXmlConsumer(@NotNull @NotNull BambooStAXMappingHelperAbstractImpl<T,I> mapper, @NotNull @NotNull org.codehaus.staxmate.out.SMOutputElement rootElement, ExportDetailsBean exportDetailsBean)
-
-