Package org.mifosplatform.portfolio.note.exception

Examples of org.mifosplatform.portfolio.note.exception.NoteResourceNotSupportedException


    public String retrieveNotesByResource(@PathParam("resourceType") final String resourceType,
            @PathParam("resourceId") final Long resourceId, @Context final UriInfo uriInfo) {

        final NoteType noteType = NoteType.fromApiUrl(resourceType);

        if (noteType == null) { throw new NoteResourceNotSupportedException(resourceType); }

        this.context.authenticatedUser().validateHasReadPermission(getResourceDetails(noteType, resourceId).entityName());

        final Integer noteTypeId = noteType.getValue();
View Full Code Here


    public String retrieveNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId,
            @PathParam("noteId") final Long noteId, @Context final UriInfo uriInfo) {

        final NoteType noteType = NoteType.fromApiUrl(resourceType);

        if (noteType == null) { throw new NoteResourceNotSupportedException(resourceType); }

        this.context.authenticatedUser().validateHasReadPermission(getResourceDetails(noteType, resourceId).entityName());

        final Integer noteTypeId = noteType.getValue();
View Full Code Here

    public String addNewNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId,
            final String apiRequestBodyAsJson) {

        final NoteType noteType = NoteType.fromApiUrl(resourceType);

        if (noteType == null) { throw new NoteResourceNotSupportedException(resourceType); }

        final CommandWrapper resourceDetails = getResourceDetails(noteType, resourceId);
        final CommandWrapper commandRequest = new CommandWrapperBuilder().createNote(resourceDetails, resourceType, resourceId)
                .withJson(apiRequestBodyAsJson).build();
View Full Code Here

    public String updateNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId,
            @PathParam("noteId") final Long noteId, final String apiRequestBodyAsJson) {

        final NoteType noteType = NoteType.fromApiUrl(resourceType);

        if (noteType == null) { throw new NoteResourceNotSupportedException(resourceType); }

        final CommandWrapper resourceDetails = getResourceDetails(noteType, resourceId);

        final CommandWrapper commandRequest = new CommandWrapperBuilder().updateNote(resourceDetails, resourceType, resourceId, noteId)
                .withJson(apiRequestBodyAsJson).build();
View Full Code Here

    public String deleteNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId,
            @PathParam("noteId") final Long noteId) {

        final NoteType noteType = NoteType.fromApiUrl(resourceType);

        if (noteType == null) { throw new NoteResourceNotSupportedException(resourceType); }

        final CommandWrapper resourceDetails = getResourceDetails(noteType, resourceId);

        final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteNote(resourceDetails, resourceType, resourceId, noteId)
                .build();
View Full Code Here

            }
            // case SAVING_ACCOUNT: {
            // return createSavingAccountNote(command);
            // }
            default:
                throw new NoteResourceNotSupportedException(resourceUrl);
        }

    }
View Full Code Here

            }
            // case SAVING_ACCOUNT: {
            // return updateSavingAccountNote(command);
            // }
            default:
                throw new NoteResourceNotSupportedException(resourceUrl);
        }
    }
View Full Code Here

TOP

Related Classes of org.mifosplatform.portfolio.note.exception.NoteResourceNotSupportedException

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.