Package org.eurekastreams.commons.exceptions

Examples of org.eurekastreams.commons.exceptions.ValidationException.addError()


            }

            if (!inActivity.getOriginalActor().getUniqueIdentifier().equals(
                    origActivity.getActor().getUniqueIdentifier()))
            {
                ve.addError("OriginalActor",
                        "Original actor of the shared activity does not match the actor of the original activity.");
            }

            if (!inActivity.getBaseObjectType().equals(origActivity.getBaseObjectType()))
            {
View Full Code Here


                        "Original actor of the shared activity does not match the actor of the original activity.");
            }

            if (!inActivity.getBaseObjectType().equals(origActivity.getBaseObjectType()))
            {
                ve.addError("BaseObjectType", "activity must be of the same type as the original activity.");
            }

            transMgr.commit(transStatus);
        }
        catch (Exception ex)
View Full Code Here

            transMgr.commit(transStatus);
        }
        catch (Exception ex)
        {
            transMgr.rollback(transStatus);
            ve.addError("OriginalActivity", "Error occurred accessing the original activity.");
        }

        if (!ve.getErrors().isEmpty())
        {
            throw ve;
View Full Code Here

            hasFeature = checkForRequiredFeature(inPluginDefinitionUrl);
        }
        catch (Exception ex)
        {
            log.debug(CANT_FIND_PLUGIN, ex);
            ve.addError("url", CANT_FIND_PLUGIN);
            throw ve;
        }

        final Map<String, GeneralGadgetDefinition> gadgetDefs = new HashMap<String, GeneralGadgetDefinition>();
        gadgetDefs.put(inPluginDefinitionUrl, inPluginDefinition);
View Full Code Here

            // add see if a error message was created. If so add it as a validation exceptions. If not check for
            // defaults.
            if (!errorMessage.equals(""))
            {
                ve.addError("url", errorMessage);

            }
            else
            {
                if (inPluginDefinition.getObjectType() == null)
View Full Code Here

        {
            throw ve2;
        }
        catch (Exception ex)
        {
            ve.addError("url", "Error retreiving plugin data.");
            log.debug(ex.fillInStackTrace());
            throw ve;
        }

    }
View Full Code Here

       
        if (inActivity.getOriginalActor() != null
                && inActivity.getOriginalActor().getUniqueIdentifier() != null
                && inActivity.getOriginalActor().getUniqueIdentifier().length() > 0)
        {
            ve.addError("OriginalActor", "Must not be included for Post verbs.");
        }
       
        if (!ve.getErrors().isEmpty())
        {
            throw ve;
View Full Code Here

        SystemSettings settings = getSystemSettingsMapper.execute(null);

        // Verify that group with given short name doesn't already exist.
        if (getGroupMapper().findByShortName(inGroup.getShortName()) != null)
        {
            ve.addError(SHORTNAME_KEY, DUP_SHORTNAME_MSG);
        }

        // Verify that group has on coordinator.
        if (inGroup.getCoordinators().isEmpty())
        {
View Full Code Here

        }

        // Verify that group has on coordinator.
        if (inGroup.getCoordinators().isEmpty())
        {
            ve.addError("coordinators", "Group must have at least one coordinator");
        }

        if (!ve.getErrors().isEmpty())
        {
            throw ve;
View Full Code Here

        //If result is found for url and it's not the current item being updated,
        //throw exception
        if (inUseGalleryItem != null && (inUseGalleryItem.getUUID() != inGalleryItem.getUUID()))
        {
            ValidationException ve = new ValidationException();
            ve.addError(URL_KEY, "Url has already been uploaded to Eureka");
            throw ve;
        }
        galleryItemMapper.flush();
    }
}
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.