public class

ResourceDescriptorFactory

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

Summary

Public Constructors
ResourceDescriptorFactory()
Public Methods
ResourceDescriptor createResource(Plugin plugin, String resourceName, String location, Optional<String> contentType)
Creates a ResourceDescriptor for the file at location within the given Plugin.
ResourceDescriptor makeResourceDescriptorNode(String resourceName, String location, String contentType)
Creates ResourceDescriptor based on given input.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ResourceDescriptorFactory ()

Public Methods

public ResourceDescriptor createResource (Plugin plugin, String resourceName, String location, Optional<String> contentType)

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

public 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