@GET
  @Path("gamedata/template")
  @Consumes({MediaType.APPLICATION_JSON})
  @Produces({MediaType.APPLICATION_JSON})
  public String getGameAttributes(final @Context UriInfo uriInfo) {

    context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
    final Collection<MCodeData> mediaCategory =
        codeReadPlatformService.getCodeValue("MediaGameCategory");
    final Collection<MCodeData> mediaType = codeReadPlatformService.getCodeValue("MediaGameType");

    // final Collection<MCodeData> mediaContentProvider =
    // codeReadPlatformService.getCodeValue("MediaGameDescription");

    /*final Collection<MCodeData> oem = codeReadPlatformService.getCodeValue("OEM");
    final Collection<MCodeData> contentProvider = codeReadPlatformService.getCodeValue("Content Provider");
    final Collection<MCodeData> wrappers = codeReadPlatformService.getCodeValue("Wrappers");
    */

    List<MCodeData> mediaContentProvider = new ArrayList<MCodeData>();

    final Collection<MCodeData> revenueHolders =
        codeReadPlatformService.getCodeValue("GameRevenueHolders");
    for (MCodeData c : revenueHolders) {
      final List<MCodeData> mcp = codeReadPlatformService.getCodeValueForGame(c.getmCodeValue());
      for (MCodeData mc : mcp) {
        mediaContentProvider.add(mc);
      }
    }

    final Collection<MCodeData> source = codeReadPlatformService.getCodeValue("Deck Type");

    /*final MediaAssetData assetData = new MediaAssetData(mediaCategory,mediaType,revenueHolders,source,oem,contentProvider,wrappers);*/
    Collection<GameMediaDetailsData> contentProviderName =
        mediaAssetReadPlatformService.retriveContentProvider();

    final MediaAssetData assetData =
        new MediaAssetData(
            mediaCategory, mediaType, source, mediaContentProvider, contentProviderName);
    final ApiRequestJsonSerializationSettings settings =
        apiRequestParameterHelper.process(uriInfo.getQueryParameters());
    return this.toApiJsonSerializer.serialize(settings, assetData, RESPONSE_DATA_PARAMETERS);
  }
  @GET
  @Path("mediaIdForGame/{id}")
  @Consumes({MediaType.APPLICATION_JSON})
  @Produces({MediaType.APPLICATION_JSON})
  public String getGameDetails(
      @Context final UriInfo uriInfo, @PathParam("id") final Long mediaAssetId) {

    context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
    MediaAssetData mediaAssetData =
        this.mediaAssetReadPlatformService.retrievemediaAsset(mediaAssetId);
    List<SettlementData> settlementData =
        this.mediaAssetReadPlatformService.retriveSettlementDetails(mediaAssetId);

    final Collection<MCodeData> mediaCategory =
        codeReadPlatformService.getCodeValue("MediaGameCategory");
    final Collection<MCodeData> mediaType = codeReadPlatformService.getCodeValue("MediaGameType");
    /*final Collection<MCodeData> mediaContentProvider = codeReadPlatformService.getCodeValue("MediaGameDescription");*/
    final Collection<MCodeData> source = codeReadPlatformService.getCodeValue("Deck Type");

    List<MCodeData> mediaContentProvider = new ArrayList<MCodeData>();

    final Collection<MCodeData> revenueHolders =
        codeReadPlatformService.getCodeValue("GameRevenueHolders");
    for (MCodeData c : revenueHolders) {
      final List<MCodeData> mcp = codeReadPlatformService.getCodeValueForGame(c.getmCodeValue());
      for (MCodeData mc : mcp) {
        mediaContentProvider.add(mc);
      }
    }
    Collection<GameMediaDetailsData> contentProviderName =
        mediaAssetReadPlatformService.retriveContentProvider();

    mediaAssetData.setSettlementData(settlementData);
    mediaAssetData.setMediaCategory(mediaCategory);
    mediaAssetData.setMediaType(mediaType);
    mediaAssetData.setMCProvider(mediaContentProvider);
    mediaAssetData.setSource(source);
    mediaAssetData.setContentProviderName(contentProviderName);

    final ApiRequestJsonSerializationSettings settings =
        apiRequestParameterHelper.process(uriInfo.getQueryParameters());
    return this.toApiJsonSerializer.serialize(settings, mediaAssetData, RESPONSE_DATA_PARAMETERS);
  }