Class ModuleDescriptorXMLUtils

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

public class ModuleDescriptorXMLUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getClass(com.atlassian.plugin.module.Element element)
    Given an XML Element, find an attribute called 'class', and get its value of it.
    static int
    getOrder(com.atlassian.plugin.module.Element element)
    Given an XML Element, find a child element called 'order', and get the value of it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getOrder

      public static int getOrder(com.atlassian.plugin.module.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.
    • getClass

      public static Optional<String> getClass(com.atlassian.plugin.module.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.