public class SystemQuota extends Object implements DocumentListener
increment()
and decrement()
.Constructor and Description |
---|
SystemQuota() |
Modifier and Type | Method and Description |
---|---|
void |
afterCheckin(Document document,
History transaction,
Map<String,Object> dictionary)
Called after a document is checked in
|
void |
afterStore(Document document,
History transaction,
Map<String,Object> dictionary)
Called after a document is stored in the database
|
void |
beforeCheckin(Document document,
History transaction,
Map<String,Object> dictionary)
Called before a document is checked in
|
void |
beforeStore(Document document,
History transaction,
Map<String,Object> dictionary)
Called before a document is stored in the database
|
static void |
checkOverQuota()
Checks if the quota was exceeded.
|
static void |
checkOverQuota(long docSize)
Checks if the quota will be exceeded adding a new document with the given
size.
|
static boolean |
checkOverThreshold()
Checks if the quota threshold was exceeded.
|
static void |
checkUserQuota(Document document)
Checks if user quota will be exceeded adding a document
|
static void |
checkUserQuota(long userId,
Long filesize)
Checks if the quota of the user (with the given user id) will be exceeded
adding a document with the given file size
|
static void |
decrement(long docSize)
Decrements the total size counter of the document file size
|
static void |
decrementUserQuota(Document document)
Decrements user quota counter of the document file size
|
static long |
getTotalSize()
Retrieve the total size of documents folder into the file system (in
bytes)
|
static void |
increment(long docSize)
Increments the total size counter of the document file size
|
static void |
incrementUserQuota(Document document,
Long filesize)
Increments user quota counter of the document file size retrieving the
userid from the given document
|
static void |
incrementUserQuota(long docId,
Long filesize)
Increments user quota counter of the document file size retrieving the
userid from the given document id
|
static boolean |
isOverQuota(User user)
Checks if user quota has be exceeded
|
static void |
setTotalSize(long size) |
public static void setTotalSize(long size)
public static void checkOverQuota() throws Exception
Exception
public static boolean checkOverThreshold()
public static void checkOverQuota(long docSize) throws Exception
Exception
public static long getTotalSize()
public static void increment(long docSize)
public static void decrement(long docSize)
public static void decrementUserQuota(Document document)
public static void incrementUserQuota(Document document, Long filesize)
public static void incrementUserQuota(long docId, Long filesize)
public static void checkUserQuota(Document document) throws Exception
Exception
public static boolean isOverQuota(User user)
public static void checkUserQuota(long userId, Long filesize) throws Exception
Exception
public void afterCheckin(Document document, History transaction, Map<String,Object> dictionary) throws Exception
DocumentListener
afterCheckin
in interface DocumentListener
document
- The document to be checked intransaction
- Transaction informationsdictionary
- Dictionary of the execution pipelineException
public void afterStore(Document document, History transaction, Map<String,Object> dictionary) throws Exception
DocumentListener
afterStore
in interface DocumentListener
document
- The document to be storedtransaction
- Transaction informationsdictionary
- Dictionary of the execution pipelineException
public void beforeCheckin(Document document, History transaction, Map<String,Object> dictionary) throws Exception
DocumentListener
beforeCheckin
in interface DocumentListener
document
- The document to be checked intransaction
- Transaction informationsdictionary
- Dictionary of the execution pipelineException
public void beforeStore(Document document, History transaction, Map<String,Object> dictionary) throws Exception
DocumentListener
beforeStore
in interface DocumentListener
document
- The document to be storedtransaction
- Transaction informationsdictionary
- Dictionary of the execution pipelineException
Copyright © 2008-2014 Logical Objects. All Rights Reserved.