Package org.nasutekds.server.config

Examples of org.nasutekds.server.config.ConfigException


          break;

        default:
          Message message =
              ERR_PLUGIN_CHANGE_NUMBER_INVALID_PLUGIN_TYPE.get(t.toString());
          throw new ConfigException(message);
      }
    }
    if (types.size() != 4) {
      StringBuffer expected = new StringBuffer();
      expected.append(PluginType.POST_OPERATION_ADD.toString());
      expected.append(", ");
      expected.append(PluginType.POST_OPERATION_DELETE.toString());
      expected.append(", ");
      expected.append(PluginType.POST_OPERATION_MODIFY.toString());
      expected.append(", ");
      expected.append(PluginType.POST_OPERATION_MODIFY_DN.toString());

      StringBuffer found = new StringBuffer();
      boolean first = true;
      for (PluginType t : types) {
        if (first) {
          first = false;
        } else {
          found.append(", ");
        }
        found.append(t.toString());
      }

      Message message = ERR_PLUGIN_CHANGE_NUMBER_INVALID_PLUGIN_TYPE_LIST.get(
              found.toString(), expected.toString());
          throw new ConfigException(message);
    }
  }
View Full Code Here


    // Make sure that a configuration entry was provided.  If not, then we will
    // not be able to complete initialization.
    if (configEntry == null)
    {
      Message message = ERR_ROOTDSE_CONFIG_ENTRY_NULL.get();
      throw new ConfigException(message);
    }

    // Get the set of user-defined attributes for the configuration entry.  Any
    // attributes that we don't recognize will be included directly in the root
    // DSE.
View Full Code Here


        default:
          Message message =
              ERR_PLUGIN_LASTMOD_INVALID_PLUGIN_TYPE.get(t.toString());
          throw new ConfigException(message);
      }
    }
  }
View Full Code Here

    // likely want to separate the data for each base DN into a separate entry
    // map.
    if ((baseDNs == null) || (baseDNs.length != 1))
    {
      Message message = ERR_MEMORYBACKEND_REQUIRE_EXACTLY_ONE_BASE.get();
      throw new ConfigException(message);
    }

    baseDNSet = new HashSet<DN>();
    for (DN dn : baseDNs)
    {
View Full Code Here

      Message message =
        INFO_WARN_CONFIG_ENTRYCACHE_NO_MONITOR_CONFIG_ENTRY.get(
        ConfigConstants.DN_ENTRY_CACHE_MONITOR_CONFIG,
        monitorName);
      logError(message);
      throw new ConfigException(message);
    }
    if (!monitorConfiguration.isEnabled()) {
      Message message =
        INFO_WARN_CONFIG_ENTRYCACHE_MONITOR_CONFIG_DISABLED.get(
        ConfigConstants.DN_ENTRY_CACHE_MONITOR_CONFIG,
        monitorName);
      logError(message);
      throw new ConfigException(message);
    }
  }
View Full Code Here

        //Rule ending with '.' is invalid'
        if(ruleString.endsWith("."))
        {
            Message message =
                ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
            throw new ConfigException(message);
        }
        else if(ruleString.startsWith("."))
        {
            ruleType=RuleType.HOSTPATTERN;
        }
View Full Code Here

        String s[]=rule.split("^[0-9a-zA-z-.]+");
        if(s.length > 0)
        {
            Message message =
                ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
            throw new ConfigException(message);
        }
        hostPattern=rule;
    }
View Full Code Here

        String s[]=rule.split("^[0-9a-zA-z-.*]+");
        if(s.length > 0)
        {
            Message message =
                ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
            throw new ConfigException(message);
        }
        hostName=rule.split("\\.", -1);
    }
View Full Code Here

        try {
            //Make sure we have four parts
            if(s.length != IN4ADDRSZ) {
                Message message =
                    ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
                throw new ConfigException(message);
            }
            for(int i=0; i < IN4ADDRSZ; i++)
            {
                String quad=s[i].trim();
                if(quad.equals("*"))
                    wildCard.set(i) ; //see wildcard mark bitset
                else
                {
                    long val=Integer.parseInt(quad);
                    //must be between 0-255
                    if((val < 0) ||  (val > 0xff))
                    {
                        Message message =
                            ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
                        throw new ConfigException(message);
                    }
                    ruleMask[i] = (byte) (val & 0xff);
                }
            }
        } catch (NumberFormatException nfex)
        {
            Message message =
                ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
            throw new ConfigException(message);
        }
    }
View Full Code Here

            //can only have one prefix value and a subnet string
            if((s.length  < 1) || (s.length > 2) )
            {
                Message message =
                    ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
                throw new ConfigException(message);
            }
            else  if(s.length == 2)
            {
                //can't have wildcard with a prefix
                if(s[0].indexOf('*') > -1)
                {
                    Message message =
                        ERR_ADDRESSMASK_WILDCARD_DECODE_ERROR.get();
                    throw new ConfigException(message);
                }
                prefix = Integer.parseInt(s[1]);
            }
            //must be between 0-maxprefix
            if((prefix < 0) || (prefix > maxPrefix))
            {
                Message message =
                    ERR_ADDRESSMASK_PREFIX_DECODE_ERROR.get();
                throw new ConfigException(message);
            }
        }
        catch(NumberFormatException nfex)
        {
            Message msg = ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
            throw new ConfigException(msg);
        }
        return prefix;
    }
View Full Code Here

TOP

Related Classes of org.nasutekds.server.config.ConfigException

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.