public class ProtectionEntry extends MapEntry implements IProtectionEntry
Note that the order of this protection entry in the protections table is part of the protection entry key when pass to the server for updating the protections table.
When exclusionary mappings are used, order is relevant: the exclusionary mapping overrides any matching protections listed above it in the table. No matter what access level is being denied in the exclusionary protection, all the access levels for the matching users, files, and IP addresses are denied.
Protections0: super user p4java * //depot/... Protections1: write group p4users * //depot/project1/... Protections2: write group p4users * -//depot/project1/build/... Protections3: read user p4jtestuser * //depot/... Protections4: read user p4jtestuser * -//depot/topsecret/...
IMapEntry.EntryTypeelementPattern, elementPatternStr, left, order, right, typeEXCLUDE_PREFIX, ORDER_UNKNOWN, OVERLAY_PREFIX| Constructor and Description |
|---|
ProtectionEntry()
Default constructor -- sets all fields to null, zero, or false.
|
ProtectionEntry(int order,
String mode,
boolean group,
String host,
String name,
String path,
boolean pathExcluded)
Explicit-value constructor.
|
ProtectionEntry(Map<String,Object> map,
int order)
Constructs a ProtectionEntry from the passed-in map; this map
must have come from a Perforce IServer method call or it may fail.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHost()
Gets the client host.
|
String |
getMode()
Gets the protection mode for this entry.
|
String |
getName()
Gets the name of the grantee (user or group).
|
String |
getPath()
Gets the depot path.
|
boolean |
isGroup()
Checks if the grantee is a group.
|
boolean |
isPathExcluded()
Checks if the path is excluded.
|
void |
setGroup(boolean group)
Sets the group indicator (true/false).
|
void |
setHost(String host)
Sets the client host.
|
void |
setMode(String mode)
Sets the protection mode for this entry.
|
void |
setName(String name)
Sets the name of the grantee (user or group).
|
void |
setPath(String path)
Sets the depot path.
|
void |
setPathExcluded(boolean pathExcluded)
Sets the path excluded indicator (true/false).
|
String |
toString()
Returns string representation of the protection entry.
|
getLeft, getLeft, getOrder, getRight, getRight, getType, parseViewMappingString, quoteWhitespaceString, setLeft, setOrder, setRight, setType, stripTypePrefix, toStringpublic ProtectionEntry()
public ProtectionEntry(int order,
String mode,
boolean group,
String host,
String name,
String path,
boolean pathExcluded)
public String getHost()
IProtectionEntrygetHost in interface IProtectionEntrypublic String getMode()
IProtectionEntrygetMode in interface IProtectionEntrypublic String getName()
IProtectionEntrygetName in interface IProtectionEntrypublic String getPath()
IProtectionEntrygetPath in interface IProtectionEntrypublic boolean isGroup()
IProtectionEntryisGroup in interface IProtectionEntrypublic void setGroup(boolean group)
IProtectionEntrysetGroup in interface IProtectionEntrygroup - the group indicator (true/false).public void setHost(String host)
IProtectionEntrysetHost in interface IProtectionEntryhost - the client hostpublic void setMode(String mode)
IProtectionEntrysetMode in interface IProtectionEntrymode - the protection modepublic void setName(String name)
IProtectionEntrysetName in interface IProtectionEntryname - the name of the granteepublic void setPath(String path)
IProtectionEntrysetPath in interface IProtectionEntrypath - the depot pathpublic boolean isPathExcluded()
IProtectionEntryisPathExcluded in interface IProtectionEntrypublic void setPathExcluded(boolean pathExcluded)
IProtectionEntrysetPathExcluded in interface IProtectionEntrypathExcluded - the path excluded indicator (true/false)Copyright © 2017 Perforce Software. All Rights Reserved.