Class TriggerEntry

  • All Implemented Interfaces:
    ITriggerEntry, IMapEntry

    public class TriggerEntry
    extends MapEntry
    implements ITriggerEntry
    Default ITriggerEntry implementation class.

    Note that the order of this trigger entry in the triggers table is part of the trigger entry key when pass to the server for updating the triggers table.

     Triggers0 example1 change-submit //depot/... "echo %changelist%"
     Triggers1 example1 change-submit //depot/abc/... "echo %changelist%"
     Triggers2 example2 form-save client "echo %client%"
     Triggers3 example3 change-submit //depot/... "echo %changelist%"
     Triggers4 example4 change-submit //depot/... "echo %changelist%"
     
    • Constructor Detail

      • TriggerEntry

        public TriggerEntry()
        Default constructor.
      • TriggerEntry

        public TriggerEntry​(int order,
                            java.lang.String name,
                            ITriggerEntry.TriggerType triggerType,
                            java.lang.String path,
                            java.lang.String command)
        Explicit-value constructor.
        Parameters:
        order - order
        name - name
        triggerType - triggerType
        path - path
        command - command
      • TriggerEntry

        public TriggerEntry​(java.lang.String triggerEntry,
                            int order)
        Constructs a TriggerEntry from the passed-in trigger as a string and its order.
        Parameters:
        triggerEntry - triggerEntry
        order - order
    • Method Detail

      • getPath

        public java.lang.String getPath()
        Description copied from interface: ITriggerEntry
        For change and submit triggers, a file pattern to match files in the changelist. This file pattern can be an exclusion mapping (-pattern), to exclude files. For form triggers, the name of the form (branch, client, etc). For fix triggers 'fix' is required as the path value. For authentication triggers, 'auth' is required as the path value. For archive triggers, a file pattern to match the name of the file being accessed in the archive. Note that, due to lazy copying when branching files, the name of the file in the archive can not be the same as the name of the file in the depot. For command triggers, use the name of the command to match, e.g. 'pre-user-$cmd' or a regular expression, e.g. '(pre|post)-user-add'. *
        Specified by:
        getPath in interface ITriggerEntry
        Returns:
        the depot file path pattern or form type
        See Also:
        ITriggerEntry.getPath()
      • setPath

        public void setPath​(java.lang.String path)
        Description copied from interface: ITriggerEntry
        For change and submit triggers, a file pattern to match files in the changelist. This file pattern can be an exclusion mapping (-pattern), to exclude files. For form triggers, the name of the form (branch, client, etc). For fix triggers 'fix' is required as the path value. For authentication triggers, 'auth' is required as the path value. For archive triggers, a file pattern to match the name of the file being accessed in the archive. Note that, due to lazy copying when branching files, the name of the file in the archive can not be the same as the name of the file in the depot. For command triggers, use the name of the command to match, e.g. 'pre-user-$cmd' or a regular expression, e.g. '(pre|post)-user-add'. *
        Specified by:
        setPath in interface ITriggerEntry
        Parameters:
        path - the depot file path pattern or form type
        See Also:
        ITriggerEntry.setPath(java.lang.String)
      • toString

        public java.lang.String toString()
        Description copied from class: MapEntry
        An alias for this.toString(" ", true).
        Specified by:
        toString in interface IMapEntry
        Overrides:
        toString in class MapEntry
        See Also:
        Object.toString()