org.netbeans.modules.queries/1 1.28

org.netbeans.api.queries
Class SharabilityQuery

java.lang.Object
  extended by org.netbeans.api.queries.SharabilityQuery

public final class SharabilityQuery
extends Object

Determine whether files should be shared (for example in a VCS) or are intended to be unshared. Likely to be of use only to a VCS filesystem.

This query can be considered to obsolete FileObject.setImportant(boolean). Unlike that method, the information is pulled by the VCS filesystem on demand, which may be more reliable than ensuring that the information is pushed by a project type (or other implementor) eagerly.

See Also:
SharabilityQueryImplementation2

Nested Class Summary
static class SharabilityQuery.Sharability
          Sharability constants.
 
Field Summary
static int MIXED
          Deprecated. Use SharabilityQuery.Sharability.MIXED instead.
static int NOT_SHARABLE
          Deprecated. Use SharabilityQuery.Sharability.NOT_SHARABLE instead.
static int SHARABLE
          Deprecated. Use SharabilityQuery.Sharability.SHARABLE instead.
static int UNKNOWN
          Deprecated. Use SharabilityQuery.Sharability.UNKNOWN instead.
 
Method Summary
static int getSharability(File file)
          Deprecated. Use getSharability(java.net.URI) instead.
static SharabilityQuery.Sharability getSharability(FileObject fo)
          Check whether an existing file is sharable.
static SharabilityQuery.Sharability getSharability(URI uri)
          Check whether an existing file is sharable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

@Deprecated
public static final int UNKNOWN
Deprecated. Use SharabilityQuery.Sharability.UNKNOWN instead.
Constant indicating that nothing is known about whether a given file should be considered sharable or not. A client should therefore behave in the safest way it can.

See Also:
Constant Field Values

SHARABLE

@Deprecated
public static final int SHARABLE
Deprecated. Use SharabilityQuery.Sharability.SHARABLE instead.
Constant indicating that the file or directory is sharable. In the case of a directory, this means that all files and directories recursively contained in this directory are also sharable.

See Also:
Constant Field Values

NOT_SHARABLE

@Deprecated
public static final int NOT_SHARABLE
Deprecated. Use SharabilityQuery.Sharability.NOT_SHARABLE instead.
Constant indicating that the file or directory is not sharable. In the case of a directory, this means that all files and directories recursively contained in this directory are also not sharable.

See Also:
Constant Field Values

MIXED

@Deprecated
public static final int MIXED
Deprecated. Use SharabilityQuery.Sharability.MIXED instead.
Constant indicating that a directory is sharable but files and directories recursively contained in it may or may not be sharable. A client interested in children of this directory should explicitly ask about each in turn.

See Also:
Constant Field Values
Method Detail

getSharability

@Deprecated
public static int getSharability(File file)
Deprecated. Use getSharability(java.net.URI) instead.

Check whether an existing file is sharable.

Parameters:
file - a file or directory (may or may not already exist); should be normalized
Returns:
an answer or UNKNOWN

getSharability

public static SharabilityQuery.Sharability getSharability(URI uri)
Check whether an existing file is sharable.

Parameters:
uri - a file or directory (may or may not already exist); should be normalized.
Returns:
an answer or UNKNOWN
Since:
1.27

getSharability

public static SharabilityQuery.Sharability getSharability(FileObject fo)
Check whether an existing file is sharable.

Parameters:
fo - a file or directory; should be normalized.
Returns:
an answer or UNKNOWN
Since:
1.27

org.netbeans.modules.queries/1 1.28

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.