Examples of SubscriptionException


Examples of org.apache.james.mailbox.exception.SubscriptionException

                }
            }
        } catch (PathNotFoundException e) {
            // Do nothing just return the empty list later
        } catch (RepositoryException e) {
            throw new SubscriptionException(e);
        }
        return subList;

    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

           
            // Copy new properties to the node
            ((JCRSubscription)subscription).merge(node);

        } catch (RepositoryException e) {
            throw new SubscriptionException(e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

                    return subscription;
                }
            }
            return null;
        } catch (IOException e) {
            throw new SubscriptionException(e);
        } finally {
            if (subscriptions != null) {
                try {
                    subscriptions.close();
                } catch (IOException ex) {
                    throw new SubscriptionException(ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

        try {
            subscriptions = new HTable(conf, SUBSCRIPTIONS_TABLE);
            Put put = toPut(subscription);
            subscriptions.put(put);
        } catch (IOException e) {
            throw new SubscriptionException(e);
        } finally {
            if (subscriptions != null) {
                try {
                    subscriptions.close();
                } catch (IOException ex) {
                    throw new SubscriptionException(ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

                    subscriptionList.add(new SimpleSubscription(user, Bytes.toString(key.getQualifier())));
                }
            }
            return subscriptionList;
        } catch (IOException e) {
            throw new SubscriptionException(e);
        } finally {
            if (subscriptions != null) {
                try {
                    subscriptions.close();
                } catch (IOException ex) {
                    throw new SubscriptionException(ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

            Delete delete = new Delete(Bytes.toBytes(subscription.getUser()));
            delete.deleteColumns(SUBSCRIPTION_CF, Bytes.toBytes(subscription.getMailbox()));
            subscriptions.delete(delete);
            subscriptions.close();
        } catch (IOException e) {
            throw new SubscriptionException(e);
        } finally {
            if (subscriptions != null) {
                try {
                    subscriptions.close();
                } catch (IOException ex) {
                    throw new SubscriptionException(ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

            return (Subscription) getEntityManager().createNamedQuery("findFindMailboxSubscriptionForUser")
            .setParameter("userParam", user).setParameter("mailboxParam", mailbox).getSingleResult();
        } catch (NoResultException e) {
            return null;
        } catch (PersistenceException e) {
            throw new SubscriptionException(e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

     */
    public void save(Subscription subscription) throws SubscriptionException {
        try {
            getEntityManager().persist(subscription);
        } catch (PersistenceException e) {
            throw new SubscriptionException(e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

    @SuppressWarnings("unchecked")
    public List<Subscription> findSubscriptionsForUser(String user) throws SubscriptionException {
        try {
            return (List<Subscription>) getEntityManager().createNamedQuery("findSubscriptionsForUser").setParameter("userParam", user).getResultList();
        } catch (PersistenceException e) {
            throw new SubscriptionException(e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.SubscriptionException

     */
    public void delete(Subscription subscription) throws SubscriptionException {
        try {
            getEntityManager().remove(subscription);
        } catch (PersistenceException e) {
            throw new SubscriptionException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.