Class TemporaryResourceScriptService

  • All Implemented Interfaces:
    org.xwiki.script.service.ScriptService

    @Component
    @Named("resource.temporary")
    @Singleton
    @Unstable
    public class TemporaryResourceScriptService
    extends Object
    implements org.xwiki.script.service.ScriptService
    Exposes the Temporary Resource API to server-side scripts.
    Since:
    14.4.2, 14.5
    Version:
    $Id: bcbb73fb6056d474868b1f47ed5a7b5fbb589c81 $
    • Constructor Detail

      • TemporaryResourceScriptService

        public TemporaryResourceScriptService()
    • Method Detail

      • getURL

        public String getURL​(TemporaryResourceReference tempResourceReference)
        Parameters:
        tempResourceReference - a temporary resource reference
        Returns:
        the URL corresponding to the specified temporary resource
      • exists

        public boolean exists​(TemporaryResourceReference tempResourceReference)
        Check if a temporary resource exists.
        Parameters:
        tempResourceReference - a temporary resource reference
        Returns:
        true if the specified temporary resource exists, false otherwise
      • getLastError

        public Exception getLastError()
        Get the error generated while performing the previously called action.
        Returns:
        an eventual exception or null if no exception was thrown