Class ExtendedFileSpec
java.lang.Object
com.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.generic.core.file.FileSpec
com.perforce.p4java.impl.generic.core.file.ExtendedFileSpec
- All Implemented Interfaces:
IExtendedFileSpec,IFileOperationResult,IFileSpec,IServerResource
Useful generic implementation class for the IExtendedFileSpec interface.
Fields below generally correspond exactly with the similarly-named Perforce
fstat call fields, and will not be documented in detail here.
-
Field Summary
Fields inherited from class com.perforce.p4java.impl.generic.core.file.FileSpec
action, baseFile, baseName, baseRev, blobSha, branch, changeListId, client, clientName, clientPath, commitSha, date, depotPath, endRevision, fileType, genericCode, label, localPath, opStatus, originalPath, rawCode, repoName, severityCode, sha, startRevision, statusMessage, subCode, subSystem, treeSha, uniqueCode, unmap, userNameFields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateableFields inherited from interface com.perforce.p4java.core.file.IFileSpec
HAVE_REVISION, HAVE_REVISION_STRING, HEAD_REVISION, HEAD_REVISION_STRING, NO_FILE_REVISION, NO_REVISION_STRING, NONE_REVISION, NONE_REVISION_STRING -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ExtendedFileSpec(FileSpecOpStatus status, String errStr) Construct an ExtendedFileSpec object from a status, message string pair.ExtendedFileSpec(FileSpecOpStatus status, String errStr, int rawCode) ExtendedFileSpec(FileSpecOpStatus status, String errStr, int genericCode, int severityCode) Construct an ExtendedFileSpec object from a status, message string, generic code, severity code tuple.ExtendedFileSpec(FileSpecOpStatus status, String errStr, String errCodeStr) ExtendedFileSpec(String pathStr) Given a candidate path string (which may include version and changelist annotations, at least), try to construct a corresponding extended file spec.ExtendedFileSpec(Map<String, Object> map, IServer server) Construct an ExtendedFileSpec object from the passed-in map. -
Method Summary
Modifier and TypeMethodDescriptionGet the file attributes of this file, if they're available.getDesc()longintintintintbooleanisMapped()booleanbooleanbooleanbooleanbooleanvoidsetActionOwner(String actionOwner) voidsetCharset(String charset) voidvoidvoidvoidsetFileSize(long fileSize) voidsetHaveRev(int haveRev) voidsetHeadAction(FileAction headAction) voidsetHeadChange(int headChange) voidsetHeadCharset(String headCharset) voidsetHeadModTime(Date headModTime) voidsetHeadRev(int headRev) voidsetHeadTime(Date headTime) voidsetHeadType(String headType) voidsetMapped(boolean mapped) voidsetMovedFile(String movedFile) voidsetOpenAction(FileAction openAction) voidsetOpenActionOwner(String openActionOwner) voidsetOpenChangelistId(int openChangelistId) voidsetOpenType(String openType) voidsetOtherActionList(List<String> otherActionList) voidsetOtherChangelist(List<String> otherChangelist) voidsetOtherLocked(boolean otherLocked) voidsetOtherOpenList(List<String> otherOpenList) voidsetReresolvable(boolean reresolvable) voidsetResolved(boolean resolved) voidsetResolveRecords(List<IResolveRecord> resolveRecords) voidsetUnresolved(boolean unresolved) voidsetVerifyStatus(String verifyStatus) Methods inherited from class com.perforce.p4java.impl.generic.core.file.FileSpec
getAction, getAnnotatedPathString, getAnnotatedPreferredPathString, getAnnotations, getAnnotations, getBaseFile, getBaseName, getBaseRev, getBlobSha, getBranch, getChangelistId, getClientName, getClientPath, getClientPathString, getCommitSha, getContentResolveType, getContents, getContents, getDate, getDepotPath, getDepotPathString, getDiffStatus, getEndFromRev, getEndRevision, getEndToRev, getFileType, getFromFile, getGenericCode, getHowResolved, getLabel, getLocalPath, getLocalPathString, getOpStatus, getOriginalPath, getOriginalPathString, getOtherAction, getPath, getPathString, getPreferredPath, getPreferredPathString, getRawCode, getRepoName, getResolveType, getResolveTypes, getRevFromString, getRevisionHistory, getRevisionHistory, getSeverityCode, getSha, getShelvedChange, getStartFromRev, getStartRevision, getStartToRev, getStatusMessage, getSubCode, getSubSystem, getSyncTime, getToFile, getTreeSha, getUniqueCode, getUserName, getWorkRev, isLocked, isUnmap, move, move, setAction, setBaseFile, setBaseName, setBaseRev, setBlobSha, setBranch, setChangelistId, setClient, setClientName, setClientPath, setClientPath, setCodes, setCommitSha, setContentResolveType, setDate, setDepotPath, setDepotPath, setDiffStatus, setEndFromRev, setEndRevision, setEndToRev, setFileType, setFromFile, setHowResolved, setLabel, setLocalPath, setLocalPath, setLocked, setOpStatus, setOriginalPath, setOriginalPath, setOtherAction, setPath, setPathFromString, setRepoName, setResolveType, setResolveTypes, setSha, setShelvedChange, setStartFromRev, setStartRevision, setStartToRev, setStatusMessage, setSyncTime, setToFile, setTreeSha, setUnmap, setUserName, setWorkRev, toStringMethods inherited from class com.perforce.p4java.impl.generic.core.ServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, parseDate, refresh, setRawField, setRawFields, setRefreshable, setServer, toDateString, update, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.perforce.p4java.core.file.IFileOperationResult
getGenericCode, getOpStatus, getRawCode, getSeverityCode, getStatusMessage, getSubCode, getSubSystem, getUniqueCodeMethods inherited from interface com.perforce.p4java.core.file.IFileSpec
getAction, getAnnotatedPathString, getAnnotatedPreferredPathString, getAnnotations, getAnnotations, getBaseFile, getBaseName, getBaseRev, getBlobSha, getBranch, getChangelistId, getClientName, getClientPath, getClientPathString, getCommitSha, getContentResolveType, getContents, getContents, getDate, getDepotPath, getDepotPathString, getDiffStatus, getEndFromRev, getEndRevision, getEndToRev, getFileType, getFromFile, getHowResolved, getLabel, getLocalPath, getLocalPathString, getOriginalPath, getOriginalPathString, getOtherAction, getPath, getPathString, getPreferredPath, getPreferredPathString, getRepoName, getResolveType, getResolveTypes, getRevisionHistory, getRevisionHistory, getSha, getShelvedChange, getStartFromRev, getStartRevision, getStartToRev, getSyncTime, getToFile, getTreeSha, getUserName, getWorkRev, isLocked, isUnmap, move, move, setAction, setBaseFile, setBaseName, setBaseRev, setBlobSha, setBranch, setChangelistId, setClientName, setClientPath, setCommitSha, setContentResolveType, setDate, setDepotPath, setDiffStatus, setEndFromRev, setEndRevision, setEndToRev, setFileType, setFromFile, setHowResolved, setLabel, setLocalPath, setLocked, setOriginalPath, setOtherAction, setPath, setPathFromString, setRepoName, setResolveType, setResolveTypes, setSha, setShelvedChange, setStartFromRev, setStartRevision, setStartToRev, setSyncTime, setToFile, setTreeSha, setUnmap, setUserName, setWorkRev, toStringMethods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, refresh, setRawField, setRawFields, setServer, update, update, update
-
Constructor Details
-
ExtendedFileSpec
public ExtendedFileSpec()Default constructor. Sets all boolean fields to false, object fields to null, integers to zero. -
ExtendedFileSpec
Given a candidate path string (which may include version and changelist annotations, at least), try to construct a corresponding extended file spec.See the corresponding FileSpec constructor for details -- this constructor does not add any ExtendedFileSpec-specific semantics.
- Parameters:
pathStr- candidate path string
-
ExtendedFileSpec
Construct an ExtendedFileSpec object from a status, message string pair. See the corresponding FileSpec constructor for details -- this constructor does not add any ExtendedFileSpec-specific semantics.- Parameters:
status- FileSpecOpStatus status.errStr- error / info message string.
-
ExtendedFileSpec
Construct an ExtendedFileSpec object from the passed-in map. The map must be (or have the same keys and semantics as) a map as returned from a suitable Perforce server call; the semantics and format of this map are not spelled out here.- Parameters:
map- suitable field map from Perforce server; if null, this constructor has the same semantics as the default constructor.server- non-null server object
-
ExtendedFileSpec
-
ExtendedFileSpec
-
ExtendedFileSpec
Construct an ExtendedFileSpec object from a status, message string, generic code, severity code tuple. See the corresponding FileSpec constructor for details -- this constructor does not add any ExtendedFileSpec-specific semantics.- Parameters:
status- FileSpecOpStatus status.errStr- error / info message string.genericCode- Perforce generic code to useseverityCode- Perforce severity code to use.
-
-
Method Details
-
getActionOwner
- Specified by:
getActionOwnerin interfaceIExtendedFileSpec
-
setActionOwner
- Specified by:
setActionOwnerin interfaceIExtendedFileSpec
-
getAttributeTypes
-
getAttributes
Description copied from interface:IExtendedFileSpecGet the file attributes of this file, if they're available. Attributes will only be available if getExtendedFiles was called with the correct FileStatAncilliaryOptions settings; see the main Perforce file attribute documentation. Attributes are treated by the Perforce server as bytes (they're commonly used to store raw data such as thumbnails); it is up to the consumer to determine the "real" type and convert as appropriate.- Specified by:
getAttributesin interfaceIExtendedFileSpec- Returns:
- non-null but possibly-empty map of file attributes keyed by attribute name. Individual attribute values may be null.
-
getCharset
- Specified by:
getCharsetin interfaceIExtendedFileSpec
-
setCharset
- Specified by:
setCharsetin interfaceIExtendedFileSpec
-
getDesc
- Specified by:
getDescin interfaceIExtendedFileSpec
-
setDesc
- Specified by:
setDescin interfaceIExtendedFileSpec
-
getDigest
- Specified by:
getDigestin interfaceIExtendedFileSpec
-
setDigest
- Specified by:
setDigestin interfaceIExtendedFileSpec
-
getFileSize
public long getFileSize()- Specified by:
getFileSizein interfaceIExtendedFileSpec
-
setFileSize
public void setFileSize(long fileSize) - Specified by:
setFileSizein interfaceIExtendedFileSpec
-
getHaveRev
public int getHaveRev()- Specified by:
getHaveRevin interfaceIExtendedFileSpec
-
setHaveRev
public void setHaveRev(int haveRev) - Specified by:
setHaveRevin interfaceIExtendedFileSpec
-
getHeadAction
- Specified by:
getHeadActionin interfaceIExtendedFileSpec
-
setHeadAction
- Specified by:
setHeadActionin interfaceIExtendedFileSpec
-
getHeadChange
public int getHeadChange()- Specified by:
getHeadChangein interfaceIExtendedFileSpec
-
setHeadChange
public void setHeadChange(int headChange) - Specified by:
setHeadChangein interfaceIExtendedFileSpec
-
getHeadCharset
- Specified by:
getHeadCharsetin interfaceIExtendedFileSpec
-
setHeadCharset
- Specified by:
setHeadCharsetin interfaceIExtendedFileSpec
-
getHeadModTime
- Specified by:
getHeadModTimein interfaceIExtendedFileSpec
-
setHeadModTime
- Specified by:
setHeadModTimein interfaceIExtendedFileSpec
-
getHeadRev
public int getHeadRev()- Specified by:
getHeadRevin interfaceIExtendedFileSpec
-
setHeadRev
public void setHeadRev(int headRev) - Specified by:
setHeadRevin interfaceIExtendedFileSpec
-
getHeadTime
- Specified by:
getHeadTimein interfaceIExtendedFileSpec
-
setHeadTime
- Specified by:
setHeadTimein interfaceIExtendedFileSpec
-
getHeadType
- Specified by:
getHeadTypein interfaceIExtendedFileSpec
-
setHeadType
- Specified by:
setHeadTypein interfaceIExtendedFileSpec
-
getMovedFile
- Specified by:
getMovedFilein interfaceIExtendedFileSpec
-
setMovedFile
- Specified by:
setMovedFilein interfaceIExtendedFileSpec
-
getOpenAction
- Specified by:
getOpenActionin interfaceIExtendedFileSpec
-
setOpenAction
- Specified by:
setOpenActionin interfaceIExtendedFileSpec
-
getOpenActionOwner
- Specified by:
getOpenActionOwnerin interfaceIExtendedFileSpec
-
setOpenActionOwner
- Specified by:
setOpenActionOwnerin interfaceIExtendedFileSpec
-
getOpenChangelistId
public int getOpenChangelistId()- Specified by:
getOpenChangelistIdin interfaceIExtendedFileSpec
-
setOpenChangelistId
public void setOpenChangelistId(int openChangelistId) - Specified by:
setOpenChangelistIdin interfaceIExtendedFileSpec
-
getOpenType
- Specified by:
getOpenTypein interfaceIExtendedFileSpec
-
setOpenType
- Specified by:
setOpenTypein interfaceIExtendedFileSpec
-
getOtherActionList
- Specified by:
getOtherActionListin interfaceIExtendedFileSpec
-
setOtherActionList
- Specified by:
setOtherActionListin interfaceIExtendedFileSpec
-
getOtherChangelist
- Specified by:
getOtherChangelistin interfaceIExtendedFileSpec
-
setOtherChangelist
- Specified by:
setOtherChangelistin interfaceIExtendedFileSpec
-
getOtherOpenList
- Specified by:
getOtherOpenListin interfaceIExtendedFileSpec
-
setOtherOpenList
- Specified by:
setOtherOpenListin interfaceIExtendedFileSpec
-
getPropagatingAttributes
-
getResolveRecords
- Specified by:
getResolveRecordsin interfaceIExtendedFileSpec
-
setResolveRecords
- Specified by:
setResolveRecordsin interfaceIExtendedFileSpec
-
getVerifyStatus
- Specified by:
getVerifyStatusin interfaceIExtendedFileSpec
-
setVerifyStatus
- Specified by:
setVerifyStatusin interfaceIExtendedFileSpec
-
isMapped
public boolean isMapped()- Specified by:
isMappedin interfaceIExtendedFileSpec
-
setMapped
public void setMapped(boolean mapped) - Specified by:
setMappedin interfaceIExtendedFileSpec
-
isOtherLocked
public boolean isOtherLocked()- Specified by:
isOtherLockedin interfaceIExtendedFileSpec
-
setOtherLocked
public void setOtherLocked(boolean otherLocked) - Specified by:
setOtherLockedin interfaceIExtendedFileSpec
-
isReresolvable
public boolean isReresolvable()- Specified by:
isReresolvablein interfaceIExtendedFileSpec
-
setReresolvable
public void setReresolvable(boolean reresolvable) - Specified by:
setReresolvablein interfaceIExtendedFileSpec
-
isResolved
public boolean isResolved()- Specified by:
isResolvedin interfaceIExtendedFileSpec
-
setResolved
public void setResolved(boolean resolved) - Specified by:
setResolvedin interfaceIExtendedFileSpec
-
isShelved
public boolean isShelved()- Specified by:
isShelvedin interfaceIExtendedFileSpec
-
isUnresolved
public boolean isUnresolved()- Specified by:
isUnresolvedin interfaceIExtendedFileSpec
-
setUnresolved
public void setUnresolved(boolean unresolved) - Specified by:
setUnresolvedin interfaceIExtendedFileSpec
-
setEntry
- Specified by:
setEntryin interfaceIExtendedFileSpec
-