Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.AttributeType


    DN    schemaDN    = DN.decode("cn=schema");
    Entry schemaEntry = schemaBackend.getEntry(schemaDN);
    assertNotNull(schemaEntry);
    assertEquals(schemaEntry.getDN(), schemaDN);

    AttributeType t = DirectoryServer.getAttributeType("attributetypes");
    assertTrue(schemaEntry.hasAttribute(t));

    t = DirectoryServer.getAttributeType("objectclasses");
    assertTrue(schemaEntry.hasAttribute(t));
View Full Code Here


    DN    schemaDN    = DN.decode("cn=schema");
    Entry schemaEntry = schemaBackend.getSchemaEntry(schemaDN, false);
    assertNotNull(schemaEntry);
    assertEquals(schemaEntry.getDN(), schemaDN);

    AttributeType t = DirectoryServer.getAttributeType("attributetypes");
    assertTrue(schemaEntry.hasAttribute(t));

    t = DirectoryServer.getAttributeType("objectclasses");
    assertTrue(schemaEntry.hasAttribute(t));
View Full Code Here

  @Test()
  public void testTreatAsUserAttrs()
         throws Exception
  {
    DN schemaDN = DN.decode("cn=schema");
    AttributeType a = DirectoryServer.getAttributeType("attributetypes");
    AttributeType o = DirectoryServer.getAttributeType("objectclasses");
    AttributeType m = DirectoryServer.getAttributeType("matchingrules");
    AttributeType s = DirectoryServer.getAttributeType("ldapsyntaxes");

    assertFalse(schemaBackend.showAllAttributes());
    Entry schemaEntry = schemaBackend.getSchemaEntry(schemaDN, false);
    assertTrue(schemaEntry.hasOperationalAttribute(a));
    assertTrue(schemaEntry.hasOperationalAttribute(o));
View Full Code Here

         throws Exception
  {
    Entry schemaEntry = DirectoryServer.getEntry(DN.decode("cn=schema"));
    assertNotNull(schemaEntry);

    AttributeType cnType =
         DirectoryServer.getAttributeType("creatorsname", true);
    AttributeType ctType =
         DirectoryServer.getAttributeType("createtimestamp", true);
    AttributeType mnType =
         DirectoryServer.getAttributeType("modifiersname", true);
    AttributeType mtType =
         DirectoryServer.getAttributeType("modifytimestamp", true);

    assertTrue(schemaEntry.hasAttribute(cnType));
    assertTrue(schemaEntry.hasAttribute(ctType));
    assertTrue(schemaEntry.hasAttribute(mnType));
View Full Code Here

            invalidReason.toString());


    // Verify that we can decode the attribute type and that it has the
    // correct approximate matching rule.
    AttributeType attrType =
         AttributeTypeSyntax.decodeAttributeType(definition,
                                                 DirectoryServer.getSchema(),
                                                 false);
    assertNotNull(attrType);
    assertNotNull(attrType.getApproximateMatchingRule());
    assertEquals(attrType.getApproximateMatchingRule(), testApproxRule);
  }
View Full Code Here

    }
    description.setText(n);

    syntax.setSelectedItem(attr.getSyntax());

    AttributeType superior = attr.getSuperiorType();
    if (superior == null)
    {
      parent.setSelectedItem(NO_PARENT);
    }
    else
View Full Code Here

      HashMap<String, AttributeType> attributeNameMap = new HashMap<String,
      AttributeType>();
      for (String key : schema.getAttributeTypes().keySet())
      {
        AttributeType attr = schema.getAttributeType(key);
        attributeNameMap.put(attr.getNameOrOID(), attr);
      }
      orderedKeys.clear();
      orderedKeys.addAll(attributeNameMap.keySet());
      ArrayList<Object> newParents = new ArrayList<Object>();
      for (String key : orderedKeys)
View Full Code Here

        }
      }
    }


    AttributeType superior = getSuperior();
    if (superior != null)
    {
      if (superior.getNameOrOID().equalsIgnoreCase(attribute.getNameOrOID()))
      {
        errors.add(ERR_CTRL_PANEL_ATTRIBUTE_CANNOT_BE_ITS_SUPERIOR.get());
        setPrimaryInvalid(lSuperior);
      }
      else
      {
        // Check whether this object class is defined as parent as the superior.
        superior = superior.getSuperiorType();
        while (superior != null)
        {
          if (superior.getNameOrOID().equalsIgnoreCase(
              attribute.getNameOrOID()))
          {
            errors.add(
                ERR_CTRL_PANEL_ATTRIBUTE_IS_SUPERIOR_OF_SUPERIOR.get(
                getSuperior().getNameOrOID()));
            setPrimaryInvalid(lSuperior);
            break;
          }
          superior = superior.getSuperiorType();
        }
      }
    }

    setPrimaryValid(lUsage);
View Full Code Here

      {
        // An empty schema file.  This is OK.
        continue;
      }

      AttributeType attrType =
           DirectoryServer.getAttributeType("attributetypes", false);
      assertNotNull(attrType);
      List<Attribute> attrList = e.getAttribute(attrType);
      if (attrList == null)
      {
        // No attribute types in the schema file.  This is OK.
        continue;
      }

      for (Attribute a : attrList)
      {
        for (AttributeValue v : a)
        {
          AttributeType at = AttributeTypeSyntax.decodeAttributeType(
                                  v.getValue(), DirectoryServer.getSchema(),
                                  true);
          if (! isNumericOID(at.getOID()))
          {
            invalidOIDs.add(at.getNameOrOID());
          }
        }
      }
    }
View Full Code Here

      {
        // An empty schema file.  This is OK.
        continue;
      }

      AttributeType attrType =
           DirectoryServer.getAttributeType("objectclasses", false);
      assertNotNull(attrType);
      List<Attribute> attrList = e.getAttribute(attrType);
      if (attrList == null)
      {
View Full Code Here

TOP

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

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.