Interface IExtensionDelegator

All Known Subinterfaces:
IOptionsServer, IServer, IStreamingServer
All Known Implementing Classes:
ExtensionDelegator, NtsServerImpl, OneShotServerImpl, RpcServer, Server

public interface IExtensionDelegator
  • Method Details

    • sampleExtension

      String sampleExtension(String extnName) throws P4JavaException
      Creates sample extension with the given name. As a result a folder extnName will be created with main.lua and manifest.json in it. command: extension [ --sample name ]
      Parameters:
      extnName - - name of the extension
      Returns:
      result
      Throws:
      P4JavaException - on error
    • packageExtension

      String packageExtension(String dirName) throws P4JavaException
      Packages the extension. As a result creates a file with .p4-extension in the current folder. command: extension [ --package dir ]
      Parameters:
      dirName - - Directory name containing main.lua and manifest.json for the extension
      Returns:
      result
      Throws:
      P4JavaException - on error
    • installExtension

      ExtensionSummary installExtension(String extnPackageName, boolean allowUnsigned) throws P4JavaException
      Installs extension on p4 server. command: extension [ --install file [--yes] [--cert] [--allow-unsigned] ]
      Parameters:
      extnPackageName - - Name of the extension package file. For ex. p4java-obliterate-extn.p4-extension
      allowUnsigned - if true
      Returns:
      extension summary
      Throws:
      P4JavaException - on error
    • createExtensionConfig

      String createExtensionConfig(IExtension extension, String namespace, @Nullable String instanceConfig) throws P4JavaException
      Creates/updates an extension's global/instance config.
      Parameters:
      extension - extension
      namespace - name space
      instanceConfig - - If provided, creates/updates this instance config.
      Returns:
      result
      Throws:
      P4JavaException - on error
    • updateExtensionConfig

      String updateExtensionConfig(IExtension extension, String namespace, @Nullable String instanceConfig) throws P4JavaException
      Updates an extension's global/instance config.
      Parameters:
      extension - extension
      namespace - name space
      instanceConfig - - If provided updates this instance config.
      Returns:
      result
      Throws:
      P4JavaException - on error
    • listExtensions

      List<ExtensionSummary> listExtensions(String type) throws P4JavaException
      Lists extensions or configs based on type.
      Parameters:
      type - - Can be "extensions" or "configs"
      Returns:
      list of extensions
      Throws:
      P4JavaException - on error
    • deleteExtension

      String deleteExtension(String namespace, String extnName) throws P4JavaException
      Deletes an extension along with all of its configuration.
      Parameters:
      namespace - name space
      extnName - extension name
      Returns:
      result
      Throws:
      P4JavaException - on error
    • getExtensionConfig

      Extension getExtensionConfig(String namespace, String name, @Nullable String instanceName) throws P4JavaException
      Retrieves an extension/config.
      Parameters:
      namespace - name space
      name - extension name
      instanceName - Optional, only required for instance config
      Returns:
      extension config
      Throws:
      P4JavaException - on error