Class TriggerEntry
- java.lang.Object
-
- com.perforce.p4java.impl.generic.core.MapEntry
-
- com.perforce.p4java.impl.generic.admin.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%"
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.perforce.p4java.core.IMapEntry
IMapEntry.EntryType
-
Nested classes/interfaces inherited from interface com.perforce.p4java.admin.ITriggerEntry
ITriggerEntry.TriggerType
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.generic.core.MapEntry
comment, elementPattern, elementPatternStr, left, order, right, type
-
Fields inherited from interface com.perforce.p4java.core.IMapEntry
ORDER_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description TriggerEntry()
Default constructor.TriggerEntry(int order, java.lang.String name, ITriggerEntry.TriggerType triggerType, java.lang.String path, java.lang.String command)
Explicit-value constructor.TriggerEntry(java.lang.String triggerEntry, int order)
Constructs a TriggerEntry from the passed-in trigger as a string and its order.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCommand()
Gets the trigger command.java.lang.String
getName()
Gets the trigger name.java.lang.String
getPath()
For change and submit triggers, a file pattern to match files in the changelist.ITriggerEntry.TriggerType
getTriggerType()
Gets the trigger type.void
setCommand(java.lang.String command)
Sets the trigger command.void
setName(java.lang.String name)
Sets the trigger name.void
setPath(java.lang.String path)
For change and submit triggers, a file pattern to match files in the changelist.void
setTriggerType(ITriggerEntry.TriggerType triggerType)
Sets the trigger type.java.lang.String
toString()
An alias for this.toString(" ", true).-
Methods inherited from class com.perforce.p4java.impl.generic.core.MapEntry
getComment, getComment, getLeft, getLeft, getOrder, getRight, getRight, getType, parseComments, parseViewMappingString, quoteWhitespaceString, setComment, setLeft, setOrder, setRight, setType, stripComments, stripTypePrefix, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.perforce.p4java.core.IMapEntry
getComment, getComment, getLeft, getLeft, getOrder, getRight, getRight, getType, setComment, setLeft, setOrder, setRight, setType, toString
-
-
-
-
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
- ordername
- nametriggerType
- triggerTypepath
- pathcommand
- 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
- triggerEntryorder
- order
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:ITriggerEntry
Gets the trigger name.- Specified by:
getName
in interfaceITriggerEntry
- Returns:
- the trigger name
- See Also:
ITriggerEntry.getName()
-
setName
public void setName(java.lang.String name)
Description copied from interface:ITriggerEntry
Sets the trigger name.- Specified by:
setName
in interfaceITriggerEntry
- Parameters:
name
- the trigger name- See Also:
ITriggerEntry.setName(java.lang.String)
-
getTriggerType
public ITriggerEntry.TriggerType getTriggerType()
Description copied from interface:ITriggerEntry
Gets the trigger type.- Specified by:
getTriggerType
in interfaceITriggerEntry
- Returns:
- the trigger type
- See Also:
ITriggerEntry.getTriggerType()
-
setTriggerType
public void setTriggerType(ITriggerEntry.TriggerType triggerType)
Description copied from interface:ITriggerEntry
Sets the trigger type.- Specified by:
setTriggerType
in interfaceITriggerEntry
- Parameters:
triggerType
- the trigger type- See Also:
ITriggerEntry.setTriggerType(com.perforce.p4java.admin.ITriggerEntry.TriggerType)
-
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 interfaceITriggerEntry
- 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 interfaceITriggerEntry
- Parameters:
path
- the depot file path pattern or form type- See Also:
ITriggerEntry.setPath(java.lang.String)
-
getCommand
public java.lang.String getCommand()
Description copied from interface:ITriggerEntry
Gets the trigger command. If the command contains spaces, enclose it in double quotes.- Specified by:
getCommand
in interfaceITriggerEntry
- Returns:
- the trigger comamnd
- See Also:
ITriggerEntry.getCommand()
-
setCommand
public void setCommand(java.lang.String command)
Description copied from interface:ITriggerEntry
Sets the trigger command. If the command contains spaces, enclose it in double quotes.- Specified by:
setCommand
in interfaceITriggerEntry
- Parameters:
command
- the trigger command- See Also:
ITriggerEntry.setCommand(java.lang.String)
-
-