All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.geotab.model.enumeration.SecurityIdentifier Maven / Gradle / Ivy

package com.geotab.model.enumeration;

import com.fasterxml.jackson.annotation.JsonValue;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

/**
 * The list of identifiers that gives a security identity to something whose access can be
 * controlled.
 */
@Slf4j
public enum SecurityIdentifier {

  /**
   * The Unknown identifier is not used for security purposes. It's used internally to indicate a
   * particular type could not be translated into a security identifier. This always yields in
   * access denied.
   */
  UNKNOWN("Unknown"),

  EVERYTHING("Everything"),

  SYSTEM_SETTINGS("SystemSettings"),

  IMPORT_FROM_OTHER_DATABASE("ImportFromOtherDatabase"),

  AUDIT_LOG("AuditLog"),

  USER_LIST("UserList"),

  USER_ADMIN("UserAdmin"),

  PURGE_DATA("PurgeData"),

  DEVICE_LIST("DeviceList"),

  ENGINE_MANAGEMENT_REPORT("EngineManagementReport"),

  ZONE_TYPE_LIST("ZoneTypeList"),

  REPROCESS_DATA("ReprocessData"),

  WORK_TIME_LIST("WorkTimeList"),

  WORK_HOLIDAY_LIST("WorkHolidayList"),

  ZONE_LIST("ZoneList"),

  ZONE_ADMIN("ZoneAdmin"),

  EXCEPTIONS_LIST("ExceptionsList"),

  REMINDER_REPORT("ReminderReport"),

  EVENT_OCCURRENCE_LIST("EventOccurrenceList"),

  NODES_LIST("NodesList"),

  REMINDER_RULE_LIST("ReminderRuleList"),

  CHANGE_PASSWORD("ChangePassword"),

  CREATE_EXTRACT_KEY("CreateExtractKey"),

  CREATE_TEST_KEY("CreateTestKey"),

  CREATE_FIRMWARE_KEY("CreateFirmwareKey"),

  CREATE_PROGRAMMING_KEY("CreateProgrammingKey"),

  CREATE_KEY_BACKUP("CreateKeyBackup"),

  RESTORE_KEY_BACKUP("RestoreKeyBackup"),

  CREATE_WIFI_KEY("CreateWifiKey"),

  IMPORT_ZONES("ImportZones"),

  RADIO_DOWNLOADER_LIST("RadioDownloaderList"),

  NOTIFICATION_LIST("NotificationList"),

  ORGANIZE_VIEWS("OrganizeViews"),

  ROUTE_LIST("RouteList"),

  USER_SETTINGS("UserSettings"),

  ENGINE_DIAGNOSTIC_LIST("EngineDiagnosticList"),

  ENGINE_TYPE_LIST("EngineTypeList"),

  ENGINE_FAILURE_MODE_LIST("EngineFailureModeList"),

  ENGINE_FLASH_CODE_LIST("EngineFlashCodelist"),

  ENGINE_UNIT_OF_MEASURE_LIST("EngineUnitOfMeasureList"),

  TRIPS_ACTIVITY_REPORT("TripsActivityReport"),

  CONGREGATION_REPORT("CongregationReport"),

  CUSTOMER_VISITS_REPORT("CustomerVisitsReport"),

  SPEED_PROFILE_REPORT("SpeedProfileReport"),

  TIME_CARD_REPORT("TimeCardReport"),

  ENGINE_STATUS_DATA_GRAPH("EngineStatusDataGraph"),

  EXCEPTIONS_REPORT("ExceptionsReport"),

  RISK_MANAGEMENT_REPORT("RiskManagementReport"),

  ROUTE_SUMMARY_REPORT("RouteSummaryReport"),

  UNASSIGNED_ROUTE_REPORT("UnassignedRouteReport"),

  DRIVER_HISTORY_REPORT("DriverHistoryReport"),

  ACCIDENT_DEBUG_REPORT("AccidentDebugReport"),

  DEVICE_INSTALL_HISTORY_REPORT("DeviceInstallHistoryReport"),

  PERFORMANCE_REPORT("PerformanceReport"),

  LAUNCH_ADD_IN("LaunchAddIn"),

  DEVICE_ADMIN("DeviceAdmin"),

  DEVICE_ADMIN_DELETE_UNPLUG_REPLACE("DeviceAdminDeleteUnplugReplace"),

  KEY_INFORMATION("KeyInformation"),

  SECURITY_CLEARANCE_LIST("SecurityClearanceList"),

  TRACK_HISTORIC_DATA("TrackHistoricData"),

  SERVICES_SETTINGS("ServicesSettings"),

  MILEAGE_SUMMARY_DASHBOARD("MileageSummaryDashboard"),

  ACCIDENT_WIZARD("AccidentWizard"),

  FUEL_TAX("FuelTax"),

  MANAGE_REPORT_TEMPLATES("ManageReportTemplates"),

  VIEW_REPORT_TEMPLATE("ViewReportTemplate"),

  EXPORT_FROM_OTHER_DATABASE("ExportFromOtherDatabase"),

  VIEW_GPS_TEXT_MESSAGE("ViewGpsTextMessage"),

  SEND_GPS_TEXT_MESSAGE("SendGpsTextMessage"),

  DELETE_GPS_TEXT_MESSAGE("DeleteGpsTextMessage"),

  REQUEST_DEVICE_LOCATION("RequestDeviceLocation"),

  DISPLAY_MAP("DisplayMap"),

  START_FULL_VERSION("StartFullVersion"),

  EDIT_NOTIFICATION_EMAIL_TEMPLATE("EditNotificationEmailTemplate"),

  DEVICE_ADMIN_ADVANCED("DeviceAdminAdvanced"),

