Class WebService
java.lang.Object
org.deltava.service.WebService
- Direct Known Subclasses:
AcademyRideCountService
,AIRACVersionService
,AircraftListService
,AirlineListService
,AirportListService
,AirportWeatherService
,AllFlightsService
,APICodeService
,AvailableFlightLegService
,AvailableFlightService
,BandwidthInfoService
,CacheClearService
,CacheInfoService
,ChatLogService
,CheckRideSimulatorService
,ClearEndpointsService
,ClientVersionService
,CoolerQuoteService
,CoolerSyndicationService
,CustomAirframeService
,DatabaseIDService
,DiscordInfoService
,DiscordUnregisterService
,DispatchRouteListService
,DownloadService
,DraftFlightPlanService
,DuplicateNameService
,EarthMapLinkService
,EliteStatsService
,ErrorLogService
,EventCalendarService
,EventInfoService
,EventSyndicationService
,ExportService
,FeedbackService
,FIRInfoService
,FIRLayerService
,FleetInfoService
,FlightDataExportService
,FlightStatsService
,FlightTimeStatsService
,GateService
,GateUpdateService
,GateUseService
,GoogleEarthService
,HealthCheckService
,ImageLikeService
,InstallerInfoService
,IssueTemplateService
,JobProfileService
,JSONDataService
,LoadModelService
,LoadStatsService
,LogbookPreloadService
,LogbookService
,MapFlightDataService
,MapJSONService
,MapPlotService
,MapProgressJSONService
,MapProgressXMLService
,MapRouteService
,MapService
,MapXMLService
,METARService
,MyFlightsService
,MyRouteMapService
,MyTrackService
,NavaidSearchService
,NewsSyndicationService
,NoticeSyndicationService
,OceanicPlotService
,OnlineStatsService
,OnTimeStatsService
,PackageDownloadService
,PackageRefreshService
,PartnerRedirectService
,PassengerCountService
,PilotLocationClearService
,PilotLocationService
,PilotNominationService
,PilotValidationService
,RoutePlanService
,RouteService
,SearchService
,SeriesListService
,ServicedAirportService
,SimFDRService
,SimulatorStatsService
,SNSReceiverService
,StatusService
,SubscribeService
,SystemInfoService
,TAFService
,TerminalRouteService
,TerminalRouteUpdateService
,TestService
,TextService
,TourLegService
,TourService
,TrackMetadataUpdateService
,UnsubscribeService
,UpdateAvailableService
,UpdateChannelService
,URLCheckService
,ValidateCAPTCHAService
,XAService
Web Services are designed to be light-weight objects that are instantiated using a no-argument constructor
and then passed a request and a response.
- Since:
- 1.0
- Version:
- 8.2
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ServiceException
Creates a ServiceException.protected static ServiceException
Creates a ServiceException.protected static ServiceException
Creates a ServiceException.abstract int
execute
(ServiceContext ctx) Executes the Web Service.protected static int
getCount
(ServiceContext sctxt, int defaultValue) Helper method to return the number of entries to display.boolean
isLogged()
Returns whether this web service calls are logged.boolean
isSecure()
Returns whether this web service requires authentication.
-
Constructor Details
-
WebService
public WebService()
-
-
Method Details
-
execute
Executes the Web Service.- Parameters:
ctx
- the Web Service context- Returns:
- the HTTP status code
- Throws:
ServiceException
- if an error occurs
-
isSecure
public boolean isSecure()Returns whether this web service requires authentication.- Returns:
- TRUE if authentication is required, otherwise FALSE
-
isLogged
public boolean isLogged()Returns whether this web service calls are logged. High volume services like the Map/ServInfo route services will not be logged.- Returns:
- TRUE if invocation logging should be performed by the servlet, otherwise FALSE
-
error
Creates a ServiceException. This method allows subclasses outside the default package to create a new ServiceException, which has a package-private constructor.- Parameters:
code
- the HTTP codemsg
- the error message- Returns:
- ServiceException the newly-created ServiceException
- See Also:
-
error
Creates a ServiceException. This method allows subclasses outside the default package to create a new ServiceException, which has a package-private constructor.- Parameters:
code
- the HTTP codemsg
- the error messagedumpStack
- TRUE if a stack dump should be logged, otherwise FALSE- Returns:
- ServiceException the newly-created ServiceException
- See Also:
-
error
Creates a ServiceException. This method allows subclasses outside the default package to create a new ServiceException, which has a package-private constructor.- Parameters:
code
- the HTTP codemsg
- the error messaget
- the root exception- Returns:
- ServiceException the newly-created ServiceException
- See Also:
-
getCount
Helper method to return the number of entries to display.- Parameters:
sctxt
- the Service ContextdefaultValue
- the default number of entries- Returns:
- the value of the count parameter, or defaultVlue
-