Package org.eurekastreams.commons.exceptions

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


            ve.addError("pluginWarning", PLUGIN_WARNING_REQUIRED_ERROR_MESSAGE);
        }

        if (fields.containsKey("contentExpiration") && fields.get("contentExpiration") == null)
        {
            ve.addError("contentExpiration", CONTENT_EXPIRATION_REQUIRED_ERROR_MESSAGE);
        }
        else if (fields.containsKey("contentExpiration") && !(fields.get("contentExpiration") instanceof Integer))
        {
            ve.addError("contentExpiration", CONTENT_EXPIRATION_ERROR_MESSAGE);
        }
View Full Code Here


        {
            ve.addError("contentExpiration", CONTENT_EXPIRATION_REQUIRED_ERROR_MESSAGE);
        }
        else if (fields.containsKey("contentExpiration") && !(fields.get("contentExpiration") instanceof Integer))
        {
            ve.addError("contentExpiration", CONTENT_EXPIRATION_ERROR_MESSAGE);
        }
        else if (fields.containsKey("contentExpiration") && fields.get("contentExpiration") != null
                && fields.get("contentExpiration") instanceof Integer
                && ((Integer) fields.get("contentExpiration") < SystemSettings.MIN_CONTENT_EXPIRATION //
                || (Integer) fields.get("contentExpiration") > SystemSettings.MAX_CONTENT_EXPIRATION))
View Full Code Here

        else if (fields.containsKey("contentExpiration") && fields.get("contentExpiration") != null
                && fields.get("contentExpiration") instanceof Integer
                && ((Integer) fields.get("contentExpiration") < SystemSettings.MIN_CONTENT_EXPIRATION //
                || (Integer) fields.get("contentExpiration") > SystemSettings.MAX_CONTENT_EXPIRATION))
        {
            ve.addError("contentExpiration", CONTENT_EXPIRATION_ERROR_MESSAGE);
        }

        if (fields.containsKey("tosPromptInterval") && !(fields.get("tosPromptInterval") instanceof Integer))
        {
            ve.addError("tosPromptInterval", TOS_PROMPT_INTERVAL_INVALID_ERROR_MESSAGE);
View Full Code Here

            ve.addError("contentExpiration", CONTENT_EXPIRATION_ERROR_MESSAGE);
        }

        if (fields.containsKey("tosPromptInterval") && !(fields.get("tosPromptInterval") instanceof Integer))
        {
            ve.addError("tosPromptInterval", TOS_PROMPT_INTERVAL_INVALID_ERROR_MESSAGE);
        }
        else if (fields.containsKey("tosPromptInterval")
                && (Integer) fields.get("tosPromptInterval") < SystemSettings.MIN_TOS_PROMPT_INTERVAL)
        {
            ve.addError("tosPromptInterval", MIN_TOS_PROMPT_INTERVAL_ERROR_MESSAGE);
View Full Code Here

            ve.addError("tosPromptInterval", TOS_PROMPT_INTERVAL_INVALID_ERROR_MESSAGE);
        }
        else if (fields.containsKey("tosPromptInterval")
                && (Integer) fields.get("tosPromptInterval") < SystemSettings.MIN_TOS_PROMPT_INTERVAL)
        {
            ve.addError("tosPromptInterval", MIN_TOS_PROMPT_INTERVAL_ERROR_MESSAGE);
        }

        if (!fields.containsKey("admins") || fields.get("admins") == null
                || ((HashSet<Person>) fields.get("admins")).size() == 0)
        {
View Full Code Here

        }

        if (!fields.containsKey("admins") || fields.get("admins") == null
                || ((HashSet<Person>) fields.get("admins")).size() == 0)
        {
            ve.addError("admins", SYSTEM_ADMINISTRATORS_EMPTY_ERROR_MESSAGE);
        }
        else
        {
            boolean adminErrorOccurred = false;
            // see if the people exist
View Full Code Here

                }
            }
            if (lockedUsers.length() > 0)
            {
                // some of the users are locked users
                ve.addError("admins", SYSTEM_ADMINISTRATOR_LOCKED_OUT_ERROR_MESSAGE + lockedUsers);
                adminErrorOccurred = true;
            }

            if (!adminErrorOccurred)
            {
View Full Code Here

                    }
                }
                if (missingUsers.length() > 0)
                {
                    // some of the users weren't found
                    ve.addError("admins", SYSTEM_ADMINISTRATOR_NOTFOUND_ERROR_MESSAGE + missingUsers);
                }
            }
        }

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

        // GalleryItem is a URL, find or create.
        T inUseGalleryItem = galleryItemMapper.findByUrl(galleryItemUrl);
        if (inUseGalleryItem != null && inUseGalleryItem.getShowInGallery())
        {
            ValidationException ve = new ValidationException();
            ve.addError(URL_KEY, "Url has already been uploaded to Eureka");
            throw ve;
        }
        else if (inUseGalleryItem != null && !inUseGalleryItem.getShowInGallery())
        {
            outGalleryItem = inUseGalleryItem;
View Full Code Here

        // Actor is not validated because it is supplied by the action.

        if (inActivity.getOriginalActor() == null || inActivity.getOriginalActor().getUniqueIdentifier() == null
                || inActivity.getOriginalActor().getUniqueIdentifier().length() <= 0)
        {
            ve.addError("OriginalActor", "Must be included for Share verbs.");
            throw ve;
        }

        List<Long> activityIds = new ArrayList<Long>(1);
        activityIds.add(new Long(inActivity.getBaseObjectProperties().get("originalActivityId")));
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.