Class ResourceDescriptorFactory

java.lang.Object
com.atlassian.jira.project.template.descriptor.ResourceDescriptorFactory

public class ResourceDescriptorFactory extends Object
  • Constructor Details

    • ResourceDescriptorFactory

      public ResourceDescriptorFactory()
  • Method Details

    • createResource

      public com.atlassian.plugin.elements.ResourceDescriptor createResource(com.atlassian.plugin.Plugin plugin, String resourceName, String location, Optional<String> contentType) throws FileNotFoundException
      Creates a ResourceDescriptor for the file at location within the given Plugin.
      Parameters:
      plugin - the Plugin to load the resource from
      resourceName - the resource name with the plugin
      location - the resource location within the plugin
      Returns:
      a ResourceDescriptor
      Throws:
      FileNotFoundException - if there is no file at location
    • makeResourceDescriptorNode

      public com.atlassian.plugin.elements.ResourceDescriptor makeResourceDescriptorNode(String resourceName, String location, String contentType)
      Creates ResourceDescriptor based on given input. Does not any perform data validation.
      Parameters:
      resourceName - user-friendly resource name
      location - resource location
      contentType - resource content type
      Returns: