Collector
Helper
The CollectorHelper
class is useful to
collect all the issues and analytics data sent by the Ametista Engine
Author
N7ghtm4r3 - Tecknobit
See also
Properties
Link copied to clipboard
Link copied to clipboard
APPLICATION_ICONS_FOLDER
the folder where the icons pics will be saved
Link copied to clipboard
applicationsRepository
instance for the application repository
Link copied to clipboard
Link copied to clipboard
DEFAULT_PLATFORMS_FILTER
the default value of the platforms filter
Link copied to clipboard
Link copied to clipboard
devicesRepository
instance
for the device repository
Link copied to clipboard
Link copied to clipboard
EXCEPTION_NAME_PATTERN
the pattern to validate the exception names values
Link copied to clipboard
EXCEPTION_NAME_REGEX
regex to validate the exception name
Link copied to clipboard
issuesRepository
instance for
the issues repository
Link copied to clipboard
Link copied to clipboard
performanceRepository
instance for the performance repository
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
timeFormatter
helps to format
the temporal value with the specific "dd/MM/yyyy" pattern
Functions
Link copied to clipboard
Method to get whether the application is
present in the database
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private open fun calculateAnalyticValue(analytic: PerformanceAnalytic, value: Double, currentDate: Long)
Method to calculate and store the value of
an analytic
Link copied to clipboard
open fun collectAnalytic(applicationId: String, appVersion: String, platform: Platform, type: PerformanceAnalytic.PerformanceAnalyticType, hPayload: JsonHelper)
Method to collect an analytic for an
application and its platform version
Link copied to clipboard
open fun collectIssue(applicationId: String, appVersion: String, platform: Platform, hPayload: JsonHelper)
Method to collect a new issue occurred in
the application
Link copied to clipboard
Method to connect a new platform for the
application
Link copied to clipboard
Method to create the pathname for an icon
pic
Link copied to clipboard
Link copied to clipboard
open fun createResource(resource: MultipartFile, resourcesDirectory: String, resourceId: String): String
Link copied to clipboard
Method to delete an icon pic
Link copied to clipboard
Method to delete an existing application
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Method to edit an existing application
Link copied to clipboard
Method to get whether the application is
present in the database
Link copied to clipboard
open fun getApplications(page: Int, pageSize: Int, name: String, platforms: List<String>): PaginatedResponse<AmetistaApplication>
Method to get the applications list
registered in the system
Link copied to clipboard
Method to get the current date formatted
with the timeFormatter
Link copied to clipboard
Method to get with the EXCEPTION_NAME_PATTERN
the name of the issue
Link copied to clipboard
open fun <T : IssueAnalytic?> getIssues(application: AmetistaApplication, page: Int, pageSize: Int, platform: Platform, filters: Set<String>): PaginatedResponse<T>
Method to get the issues related to an
application
Link copied to clipboard
open fun getPerformanceData(applicationId: String, platform: Platform, filters: JsonHelper): PerformanceData
Method to get the performance data of an
application
Link copied to clipboard
Link copied to clipboard
open fun getVersionSamples(applicationId: String, platform: Platform, analyticType: PerformanceAnalytic.PerformanceAnalyticType): List<String>
Method to get all the available versions
target for a specific analytic
Link copied to clipboard
private open fun incrementAnalyticValue(analytic: PerformanceAnalytic, incrementValue: Int, currentDate: Long)
Method to increment and store the value of
an analytic
Link copied to clipboard
private open fun manageIssuesPerSessionAnalytic(applicationId: String, appVersion: String, platform: Platform)
Method to calculate the ISSUES_PER_SESSION
rate and save it
Link copied to clipboard
Method to save and add in the system a new
application
Link copied to clipboard
Method to save a new device in the system if
not already exists
Link copied to clipboard
Link copied to clipboard
private open fun storeAnalytic(applicationId: String, appVersion: String, platform: Platform, type: PerformanceAnalytic.PerformanceAnalyticType, value: Double)
Method to store an analytic for an
application and its platform version
Link copied to clipboard
private open fun storeLaunchTime(applicationId: String, appVersion: String, platform: Platform, hPayload: JsonHelper)
Method to collect a LAUNCH_TIME
analytic
Link copied to clipboard
private open fun updateAnalytic(updatesRefreshed: Int, updatedValue: Double, analytic: PerformanceAnalytic, currentDate: Long)
Method to update and then store the updated
analytic