Package org.sakaiproject.entitybus.exception

Examples of org.sakaiproject.entitybus.exception.EntityException


                entities.add(trim ? new CommunityEntityTrim(c, uparams) : new CommunityEntity(c, uparams));
            }

            return entities;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
    }
View Full Code Here


            refreshParams(context);

            Item comm = Item.find(context, Integer.parseInt(id));
            return comm != null ? true : false;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
    }
View Full Code Here

            if (entityExists(ref.getId())) {
                return new ItemEntity(ref.getId(), context, uparams);
            }
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
        throw new IllegalArgumentException("Invalid id:" + ref.getId());
    }
View Full Code Here

                entities.add(new ItemEntity(items.next(), context, uparams));
            }

            return entities;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
    }
View Full Code Here

        return true;
    }

    public Object getEntity(EntityReference reference) {
        log.info(userInfo() + "get_harvest:" + reference.getId());
        throw new EntityException("Not Acceptable", "The data is not available", 406);
    }
View Full Code Here

                entities.add(new ItemEntity(res.get(x).item, context, uparams));
            }

            return entities;
        } catch (ParseException ex) {
            throw new EntityException("Bad request", "Incompatible date format", 400);
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
    }
View Full Code Here

            refreshParams(context);

            Group comm = Group.find(context, Integer.parseInt(id));
            return comm != null ? true : false;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } catch (NumberFormatException ex) {
            throw new EntityException("Bad request", "Could not parse input", 400);
        } finally {
            removeConn(context);
        }
    }
View Full Code Here

            if (entityExists(ref.getId())) {
                return new GroupEntity(ref.getId(), context);
            }
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
        throw new IllegalArgumentException("Invalid id:" + ref.getId());
    }
View Full Code Here

                entities.add(new GroupEntity(g));
            }

            return entities;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
        }
    }
View Full Code Here

                    groups.add(new GroupEntityTrim(group));
                }
            }
            return groups;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } catch (AuthorizeException ex) {
            throw new EntityException("Forbidden", "Forbidden", 403);
        }
    }
View Full Code Here

TOP

Related Classes of org.sakaiproject.entitybus.exception.EntityException

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.