Class APIRequest
java.lang.Object
org.deltava.beans.system.APIRequest
- All Implemented Interfaces:
Serializable
,Comparable<APIRequest>
A bean to store external API usage statistics.
- Since:
- 9.0
- Version:
- 9.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAPIRequest
(String name, boolean isAnonymous) Creates the bean.APIRequest
(String name, String db, boolean isAnonymous, boolean isBlocked) Creates the bean. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(APIRequest u2) getDB()
Returns the database name.boolean
Returns if the request was made by an unauthenticated user.getName()
Returns the API name.getTime()
Returns the time of the API request.boolean
Returns if the request was blocked.
-
Constructor Details
-
APIRequest
Creates the bean.- Parameters:
name
- the API nameisAnonymous
- TRUE if not authenticated, otherwise FALSE
-
APIRequest
-
-
Method Details
-
getName
-
getTime
-
getDB
-
getIsAnonymous
public boolean getIsAnonymous()Returns if the request was made by an unauthenticated user.- Returns:
- TRUE if anonymous, otherwise FALSE
-
isBlocked
public boolean isBlocked()Returns if the request was blocked.- Returns:
- TRUE if blocked, otherwise FALSE
-
compareTo
- Specified by:
compareTo
in interfaceComparable<APIRequest>
-