Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.InitializationException


  {
    if (arguments.length != 0)
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_COUNT.get(
          getName(), lineNumber, 0, arguments.length);
      throw new InitializationException(message);
    }
  }
View Full Code Here


  {
    if (arguments.length != 0)
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_COUNT.get(
          getName(), lineNumber, 0, arguments.length);
      throw new InitializationException(message);
    }
  }
View Full Code Here

          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }

        Message message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get(
            dn.toString(), getExceptionMessage(e));
        throw new InitializationException(message, e);
      }
    }
    rootObjectclasses = new LinkedHashMap<ObjectClass,String>(3);
    rootObjectclasses.put(DirectoryServer.getTopObjectClass(), OC_TOP);
    ObjectClass domainOC = DirectoryServer.getObjectClass("domain", true);
View Full Code Here

  {
    if (arguments.length != 1)
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_COUNT.get(
          getName(), lineNumber, 1, arguments.length);
      throw new InitializationException(message);
    }

    text = arguments[0];
  }
View Full Code Here

  {
    if (arguments.length != 1)
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_COUNT.get(
          getName(), lineNumber, 1, arguments.length);
      throw new InitializationException(message);
    }

    text = arguments[0];
  }
View Full Code Here

  {
    if ((arguments.length < 1) || (arguments.length > 2))
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_RANGE_COUNT.get(
          getName(), lineNumber, 1, 2, arguments.length);
      throw new InitializationException(message);
    }

    String lowerName = toLowerCase(arguments[0]);
    AttributeType t = DirectoryServer.getAttributeType(lowerName, true);
    if (! branch.hasAttribute(t))
    {
      Message message =
          ERR_MAKELDIF_TAG_UNDEFINED_ATTRIBUTE.get(arguments[0], lineNumber);
      throw new InitializationException(message);
    }

    if (arguments.length == 2)
    {
      assertionValue = arguments[1];
View Full Code Here

  {
    if ((arguments.length < 1) || (arguments.length > 2))
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_RANGE_COUNT.get(
          getName(), lineNumber, 1, 2, arguments.length);
      throw new InitializationException(message);
    }

    String lowerName = toLowerCase(arguments[0]);
    attributeType = DirectoryServer.getAttributeType(lowerName, true);
    if (! template.hasAttribute(attributeType))
    {
      Message message =
          ERR_MAKELDIF_TAG_UNDEFINED_ATTRIBUTE.get(arguments[0], lineNumber);
      throw new InitializationException(message);
    }


    if (arguments.length == 2)
    {
View Full Code Here

    if (arguments.length != 0)
    {
      Message message = ERR_MAKELDIF_TAG_INVALID_ARGUMENT_COUNT.get(
          getName(), lineNumber, 0, arguments.length);
      throw new InitializationException(message);
    }
  }
View Full Code Here

    {
      Message message = ERR_CONFIG_WORK_QUEUE_INITIALIZATION_FAILED.
          get(workQueueConfig.getJavaClass(),
              String.valueOf(workQueueConfig.dn()),
              stackTraceToSingleLineString(e));
      throw new InitializationException(message, e);
    }
  }
View Full Code Here

    {
      if (schemaInstallDir == null || ! schemaInstallDir.exists())
      {
        Message message =
          ERR_CONFIG_SCHEMA_NO_SCHEMA_DIR.get(schemaInstallDirPath);
        throw new InitializationException(message);
      }
      if (! schemaInstallDir.isDirectory())
      {
        Message message =
            ERR_CONFIG_SCHEMA_DIR_NOT_DIRECTORY.get(schemaInstallDirPath);
        throw new InitializationException(message);
      }

      if ((schemaInstanceDir == null) || (!schemaInstanceDir.exists())
          || (! schemaInstanceDir.isDirectory()))
      {
        schemaInstanceDir = null;
      }

      FilenameFilter filter = new SchemaFileFilter();
      File[] schemaInstallDirFiles =
              schemaInstallDir.listFiles(filter);
      int fileNumber = schemaInstallDirFiles.length;
      File[] schemaInstanceDirFiles = null ;
      if (schemaInstanceDir != null)
      {
        schemaInstanceDirFiles =
                schemaInstanceDir.listFiles(filter);
        fileNumber =+ schemaInstanceDirFiles.length ;
      }

      ArrayList<String> fileList = new ArrayList<String>(fileNumber);
      for (File f : schemaInstallDirFiles)
      {
        if (f.isFile())
        {
          fileList.add(f.getName());
        }

        long modificationTime = f.lastModified();
        if ((oldestModificationTime <= 0L) ||
            (modificationTime < oldestModificationTime))
        {
          oldestModificationTime = modificationTime;
        }

        if ((youngestModificationTime <= 0) ||
            (modificationTime > youngestModificationTime))
        {
          youngestModificationTime = modificationTime;
        }
      }
      if (schemaInstanceDirFiles != null)
      {
        for (File f : schemaInstanceDirFiles)
        {
          if (f.isFile())
          {
            fileList.add(f.getName());
          }

          long modificationTime = f.lastModified();
          if ((oldestModificationTime <= 0L)
              || (modificationTime < oldestModificationTime))
          {
            oldestModificationTime = modificationTime;
          }

          if ((youngestModificationTime <= 0)
              || (modificationTime > youngestModificationTime))
          {
            youngestModificationTime = modificationTime;
          }
        }
      }

      fileNames = new String[fileList.size()];
      fileList.toArray(fileNames);
      Arrays.sort(fileNames);
    }
    catch (InitializationException ie)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, ie);
      }

      throw ie;
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }

      Message message = ERR_CONFIG_SCHEMA_CANNOT_LIST_FILES.get(
          schemaInstallDirPath, schemaInstanceDirPath, getExceptionMessage(e));
      throw new InitializationException(message, e);
    }


    // If the oldest and youngest modification timestamps didn't get set for
    // some reason, then set them to the current time.
View Full Code Here

TOP

Related Classes of org.nasutekds.server.types.InitializationException

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.