Class ProtectDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.ProtectDelegator
-
- All Implemented Interfaces:
IProtectDelegator
public class ProtectDelegator extends BaseDelegator implements IProtectDelegator
Implementation to handle the Protect 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 ProtectDelegator(IOptionsServer server)Instantiate a new ProtectDelegator, 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.StringcreateProtectionEntries(java.util.List<IProtectionEntry> entryList)Create or replace the protections table data on the Perforce server with these new protection entries.java.io.InputStreamgetProtectionsTable()Get an InputStream onto the entries of the Perforce protections table.java.lang.StringupdateProtectionEntries(java.util.List<IProtectionEntry> entryList)Replace the protections table data on the Perforce server with these new protection entries.
-
-
-
Constructor Detail
-
ProtectDelegator
public ProtectDelegator(IOptionsServer server)
Instantiate a new ProtectDelegator, 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
-
createProtectionEntries
public java.lang.String createProtectionEntries(@Nonnull java.util.List<IProtectionEntry> entryList) throws P4JavaExceptionDescription copied from interface:IProtectDelegatorCreate or replace the protections table data on the Perforce server with these new protection entries.Each entry in the table contains a protection mode, a group/user indicator, the group/user name, client host ID and a depot file path pattern. Users receive the highest privilege that is granted on any entry.
Warning: this will overwrite the existing protections table data.
- Specified by:
createProtectionEntriesin interfaceIProtectDelegator- Parameters:
entryList- non-null list of protection entries.- Returns:
- possibly-null status message string as returned from the server
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-
updateProtectionEntries
public java.lang.String updateProtectionEntries(@Nonnull java.util.List<IProtectionEntry> entryList) throws P4JavaExceptionDescription copied from interface:IProtectDelegatorReplace the protections table data on the Perforce server with these new protection entries.Each entry in the table contains a protection mode, a group/user indicator, the group/user name, client host ID and a depot file path pattern. Users receive the highest privilege that is granted on any entry.
Warning: this will overwrite the existing protections table data.
- Specified by:
updateProtectionEntriesin interfaceIProtectDelegator- Parameters:
entryList- non-null list of protection entries.- Returns:
- possibly-null status message string as returned from the server
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-
getProtectionsTable
public java.io.InputStream getProtectionsTable() throws P4JavaExceptionDescription copied from interface:IProtectDelegatorGet an InputStream onto the entries of the Perforce protections table.- Specified by:
getProtectionsTablein interfaceIProtectDelegator- Returns:
- a non-null but possibly empty InputStream onto the protections table's entries.
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
-