Class ClientSystemFileMatchCommands
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.rpc.func.client.ClientSystemFileMatchCommands
-
public class ClientSystemFileMatchCommands extends java.lang.Object
Implements the simpler lower-level file commands that typically correspond to system commands such as chmod, delete, etc.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_TMPFILE_PFX
static java.lang.String
DEFAULT_TMPFILE_SFX
static java.lang.String
PERMS_RW
protected static java.lang.String
RECONCILE_HANDLE
static java.lang.String
SYSTEM_TMPDIR_DEFAULT
static java.lang.String
SYSTEM_TMPDIR_PROPS_KEY
static java.lang.String
TRACE_PREFIX
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClientSystemFileMatchCommands(java.util.Properties props, RpcServer server)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RpcPacketDispatcher.RpcPacketDispatcherResult
ackMatch(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap)
protected RpcPacketDispatcher.RpcPacketDispatcherResult
exactMatch(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap)
static void
getFiles(java.io.File dir, java.io.FilenameFilter filter, java.util.List<java.io.File> files)
Recursively get all files in a directory.protected RpcPacketDispatcher.RpcPacketDispatcherResult
reconcileAdd(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap)
Reconcile add confirm - scans the directory (local syntax) and returns files in the directory using the full path.protected RpcPacketDispatcher.RpcPacketDispatcherResult
reconcileEdit(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap)
"inquire" about file, for 'p4 reconcile'protected RpcPacketDispatcher.RpcPacketDispatcherResult
reconcileFlush(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap)
Reconcile flush - remove the skip add files map from the reconcile handler.
-
-
-
Field Detail
-
TRACE_PREFIX
public static final java.lang.String TRACE_PREFIX
- See Also:
- Constant Field Values
-
DEFAULT_TMPFILE_PFX
public static final java.lang.String DEFAULT_TMPFILE_PFX
- See Also:
- Constant Field Values
-
DEFAULT_TMPFILE_SFX
public static final java.lang.String DEFAULT_TMPFILE_SFX
- See Also:
- Constant Field Values
-
SYSTEM_TMPDIR_PROPS_KEY
public static final java.lang.String SYSTEM_TMPDIR_PROPS_KEY
- See Also:
- Constant Field Values
-
SYSTEM_TMPDIR_DEFAULT
public static final java.lang.String SYSTEM_TMPDIR_DEFAULT
- See Also:
- Constant Field Values
-
PERMS_RW
public static final java.lang.String PERMS_RW
- See Also:
- Constant Field Values
-
RECONCILE_HANDLE
protected static final java.lang.String RECONCILE_HANDLE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClientSystemFileMatchCommands
protected ClientSystemFileMatchCommands(java.util.Properties props, RpcServer server)
-
-
Method Detail
-
ackMatch
protected RpcPacketDispatcher.RpcPacketDispatcherResult ackMatch(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap) throws ConnectionException
- Throws:
ConnectionException
-
exactMatch
protected RpcPacketDispatcher.RpcPacketDispatcherResult exactMatch(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap) throws ConnectionException
- Throws:
ConnectionException
-
reconcileEdit
protected RpcPacketDispatcher.RpcPacketDispatcherResult reconcileEdit(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap) throws ConnectionException
"inquire" about file, for 'p4 reconcile'This routine performs clientCheckFile's scenario 1 checking, but also saves the list of files that are in the depot so they can be compared to the list of files on the client when reconciling later for add.
- Parameters:
rpcConnection
- rpcConnectioncmdEnv
- cmdEnvresultsMap
- resultsMap- Returns:
- RpcPacketDispatcherResult
- Throws:
ConnectionException
- on error
-
reconcileAdd
protected RpcPacketDispatcher.RpcPacketDispatcherResult reconcileAdd(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap) throws ConnectionException
Reconcile add confirm - scans the directory (local syntax) and returns files in the directory using the full path. This supports traversing sub-directories.- Parameters:
rpcConnection
- rpcConnectioncmdEnv
- cmdEnvresultsMap
- resultsMap- Returns:
- RpcPacketDispatcherResult
- Throws:
ConnectionException
- on error
-
reconcileFlush
protected RpcPacketDispatcher.RpcPacketDispatcherResult reconcileFlush(RpcConnection rpcConnection, CommandEnv cmdEnv, java.util.Map<java.lang.String,java.lang.Object> resultsMap) throws ConnectionException
Reconcile flush - remove the skip add files map from the reconcile handler.- Parameters:
rpcConnection
- rpcConnectioncmdEnv
- cmdEnvresultsMap
- resultsMap- Returns:
- RpcPacketDispatcherResult
- Throws:
ConnectionException
- on error
-
getFiles
public static void getFiles(java.io.File dir, java.io.FilenameFilter filter, java.util.List<java.io.File> files)
Recursively get all files in a directory.Note: must pass in a non-null 'files' list as a parameter.
- Parameters:
dir
- dirfilter
- filterfiles
- files
-
-