  DEVICE_ADMIN_DRIVER_FEEDBACK("DeviceAdminDriverFeedback"),

  EDIT_DEVICE_ODOMETER("EditDeviceOdometer"),

  SEND_EXTERNAL_RELAY_INSTRUCTION("SendExternalRelayInstruction"),

  ABOUT_CHECKMATE("AboutCheckmate"),

  FUEL_USAGE_REPORT("FuelUsageReport"),

  DRIVER_BLACKLIST("DriverBlacklist"),

  EDIT_EXCEPTION("EditException"),

  EDIT_DISTRIBUTION_LIST("EditDistributionList"),

  ROUTE_COMPARISON_REPORT("RouteComparisonReport"),

  MANAGE_HOS_LOGS("ManageHOSLogs"),

  VIEW_HOS_LOGS("ViewHOSLogs"),

  VIEW_DVIR_LOGS("ViewDVIRLogs"),

  MANAGE_DVIR_LOGS("ManageDVIRLogs"),

  VIEW_TRAILERS("ViewTrailers"),

  MANAGE_TRAILERS("ManageTrailers"),

  VIEW_ADVANCED_HELP("ViewAdvancedHelp"),

  EDIT_ROAD_SPEEDS("EditRoadSpeeds"),

  FUEL_TRANSACTION_LIST("FuelTransactionList"),

  FUEL_TRANSACTION_ADMIN("FuelTransactionAdmin"),

  VIEW_MARKETPLACE_PAID_ITEMS("ViewMarketplacePaidItems"),

  VIEW_CERTIFICATES("ViewCertificates"),

  MANAGE_CERTIFICATES("ManageCertificates"),

  REPAIR_DVIR("RepairDVIR"),

  PURCHASE_MARKETPLACE_PAID_ITEMS("PurchaseMarketplacePaidItems"),

  MANAGE_ADD_IN_DATA("ManageAddInData"),

  VIEW_ADD_IN_DATA("ViewAddInData"),

  VIEW_BINARY_DATA("ViewBinaryData"),

  DRIVER_IDENTIFICATION_CLEARANCE("DriverIdentificationClearance"),

  ACCELEROMETER_DATA_CLEARANCE("AccelerometerDataClearance"),

  SERVICE_PLANS_CLEARANCE("ServicePlansClearance"),

  AUXILIARY_CLEARANCE("AuxiliaryClearance"),

  ENGINE_STATUS_DATA_CLEARANCE("EngineStatusDataClearance"),

  RESELLER_CONTROL_CLEARANCE("ResellerControlClearance"),

  GO_TALK_CLEARANCE("GoTalkClearance"),

  STATUS_GROUPS_CLEARANCE("StatusGroupsClearance"),

  PRODUCT_GUIDE_CLEARANCE("ProductGuideClearance"),

  FEATURE_PREVIEW_CLEARANCE("FeaturePreviewClearance"),

  NEWS_NOTIFICATIONS_CLEARANCE("NewsNotificationsClearance"),

  MANAGE_ADDINS_CLEARANCE("ManageAddinsClearance"),

  DEVICE_CURRENT_STATUS_CLEARANCE("DeviceCurrentStatusClearance"),

  VIEW_TRIP_TYPE_CHANGE_DATA("ViewTripTypeChangeData"),

  EDIT_TRIP_TYPE_CHANGE_DATA("EditTripTypeChangeData"),

  DIRECT_SUPPORT_ADMIN("DirectSupportAdmin"),

  VIEW_BUSINESS_INTELLIGENCE("ViewBusinessIntelligence"),

  ACTIVE_TRACKING_CLEARANCE("ActiveTrackingClearance"),

  CERTIFY_DVIR("CertifyDVIR"),

  INSPECT_DVIR("InspectDVIR"),

  VIEW_MEDIA("ViewMedia"),

  MANAGE_MEDIA("ManageMedia"),

  VIEW_GROUPS("ViewGroups"),

  ADMINISTER_WIFI_HOTSPOT_SETTINGS("AdministerWiFiHotspotSettings"),

  TACHOGRAPH_DOWNLOAD_AND_UPLOAD_FILES("TachographDownloadAndUploadFiles"),

  TACHOGRAPH_ADMIN("TachographAdmin"),

  VIEW_TACHOGRAPH_REMOTE_DOWNLOAD_DATA("ViewTachographRemoteDownloadData"),

  VIEW_TACHOGRAPH_DRIVING_TIME_DATA("ViewTachographDrivingTimeData"),

  VIEW_TACHOGRAPH_INFRINGEMENT_DATA("ViewTachographInfringementData"),

  VIEW_WIFI_HOTSPOT_SETTINGS("ViewWiFiHotspotSettings"),

  MATERIAL_MANAGEMENT_REPORT("MaterialManagementReport");

  private String name;

  SecurityIdentifier(String name) {
    this.name = name;
  }

  @JsonValue
  public String getName() {
    return name;
  }

  public static SecurityIdentifier findOrDefault(String name) {
    if (StringUtils.isEmpty(name)) {
      log.warn("Empty value is not recognized for {} enum; returning default {}",
          SecurityIdentifier.class.getSimpleName(), SecurityIdentifier.UNKNOWN);
      return UNKNOWN;
    }

    for (SecurityIdentifier securityIdentifier : values()) {
      if (securityIdentifier.getName().equalsIgnoreCase(name.trim())) {
        return securityIdentifier;
      }
    }

    log.warn("{} is not recognized for {} enum; returning default {}",
        name, SecurityIdentifier.class.getSimpleName(), SecurityIdentifier.UNKNOWN);
    return UNKNOWN;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy