Class TriggersDelegator

java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.TriggersDelegator
All Implemented Interfaces:
ITriggersDelegator

public class TriggersDelegator extends BaseDelegator implements ITriggersDelegator
Implementation to handle the Triggers command.
  • Constructor Details

    • TriggersDelegator

      public TriggersDelegator(IOptionsServer server)
      Instantiate a new TriggersDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.
      Parameters:
      server - a concrete implementation of a Perforce Helix Server
  • Method Details

    • createTriggerEntries

      public String createTriggerEntries(@Nonnull List<ITriggerEntry> entryList) throws P4JavaException
      Description copied from interface: ITriggersDelegator
      Create or replace the triggers table data on the Perforce server with these new trigger entries.

      This method require that the user have 'super' access granted by 'p4 protect'.

      Warning: this will overwrite the existing triggers table data.

      Specified by:
      createTriggerEntries in interface ITriggersDelegator
      Parameters:
      entryList - non-null list of trigger entries.
      Returns:
      possibly-null status message string as returned from the server
      Throws:
      P4JavaException - if an error occurs processing this method and its parameters.
    • getTriggerEntries

      public List<ITriggerEntry> getTriggerEntries() throws P4JavaException
      Description copied from interface: ITriggersDelegator
      Get a list of Perforce trigger entries.

      This method require that the user have 'super' access granted by 'p4 protect'.

      Specified by:
      getTriggerEntries in interface ITriggersDelegator
      Returns:
      non-null but possibly empty list of trigger entries.
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
    • updateTriggerEntries

      public String updateTriggerEntries(@Nonnull List<ITriggerEntry> entryList) throws P4JavaException
      Description copied from interface: ITriggersDelegator
      Replace the triggers table data on the Perforce server with these new triggers entries.

      This method require that the user have 'super' access granted by 'p4 protect'.

      Warning: this will overwrite the existing triggers table data.

      Specified by:
      updateTriggerEntries in interface ITriggersDelegator
      Parameters:
      entryList - non-null list of trigger entries.
      Returns:
      possibly-null status message string as returned from the server
      Throws:
      P4JavaException - if an error occurs processing this method and its parameters.
    • getTriggersTable

      public InputStream getTriggersTable() throws P4JavaException
      Description copied from interface: ITriggersDelegator
      Get an InputStream onto the entries of the Perforce triggers table.

      This method require that the user have 'super' access granted by 'p4 protect'.

      Specified by:
      getTriggersTable in interface ITriggersDelegator
      Returns:
      a non-null but possibly empty InputStream onto the triggers table's entries.
      Throws:
      P4JavaException - if any error occurs in the processing of this method.