|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.perforce.p4java.server.AbstractAuthHelper
com.perforce.p4java.server.FingerprintsHelper
public class FingerprintsHelper
This class is designed to lookup fingerprints from a trust file or the in-memory fingerprints map. If a null trust file parameter is passed to the methods, the in-memory fingerprints map will be used instead.
| Field Summary |
|---|
| Fields inherited from class com.perforce.p4java.server.AbstractAuthHelper |
|---|
AUTH_VALUE_MAP_KEY, DEFAULT_LOCK_DELAY, DEFAULT_LOCK_TRY, DEFAULT_LOCK_WAIT, SERVER_ADDRESS_MAP_KEY, USER_NAME_MAP_KEY |
| Constructor Summary | |
|---|---|
FingerprintsHelper()
|
|
| Method Summary | |
|---|---|
static Fingerprint |
getFingerprint(String serverAddress,
String trustFilePath)
Get the first found fingerprint in the specified fingerprint file that matches the specified server address. |
static Fingerprint |
getFingerprint(String userName,
String serverAddress,
String trustFilePath)
Get the first found fingerprint in the specified trust file that matches the specified user name and server address. |
static Fingerprint[] |
getFingerprints(File trustFile)
Get all the fingerprints found in the specified file. |
static Fingerprint[] |
getFingerprints(String trustFilePath)
Get all the fingerprints found in the file at the specified file path. |
static String |
getFingerprintValue(String userName,
String serverAddress,
String trustFilePath)
Get the first found fingerprint value that matches the specified user name and server address. |
static void |
saveFingerprint(Fingerprint fingerprint,
File trustFile)
Save the specified fingerprint as an entry into the specified trust file. |
static void |
saveFingerprint(Fingerprint fingerprint,
String trustFilePath)
Save the specified fingerprint as an entry into the specified trust file. |
static void |
saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
File trustFile)
Save the specified parameters as an entry into the specified trust file. |
static void |
saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
File trustFile,
int lockTry,
long lockDelay,
long LockWait)
Save the specified parameters as an entry into the specified trust file. |
static void |
saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
String trustFilePath)
Save the specified parameters as an entry into the specified trust file. |
static void |
saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
String trustFilePath,
int lockTry,
long lockDelay,
long lockWait)
Save the specified parameters as an entry into the specified trust file. |
| Methods inherited from class com.perforce.p4java.server.AbstractAuthHelper |
|---|
getFileEntries, getMemoryEntries, getMemoryEntry, saveFileEntry, saveMemoryEntry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FingerprintsHelper()
| Method Detail |
|---|
public static String getFingerprintValue(String userName,
String serverAddress,
String trustFilePath)
throws IOException
userName - serverAddress - trustFilePath -
IOException - - io exception from reading trust file
public static Fingerprint[] getFingerprints(String trustFilePath)
throws IOException
trustFilePath -
IOException - - io exception from reading trust file
public static Fingerprint[] getFingerprints(File trustFile)
throws IOException
trustFile -
IOException - - io exception from reading trust file
public static Fingerprint getFingerprint(String userName,
String serverAddress,
String trustFilePath)
throws IOException
userName - - possibly null user name to match against the found fingerprintsserverAddress - - non-null server addresstrustFilePath - - path to trust file to search
IOException - - io exception from reading trust file
public static Fingerprint getFingerprint(String serverAddress,
String trustFilePath)
throws IOException
serverAddress - - non-null server addresstrustFilePath - - path to trust file to search
IOException - - io exception from reading trust file
public static void saveFingerprint(Fingerprint fingerprint,
String trustFilePath)
throws IOException
fingerprint - - non-null fingerprinttrustFilePath - - non-null path
IOException
public static void saveFingerprint(Fingerprint fingerprint,
File trustFile)
throws IOException
fingerprint - - non-null fingerprinttrustFile - - non-null file
IOException
public static void saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
String trustFilePath)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - non-null fingerprint valuetrustFilePath - - non-null file path
IOException
public static void saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
String trustFilePath,
int lockTry,
long lockDelay,
long lockWait)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - non-null fingerprint valuetrustFilePath - - non-null file pathlockTry - - number of tries for lockinglockDelay - - delay time (ms) for lockinglockWait - - wait time (ms) for other process/thread to finish locking
IOException
public static void saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
File trustFile)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - possibly null fingerprint valuetrustFile - - non-null file
IOException
public static void saveFingerprint(String userName,
String serverAddress,
String fingerprintValue,
File trustFile,
int lockTry,
long lockDelay,
long LockWait)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - possibly null fingerprint valuetrustFile - - non-null filelockTry - - number of tries for lockinglockDelay - - delay time (ms) for lockinglockWait - - wait time (ms) for other process/thread to finish locking
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||