Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.Schema


   * @return <CODE>true</CODE> if the attribute has an image syntax and
   * <CODE>false</CODE> otherwise.
   */
  private boolean hasImageSyntax(String attrName)
  {
    Schema schema = getInfo().getServerDescriptor().getSchema();
    return Utilities.hasImageSyntax(attrName, schema);
  }
View Full Code Here


        }
        catch (Throwable t)
        {
        }
        attrName.setText(attr);
        Schema schema = getInfo().getServerDescriptor().getSchema();
        if (Utilities.hasImageSyntax(attr, schema))
        {
          BinaryAttributeEditorPanel.updateImage(lImage, bytes);
          lBase64.setVisible(false);
          base64.setVisible(false);
View Full Code Here

   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    final ServerDescriptor desc = ev.getNewDescriptor();

    Schema s = desc.getSchema();
    final boolean[] repack = {false};
    final boolean[] error = {false};
    if (s != null)
    {
      schema = s;
View Full Code Here

   * @return <CODE>true</CODE> if an error has been displayed and
   * <CODE>false</CODE> otherwise.
   */
  protected boolean updateLayout(final ServerDescriptor desc)
  {
    Schema schema = desc.getSchema();
    BackendDescriptor backend = getBackend();
    final boolean[] repack = {false};
    final boolean[] error = {false};
    if (backend != null)
    {
      updateBaseDNCombo(backend);
    }

    if (schema != null)
    {
      repack[0] = attributes.getItemCount() == 0;
      LinkedHashSet<CategorizedComboBoxElement> newElements =
        new LinkedHashSet<CategorizedComboBoxElement>();

      synchronized(standardAttrNames)
      {
        standardAttrNames.clear();
        configurationAttrNames.clear();
        customAttrNames.clear();

        for (AttributeType attr : schema.getAttributeTypes().values())
        {
          String name = attr.getPrimaryName();
          boolean defined = false;
          ListModel model = sortOrder.getModel();
          for (int i=0; i < model.getSize(); i++)
View Full Code Here

  protected void objectClassSelected(JList list)
  {
    String o = (String)list.getSelectedValue();
    if (o != null)
    {
      Schema schema = getInfo().getServerDescriptor().getSchema();
      if (schema != null)
      {
        ObjectClass oc = schema.getObjectClass(o.toLowerCase());
        if (oc != null)
        {
          notifySchemaSelectionListeners(oc);
        }
      }
View Full Code Here

   * the userPassword attribute) and <CODE>false</CODE> otherwise.
   */
  private boolean hasUserPassword(String[] ocs)
  {
    boolean hasUserPassword = false;
    Schema schema = getInfo().getServerDescriptor().getSchema();
    if ((ocs != null) && (schema != null))
    {
      AttributeType attr = schema.getAttributeType(
          ServerConstants.ATTR_USER_PASSWORD);
      for (String oc : ocs)
      {
        ObjectClass objectClass = schema.getObjectClass(oc);
        if ((objectClass != null) && (attr != null))
        {
          if (objectClass.isRequiredOrOptional(attr))
          {
            hasUserPassword = true;
View Full Code Here

   * Constructor.
   *
   */
  public SchemaLoader()
  {
    Schema sc = DirectoryServer.getSchema();
    for (String name : ocsToKeep)
    {
      ObjectClass oc = sc.getObjectClass(name.toLowerCase());
      if (oc != null)
      {
        objectclassesToKeep.add(oc);
      }
    }
    for (String name : attrsToKeep)
    {
      AttributeType attr = sc.getAttributeType(name.toLowerCase());
      if (attr != null)
      {
        attributesToKeep.add(attr);
      }
    }
    for (MatchingRule mr : sc.getMatchingRules().values())
    {
      matchingRulesToKeep.add(mr);
    }
    for (AttributeSyntax<?> syntax : sc.getSyntaxes().values())
    {
      syntaxesToKeep.add(syntax);
    }
  }
View Full Code Here

   * @throws DirectoryException if there is an error registering the minimal
   * objectclasses.
   */
  protected Schema getBaseSchema() throws DirectoryException
  {
    Schema schema = new Schema();
    for (MatchingRule mr : matchingRulesToKeep)
    {
      schema.registerMatchingRule(mr, true);
    }
    for (AttributeSyntax<?> syntax : syntaxesToKeep)
    {
      schema.registerSyntax(syntax, true);
    }
    for (AttributeType attr : attributesToKeep)
    {
      schema.registerAttributeType(attr, true);
    }
    for (ObjectClass oc : objectclassesToKeep)
    {
      schema.registerObjectClass(oc, true);
    }
    return schema;
  }
View Full Code Here

  private void usedBySelected()
  {
    String o = (String)usedByAttributes.getSelectedValue();
    if (o != null)
    {
      Schema schema = getInfo().getServerDescriptor().getSchema();
      if (schema != null)
      {
        AttributeType attr = schema.getAttributeType(o.toLowerCase());
        if (attr != null)
        {
          notifySchemaSelectionListeners(attr);
        }
      }
View Full Code Here

  {
    ArrayList<AttributeSyntax<?>> newSyntaxes =
      new ArrayList<AttributeSyntax<?>>();

    final ServerDescriptor desc = ev.getNewDescriptor();
    Schema s = desc.getSchema();

    boolean schemaChanged;
    if (schema != null && s != null)
    {
      schemaChanged = !ServerDescriptor.areSchemasEqual(s, schema);
View Full Code Here

TOP

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

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.