Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.AttributeType


   * @return  <CODE>true</CODE> if the provided attribute is one that is used in
   *          the configuration of this backend, <CODE>false</CODE> if not.
   */
  private boolean isMonitorConfigAttribute(Attribute attribute)
  {
    AttributeType attrType = attribute.getAttributeType();
    if (attrType.hasName(ATTR_COMMON_NAME) ||
        attrType.hasName(ATTR_BACKEND_ENABLED.toLowerCase()) ||
        attrType.hasName(ATTR_BACKEND_CLASS.toLowerCase()) ||
        attrType.hasName(ATTR_BACKEND_BASE_DN.toLowerCase()) ||
        attrType.hasName(ATTR_BACKEND_ID.toLowerCase()) ||
        attrType.hasName(ATTR_BACKEND_WRITABILITY_MODE.toLowerCase()))
    {
      return true;
    }

    return false;
View Full Code Here



    // Add all the user-defined attributes.
    for (Attribute a : userDefinedAttributes)
    {
      AttributeType type = a.getAttributeType();

      if (type.isOperational())
      {
        List<Attribute> attrs = monitorOperationalAttrs.get(type);
        if (attrs == null)
        {
          attrs = new ArrayList<Attribute>();
View Full Code Here

    if (rdn != null)
    {
      // Add the RDN values
      for (int i=0; i<rdn.getNumValues(); i++)
      {
        AttributeType attributeType = rdn.getAttributeType(i);
        AttributeValue value = rdn.getAttributeValue(attributeType);
        Attribute attr = Attributes.create(attributeType, value);
        List<Attribute> attrList = new ArrayList<Attribute>(1);
        attrList.add(attr);
        monitorUserAttrs.put(attributeType, attrList);
View Full Code Here

                  monitorAttrs.size()+1);


    // Make sure to include the RDN attribute.
    RDN            entryRDN = entryDN.getRDN();
    AttributeType  rdnType  = entryRDN.getAttributeType(0);
    AttributeValue rdnValue = entryRDN.getAttributeValue(0);

    Attribute rdnAttr = Attributes.create(rdnType, rdnValue);
    ArrayList<Attribute> rdnList = new ArrayList<Attribute>(1);
    rdnList.add(rdnAttr);
    attrMap.put(rdnType, rdnList);


    // Take the rest of the information from the monitor data.
    for (Attribute a : monitorAttrs)
    {
      AttributeType type = a.getAttributeType();

      List<Attribute> attrs = attrMap.get(type);
      if (attrs == null)
      {
        attrs = new ArrayList<Attribute>();
View Full Code Here

    }

    // FIXME -- Do we need any special authorization here?
    Entry taskEntry = getTaskEntry();

    AttributeType typeDomainBase;
    AttributeType typeSourceScope;

    typeDomainBase =
      getAttributeType(ATTR_TASK_INITIALIZE_DOMAIN_DN, true);
    typeSourceScope =
      getAttributeType(ATTR_TASK_INITIALIZE_SOURCE, true);
View Full Code Here

                    Message message =
                        WARN_ACI_TARGETATTR_INVALID_ATTR_TOKEN.get(attrStr);
                    throw new AciException(message);
                }
            } else {
                AttributeType attributeType;
                if((attributeType =
                        DirectoryServer.getAttributeType(attribute)) == null)
                    attributeType =
                            DirectoryServer.getDefaultAttributeType(attribute);
                if(attributeType.isOperational())
                    opAttributes.add(attributeType);
                else
                    attributes.add(attributeType);
            }
        }
View Full Code Here

    }

    LinkedList<Modification> mods = new LinkedList<Modification>();
    // adminport
    String attName = "adminport";
    AttributeType attrType = DirectoryServer.getAttributeType(attName
        .toLowerCase());
    if (attrType == null)
    {
      attrType = DirectoryServer.getDefaultAttributeType(attName.toLowerCase());
    }
View Full Code Here

    }

    // Look for a local server with the Ldap Port.
    InternalSearchOperation op = null;
    String attrName = "hostname";
    AttributeType hostnameType = DirectoryServer.getAttributeType(attrName);
    if (hostnameType == null)
    {
      hostnameType = DirectoryServer.getDefaultAttributeType(attrName);
    }
    try
    {
      op = internalConnection.processSearch("cn=Servers,cn=admin data",
          SearchScope.SINGLE_LEVEL, "objectclass=*");
      if (op.getResultCode() == ResultCode.SUCCESS)
      {
        Entry entry = null;
        for (Entry currentEntry : op.getSearchEntries())
        {
          String currentHostname = currentEntry.getAttributeValue(hostnameType,
              DirectoryStringSyntax.DECODER);
          try
          {
            String currentIPAddress = java.net.InetAddress.getByName(
                currentHostname).getCanonicalHostName();
            if (currentIPAddress.equals(hostName))
            {
              // Check if one of the port match
              attrName = "ldapport";
              AttributeType portType = DirectoryServer
                  .getAttributeType(attrName);
              if (portType == null)
              {
                portType = DirectoryServer.getDefaultAttributeType(attrName);
              }
View Full Code Here

    if (!result.isEmpty())
    {
      adminConnectorEntry = result.getFirst();
    }

    AttributeType attrType = DirectoryServer.getAttributeType(attrName);
    if (attrType == null)
    {
      attrType = DirectoryServer.getDefaultAttributeType(attrName);
    }
View Full Code Here

        new HashMap<AttributeType,List<Attribute>>();

      for (RawAttribute a : addOperation.getRawAttributes())
      {
        Attribute attr = a.toAttribute();
        AttributeType attrType = attr.getAttributeType();
        List<Attribute> attrs = attributes.get(attrType);
        if (attrs == null)
        {
          attrs = new ArrayList<Attribute>(1);
          attrs.add(attr);
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.