Class ImportResourceFunction

  • All Implemented Interfaces:
    com.atlassian.soy.renderer.SoyFunction, com.atlassian.soy.renderer.SoyServerFunction<String>

    public class ImportResourceFunction
    extends Object
    implements com.atlassian.soy.renderer.SoyServerFunction<String>
    Serialises resource(s) contained within modules.
    • Constructor Detail

      • ImportResourceFunction

        public ImportResourceFunction​(DataSourceFactory dataSourceFactory)
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface com.atlassian.soy.renderer.SoyFunction
      • apply

        public String apply​(Object... args)
        Usage:

        
         importResource("com.atlassian.plugins.module:modulekey", "name")
         
        Specified by:
        apply in interface com.atlassian.soy.renderer.SoyServerFunction<String>
        Parameters:
        args - two arguments expected, first a serialized complete module key in the format <plugin-key>:<module-key>, and second a resource name
        Returns:
        serialised content of the matched resource(s)
      • validArgSizes

        public Set<Integer> validArgSizes()
        Specified by:
        validArgSizes in interface com.atlassian.soy.renderer.SoyFunction