Package org.eurekastreams.commons.exceptions

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


                    valEx.addError("stream", "Add at least one stream");
                    throw valEx;
                }
                else if (arr.size() > MAX_STREAMS)
                {
                    valEx.addError("stream", "Maximum number of streams allowed is " + MAX_STREAMS);
                    throw valEx;
                }
            }
            catch (JSONException ex)
            {
View Full Code Here


        ValidationException vex = new ValidationException();

        if (inRequest.getTargetUniqueId().length() <= 0)
        {
            vex.addError("FollowerAndTarget", "This action requires a target unique id");
            logger.error("Validation error - " + vex.getErrors().get("FollowerAndTarget"));
            // if this occurs, throw the error now, no point continuing since the following calls will fail.
            throw vex;
        }
View Full Code Here

            throw vex;
        }

        if (inRequest.getFollowerStatus().equals(Follower.FollowerStatus.NOTSPECIFIED))
        {
            vex.addError("FollowingStatus", "This action does not accept setting FollowerStatus of NOTSPECIFIED");
            logger.error("Validation error - " + vex.getErrors().get("FollowingStatus"));
            throw vex;
        }

        decoratorValidationStrategy.validate(inActionContext);
View Full Code Here

        ValidationException ve = new ValidationException();

        if (fields.containsKey("ldapGroups") && ((List<MembershipCriteria>) fields.get("ldapGroups")).size() == 0)
        {
            ve.addError("ldapGroups", "At least one entry is required in the access list");
        }

        if (fields.containsKey("contentWarningText") && fields.get("contentWarningText") == null)
        {
            ve.addError("contentWarningText", CONTENT_WARNING_REQUIRED_ERROR_MESSAGE);
View Full Code Here

            ve.addError("ldapGroups", "At least one entry is required in the access list");
        }

        if (fields.containsKey("contentWarningText") && fields.get("contentWarningText") == null)
        {
            ve.addError("contentWarningText", CONTENT_WARNING_REQUIRED_ERROR_MESSAGE);
        }
        else if (fields.containsKey("contentWarningText")
                && ((String) fields.get("contentWarningText")).length() > SystemSettings.MAX_INPUT)
        {
            ve.addError("contentWarningText", CONTENT_WARNING_LENGTH_ERROR_MESSAGE);
View Full Code Here

            ve.addError("contentWarningText", CONTENT_WARNING_REQUIRED_ERROR_MESSAGE);
        }
        else if (fields.containsKey("contentWarningText")
                && ((String) fields.get("contentWarningText")).length() > SystemSettings.MAX_INPUT)
        {
            ve.addError("contentWarningText", CONTENT_WARNING_LENGTH_ERROR_MESSAGE);
        }

        if (fields.containsKey("siteLabel") && fields.get("siteLabel") == null)
        {
            ve.addError("siteLabel", SITE_LABEL_REQUIRED_ERROR_MESSAGE);
View Full Code Here

            ve.addError("contentWarningText", CONTENT_WARNING_LENGTH_ERROR_MESSAGE);
        }

        if (fields.containsKey("siteLabel") && fields.get("siteLabel") == null)
        {
            ve.addError("siteLabel", SITE_LABEL_REQUIRED_ERROR_MESSAGE);
        }
        else if (fields.containsKey("siteLabel")
                && ((String) fields.get("siteLabel")).length() > SystemSettings.MAX_SITELABEL_INPUT)
        {
            ve.addError("siteLabel", SITE_LABEL_LENGTH_ERROR_MESSAGE);
View Full Code Here

            ve.addError("siteLabel", SITE_LABEL_REQUIRED_ERROR_MESSAGE);
        }
        else if (fields.containsKey("siteLabel")
                && ((String) fields.get("siteLabel")).length() > SystemSettings.MAX_SITELABEL_INPUT)
        {
            ve.addError("siteLabel", SITE_LABEL_LENGTH_ERROR_MESSAGE);
        }

        if (fields.containsKey("termsOfService") && fields.get("termsOfService") == null)
        {
            ve.addError("termsOfService", TOS_REQUIRED_ERROR_MESSAGE);
View Full Code Here

            ve.addError("siteLabel", SITE_LABEL_LENGTH_ERROR_MESSAGE);
        }

        if (fields.containsKey("termsOfService") && fields.get("termsOfService") == null)
        {
            ve.addError("termsOfService", TOS_REQUIRED_ERROR_MESSAGE);
        }

        if (fields.containsKey("pluginWarning") && fields.get("pluginWarning") == null)
        {
            ve.addError("pluginWarning", PLUGIN_WARNING_REQUIRED_ERROR_MESSAGE);
View Full Code Here

            ve.addError("termsOfService", TOS_REQUIRED_ERROR_MESSAGE);
        }

        if (fields.containsKey("pluginWarning") && fields.get("pluginWarning") == null)
        {
            ve.addError("pluginWarning", PLUGIN_WARNING_REQUIRED_ERROR_MESSAGE);
        }

        if (fields.containsKey("contentExpiration") && fields.get("contentExpiration") == null)
        {
            ve.addError("contentExpiration", CONTENT_EXPIRATION_REQUIRED_ERROR_MESSAGE);
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.