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.
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description TriggersDelegator(IOptionsServer server)
Instantiate a new TriggersDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createTriggerEntries(java.util.List<ITriggerEntry> entryList)
Create or replace the triggers table data on the Perforce server with these new trigger entries.java.util.List<ITriggerEntry>
getTriggerEntries()
Get a list of Perforce trigger entries.java.io.InputStream
getTriggersTable()
Get an InputStream onto the entries of the Perforce triggers table.java.lang.String
updateTriggerEntries(java.util.List<ITriggerEntry> entryList)
Replace the triggers table data on the Perforce server with these new triggers entries.
-
-
-
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 interfaceITriggersDelegator
- 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 interfaceITriggersDelegator
- 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 interfaceITriggersDelegator
- 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 interfaceITriggersDelegator
- 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.
-
-