Package org.mifosplatform.infrastructure.core.serialization

Examples of org.mifosplatform.infrastructure.core.serialization.ApiRequestJsonSerializationSettings


        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForReadPermissions);

        final OfficeTransactionData officeTransactionData = this.readPlatformService.retrieveNewOfficeTransactionDetails();

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.toApiJsonSerializer.serialize(settings, officeTransactionData, RESPONSE_DATA_PARAMETERS);
    }
View Full Code Here


        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);

        final Collection<OfficeData> offices = this.readPlatformService.retrieveAllOffices(onlyManualEntries);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.toApiJsonSerializer.serialize(settings, offices, this.RESPONSE_DATA_PARAMETERS);
    }
View Full Code Here

        OfficeData office = this.readPlatformService.retrieveNewOfficeTemplate();

        final Collection<OfficeData> allowedParents = this.readPlatformService.retrieveAllOfficesForDropdown();
        office = OfficeData.appendedTemplate(office, allowedParents);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.toApiJsonSerializer.serialize(settings, office, this.RESPONSE_DATA_PARAMETERS);
    }
View Full Code Here

    @Produces({ MediaType.APPLICATION_JSON })
    public String retreiveOffice(@PathParam("officeId") final Long officeId, @Context final UriInfo uriInfo) {

        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

        OfficeData office = this.readPlatformService.retrieveOffice(officeId);
        if (settings.isTemplate()) {
            final Collection<OfficeData> allowedParents = this.readPlatformService.retrieveAllowedParents(officeId);
            office = OfficeData.appendedTemplate(office, allowedParents);
        }

        return this.toApiJsonSerializer.serialize(settings, office, this.RESPONSE_DATA_PARAMETERS);
View Full Code Here

        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);

        final Collection<SmsData> smsMessages = this.readPlatformService.retrieveAll();

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.toApiJsonSerializer.serialize(settings, smsMessages);
    }
View Full Code Here

    @Path("{resourceId}")
    public String retrieveOne(@PathParam("resourceId") final Long resourceId, @Context final UriInfo uriInfo) {

        final SmsData smsMessage = this.readPlatformService.retrieveOne(resourceId);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.toApiJsonSerializer.serialize(settings, smsMessage);
    }
View Full Code Here

    public String retrieveAllClosures(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId) {

        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission);
        final List<GLClosureData> glClosureDatas = this.glClosureReadPlatformService.retrieveAllGLClosures(officeId);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.apiJsonSerializerService.serialize(settings, glClosureDatas, RESPONSE_DATA_PARAMETERS);
    }
View Full Code Here

    @Produces({ MediaType.APPLICATION_JSON })
    public String retreiveClosure(@PathParam("glClosureId") final Long glClosureId, @Context final UriInfo uriInfo) {

        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

        final GLClosureData glClosureData = this.glClosureReadPlatformService.retrieveGLClosureById(glClosureId);
        if (settings.isTemplate()) {
            glClosureData.setAllowedOffices(this.officeReadPlatformService.retrieveAllOfficesForDropdown());
        }

        return this.apiJsonSerializerService.serialize(settings, glClosureData, RESPONSE_DATA_PARAMETERS);
    }
View Full Code Here

        HOOK_RESOURCE_NAME);

    final Collection<HookData> hooks = this.readPlatformService
        .retrieveAllHooks();

    final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper
        .process(uriInfo.getQueryParameters());
    return this.toApiJsonSerializer.serialize(settings, hooks,
        RESPONSE_DATA_PARAMETERS);
  }
View Full Code Here

      @Context final UriInfo uriInfo) {

    this.context.authenticatedUser().validateHasReadPermission(
        HOOK_RESOURCE_NAME);

    final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper
        .process(uriInfo.getQueryParameters());

    HookData hook = this.readPlatformService.retrieveHook(hookId);

    if (settings.isTemplate()) {
      final HookData hookData = this.readPlatformService
          .retrieveNewHookDetails(hook.getTemplateName());
      hook = HookData.templateExisting(hook, hookData.getTemplates(),
          hookData.getGroupings());
    }
View Full Code Here

TOP

Related Classes of org.mifosplatform.infrastructure.core.serialization.ApiRequestJsonSerializationSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.