|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.filesystems.DefaultAttributes org.netbeans.modules.masterfs.providers.Attributes org.netbeans.modules.vcscore.VcsAttributes
Implementation of file attributes for version control systems. All attributes read/write operations are delegated to the DefaultAttributes, whith the exception of VCS-related attributes. These special attributes are not propagated to the DefaultAttributes, but are interpreted as VCS commands.
Field Summary | |
static String |
FILE_ATTRIBUTE
The name of attribute, that contains the java.io.File object for the given FileObject |
static String |
RUNTIME_PROVIDER
|
static String |
VCS_ACTION
Attribute name for a VCS action. |
static String |
VCS_ACTION_ADD
The VCS Add command name. |
static String |
VCS_ACTION_DESCRIPTION
The description to the action. |
static String |
VCS_ACTION_DONE
This attribute is set when the action is done. |
static String |
VCS_ACTION_REMOVE
The VCS Remove command name. |
static String |
VCS_NATIVE_FILEOBJECT
Name of attribute that contains VcsFilesystem fileobject or null . |
static String |
VCS_NATIVE_FS
Name of the attribute that contains the instance of the vcs filesystem that the fileobject belongs to. |
static String |
VCS_NATIVE_PACKAGE_NAME_EXT
Name of the attribute that contains path of the fileobject within the versioning filesystem. |
static String |
VCS_REFRESH
Attribute name for the refresh action on a VCS filesystem. |
static String |
VCS_SCHEDULED_FILE_ATTR
The attribute name marking the file as scheduled for later processing. |
static String |
VCS_SCHEDULED_FILES_ATTR
The attribute name where scheduled files are stored. |
static String |
VCS_SCHEDULING_ADD
The scheduling VCS Add action name. |
static String |
VCS_SCHEDULING_MASTER_FILE_NAME_ATTR
The attribute name containing the java.io.File name of the primary file, that contains scheduled files. |
static String |
VCS_SCHEDULING_REMOVE
The scheduling VCS Remove action name. |
static String |
VCS_SCHEDULING_SECONDARY_FO_ACTION
Attribute name for a VCS action, that schedules the VCS operation for later processing. |
static String |
VCS_STATUS
Read the attribute of this name to obtain the VCS file status. |
static String |
VCS_STATUS_LOCAL
The status, that is returned from readAttribute for files,
that are not version controlled. |
static String |
VCS_STATUS_MISSING
The status, that is returned from readAttribute for files,
that are present in VCS repository, but do not exist locally. |
static String |
VCS_STATUS_UNKNOWN
The status, that is returned from readAttribute for files,
that are not recognized. |
static String |
VCS_STATUS_UP_TO_DATE
The status, that is returned from readAttribute for files,
that are version controlled and are present locally. |
Fields inherited from class org.netbeans.modules.masterfs.providers.Attributes |
ATTRNAME |
Fields inherited from class org.openide.filesystems.DefaultAttributes |
ATTR_EXT, ATTR_NAME, ATTR_NAME_EXT |
Constructor Summary | |
VcsAttributes(File mountPoint,
AbstractFileSystem.Info info,
AbstractFileSystem.Change change,
AbstractFileSystem.List list,
VcsFileSystem fileSystem,
VcsActionSupporter supp)
Creates new VcsAttributes |
Method Summary | |
VcsCommandsProvider |
getCommandsProvider()
|
VcsActionSupporter |
getCurrentSupporter()
|
org.netbeans.modules.vcscore.runtime.RuntimeCommandsProvider |
getRuntimeCommandsProvider()
|
Object |
readAttribute(String name,
String attrName)
Get the file attribute with the specified name. |
void |
setCommandsProvider(VcsCommandsProvider commandsProvider)
|
void |
setCurrentSupporter(VcsActionSupporter supporter)
|
void |
setRuntimeCommandsProvider(org.netbeans.modules.vcscore.runtime.RuntimeCommandsProvider provider)
|
void |
writeAttribute(String name,
String attrName,
Object value)
Set the file attribute with the specified name. |
Methods inherited from class org.netbeans.modules.masterfs.providers.Attributes |
attributes, children, deleteAttributes, getRootForAttributes, renameAttributes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String FILE_ATTRIBUTE
public static final String VCS_NATIVE_FS
public static final String VCS_NATIVE_PACKAGE_NAME_EXT
public static final String VCS_NATIVE_FILEOBJECT
null
.
It's typical use case is a wormhole through MasterFileSystem
.
It's read-only attribute.
public static final String RUNTIME_PROVIDER
public static final String VCS_ACTION
public static final String VCS_REFRESH
public static final String VCS_SCHEDULING_SECONDARY_FO_ACTION
public static final String VCS_SCHEDULING_ADD
public static final String VCS_SCHEDULING_REMOVE
public static final String VCS_SCHEDULED_FILES_ATTR
public static final String VCS_SCHEDULED_FILE_ATTR
VCS_SCHEDULING_ADD
or VCS_SCHEDULING_REMOVE
.
public static final String VCS_SCHEDULING_MASTER_FILE_NAME_ATTR
public static final String VCS_ACTION_ADD
public static final String VCS_ACTION_REMOVE
public static final String VCS_ACTION_DONE
public static final String VCS_ACTION_DESCRIPTION
public static String VCS_STATUS
public static String VCS_STATUS_LOCAL
readAttribute
for files,
that are not version controlled.
public static String VCS_STATUS_MISSING
readAttribute
for files,
that are present in VCS repository, but do not exist locally.
public static String VCS_STATUS_UP_TO_DATE
readAttribute
for files,
that are version controlled and are present locally.
public static String VCS_STATUS_UNKNOWN
readAttribute
for files,
that are not recognized. We can not say whether they are version controlled
or not.
Constructor Detail |
public VcsAttributes(File mountPoint, AbstractFileSystem.Info info, AbstractFileSystem.Change change, AbstractFileSystem.List list, VcsFileSystem fileSystem, VcsActionSupporter supp)
Method Detail |
public VcsActionSupporter getCurrentSupporter()
public void setCurrentSupporter(VcsActionSupporter supporter)
public VcsCommandsProvider getCommandsProvider()
public void setCommandsProvider(VcsCommandsProvider commandsProvider)
public org.netbeans.modules.vcscore.runtime.RuntimeCommandsProvider getRuntimeCommandsProvider()
public void setRuntimeCommandsProvider(org.netbeans.modules.vcscore.runtime.RuntimeCommandsProvider provider)
public Object readAttribute(String name, String attrName)
name
- the file nameattrName
- name of the attribute
VCS_STATUS
, then the VCS status
of the file is returned.public void writeAttribute(String name, String attrName, Object value) throws IOException, UnknownServiceException
VCS_ACTION
,
and the value is an instance of FeatureDescriptor, then it's not set as file attribute,
but is interpreted as a VCS command. The name of the command is taken from
value.getName() and commands options from attributes of that feature descriptor.
name
- the file nameattrName
- name of the attributevalue
- new value or null to clear the attribute. Must be serializable,
with the exception of VCS command attribute.
IOException
- if the attribute cannot be set. If serialization is
used to store it, this may in fact be a subclass such
as NotSerializableException.
UnknownServiceException
- if the requested VCS action is not provided.
A subclass of IOException was chosen, since
FileObject.setAttribute throws IOException.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |