public class

ModuleDescriptorXMLUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.plugin.util.ModuleDescriptorXMLUtils

Summary

Constants
int DEFAULT_ORDER
Public Methods
static Optional<String> getClass(Element element)
Given an XML Element, find an attribute called 'class', and get its value of it.
static int getOrder(Element element)
Given an XML Element, find a child element called 'order', and get the value of it.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_ORDER

Constant Value: 2147483647 (0x7fffffff)

Public Methods

public static Optional<String> getClass (Element element)

Given an XML Element, find an attribute called 'class', and get its value of it.

Parameters
element The parent element.
Returns
  • The `class` attribute value or empty if not found.

public static int getOrder (Element element)

Given an XML Element, find a child element called 'order', and get the value of it. eg:


 <project-tabpanel ...>
  <order>10</order>
 </project-tabpanel>
 

Parameters
element The parent element (in this case 'project-tabpanel')
Returns
  • The order. In the example above, this would be '10'. If no order is specified in the XML, then DEFAULT_ORDER is returned.