Package net.stinfoservices.pacifiq.shared.exception

Examples of net.stinfoservices.pacifiq.shared.exception.CustomException


            LOGGER.info(MessageFormat.format(ResourceBundle.getBundle("system").getString("OBJECT_SAVED"), this.getClass().getSimpleName(),
                    p.getId()));

            return (p);
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here


            entityManager.remove(nbp);

            LOGGER.info(MessageFormat.format(ResourceBundle.getBundle("system").getString("OBJECT_DELETED"), this.getClass().getSimpleName(),
                    nbp.getId()));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

                c = result.get(0);
            }

            return (c);
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

        try {
            return (entityManager.createQuery("SELECT name FROM " + IModel.DATABASE_PRE + "BusinessPartner o where name in (:names)").setParameter(
                    "names", names).getResultList());
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

            Authentication auth = SecurityContextHolder.getContext().getAuthentication();
            final Collection<? extends GrantedAuthority> authorities = auth.getAuthorities();
            final GrantedAuthority authority = new SimpleGrantedAuthority(role);
            boolean hasAuthority = authorities.contains(authority);
            if (!hasAuthority) {
                throw new CustomException(MessageFormat.format(LocaleManager.getInstance(aSession).getMessageResource(ServiceSecurityHelper.class)
                        .getString("EXCEPTION_ACCESS_DENIED_BECAUSE_OF_RIGHTS"), role));
            }
            return hasAuthority;
        }
        return false;
View Full Code Here

                if (hasAuthority) {
                    break;
                }
            }
            if (!hasAuthority) {
                throw new CustomException(LocaleManager.getInstance(aSession).getMessageResource(ServiceSecurityHelper.class)
                        .getString("EXCEPTION_ACCESS_DENIED_BECAUSE_OF_RIGHTS_SIMPLE"));
            }
            return hasAuthority;
        }
        return false;
View Full Code Here

    public void updateLicenseNumber(Long id, String licenseNumber) throws Exception {
        try {
            taaServiceCore.updateLicenseNumber(id, licenseNumber);
        } catch (JpaSystemException e) {
            CustomExceptionMessageHelper.log(getClass(), Level.SEVERE, e);
            throw new CustomException(MessageFormat.format(taaServiceCore.getMessageResource().getString("EXCEPTION_LICENSE_NUMBER_ALREADY_EXISTS"),
                    licenseNumber));
        }
    }
View Full Code Here

    public Long saveTAA(TAADTO document) throws Exception {
        try {
            return taaServiceCore.saveTAA(document);
        } catch (JpaSystemException e) {
            CustomExceptionMessageHelper.log(getClass(), Level.SEVERE, e);
            throw new CustomException(MessageFormat.format(taaServiceCore.getMessageResource().getString("EXCEPTION_LICENSE_NUMBER_ALREADY_EXISTS"),
                    document.getVersionNumber()));
        }
    }
View Full Code Here

        }

        try {
            return (entityManager.find(GenericTAA.class, id));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

                t = result.get(0);
            }

            return (t);
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of net.stinfoservices.pacifiq.shared.exception.CustomException

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.