Package org.nasutekds.server.admin

Examples of org.nasutekds.server.admin.PropertyIsMandatoryException


    }

    if (values.isEmpty() && d.hasOption(PropertyOption.MANDATORY)) {
      // But only if there are no default values.
      if (property.getDefaultValues().isEmpty()) {
        throw new PropertyIsMandatoryException(d);
      }
    }

    // Validate each value.
    for (T e : values) {
View Full Code Here


    for (PropertyDefinition<?> pd : definition.getAllPropertyDefinitions()) {
      Property<?> p = getProperty(pd);
      if (pd.hasOption(PropertyOption.MANDATORY)
          && p.getEffectiveValues().isEmpty()) {
        exceptions.add(new PropertyIsMandatoryException(pd));
      }
    }

    if (!exceptions.isEmpty()) {
      throw new MissingMandatoryPropertiesException(definition
View Full Code Here

      if (values.size() > 1 && !pd.hasOption(PropertyOption.MULTI_VALUED)) {
        throw new PropertyIsSingleValuedException(pd);
      }

      if (values.isEmpty() && pd.hasOption(PropertyOption.MANDATORY)) {
        throw new PropertyIsMandatoryException(pd);
      }

      if (values.isEmpty()) {
        // Use the property's default values.
        values.addAll(findDefaultValues(path.asSubType(mod), pd, false));
View Full Code Here

    if (activeValues.isEmpty() && pd.hasOption(PropertyOption.MANDATORY)) {
      // The active values maybe empty because of a previous
      // exception.
      if (exception == null) {
        exception = new PropertyIsMandatoryException(pd);
      }
    }

    // Get the property's default values.
    Collection<PD> defaultValues;
View Full Code Here

    }

    if (pvalues.isEmpty() && pd.hasOption(PropertyOption.MANDATORY)) {
      // The values maybe empty because of a previous exception.
      if (exception == null) {
        exception = new PropertyIsMandatoryException(pd);
      }
    }

    if (exception != null) {
      throw exception;
View Full Code Here

    } else if (e instanceof IllegalPropertyValueStringException) {
      IllegalPropertyValueStringException pe =
        (IllegalPropertyValueStringException) e;
      return adapt(d, pe);
    } else if (e instanceof PropertyIsMandatoryException) {
      PropertyIsMandatoryException pe = (PropertyIsMandatoryException) e;
      return adapt(d, pe);
    } else if (e instanceof PropertyIsSingleValuedException) {
      PropertyIsSingleValuedException pe = (PropertyIsSingleValuedException) e;
      return adapt(d, pe);
    } else if (e instanceof PropertyIsReadOnlyException) {
View Full Code Here

TOP

Related Classes of org.nasutekds.server.admin.PropertyIsMandatoryException

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.