Class CSPViolations
java.lang.Object
org.deltava.beans.system.CSPViolations
- All Implemented Interfaces:
Comparable<CSPViolations>
A bean to store Content Security Policy violation data.
- Since:
- 12.0
- Version:
- 12.0
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a site URL.int
compareTo
(CSPViolations cv2) int
getCount()
Returns the number of violationsgetDate()
Returns the violation date.getHost()
Returns the offending host name.getType()
Returns the CSP directive violated.getURLs()
Returns the offending site URLsvoid
setCount
(int cnt) Updates the violation count.void
Updates the offending host name.
-
Constructor Details
-
CSPViolations
-
-
Method Details
-
getDate
-
getType
-
getCount
public int getCount()Returns the number of violations- Returns:
- the violation count
-
getHost
-
getURLs
-
addURL
Adds a site URL. THe protocol and host names will be stripped if present.- Parameters:
url
- the URL
-
setHost
-
setCount
public void setCount(int cnt) Updates the violation count.- Parameters:
cnt
- the violation count
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CSPViolations>
-