public enum Location extends java.lang.Enum<Location>
Enum Constant and Description |
---|
EXTERNAL
The item is stored externally.
|
OFFLINE
The item is offline and doesn't use any quota.
|
PRIMARY
The item is stored in primary storage.
|
SECONDARY
The item is stored in secondary storage.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
displayValue
Returned by the toString method.
|
private boolean |
downloadable
If the file can be downloaded from this location.
|
private boolean |
quotaLimited
If this location is limited by quota.
|
private int |
value
The integer value of this location.
|
private static java.util.Map<java.lang.Integer,Location> |
valueMapping
Maps an integer to a location.
|
Modifier and Type | Method and Description |
---|---|
static Location |
fromValue(int value)
Get the
Location object when you know the integer code. |
int |
getValue()
Get the integer value that is used when storing an location to the database.
|
boolean |
isDownloadable()
A flag indicating if a file that is stored at this location can
be downloaded by a call to
File.getDownloadStream(long)
or File.download(java.io.OutputStream, long) . |
boolean |
isQuotaLimited()
A flag indicating if a file that is stored at this location
should be included in quota limit.
|
java.lang.String |
toString() |
static Location |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Location[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Location OFFLINE
public static final Location PRIMARY
public static final Location SECONDARY
public static final Location EXTERNAL
private static final java.util.Map<java.lang.Integer,Location> valueMapping
private final int value
private final java.lang.String displayValue
private final boolean downloadable
private final boolean quotaLimited
public static Location[] values()
for (Location c : Location.values()) System.out.println(c);
public static Location valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<Location>
public static Location fromValue(int value)
Location
object when you know the integer code.value
- The integer value.public int getValue()
public boolean isDownloadable()
File.getDownloadStream(long)
or File.download(java.io.OutputStream, long)
.public boolean isQuotaLimited()