Package org.jitterbit.util.name

Examples of org.jitterbit.util.name.NameValidator.validateName()


        actionListeners.add(lst);
    }

    public void validateProjectName() throws IllegalNameException {
        NameValidator validator = NameValidatorStore.getInstance().get(IntegrationProject.class);
        validator.validateName(nameField.getValue());
    }

    public void addValidInputSensor(Enablable e) {
        TextEnablerCondition condition = new NonEmptyTextEnablerCondition(true);
        projectNameEnabler.addDependency(e, condition);
View Full Code Here


        if (!EntityUtils.isNameUnique(this, name)) {
            throw new IllegalNameException("The name \"" + name + "\" is already in use.");
        }
        NameValidator v = NameValidatorStore.getInstance().get(this);
        if (v != null) {
            v.validateName(name);
        }
    }

    /**
     * Returns a list of the <code>IntegrationDataLink</code>s to the objects on which this
View Full Code Here

    }

    private boolean validateName() {
        try {
            NameValidator validator = NameValidatorStore.getInstance().get(IntegrationProject.class);
            validator.validateName(newName);
            return true;
        } catch (IllegalNameException ex) {
            Alert.error(ex.getMessage(), "Invalid Name");
            return false;
        }
View Full Code Here

            @Override
            public void validateName(String name) throws IllegalNameException {
                NameValidator validator = NameValidatorStore.getInstance().get(entity);
                if (validator != null) {
                    validator.validateName(name);
                }
                if (!EntityUtils.isNameUnique(entity, name)) {
                    String msg = format("DuplicateName.Message", name);
                    throw new IllegalNameException(msg);
                }
View Full Code Here

        return new ProjectLocation(newName, newFolder);
    }
   
    private void validateName(String name) throws IllegalNameException {
        NameValidator validator = NameValidatorStore.getInstance().get(IntegrationProject.class);
        validator.validateName(name);
    }
   
    private boolean isNewLocationOk(ProjectLocation newLocation) {
        if (newLocation.getLocation().exists()) {
            Resolution r = conflictResolver.resolve(newLocation);
View Full Code Here

        }

        private boolean isNameOk(String name) {
            try {
                NameValidator validator = NameValidatorStore.getInstance().get(IntegrationProject.class);
                validator.validateName(name);
                return true;
            } catch (IllegalNameException ex) {
                handleError(ex);
                return false;
            }
View Full Code Here

     *             if <tt>originalName</tt> is not a valid name.
     */
    public static String getAvailableName(IntegrationEntity entity, String originalName) throws IllegalNameException {
        NameValidator v = NameValidatorStore.getInstance().get(entity);
        if (v != null) {
            v.validateName(originalName);
        }
        String newName = originalName;
        int counter = 2;
        while (!EntityUtils.isNameUnique(entity, newName)) {
            newName = originalName + " (" + counter + ")";
View Full Code Here

     */
    public static String getAvailableName(IntegrationEntity entity, IntegrationEntity owner, String originalName)
                    throws IllegalNameException {
        NameValidator v = NameValidatorStore.getInstance().get(entity);
        if (v != null) {
            v.validateName(originalName);
        }
        String newName = originalName;
        int counter = 2;
        while (EntityUtils.isNameTaken(owner, newName)) {
            newName = originalName + " (" + counter + ")";
View Full Code Here

            @Override
            public void validateName(String name) throws IllegalNameException {
                NameValidator validator = NameValidatorStore.getInstance().get(itemToMove);
                if (validator != null) {
                    validator.validateName(name);
                }
                if (!EntityUtils.isChildNameUnique(newOwner, name)) {
                    String msg = format("DuplicateName.Message", name);
                    throw new IllegalNameException(msg);
                }
View Full Code Here

    }

    private boolean isProjectNameValid() {
        try {
            NameValidator validator = NameValidatorStore.getInstance().get(IntegrationEntity.class);
            validator.validateName(currentProjectName);
            return true;
        } catch (IllegalNameException e) {
            return false;
        }
    }
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.