| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | * Portions Copyright 2011-2016 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.server.schema.SchemaConstants; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.opends.server.types.Attributes; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | { |
| | | schemaReadOnlyAttributes.clear(); |
| | | schemaReadOnlyAttributesLowerCase.clear(); |
| | | for (AttributeType attr : schema.getAttributeTypes().values()) |
| | | for (AttributeType attr : schema.getAttributeTypes()) |
| | | { |
| | | if (attr.isNoUserModification()) |
| | | { |
| | |
| | | // Check all the attributes that we consider binaries. |
| | | if (schema != null) |
| | | { |
| | | AttributeType attr = schema.getAttributeType( |
| | | Utilities.getAttributeNameWithoutOptions(attrName).toLowerCase()); |
| | | if (attr != null) |
| | | String attributeName = Utilities.getAttributeNameWithoutOptions(attrName).toLowerCase(); |
| | | if (schema.hasAttributeType(attributeName)) |
| | | { |
| | | AttributeType attr = schema.getAttributeType(attributeName); |
| | | Syntax syntax = attr.getSyntax(); |
| | | if (syntax != null) |
| | | { |
| | |
| | | attrName = Utilities.getAttributeNameWithoutOptions(attrName); |
| | | if (schema != null) |
| | | { |
| | | AttributeType attrType = schema.getAttributeType(attrName.toLowerCase()); |
| | | if (attrType != null) |
| | | if (schema.hasAttributeType(attrName.toLowerCase())) |
| | | { |
| | | AttributeType attrType = schema.getAttributeType(attrName.toLowerCase()); |
| | | isEditable = !attrType.isNoUserModification(); |
| | | } |
| | | } |