Class LicenseKeyReportingConfigurer
java.lang.Object
com.itextpdf.licensing.base.reporting.LicenseKeyReportingConfigurer
Class provides a set of static methods to configure licensekey reporting.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the root directory for local reporting.static com.itextpdf.licensing.base.licensefile.ReportingTypeGets the current reporting type asReportingTypeinstance.static booleanisStatisticsEnabledForProduct(String productName) Checks if statistics are enabled for such productName.static voidoverrideStatisticsSendingForProduct(String productName, boolean sendStatistics) Enables or disables statistics for provided product.static voidReset API configuration.static voiduseLocalReporting(String directoryToWritePath) Select local reporting type with specified root directory for generated reports.static voidSelect remote reporting type in which events are sent over the web to a remote server.
-
Field Details
-
REMOTE_REPORTING_TYPE
- See Also:
-
LOCAL_REPORTING_TYPE
- See Also:
-
-
Method Details
-
useRemoteReporting
public static void useRemoteReporting()Select remote reporting type in which events are sent over the web to a remote server. -
useLocalReporting
Select local reporting type with specified root directory for generated reports.- Parameters:
-
directoryToWritePath- the path to local directory for writing reports. If it is null, then System property, or System environment variable will be used. - Throws:
-
IllegalArgumentException- in case of invalid directory path
-
resetApiConfiguration
public static void resetApiConfiguration()Reset API configuration. Can be used to use environment variables or default logic after API use. -
getReportingType
public static com.itextpdf.licensing.base.licensefile.ReportingType getReportingType()Gets the current reporting type asReportingTypeinstance.- Returns:
- the current reporting type
-
getLocalFileRootDir
Gets the root directory for local reporting.- Returns:
- the root directory for local reporting
-
isStatisticsEnabledForProduct
Checks if statistics are enabled for such productName.- Parameters:
-
productName- name of the product for which to check if statistics are enabled - Returns:
-
trueif statistics are enabled,falseotherwise
-
overrideStatisticsSendingForProduct
Enables or disables statistics for provided product. By default the value from license file will be taken.- Parameters:
-
productName- name of the product for which enable or disable statistics -
sendStatistics-trueto enable statistics,falseotherwise
-