コード例 #1
0
    @GET
    @Produces({ "application/json", "application/xml" })  
    @OAuthSecurity(scope="default")
    @Path("/requests/shift")
    public ServiceResponse getShiftRequests(@QueryParam("offset") Integer offset, @QueryParam("limit") Integer limit) {
		
		RequestsAdapterFactory factory = requestsAdapterFactory.getInstance();
		
		RequestsAdapter adapter = factory.getrequestsAdapter(ServiceConstants.ADAPTER_NAME);
				
		ServiceResponse response = adapter.getShiftRequests(offset, limit);
		
		return response;
    }
コード例 #2
0
    @POST
    @Produces({ "application/json", "application/xml" })  
    @OAuthSecurity(scope="default")
    @Path("/requests/occurrence_dispute/{occurrence_dispute_id}")
    public ServiceResponse updateOccurrenceDisputeById(@PathParam("occurrence_dispute_id") String occurrenceDisputeId, ) {
		
		RequestsAdapterFactory factory = requestsAdapterFactory.getInstance();
		
		RequestsAdapter adapter = factory.getrequestsAdapter(ServiceConstants.ADAPTER_NAME);
				
		ServiceResponse response = adapter.updateOccurrenceDisputeById(occurrenceDisputeId, );
		
		return response;
    }
コード例 #3
0
    @GET
    @Produces({ "application/json", "application/xml" })  
    @OAuthSecurity(scope="default")
    @Path("/requests/count")
    public ServiceResponse getRequestsCount(@QueryParam("startTime") Date startTime, @QueryParam("includeShift") Boolean includeShift, @QueryParam("includeTimeOff") Boolean includeTimeOff, @QueryParam("includeOccurrence") Boolean includeOccurrence, @QueryParam("includeAlerts") Boolean includeAlerts) {
		
		RequestsAdapterFactory factory = requestsAdapterFactory.getInstance();
		
		RequestsAdapter adapter = factory.getrequestsAdapter(ServiceConstants.ADAPTER_NAME);
				
		ServiceResponse response = adapter.getRequestsCount(startTime, includeShift, includeTimeOff, includeOccurrence, includeAlerts);
		
		return response;
    }
コード例 #4
0
    @POST
    @Produces({ "application/json", "application/xml" })  
    @OAuthSecurity(scope="default")
    @Path("/requests/time_off/{time_off_request_id}")
    public ServiceResponse updateTimeOffRequestById(@PathParam("time_off_request_id") String timeOffRequestId, ) {
		
		RequestsAdapterFactory factory = requestsAdapterFactory.getInstance();
		
		RequestsAdapter adapter = factory.getrequestsAdapter(ServiceConstants.ADAPTER_NAME);
				
		ServiceResponse response = adapter.updateTimeOffRequestById(timeOffRequestId, );
		
		return response;
    }
コード例 #5
0
    @POST
    @Produces({ "application/json", "application/xml" })  
    @OAuthSecurity(scope="default")
    @Path("/requests/time_off")
    public ServiceResponse submitTimeOffRequest(@QueryParam("type") String type, @QueryParam("startDate") Date startDate, @QueryParam("endDate") Date endDate) {
		
		RequestsAdapterFactory factory = requestsAdapterFactory.getInstance();
		
		RequestsAdapter adapter = factory.getrequestsAdapter(ServiceConstants.ADAPTER_NAME);
				
		ServiceResponse response = adapter.submitTimeOffRequest(type, startDate, endDate);
		
		return response;
    }
コード例 #6
0
    @GET
    @Produces({ "application/json", "application/xml" })  
    @OAuthSecurity(scope="default")
    @Path("/requests/shift/{shift_request_id}")
    public ServiceResponse getShiftRequestById(@PathParam("shift_request_id") String shiftRequestId) {
		
		RequestsAdapterFactory factory = requestsAdapterFactory.getInstance();
		
		RequestsAdapter adapter = factory.getrequestsAdapter(ServiceConstants.ADAPTER_NAME);
				
		ServiceResponse response = adapter.getShiftRequestById(shiftRequestId);
		
		return response;
    }