|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.BasicItem<DiskUsageData>
net.sf.basedb.core.DiskUsage
public class DiskUsage
This class is used to represent the disk usage of
DiskConsumable items. The creation, updating
and deletion of items of this type is handled entirely by Base
using the data package.
For each DiskConsuming item there is a corresponding
item of this type.
DiskUsageData| Field Summary | |
|---|---|
private DiskConsumable |
item
The item this diks usage information belongs to. |
static Item |
TYPE
The type of item represented by this class. |
| Constructor Summary | |
|---|---|
DiskUsage(DiskUsageData data)
Create a new DiskUsage item. |
|
| Method Summary | |
|---|---|
long |
getBytes()
Get the number of bytes the DiskConsumable
item is using. |
Group |
getGroup()
Get the group that owns the DiskConsumable item or null
if ther is none. |
DiskConsumable |
getItem()
Get the item this disk usage holds information for |
Item |
getItemType()
Get the Item type of the item this annotation set belongs to. |
Location |
getLocation()
Get the location of the DiskConsumable item. |
static ItemQuery<DiskUsage> |
getQuery(User user,
Group group)
Get a query configured to retrieve disk usage for the specified user. |
QuotaType |
getQuotaType()
Get the QuotaType the DiskConsumable item is using. |
static DiskUsageStatistics |
getStatistics(DbControl dc)
|
Item |
getType()
Get the type of item represented by the object. |
User |
getUser()
Get the user that owns the DiskConsumable item. |
Set<ItemProxy> |
getUsingItems()
Get the item this disk usage information belongs to. |
(package private) void |
initPermissions(int granted,
int denied)
READ permission is granted if the logged in user is the owner of this disk usage. |
boolean |
isUsed()
Check if this item is used by some other item. |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Item TYPE
Item.DISKUSAGE,
getType()private DiskConsumable item
| Constructor Detail |
|---|
DiskUsage(DiskUsageData data)
DiskUsage item.
data - The data class for this item.| Method Detail |
|---|
public static ItemQuery<DiskUsage> getQuery(User user,
Group group)
user - The user to retreive disk usage for, null is allowed if
the logged in user has generic READ permission for disk usage in which case
all items will be returnedgroup - The group to retrieve the disk usage for
ItemQuery objectpublic static DiskUsageStatistics getStatistics(DbControl dc)
public Item getType()
IdentifiableItem enumeration.
public boolean isUsed()
BasicItemsuper.isUsed(), unless it has decided
that the item is used by some other means.
isUsed in class BasicItem<DiskUsageData>BasicItem.getUsingItems()public Set<ItemProxy> getUsingItems()
getUsingItems in class BasicItem<DiskUsageData>BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void initPermissions(int granted,
int denied)
throws BaseException
initPermissions in class BasicItem<DiskUsageData>granted - Permissions that have been granted by the subclassdenied - Permissions that have been denied by the subclass
BaseException - If the permissions couldn't be initialised
public DiskConsumable getItem()
throws PermissionDeniedException,
BaseException
DiskConsumable item
PermissionDeniedException - If the logged in user doesn't have
read permission to the item
BaseException - If there is another errorpublic Item getItemType()
Item type of the item this annotation set belongs to.
public QuotaType getQuotaType()
throws BaseException
QuotaType the DiskConsumable item is using.
DiskUsage item.
BaseException - If there is any errorpublic Location getLocation()
DiskConsumable item.
Location of this DiskUsage item.public long getBytes()
DiskConsumable
item is using.
DiskUsage item.
public User getUser()
throws BaseException
DiskConsumable item.
user
BaseException - If there is any error
public Group getGroup()
throws BaseException
DiskConsumable item or null
if ther is none.
group
BaseException - If there is any error
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||