|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.modules.vcscore.turbo.FileProperties
Additional metadata for files in versioning system working directory.
It defines a bunch of properties. All clients that
create instance must fill it consistently, setting values
or null
-ing them if the client does
not have current value. Clients can also use
clone constructor and update just changed values
(inlucing null
-ing them.)
e.g. cvs up
U folder/file
command knows that the file was updated but it does
not know recent revision. It updates status and null
s
revision.
The object is treated as immutable for most of its lifetime, once
initialized creator must invoke freeze()
to assure it.
Note: FileAttributeProvider
s
must report all statuses including local/non-versioned ones. It differs
from FileReaderListener
events
sources (LIST) that must not report local/non-versioned statuses. Mentioning
here because in typical setup FileProperties
provider and LIST provider is implemented by one package. It puts
extra:
FileAttributeProvider
consistency for versioned files and
FileAttributeProvider
and framework consistency for local files
Field Summary | |
static String |
ID
Attribute holding this object. |
Constructor Summary | |
FileProperties()
|
|
FileProperties(FileProperties fprops)
Clones FileProperties except retrieval time. |
|
FileProperties(String[] elements)
Constructs from StatusFormatElements. |
Method Summary | |
static FileProperties |
createLocal(FileObject fileObject)
Creates file properties with LOCAL or IGNORED status for given file. |
static FileProperties |
createLocal(String name)
Creates file properties with LOCAL status for given file. |
void |
freeze()
Make object immutable, all setters throw exception. |
String |
getAttr()
VCS specific additonal attributes (e.g CVS -kb) or null for unknown. |
String |
getDate()
Returns recent VCS specifics date string or null for unknown. |
String |
getFileName()
Gets file name. |
String |
getLocker()
What VCS specifics user holds lock on the file. |
String |
getName()
Gets file name. |
long |
getRetrieval()
Keeps time when updated from repository. |
String |
getRevision()
Returns recent VCS specifics revision string (e.g. |
long |
getSize()
Returns recent file size or -1 for unknown. |
String |
getSizeAsString()
|
String |
getStatus()
Status as provided by VCS repository or LOCAL, IGNORED or UNKNOWN assigned by cache. |
static String |
getStatus(FileProperties fprops)
Get versioning system specifics status, "Yet-Unknown" for unknown and "Local" or "Ignored" for local files (defined in Statuses ). |
String |
getSticky()
Returns recent VCS specifics sticky string (branch/date) or null for unknown. |
String |
getTime()
Returns recent VCS specifics time string or null for unknown. |
boolean |
isLocal()
Determines whether reported status means that file is not versioned. |
void |
setAttr(String attr)
|
void |
setDate(String date)
|
void |
setLocker(String locker)
|
void |
setName(String name)
Sets file name. |
void |
setRetrieval(long retrieval)
|
void |
setRevision(String revision)
|
void |
setSize(long size)
|
void |
setStatus(String status)
Sets new status. |
void |
setSticky(String sticky)
|
void |
setTime(String time)
|
String[] |
toElements()
Converts to format accepted by StatusFormat |
String |
toString()
For debugging purposes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String ID
Constructor Detail |
public FileProperties()
public FileProperties(FileProperties fprops)
public FileProperties(String[] elements)
Method Detail |
public static FileProperties createLocal(String name)
createLocal(FileObject)
.
name
- name of file (without path), trailing '/' denotes folderpublic static FileProperties createLocal(FileObject fileObject)
fileObject
- target filepublic String getStatus()
public void setStatus(String status)
class
Javadoc.
status
- updates status or null
public long getRetrieval()
public void setRetrieval(long retrieval)
public String getName()
public String getFileName()
public void setName(String name)
public String getRevision()
null
for unknown.
public void setRevision(String revision)
public String getSticky()
null
for unknown.
public void setSticky(String sticky)
public String getAttr()
null
for unknown.
public void setAttr(String attr)
public String getDate()
null
for unknown.
public void setDate(String date)
public String getTime()
null
for unknown.
public void setTime(String time)
public long getSize()
-1
for unknown.
public String getSizeAsString()
public void setSize(long size)
public boolean isLocal()
public void freeze()
public String getLocker()
null
for unknown.
public void setLocker(String locker)
public static String getStatus(FileProperties fprops)
Statuses
).
fprops
- propeties or null
public String[] toElements()
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |