init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Dummy;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/Dummy")]
|
||||
public class DummyController : ApiController
|
||||
{
|
||||
private ITraceLogger TraceLogger { get; }
|
||||
|
||||
public DummyController(ITraceLogger traceLogger)
|
||||
{
|
||||
TraceLogger = traceLogger ?? throw new ArgumentNullException(nameof(traceLogger));
|
||||
}
|
||||
|
||||
[HttpGet, Route("TraceLoggerDummy")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TraceDummyResponseLeiras, typeof(List<object>))]
|
||||
public List<object> TraceLoggerDummy()
|
||||
{
|
||||
return ((DummyFacade)Activator.CreateInstance(typeof(DummyFacade), FelhasznaloLogic.GetFelhasznalo(), TraceLogger)).TraceLoggerDummy();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Enum;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/Enum")]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class EnumController : ApiController
|
||||
{
|
||||
[HttpGet, Route("NaploEnum")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.EnumResponseLeiras, typeof(EnumResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<EnumController, EnumResponseDto>))]
|
||||
public List<EnumResponseDto> GetNaploEnum([FromUri] EnumRequestDto request)
|
||||
{
|
||||
return ModelToDto(((EnumFacade)Activator.CreateInstance(typeof(EnumFacade), FelhasznaloLogic.GetFelhasznalo())).GetNaploEnum(request));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.BusinessLogic.V3.HaziFeladat;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.HaziFeladat;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix)]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class HaziFeladatController : ApiController
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient;
|
||||
|
||||
public HaziFeladatController(IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
[HttpGet, Route("HaziFeladat/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(HaziFeladatResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProviderWithDependencyInjection<HaziFeladatController, HaziFeladatResponseDto>))]
|
||||
public HaziFeladatResponseDto GetHaziFeladat(int id)
|
||||
{
|
||||
return ((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo())).GetHaziFeladat(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat rögzítése
|
||||
/// </summary>
|
||||
[HttpPost, Route("HaziFeladat")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.HaziFeladatRogziteseSikertelenAzOraMarNemLetezikAKivalasztottNapon, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.HaziFeladatMenteseSikeres, typeof(int))]
|
||||
public int SaveHaziFeladat(HaziFeladatCreateRequestDto request)
|
||||
{
|
||||
return ((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper, _coreApiClient)).SaveHaziFeladat(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat módosítása
|
||||
/// </summary>
|
||||
[HttpPut, Route("HaziFeladat/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.HaziFeladatModositasaSikertelenAHaziFeladatNemLetezik, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.HaziFeladatMenteseSikeres, typeof(void))]
|
||||
public void UpdateHaziFeladat([FromUri] int id, [FromBody] HaziFeladatUpdateRequestDto request)
|
||||
{
|
||||
((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper, _coreApiClient)).UpdateHaziFeladat(id, request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat törlése
|
||||
/// </summary>
|
||||
[HttpDelete, Route("HaziFeladat/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.HaziFeladatTorleseSikertelenAHaziFeladatNemLetezik, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.HaziFeladatTorleseSikeres, typeof(void))]
|
||||
public void DeleteHaziFeladat([FromUri] int id)
|
||||
{
|
||||
((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _coreApiClient)).DeleteHaziFeladat(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat csatolmány törlése
|
||||
/// </summary>
|
||||
[HttpDelete, Route("HaziFeladat/Csatolmany/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.HaziFeladatCsatolmanyTorlesSikeres, typeof(void))]
|
||||
public void HaziFeladatCsatolmanyTorles(int id)
|
||||
{
|
||||
((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper)).HaziFeladatCsatolmanyTorles(id);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Igazolas;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Igazolas;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix)]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class IgazolasController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Igazolas")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IgazolasResponseLeiras, typeof(IgazolasResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<IgazolasController, IgazolasResponseDto>))]
|
||||
public IEnumerable<IgazolasResponseDto> GetIgazolas([FromUri] int tanuloId)
|
||||
{
|
||||
return ModelToDto(((IgazolasFacade)Activator.CreateInstance(typeof(IgazolasFacade), FelhasznaloLogic.GetFelhasznalo())).GetIgazolas(tanuloId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Igazolás rögzítése
|
||||
/// </summary>
|
||||
[HttpPost, Route("Igazolas")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IgazolasMenteseSikeres, typeof(void))]
|
||||
public void CreateIgazolas(IgazolasCreateRequestDto request)
|
||||
{
|
||||
((IgazolasFacade)Activator.CreateInstance(typeof(IgazolasFacade), FelhasznaloLogic.GetFelhasznalo())).CreateIgazolas(request);
|
||||
}
|
||||
|
||||
[HttpDelete, Route("Igazolas/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IgazolasTorlesSikeres)]
|
||||
public void DeleteIgazolas([FromUri] int id)
|
||||
{
|
||||
((IgazolasFacade)Activator.CreateInstance(typeof(IgazolasFacade), FelhasznaloLogic.GetFelhasznalo())).DeleteIgazolas(id);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Iskolaor;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Iskolaor;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix)]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class IskolaorController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Iskolaor")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IskolaorResponseLeiras, typeof(IskolaorResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<IskolaorController, IskolaorResponseDto>))]
|
||||
public List<IskolaorResponseDto> GetIskolaorList()
|
||||
{
|
||||
return ModelToDto(((IskolaorFacade)Activator.CreateInstance(typeof(IskolaorFacade), FelhasznaloLogic.GetFelhasznalo())).ListIskolaor());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Ora;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Ora;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/Ora")]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class OraController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Feljegyzes")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OraFeljegyzesResponseLeiras, typeof(OraFeljegyzesResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<OraController, OraFeljegyzesResponseDto>))]
|
||||
public List<OraFeljegyzesResponseDto> GetOraFeljegyzesek([FromUri] OraFeljegyzesRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OraFacade)Activator.CreateInstance(typeof(OraFacade), FelhasznaloLogic.GetFelhasznalo())).GetOraFeljegyzesek(request));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/Orarend")]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class OrarendController : ApiController
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient;
|
||||
|
||||
public OrarendController(IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Órarend lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(OrarendElemResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OrarendController, OrarendElemResponseDto>))]
|
||||
public HashSet<OrarendElemResponseDto> GetOrarend([FromUri] OrarendRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetOrarend(request));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Órarend elem entitás lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("OrarendElem")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(OrarendElemResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProviderWithDependencyInjection<OrarendController, OrarendElemResponseDto>))]
|
||||
public OrarendElemResponseDto GetOrarendElem([FromUri] OrarendElemRequestDto request)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetOrarendElem(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Óra naplózása
|
||||
/// </summary>
|
||||
[HttpPost, Route("OraNaplozas")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.NaplozasSikertelenAzOraMarNemLetezikAKivalasztottNapon, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OraNaplozasaSikeres)]
|
||||
public string OraNaplozas(OraNaplozasRequestDto request)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper, _coreApiClient)).OraNaplozas(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Óra naplózási adatok törlése
|
||||
/// </summary>
|
||||
[HttpDelete, Route("OraNaplozas")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OraNaplozasTorlesSikeres)]
|
||||
public string OraNaplozasTorles([FromUri] OraNaplozasTorlesRequestDto request)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).OraNaplozasTorles(request);
|
||||
}
|
||||
|
||||
[HttpGet, Route("Jelenlet")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloJelenletResponseLeiras, typeof(TanuloJelenletResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OrarendController, TanuloJelenletResponseDto>))]
|
||||
public IEnumerable<TanuloJelenletResponseDto> GetJelenlet([FromUri] TanuloJelenletRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetTanuloJelenlet(request));
|
||||
}
|
||||
|
||||
[HttpGet, Route("Hetirend")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras + DescriptionLookUp.HetirendSzoveg, typeof(HetirendListResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OrarendController, HetirendListResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.BadRequest, typeof(ValidaciosHibaExample<HetirendListRequest, HetirendListRequest>))]
|
||||
public IEnumerable<HetirendListResponseDto> ListHetirend([FromUri] HetirendListRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).ListHetirend(request));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bejelentett számonkérés lekérdezése
|
||||
/// </summary>
|
||||
/// <param name="id">Számonkérés id</param>
|
||||
[HttpGet, Route("BejelentettSzamonkeres/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(BejelentettSzamonkeresekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProviderWithDependencyInjection<OrarendController, BejelentettSzamonkeresekResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public BejelentettSzamonkeresekResponseDto GetBejelentettSzamonkeres([FromUri] int id)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetBejelentettSzamonkeres(id);
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete, Route("BejelentettSzamonkeres/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.SzamonkeresTorleseSikeres)]
|
||||
public void DeleteBejelentettSzamonkeres([FromUri] int id)
|
||||
{
|
||||
((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).DeleteBejelentettSzamonkeres(id);
|
||||
}
|
||||
|
||||
[HttpPost, Route("BejelentettSzamonkeres")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.SzamonkeresRogzitesSikeres)]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerRequestExample(typeof(SzamonkeresRequestDto), typeof(SzamonkeresRequestDto))]
|
||||
public void PostSzamonkeres(SzamonkeresRequestDto request)
|
||||
{
|
||||
((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).PostSzamonkeres(request);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Converter;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/OsztalyCsoport")]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class OsztalyCsoportController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Ertekeles")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloErtekeleseiResponseLeiras, typeof(OsztalyCsoportErtekelesekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, OsztalyCsoportErtekelesekResponseDto>))]
|
||||
public HashSet<OsztalyCsoportErtekelesekResponseDto> GetTanuloErtekelesek([FromUri] OsztalyCsoportErtekelesekRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyCsoportErtekelesek(request));
|
||||
}
|
||||
|
||||
[HttpPost, Route("Ertekeles")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.ErtekelesRogzitesSikeres)]
|
||||
[SwaggerRequestExample(typeof(OsztalyCsoportErtekelesRequestDto), typeof(OsztalyCsoportErtekelesRequestDto))]
|
||||
public void CreateOsztalyCsoportErtekeles(List<OsztalyCsoportErtekelesRequestDto> request)
|
||||
{
|
||||
((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).CreateOsztalyCsoportErtekeles(RequestModelConverter.DtoToModel(request));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mondatbank lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("Ertekeles/Mondatbank")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.MondatbankResponseLeiras, typeof(MondatbankResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, MondatbankResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<MondatbankResponseDto> GetMondatbank([FromUri] MondatbankRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetMondatbank(request));
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tanulok")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportTanuloiResponseLeiras, typeof(OsztalyCsoportTanuloResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, OsztalyCsoportTanuloResponseDto>))]
|
||||
public IEnumerable<OsztalyCsoportTanuloResponseDto> GetOsztalyCsoportTanuloi([FromUri] OsztalyCsoportTanuloRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyCsoportTanuloi(request));
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tanulok/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportTanuloAdatokResponseLeiras, typeof(OsztalyCsoportTanuloAdatokResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public OsztalyCsoportTanuloAdatokResponseDto GetOsztalyCsoportTanuloAdatok([FromUri] int id)
|
||||
{
|
||||
return ((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyCsoportTanuloAdatok(id);
|
||||
}
|
||||
|
||||
[HttpGet, Route("")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportResponseLeiras, typeof(OsztalyokCsoportokResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, OsztalyokCsoportokResponseDto>))]
|
||||
public IEnumerable<OsztalyokCsoportokResponseDto> GetOsztalyokCsoportok()
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyokCsoportok());
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tanulok/Ertekeles")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloErtekeleseiResponseLeiras, typeof(TanuloErtekelesekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, TanuloErtekelesekResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<TanuloErtekelesekResponseDto> GetTanuloErtekelesei([FromUri] TanuloErtekelesekRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetTanuloErtekelesei(request));
|
||||
}
|
||||
|
||||
[HttpPut, Route("Tanulok/Ertekeles/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloErtekelesMentesSikeres, typeof(TanuloErtekelesMentesRequestDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
public void TanuloErtekelesMentes([FromUri] int id, [FromBody] TanuloErtekelesMentesRequestDto request)
|
||||
{
|
||||
((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).TanuloErtekelesMentes(id, request);
|
||||
}
|
||||
|
||||
[HttpDelete, Route("Tanulok/Ertekeles/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.ErtekelesTorleseSikeres)]
|
||||
public void DeleteOsztalyCsoportErtekeles([FromUri] int id)
|
||||
{
|
||||
((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).DeleteOsztalyCsoportErtekeles(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bejelentett számonkérések lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("BejelentettSzamonkeres")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.BejelentettSzamonkeresResponseLeiras, typeof(BejelentettSzamonkeresekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OsztalyCsoportController, BejelentettSzamonkeresekResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<BejelentettSzamonkeresekResponseDto> GetBejelentettSzamonkeresek([FromUri] BejelentettSzamonkeresekRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetBejelentettSzamonkeresek(request));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Tanar;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Tanar;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/Tanar")]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class TanarController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Profil")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanarAdataiResponseLeiras, typeof(ProfilResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<TanarController, ProfilResponseDto>))]
|
||||
public ProfilResponseDto GetProfil()
|
||||
{
|
||||
return ((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).GetProfil();
|
||||
}
|
||||
|
||||
[HttpGet, Route("Beallitasok")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanarBeallitasokResponseLeiras, typeof(BeallitasokResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<TanarController, BeallitasokResponseDto>))]
|
||||
public BeallitasokResponseDto GetBeallitasok()
|
||||
{
|
||||
return ((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).GetBeallitasok();
|
||||
}
|
||||
|
||||
[HttpPost, Route("Beallitasok")]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.BeallitasRogzitesSikeres)]
|
||||
[SwaggerRequestExample(typeof(BeallitasokRequestDto), typeof(BeallitasokRequestDto))]
|
||||
public void PostBeallitasok(BeallitasokRequestDto request)
|
||||
{
|
||||
((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).PostBeallitasok(request);
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tantargyfelosztas")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanarTantargyFelosztasai, typeof(TantargyFelosztasResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<TantargyFelosztasResponseDto> GetOsztalyCsoportTantargyak()
|
||||
{
|
||||
return ModelToDto(((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).GetTantargyFelosztas());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Tanmenet;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Tanmenet;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix)]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
|
||||
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
|
||||
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class TanmenetController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Tanmenet")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanmenetResponseLeiras, typeof(TanmenetItemListResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<TanmenetController, TanmenetItemListResponseDto>))]
|
||||
public IEnumerable<TanmenetItemListResponseDto> ListTanmenet([FromUri] TanmenetRequestDto request)
|
||||
{
|
||||
return ModelToDto(((TanmenetFacade)Activator.CreateInstance(typeof(TanmenetFacade), FelhasznaloLogic.GetFelhasznalo())).ListTanmenet(request));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue