Class TriggersDelegator

    • Constructor Detail

      • 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 Detail

      • createTriggerEntries

        public java.lang.String createTriggerEntries​(@Nonnull
                                                     java.util.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 java.util.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 java.lang.String updateTriggerEntries​(@Nonnull
                                                     java.util.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 java.io.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.