OPENDJ-1308 Migrate schema support
MatchingRule.java:
Removed and replaced getName() usage with getNameOrOID().
| | |
| | | String oid = matchingRule.getOID(); |
| | | values.add(oid); |
| | | |
| | | String name = matchingRule.getName(); |
| | | String name = matchingRule.getNameOrOID(); |
| | | if (name != null) |
| | | { |
| | | values.add(name); |
| | |
| | | */ |
| | | public void update(MatchingRule matchingRule, Schema schema) |
| | | { |
| | | String n = matchingRule.getName(); |
| | | String n = matchingRule.getNameOrOID(); |
| | | if (n == null) |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | | import java.awt.Component; |
| | | import java.awt.GridBagConstraints; |
| | | import java.awt.GridBagLayout; |
| | | import java.awt.event.ItemEvent; |
| | | import java.awt.event.ItemListener; |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.*; |
| | | |
| | | import javax.swing.DefaultComboBoxModel; |
| | | import javax.swing.JCheckBox; |
| | | import javax.swing.JComboBox; |
| | | import javax.swing.JLabel; |
| | | import javax.swing.JPanel; |
| | | import javax.swing.JTextField; |
| | | import javax.swing.SwingUtilities; |
| | | import javax.swing.*; |
| | | import javax.swing.event.ChangeEvent; |
| | | import javax.swing.event.ChangeListener; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.opendj.ldap.schema.AttributeUsage; |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.event. |
| | | ConfigurationElementCreatedListener; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedListener; |
| | | import org.opends.guitools.controlpanel.task.NewSchemaElementsTask; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.components.BasicExpander; |
| | | import |
| | | org.opends.guitools.controlpanel.ui.renderer.SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.ui.renderer.SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.AttributeUsage; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | | /** |
| | | * The panel displayed when the user wants to define a new attribute in the |
| | | * schema. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ATTRIBUTE_PANEL_TITLE.get(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Component getPreferredFocusComponent() |
| | | { |
| | | return name; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void configurationChanged(ConfigurationChangeEvent ev) |
| | | { |
| | | ArrayList<AttributeSyntax<?>> newSyntaxes = |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void run() |
| | | { |
| | | setEnabledOK(!error[0]); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void okClicked() |
| | | { |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | |
| | | |
| | | for (MatchingRule rule : schema.getMatchingRules().values()) |
| | | { |
| | | String n = rule.getName(); |
| | | if (n != null) |
| | | String n = rule.getNameOrOID(); |
| | | if (n != null && n.equalsIgnoreCase(name)) |
| | | { |
| | | if (n.equalsIgnoreCase(name)) |
| | | { |
| | | return INFO_CTRL_PANEL_TYPE_MATCHING_RULE.get(); |
| | | } |
| | | return INFO_CTRL_PANEL_TYPE_MATCHING_RULE.get(); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void stateChanged(ChangeEvent e) |
| | | { |
| | | p.setVisible(expander.isSelected()); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void itemStateChanged(ItemEvent ev) |
| | | { |
| | | if (ev.getStateChange() == ItemEvent.SELECTED) |
| | |
| | | */ |
| | | public static String getMatchingRuleText(MatchingRule matchingRule) |
| | | { |
| | | String returnValue; |
| | | String name = matchingRule.getName(); |
| | | String nameOrOID = matchingRule.getNameOrOID(); |
| | | String oid = matchingRule.getOID(); |
| | | if (name == null) |
| | | if (!nameOrOID.equals(oid)) |
| | | { |
| | | returnValue = oid; |
| | | // This is the name only |
| | | return nameOrOID + " - " + oid; |
| | | } |
| | | else |
| | | { |
| | | returnValue = name+" - "+oid; |
| | | } |
| | | return returnValue; |
| | | return oid; |
| | | } |
| | | |
| | | /** |
| | |
| | | mayInvoke = false) |
| | | public abstract class AbstractMatchingRule implements MatchingRule |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public abstract String getName(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract Collection<String> getNames(); |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract String getOID(); |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ByteString normalizeAssertionValue(ByteSequence value) |
| | | throws DirectoryException |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public final String getNameOrOID() |
| | | { |
| | | String name = getName(); |
| | | if ((name == null) || (name.length() == 0)) |
| | | Collection<String> names = getNames(); |
| | | if (names != null && !names.isEmpty()) |
| | | { |
| | | return getOID(); |
| | | return names.iterator().next(); |
| | | } |
| | | else |
| | | { |
| | | return name; |
| | | } |
| | | return getOID(); |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract String getDescription(); |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract String getSyntaxOID(); |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isObsolete() |
| | | { |
| | | return false; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract ByteString normalizeValue(ByteSequence value) |
| | | throws DirectoryException; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ConditionResult valuesMatch( |
| | | ByteSequence attributeValue, ByteSequence assertionValue) |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | buffer.append("( "); |
| | |
| | | } |
| | | buffer.append(" )"); |
| | | } |
| | | else |
| | | else if (names.size() == 1) |
| | | { |
| | | buffer.append('\''); |
| | | buffer.append(getName()); |
| | | buffer.append(names.iterator().next()); |
| | | buffer.append('\''); |
| | | } |
| | | |
| | |
| | | mayInvoke = false) |
| | | public interface MatchingRule |
| | | { |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or {@code null} |
| | | * if it does not have a name. |
| | | */ |
| | | String getName(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves all names for this matching rule. |
| | |
| | | * Portions Copyright 2014 Manuel Gaupp |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn; |
| | | import org.opends.server.admin.std.server.LocalDBIndexCfg; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.monitors.DatabaseEnvironmentMonitor; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import com.sleepycat.je.*; |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | |
| | | import org.opends.server.monitors.DatabaseEnvironmentMonitor; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.admin.std.server.LocalDBIndexCfg; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.ExtensibleIndexer; |
| | | import org.opends.server.api.ExtensibleMatchingRule; |
| | | import org.opends.server.api.IndexQueryFactory; |
| | | import org.opends.server.config.ConfigException; |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.toLowerCase; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.util.StaticUtils; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | * Class representing an attribute index. |
| | |
| | | * first argument is less than, equal to, or greater than the |
| | | * second. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] a, byte[] b) |
| | | { |
| | | int i; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public synchronized boolean isConfigurationChangeAcceptable( |
| | | LocalDBIndexCfg cfg, |
| | | List<LocalizableMessage> unacceptableReasons) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public synchronized ConfigChangeResult applyConfigurationChange( |
| | | LocalDBIndexCfg cfg) |
| | | { |
| | |
| | | */ |
| | | EqualityMatchingRule eqRule = |
| | | indexConfig.getAttribute().getEqualityMatchingRule(); |
| | | if(nOID ==null || nOID.equals(eqRule.getOID()) || |
| | | nOID.equalsIgnoreCase(eqRule.getName())) |
| | | if (nOID == null |
| | | || nOID.equals(eqRule.getOID()) |
| | | || nOID.equalsIgnoreCase(eqRule.getNameOrOID())) |
| | | { |
| | | //No matching rule is defined; use the default equality matching rule. |
| | | if(equalityIndex == null) |
| | |
| | | * Returns the length of the substring. |
| | | * @return the length of the substring. |
| | | */ |
| | | public int getSubstringLength() |
| | | @Override |
| | | public int getSubstringLength() |
| | | { |
| | | return substringLength; |
| | | } |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DELETE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | matchingRule.getNameOrOID(), |
| | | at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DELETE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | at.getNameOrOID()); |
| | | matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DELETE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | at.getNameOrOID()); |
| | | matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DELETE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | at.getNameOrOID()); |
| | | matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DELETE_MR_IN_USE_BY_MRU.get( |
| | | matchingRule.getName(), |
| | | mru.getName()); |
| | | matchingRule.getNameOrOID(), mru.getName()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DISABLE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | at.getNameOrOID()); |
| | | matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DISABLE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | at.getNameOrOID()); |
| | | matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DISABLE_MR_IN_USE_BY_AT.get( |
| | | matchingRule.getName(), |
| | | at.getNameOrOID()); |
| | | matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DISABLE_MR_IN_USE_BY_AT |
| | | .get(matchingRule.getName(), at.getNameOrOID()); |
| | | .get(matchingRule.getNameOrOID(), at.getNameOrOID()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_CONFIG_SCHEMA_CANNOT_DISABLE_MR_IN_USE_BY_MRU.get( |
| | | matchingRule.getName(), mru.getName()); |
| | | matchingRule.getNameOrOID(), mru.getName()); |
| | | unacceptableReasons.add(message); |
| | | |
| | | configAcceptable = false; |
| | |
| | | */ |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get the name of this class. |
| | | * @return name of the class in String form |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return "historicalCsnOrderingMatch"; |
| | | return Collections.singleton("historicalCsnOrderingMatch"); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_AUTH_PASSWORD_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_AUTH_PASSWORD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_AUTH_PASSWORD_EXACT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_AUTH_PASSWORD_EXACT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | /** |
| | | * This class defines the bitStringMatch matching rule defined in X.520 and |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_BIT_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_BIT_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | /** |
| | | * This class defines the booleanMatch matching rule defined in X.520 and |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_BOOLEAN_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_BOOLEAN_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | /** |
| | | * This class defines the caseExactMatch matching rule defined in X.520 and |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_CASE_EXACT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_CASE_EXACT_NAME); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_CASE_EXACT_IA5_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_CASE_EXACT_IA5_NAME); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_CASE_EXACT_IA5_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_CASE_EXACT_IA5_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_CASE_EXACT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_CASE_EXACT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | return StaticUtils.compare(b1, b2); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_CASE_EXACT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_CASE_EXACT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_CASE_IGNORE_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_CASE_IGNORE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_CASE_IGNORE_IA5_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_CASE_IGNORE_IA5_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_CASE_IGNORE_IA5_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_CASE_IGNORE_IA5_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_CASE_IGNORE_LIST_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_CASE_IGNORE_LIST_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_CASE_IGNORE_LIST_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_CASE_IGNORE_LIST_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_CASE_IGNORE_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_CASE_IGNORE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | return StaticUtils.compare(b1, b2); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_CASE_IGNORE_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_CASE_IGNORE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | import java.security.cert.CertificateException; |
| | | import java.security.cert.CertificateFactory; |
| | | import java.security.cert.X509Certificate; |
| | | import javax.security.auth.x500.X500Principal; |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import javax.security.auth.x500.X500Principal; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.GSERException; |
| | | import org.opends.server.protocols.asn1.GSERParser; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.GSERException; |
| | | import org.opends.server.protocols.asn1.GSERParser; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | public String getName() |
| | | { |
| | | return EMR_CERTIFICATE_EXACT_NAME; |
| | | return Collections.singleton(EMR_CERTIFICATE_EXACT_NAME); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return The OID for this matching rule. |
| | | */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return EMR_CERTIFICATE_EXACT_OID; |
| | |
| | | * @return The description for this matching rule, or <CODE>null</CODE> if |
| | | * there is none. |
| | | */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | return EMR_CERTIFICATE_EXACT_DESCRIPTION; |
| | |
| | | * |
| | | * @return The OID of the syntax with which this matching rule is associated. |
| | | */ |
| | | @Override |
| | | public String getSyntaxOID() |
| | | { |
| | | return SYNTAX_CERTIFICATE_EXACT_ASSERTION_OID; |
| | |
| | | * @throws DirectoryException If the provided value is invalid according to |
| | | * the associated attribute syntax. |
| | | */ |
| | | @Override |
| | | public ByteString normalizeValue(ByteSequence value) |
| | | throws DirectoryException |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ByteString normalizeAssertionValue(ByteSequence value) |
| | | throws DirectoryException |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.nio.CharBuffer; |
| | | import java.text.CollationKey; |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.meta. |
| | | CollationMatchingRuleCfgDefn.MatchingRuleType; |
| | | import org.opends.server.admin.std.meta.CollationMatchingRuleCfgDefn.MatchingRuleType; |
| | | import org.opends.server.admin.std.server.CollationMatchingRuleCfg; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.ExtensibleIndexer; |
| | | import org.opends.server.api.ExtensibleMatchingRule; |
| | | import org.opends.server.api.IndexQueryFactory; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.api.MatchingRuleFactory; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.backends.jeb.AttributeIndex; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.IndexConfig; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | //This is called when there is only 1 name. |
| | | return names.iterator().next(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_DIRECTORY_STRING_FIRST_COMPONENT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_DIRECTORY_STRING_FIRST_COMPONENT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | * This class defines the distinguishedNameMatch matching rule defined in X.520 |
| | | * and referenced in RFC 2252. |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_DN_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_DN_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(AMR_DOUBLE_METAPHONE_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return AMR_DOUBLE_METAPHONE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_GENERALIZED_TIME_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_GENERALIZED_TIME_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_GENERALIZED_TIME_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_GENERALIZED_TIME_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | try |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | return compareValues(ByteString.wrap(b1), ByteString.wrap(b2)); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_INTEGER_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_INTEGER_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | * This class implements the integerFirstComponentMatch matching rule defined in |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_INTEGER_FIRST_COMPONENT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_INTEGER_FIRST_COMPONENT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_INTEGER_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_INTEGER_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | int b1Length = value1.length(); |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | int b1Length = b1.length; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the keywordMatch matching rule defined in X.520. That |
| | | * document defines "keyword" as implementation-specific, but in this case we |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_KEYWORD_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_KEYWORD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.LinkedList; |
| | | import java.util.*; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.CommonSchemaElements; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | |
| | | /** |
| | | * This class defines the LDAP syntax description syntax, which is used to |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public int compare(byte[] arg0, byte[] arg1) |
| | | { |
| | | return compareValues(ByteString.wrap(arg0),ByteString.wrap(arg1)); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | LinkedList<ByteSequence> enumValues = syntax.getEnumValues(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return name; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(name); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_NUMERIC_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_NUMERIC_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_NUMERIC_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_NUMERIC_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | return StaticUtils.compare(b1, b2); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_NUMERIC_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_NUMERIC_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | * This class defines the objectIdentifierMatch matching rule defined in X.520 |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_OID_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_OID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_OID_FIRST_COMPONENT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_OID_FIRST_COMPONENT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_OCTET_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_OCTET_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_OCTET_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_OCTET_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | return StaticUtils.compare(b1, b2); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_OCTET_STRING_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_OCTET_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_PRESENTATION_ADDRESS_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_PRESENTATION_ADDRESS_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_PROTOCOL_INFORMATION_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_PROTOCOL_INFORMATION_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_TELEPHONE_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_TELEPHONE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(SMR_TELEPHONE_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SMR_TELEPHONE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | package org.opends.server.schema; |
| | | |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.nio.ByteBuffer; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.GregorianCalendar; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.TimeZone; |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.ExtensibleIndexer; |
| | | import org.opends.server.api.IndexQueryFactory; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.api.MatchingRuleFactory; |
| | | import org.opends.server.admin.std.server.MatchingRuleCfg; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.ExtensibleMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.IndexConfig; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.util.TimeThread.*; |
| | | import org.opends.server.admin.std.server.MatchingRuleCfg; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.GeneralizedTimeSyntax.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.schema.GeneralizedTimeSyntax.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.util.TimeThread.*; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public int compare(byte[] arg0, byte[] arg1) |
| | | { |
| | | return StaticUtils.compare(arg0, arg1); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<ExtensibleIndexer> getIndexers(IndexConfig config) |
| | | { |
| | | if(indexer == null) |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EXT_OMR_RELATIVE_TIME_GT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public <T> T createIndexQuery(ByteSequence assertionValue, |
| | | IndexQueryFactory<T> factory) throws DirectoryException |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EXT_OMR_RELATIVE_TIME_LT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public <T> T createIndexQuery(ByteSequence assertionValue, |
| | | IndexQueryFactory<T> factory) throws DirectoryException |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EXT_PARTIAL_DATE_TIME_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return EXT_PARTIAL_DATE_TIME_OID; |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EXT_PARTIAL_DATE_TIME_NAME); |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Collection<ExtensibleIndexer> getIndexers(IndexConfig config) |
| | | { |
| | | if(indexer == null) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public <T> T createIndexQuery(ByteSequence assertionValue, |
| | | IndexQueryFactory<T> factory) throws DirectoryException |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_UUID_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_UUID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(OMR_UUID_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return OMR_UUID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | * ascending order, or zero if there is no difference between the |
| | | * values with regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compareValues(ByteSequence value1, ByteSequence value2) |
| | | { |
| | | return value1.compareTo(value2); |
| | |
| | | * order, or zero if there is no difference between the values with |
| | | * regard to ordering. |
| | | */ |
| | | @Override |
| | | public int compare(byte[] b1, byte[] b2) |
| | | { |
| | | return StaticUtils.compare(b1, b2); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_UNIQUE_MEMBER_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_UNIQUE_MEMBER_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_USER_PASSWORD_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_USER_PASSWORD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_USER_PASSWORD_EXACT_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_USER_PASSWORD_EXACT_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(EMR_WORD_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return EMR_WORD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.schema.CaseIgnoreEqualityMatchingRuleFactory; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.schema.CaseIgnoreEqualityMatchingRuleFactory; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton(name); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return name; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Collection<String> getNames() |
| | | { |
| | | return Collections.singleton(getName()); |
| | | return Collections.singleton("equalLengthApproximateMatch"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this matching rule. |
| | | * |
| | | * @return The common name for this matching rule, or <CODE>null</CODE> if |
| | | * it does not have a name. |
| | | */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return "equalLengthApproximateMatch"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this matching rule. |
| | | * |
| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.testng.annotations.DataProvider; |
| | |
| | | EqualityMatchingRule rule = getRule(); |
| | | |
| | | // normalize the 2 provided values |
| | | boolean success = false; |
| | | try |
| | | { |
| | | rule.normalizeValue(ByteString.valueOf(value)); |
| | | } catch (DirectoryException e) { |
| | | success = true; |
| | | fail("The matching rule : " + rule.getNameOrOID() |
| | | + " should detect that value \"" + value + "\" is invalid"); |
| | | } |
| | | |
| | | if (!success) |
| | | catch (DirectoryException ignored) |
| | | { |
| | | fail("The matching rule : " + rule.getName() + |
| | | " should detect that value \"" + value + "\" is invalid"); |
| | | } |
| | | } |
| | | |