Package org.apache.rave.exception

Examples of org.apache.rave.exception.ResourceNotFoundException


        return tokenService.getEncryptedSecurityToken(item.getId(), item.getWidgetUrl(), item.getOwnerId());
    }

    private void validate(Widget widget) {
        if(widget == null) {
            throw new ResourceNotFoundException("The requested gadget does not exist in the gadget store.");
        } else if(widget.getWidgetStatus().equals(WidgetStatus.PREVIEW)) {
            throw new IllegalStateException("The requested gadget exists in the gadget store but is not published.");
        }
    }
View Full Code Here


    @Override
    public Category getCategory(String id) {

        org.apache.rave.model.Category fromDb = categoryService.get(id);
        if(fromDb == null) {
            throw new ResourceNotFoundException(id);
        }

        return new Category(fromDb);
    }
View Full Code Here

    @Override
    public PortalPreference getPreference(String id) {
        PortalPreference fromDb = preferenceService.getPreference(id);

        if(fromDb == null) {
            throw new ResourceNotFoundException(id);
        }

        return fromDb;
    }
View Full Code Here

        return tokenService.getEncryptedSecurityToken(item.getId(), item.getWidgetUrl(), item.getOwnerId());
    }

    protected void validate(Widget widget) {
        if(widget == null) {
            throw new ResourceNotFoundException("The requested gadget does not exist in the gadget store.");
        } else if(widget.getWidgetStatus().equals(WidgetStatus.PREVIEW)) {
            throw new IllegalStateException("The requested gadget exists in the gadget store but is not published.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.exception.ResourceNotFoundException

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.