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
public class ExtendedFileSpec extends FileSpec implements IExtendedFileSpec
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, userName
-
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable
-
Fields 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
Constructors Constructor Description ExtendedFileSpec()
Default constructor.ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr)
Construct an ExtendedFileSpec object from a status, message string pair.ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr, int rawCode)
ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr, int genericCode, int severityCode)
Construct an ExtendedFileSpec object from a status, message string, generic code, severity code tuple.ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr, java.lang.String errCodeStr)
ExtendedFileSpec(java.lang.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(java.util.Map<java.lang.String,java.lang.Object> map, IServer server)
Construct an ExtendedFileSpec object from the passed-in map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getActionOwner()
java.util.Map<java.lang.String,byte[]>
getAttributes()
Get the file attributes of this file, if they're available.java.util.Map<java.lang.String,byte[]>
getAttributeTypes()
java.lang.String
getCharset()
java.lang.String
getDesc()
java.lang.String
getDigest()
long
getFileSize()
int
getHaveRev()
FileAction
getHeadAction()
int
getHeadChange()
java.lang.String
getHeadCharset()
java.util.Date
getHeadModTime()
int
getHeadRev()
java.util.Date
getHeadTime()
java.lang.String
getHeadType()
java.lang.String
getMovedFile()
FileAction
getOpenAction()
java.lang.String
getOpenActionOwner()
int
getOpenChangelistId()
java.lang.String
getOpenType()
java.util.List<java.lang.String>
getOtherActionList()
java.util.List<java.lang.String>
getOtherChangelist()
java.util.List<java.lang.String>
getOtherOpenList()
java.util.Map<java.lang.String,byte[]>
getPropagatingAttributes()
java.util.List<IResolveRecord>
getResolveRecords()
java.lang.String
getVerifyStatus()
boolean
isMapped()
boolean
isOtherLocked()
boolean
isReresolvable()
boolean
isResolved()
boolean
isShelved()
boolean
isUnresolved()
void
setActionOwner(java.lang.String actionOwner)
void
setCharset(java.lang.String charset)
void
setDesc(java.lang.String desc)
void
setDigest(java.lang.String digest)
void
setEntry(java.lang.String tag, java.lang.String value)
void
setFileSize(long fileSize)
void
setHaveRev(int haveRev)
void
setHeadAction(FileAction headAction)
void
setHeadChange(int headChange)
void
setHeadCharset(java.lang.String headCharset)
void
setHeadModTime(java.util.Date headModTime)
void
setHeadRev(int headRev)
void
setHeadTime(java.util.Date headTime)
void
setHeadType(java.lang.String headType)
void
setMapped(boolean mapped)
void
setMovedFile(java.lang.String movedFile)
void
setOpenAction(FileAction openAction)
void
setOpenActionOwner(java.lang.String openActionOwner)
void
setOpenChangelistId(int openChangelistId)
void
setOpenType(java.lang.String openType)
void
setOtherActionList(java.util.List<java.lang.String> otherActionList)
void
setOtherChangelist(java.util.List<java.lang.String> otherChangelist)
void
setOtherLocked(boolean otherLocked)
void
setOtherOpenList(java.util.List<java.lang.String> otherOpenList)
void
setReresolvable(boolean reresolvable)
void
setResolved(boolean resolved)
void
setResolveRecords(java.util.List<IResolveRecord> resolveRecords)
void
setUnresolved(boolean unresolved)
void
setVerifyStatus(java.lang.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, toString
-
Methods 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, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.perforce.p4java.core.file.IFileOperationResult
getGenericCode, getOpStatus, getRawCode, getSeverityCode, getStatusMessage, getSubCode, getSubSystem, getUniqueCode
-
Methods 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, toString
-
Methods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, refresh, setRawField, setRawFields, setServer, update, update, update
-
-
-
-
Constructor Detail
-
ExtendedFileSpec
public ExtendedFileSpec()
Default constructor. Sets all boolean fields to false, object fields to null, integers to zero.
-
ExtendedFileSpec
public ExtendedFileSpec(java.lang.String pathStr)
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
public ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr)
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
public ExtendedFileSpec(java.util.Map<java.lang.String,java.lang.Object> map, IServer server)
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
public ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr, java.lang.String errCodeStr)
-
ExtendedFileSpec
public ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr, int rawCode)
-
ExtendedFileSpec
public ExtendedFileSpec(FileSpecOpStatus status, java.lang.String errStr, int genericCode, int severityCode)
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 Detail
-
getActionOwner
public java.lang.String getActionOwner()
- Specified by:
getActionOwner
in interfaceIExtendedFileSpec
-
setActionOwner
public void setActionOwner(java.lang.String actionOwner)
- Specified by:
setActionOwner
in interfaceIExtendedFileSpec
-
getAttributeTypes
public java.util.Map<java.lang.String,byte[]> getAttributeTypes()
-
getAttributes
public java.util.Map<java.lang.String,byte[]> getAttributes()
Description copied from interface:IExtendedFileSpec
Get 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:
getAttributes
in interfaceIExtendedFileSpec
- Returns:
- non-null but possibly-empty map of file attributes keyed by attribute name. Individual attribute values may be null.
-
getCharset
public java.lang.String getCharset()
- Specified by:
getCharset
in interfaceIExtendedFileSpec
-
setCharset
public void setCharset(java.lang.String charset)
- Specified by:
setCharset
in interfaceIExtendedFileSpec
-
getDesc
public java.lang.String getDesc()
- Specified by:
getDesc
in interfaceIExtendedFileSpec
-
setDesc
public void setDesc(java.lang.String desc)
- Specified by:
setDesc
in interfaceIExtendedFileSpec
-
getDigest
public java.lang.String getDigest()
- Specified by:
getDigest
in interfaceIExtendedFileSpec
-
setDigest
public void setDigest(java.lang.String digest)
- Specified by:
setDigest
in interfaceIExtendedFileSpec
-
getFileSize
public long getFileSize()
- Specified by:
getFileSize
in interfaceIExtendedFileSpec
-
setFileSize
public void setFileSize(long fileSize)
- Specified by:
setFileSize
in interfaceIExtendedFileSpec
-
getHaveRev
public int getHaveRev()
- Specified by:
getHaveRev
in interfaceIExtendedFileSpec
-
setHaveRev
public void setHaveRev(int haveRev)
- Specified by:
setHaveRev
in interfaceIExtendedFileSpec
-
getHeadAction
public FileAction getHeadAction()
- Specified by:
getHeadAction
in interfaceIExtendedFileSpec
-
setHeadAction
public void setHeadAction(FileAction headAction)
- Specified by:
setHeadAction
in interfaceIExtendedFileSpec
-
getHeadChange
public int getHeadChange()
- Specified by:
getHeadChange
in interfaceIExtendedFileSpec
-
setHeadChange
public void setHeadChange(int headChange)
- Specified by:
setHeadChange
in interfaceIExtendedFileSpec
-
getHeadCharset
public java.lang.String getHeadCharset()
- Specified by:
getHeadCharset
in interfaceIExtendedFileSpec
-
setHeadCharset
public void setHeadCharset(java.lang.String headCharset)
- Specified by:
setHeadCharset
in interfaceIExtendedFileSpec
-
getHeadModTime
public java.util.Date getHeadModTime()
- Specified by:
getHeadModTime
in interfaceIExtendedFileSpec
-
setHeadModTime
public void setHeadModTime(java.util.Date headModTime)
- Specified by:
setHeadModTime
in interfaceIExtendedFileSpec
-
getHeadRev
public int getHeadRev()
- Specified by:
getHeadRev
in interfaceIExtendedFileSpec
-
setHeadRev
public void setHeadRev(int headRev)
- Specified by:
setHeadRev
in interfaceIExtendedFileSpec
-
getHeadTime
public java.util.Date getHeadTime()
- Specified by:
getHeadTime
in interfaceIExtendedFileSpec
-
setHeadTime
public void setHeadTime(java.util.Date headTime)
- Specified by:
setHeadTime
in interfaceIExtendedFileSpec
-
getHeadType
public java.lang.String getHeadType()
- Specified by:
getHeadType
in interfaceIExtendedFileSpec
-
setHeadType
public void setHeadType(java.lang.String headType)
- Specified by:
setHeadType
in interfaceIExtendedFileSpec
-
getMovedFile
public java.lang.String getMovedFile()
- Specified by:
getMovedFile
in interfaceIExtendedFileSpec
-
setMovedFile
public void setMovedFile(java.lang.String movedFile)
- Specified by:
setMovedFile
in interfaceIExtendedFileSpec
-
getOpenAction
public FileAction getOpenAction()
- Specified by:
getOpenAction
in interfaceIExtendedFileSpec
-
setOpenAction
public void setOpenAction(FileAction openAction)
- Specified by:
setOpenAction
in interfaceIExtendedFileSpec
-
getOpenActionOwner
public java.lang.String getOpenActionOwner()
- Specified by:
getOpenActionOwner
in interfaceIExtendedFileSpec
-
setOpenActionOwner
public void setOpenActionOwner(java.lang.String openActionOwner)
- Specified by:
setOpenActionOwner
in interfaceIExtendedFileSpec
-
getOpenChangelistId
public int getOpenChangelistId()
- Specified by:
getOpenChangelistId
in interfaceIExtendedFileSpec
-
setOpenChangelistId
public void setOpenChangelistId(int openChangelistId)
- Specified by:
setOpenChangelistId
in interfaceIExtendedFileSpec
-
getOpenType
public java.lang.String getOpenType()
- Specified by:
getOpenType
in interfaceIExtendedFileSpec
-
setOpenType
public void setOpenType(java.lang.String openType)
- Specified by:
setOpenType
in interfaceIExtendedFileSpec
-
getOtherActionList
public java.util.List<java.lang.String> getOtherActionList()
- Specified by:
getOtherActionList
in interfaceIExtendedFileSpec
-
setOtherActionList
public void setOtherActionList(java.util.List<java.lang.String> otherActionList)
- Specified by:
setOtherActionList
in interfaceIExtendedFileSpec
-
getOtherChangelist
public java.util.List<java.lang.String> getOtherChangelist()
- Specified by:
getOtherChangelist
in interfaceIExtendedFileSpec
-
setOtherChangelist
public void setOtherChangelist(java.util.List<java.lang.String> otherChangelist)
- Specified by:
setOtherChangelist
in interfaceIExtendedFileSpec
-
getOtherOpenList
public java.util.List<java.lang.String> getOtherOpenList()
- Specified by:
getOtherOpenList
in interfaceIExtendedFileSpec
-
setOtherOpenList
public void setOtherOpenList(java.util.List<java.lang.String> otherOpenList)
- Specified by:
setOtherOpenList
in interfaceIExtendedFileSpec
-
getPropagatingAttributes
public java.util.Map<java.lang.String,byte[]> getPropagatingAttributes()
-
getResolveRecords
public java.util.List<IResolveRecord> getResolveRecords()
- Specified by:
getResolveRecords
in interfaceIExtendedFileSpec
-
setResolveRecords
public void setResolveRecords(java.util.List<IResolveRecord> resolveRecords)
- Specified by:
setResolveRecords
in interfaceIExtendedFileSpec
-
getVerifyStatus
public java.lang.String getVerifyStatus()
- Specified by:
getVerifyStatus
in interfaceIExtendedFileSpec
-
setVerifyStatus
public void setVerifyStatus(java.lang.String verifyStatus)
- Specified by:
setVerifyStatus
in interfaceIExtendedFileSpec
-
isMapped
public boolean isMapped()
- Specified by:
isMapped
in interfaceIExtendedFileSpec
-
setMapped
public void setMapped(boolean mapped)
- Specified by:
setMapped
in interfaceIExtendedFileSpec
-
isOtherLocked
public boolean isOtherLocked()
- Specified by:
isOtherLocked
in interfaceIExtendedFileSpec
-
setOtherLocked
public void setOtherLocked(boolean otherLocked)
- Specified by:
setOtherLocked
in interfaceIExtendedFileSpec
-
isReresolvable
public boolean isReresolvable()
- Specified by:
isReresolvable
in interfaceIExtendedFileSpec
-
setReresolvable
public void setReresolvable(boolean reresolvable)
- Specified by:
setReresolvable
in interfaceIExtendedFileSpec
-
isResolved
public boolean isResolved()
- Specified by:
isResolved
in interfaceIExtendedFileSpec
-
setResolved
public void setResolved(boolean resolved)
- Specified by:
setResolved
in interfaceIExtendedFileSpec
-
isShelved
public boolean isShelved()
- Specified by:
isShelved
in interfaceIExtendedFileSpec
-
isUnresolved
public boolean isUnresolved()
- Specified by:
isUnresolved
in interfaceIExtendedFileSpec
-
setUnresolved
public void setUnresolved(boolean unresolved)
- Specified by:
setUnresolved
in interfaceIExtendedFileSpec
-
setEntry
public void setEntry(java.lang.String tag, java.lang.String value)
- Specified by:
setEntry
in interfaceIExtendedFileSpec
-
-