public class ResourceDescriptorFactory extends Object
Constructor and Description |
---|
ResourceDescriptorFactory() |
Modifier and Type | Method and Description |
---|---|
com.atlassian.plugin.elements.ResourceDescriptor |
createResource(com.atlassian.plugin.Plugin plugin,
String resourceName,
String location,
Optional<String> contentType)
Creates a ResourceDescriptor for the file at
location within the given Plugin. |
com.atlassian.plugin.elements.ResourceDescriptor |
makeResourceDescriptorNode(String resourceName,
String location,
String contentType)
Creates
ResourceDescriptor based on given input. |
public com.atlassian.plugin.elements.ResourceDescriptor createResource(com.atlassian.plugin.Plugin plugin, String resourceName, String location, Optional<String> contentType) throws FileNotFoundException
location
within the given Plugin.plugin
- the Plugin to load the resource fromresourceName
- the resource name with the pluginlocation
- the resource location within the pluginFileNotFoundException
- if there is no file at location
public com.atlassian.plugin.elements.ResourceDescriptor makeResourceDescriptorNode(String resourceName, String location, String contentType)
ResourceDescriptor
based on given input. Does not any perform data validation.resourceName
- user-friendly resource namelocation
- resource locationcontentType
- resource content typeCopyright © 2002-2020 Atlassian. All Rights Reserved.