Package org.broadleafcommerce.common.exception

Examples of org.broadleafcommerce.common.exception.ServiceException


            Entity adminEntity = helper.getRecord(adminProperties, adminInstance, null, null);

            return adminEntity;
        } catch (Exception e) {
            LOG.error("Unable to execute persistence activity", e);
            throw new ServiceException("Unable to add entity for " + entity.getType()[0], e);
        }
    }
View Full Code Here


      try {
      roleDao.removeCustomerRolesByCustomerId(Long.parseLong(entity.findProperty("id").getValue()));
      helper.getCompatibleModule(OperationType.BASIC).remove(persistencePackage);
    } catch (Exception e) {
      LOG.error("Unable to execute persistence activity", e);
            throw new ServiceException("Unable to remove entity for " + entity.getType()[0], e);
    }
    }
View Full Code Here

            String deleteQuery = shs.getNamespaceFieldName() + ":(\"" + shs.getCurrentNamespace() + "\")";
            LOG.debug("Deleting by query: " + deleteQuery);
            SolrContext.getReindexServer().deleteByQuery(deleteQuery);
            SolrContext.getReindexServer().commit();
        } catch (Exception e) {
            throw new ServiceException("Could not delete documents", e);
        }
    }
View Full Code Here

                server.commit();
            }
            TransactionUtils.finalizeTransaction(status, transactionManager, false);
        } catch (SolrServerException e) {
            TransactionUtils.finalizeTransaction(status, transactionManager, true);
            throw new ServiceException("Could not rebuild index", e);
        } catch (IOException e) {
            TransactionUtils.finalizeTransaction(status, transactionManager, true);
            throw new ServiceException("Could not rebuild index", e);
        } catch (RuntimeException e) {
            TransactionUtils.finalizeTransaction(status, transactionManager, true);
            throw e;
        } finally {
            if (!cacheOperationManaged) {
View Full Code Here

             if (LOG.isDebugEnabled()) {
                 LOG.debug("Optimizing the index...");
             }
             server.optimize();
         } catch (SolrServerException e) {
             throw new ServiceException("Could not optimize index", e);
         }
     }
View Full Code Here

            try {
                SolrContext.getAdminServer().request(car);
            } catch (Exception e) {
                LOG.error(e);
                throw new ServiceException("Unable to swap cores", e);
            }
        }
    }
View Full Code Here

        try {
            CleanResults results = as.scan(string, antiSamyPolicy);
            return results.getCleanHTML();
        } catch (Exception e) {
            LOG.error("Unable to clean the passed in entity values", e);
            throw new ServiceException("Unable to clean the passed in entity values", e);
        }
    }
View Full Code Here

            sb.append("Unable to clean the passed in entity values");
            sb.append("\nNote - ");
            sb.append(getAntiSamyPolicyFileLocation());
            sb.append(" policy in effect. Set a new policy file to modify validation behavior/strictness.");
            LOG.error(sb.toString(), e);
            throw new ServiceException(sb.toString(), e);
        }
    }
View Full Code Here

    @Override
    public void compareToken(String passedToken) throws ServiceException {
        if (xsrfProtectionEnabled) {
            if (!getCSRFToken().equals(passedToken)) {
                throw new ServiceException("XSRF token mismatch (" + passedToken + "). Session may be expired.");
            } else {
                LOG.debug("Validated CSRF token");
            }
        }
    }
View Full Code Here

            if (StringUtils.isEmpty(token)) {
                try {
                    token = RandomGenerator.generateRandomId("SHA1PRNG", 32);
                } catch (NoSuchAlgorithmException e) {
                    LOG.error("Unable to generate random number", e);
                    throw new ServiceException("Unable to generate random number", e);
                }
                session.setAttribute(CSRFTOKEN, token);
            }
            return token;
        }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.common.exception.ServiceException

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.