Class ResourceDescriptorFactory
java.lang.Object
com.atlassian.jira.project.template.descriptor.ResourceDescriptorFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.plugin.elements.ResourceDescriptor
createResource
(com.atlassian.plugin.Plugin plugin, String resourceName, String location, Optional<String> contentType) Creates a ResourceDescriptor for the file atlocation
within the given Plugin.com.atlassian.plugin.elements.ResourceDescriptor
makeResourceDescriptorNode
(String resourceName, String location, String contentType) CreatesResourceDescriptor
based on given input.
-
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 atlocation
within the given Plugin.- Parameters:
plugin
- the Plugin to load the resource fromresourceName
- the resource name with the pluginlocation
- the resource location within the plugin- Returns:
- a ResourceDescriptor
- Throws:
FileNotFoundException
- if there is no file atlocation
-
makeResourceDescriptorNode
public com.atlassian.plugin.elements.ResourceDescriptor makeResourceDescriptorNode(String resourceName, String location, String contentType) CreatesResourceDescriptor
based on given input. Does not any perform data validation.- Parameters:
resourceName
- user-friendly resource namelocation
- resource locationcontentType
- resource content type- Returns:
-