| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | { |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | .addToSchema().toSchema().getMatchingRule(EMR_AUTH_PASSWORD_OID); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getAuthPasswordExactMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.schema; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_AUTH_PASSWORD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_AUTH_PASSWORD_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_AUTH_PASSWORD_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the provided authentication password value into its component |
| | | * parts. |
| | |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is encoded using the auth password |
| | | * syntax. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BINARY_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BINARY_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BINARY_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getBitStringMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BIT_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BIT_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BIT_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class BooleanEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getBooleanMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BOOLEAN_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BOOLEAN_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_BOOLEAN_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return returnValue; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves an attribute value containing a representation of the provided |
| | | * boolean value. |
| | |
| | | return b ? ServerConstants.TRUE_VALUE : ServerConstants.FALSE_VALUE; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseExactEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseExactMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseExactIA5EqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseExactIA5MatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseExactIA5SubstringMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getInstance().getMatchingRule(SchemaConstants.SMR_CASE_EXACT_IA5_OID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseExactOrderingMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseExactOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseExactSubstringMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseExactSubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated MatchingRule. |
| | | /** Associated MatchingRule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreIA5MatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseIgnoreIA5SubstringMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreIA5SubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreListMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseIgnoreListSubstringMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreListSubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseIgnoreOrderingMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CaseIgnoreSubstringMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCaseIgnoreSubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | * Portions Copyright 2013-2014 Manuel Gaupp |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getName() |
| | | { |
| | | return SYNTAX_CERTIFICATE_EXACT_ASSERTION_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getOID() |
| | | { |
| | | return SYNTAX_CERTIFICATE_EXACT_ASSERTION_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getDescription() |
| | | { |
| | | return SYNTAX_CERTIFICATE_EXACT_ASSERTION_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getEqualityMatchingRule() |
| | | { |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getOrderingMatchingRule() |
| | | { |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getSubstringMatchingRule() |
| | | { |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getApproximateMatchingRule() |
| | | { |
| | | // Approximate matching will not be allowed by default. |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | | { |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 Manuel Gaupp |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | |
| | |
| | | public final class CertificateExactMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getCertificateExactMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTLIST_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTLIST_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTLIST_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTPAIR_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTPAIR_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTPAIR_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | // The current configuration. |
| | | /** The current configuration. */ |
| | | private volatile CertificateAttributeSyntaxCfg config; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(CertificateAttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | config.addCertificateChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | CertificateAttributeSyntaxCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | CertificateAttributeSyntaxCfg configuration) |
| | | { |
| | |
| | | return new ConfigChangeResult(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTIFICATE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTIFICATE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_CERTIFICATE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Stores the list of available locales on this JVM. |
| | | /** Stores the list of available locales on this JVM. */ |
| | | private static final Set<Locale> supportedLocales = new HashSet<Locale>( |
| | | Arrays.asList(Locale.getAvailableLocales())); |
| | | |
| | | // Current Configuration. |
| | | /** Current Configuration. */ |
| | | private CollationMatchingRuleCfg currentConfig; |
| | | |
| | | // Map of OID and the Matching Rule. |
| | | /** Map of OID and the Matching Rule. */ |
| | | private final Map<String, MatchingRule> matchingRules = |
| | | new HashMap<String, MatchingRule>(); |
| | | |
| | |
| | | super(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | matchingRules.clear(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeMatchingRule(CollationMatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | currentConfig.addCollationChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void finalizeMatchingRule() |
| | | { |
| | |
| | | currentConfig.removeCollationChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | CollationMatchingRuleCfg configuration) |
| | |
| | | return ccr; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable( |
| | | CollationMatchingRuleCfg configuration, |
| | |
| | | return locale; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * A utility class for extracting the OID and Language Tag from the |
| | | * configuration entry. |
| | | */ |
| | | private final class CollationMapper |
| | | { |
| | | // OID of the collation rule. |
| | | /** OID of the collation rule. */ |
| | | private String oid; |
| | | |
| | | // Language Tag. |
| | | /** Language Tag. */ |
| | | private String lTag; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of CollationMapper. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns the OID part of the collation text. |
| | | * |
| | |
| | | return oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns the language Tag of collation text. |
| | | * |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | // The current configuration |
| | | /** The current configuration. */ |
| | | private volatile CountryStringAttributeSyntaxCfg config; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(CountryStringAttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | config.addCountryStringChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | CountryStringAttributeSyntaxCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | CountryStringAttributeSyntaxCfg configuration) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_COUNTRY_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_COUNTRY_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_COUNTRY_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SYNTAX_DIT_CONTENT_RULE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return SYNTAX_DIT_CONTENT_RULE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | return SYNTAX_DIT_CONTENT_RULE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getEqualityMatchingRule() |
| | | { |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getOrderingMatchingRule() |
| | | { |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getSubstringMatchingRule() |
| | | { |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getApproximateMatchingRule() |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the contents of the provided ASN.1 octet string as a DIT content |
| | | * rule definition according to the rules of this syntax. Note that the |
| | |
| | | isObsolete, extraProperties); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the next token name from the DIT content rule definition, skipping |
| | | * over any leading or trailing spaces, and appends it to the provided buffer. |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads an attributeType/objectclass description or numeric OID from the |
| | | * provided string, skipping over any leading or trailing spaces, and |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value for an "extra" parameter. It will handle a single unquoted |
| | | * word (which is technically illegal, but we'll allow it), a single quoted |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.LinkedList; |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the DIT structure rule description syntax, which is |
| | | * used to hold DIT structure rule definitions in the server schema. The format |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException, InitializationException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getName() |
| | | { |
| | | return SYNTAX_DIT_STRUCTURE_RULE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getOID() |
| | | { |
| | | return SYNTAX_DIT_STRUCTURE_RULE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getDescription() |
| | | { |
| | | return SYNTAX_DIT_STRUCTURE_RULE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getEqualityMatchingRule() |
| | | { |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getOrderingMatchingRule() |
| | | { |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getSubstringMatchingRule() |
| | | { |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getApproximateMatchingRule() |
| | | { |
| | | // There is no approximate matching rule by default. |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the contents of the provided ASN.1 octet string as a DIT structure |
| | | * rule definition according to the rules of this syntax. Note that the |
| | |
| | | extraProperties); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the next token name from the DIT content rule definition, skipping |
| | | * over any leading or trailing spaces, and appends it to the provided buffer. |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads an attributeType/objectclass description or numeric OID from the |
| | | * provided string, skipping over any leading or trailing spaces, and |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value for an "extra" parameter. It will handle a single unquoted |
| | | * word (which is technically illegal, but we'll allow it), a single quoted |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.util.HashSet; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.util.StringTokenizer; |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines the delivery method attribute syntax. This contains one |
| | | * or more of a fixed set of values. If there are multiple values, then they |
| | |
| | | "telephone" |
| | | }; |
| | | |
| | | |
| | | |
| | | // The hash set containing the allowed values. |
| | | /** The hash set containing the allowed values. */ |
| | | private HashSet<String> allowedValues; |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DELIVERY_METHOD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DELIVERY_METHOD_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DELIVERY_METHOD_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class DirectoryStringFirstComponentEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getDirectoryStringFirstComponentMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // Indicates whether we will allow zero-length values. |
| | | /** Indicates whether we will allow zero-length values. */ |
| | | private boolean allowZeroLengthValues; |
| | | |
| | | // The reference to the configuration for this directory string syntax. |
| | | /** The reference to the configuration for this directory string syntax. */ |
| | | private DirectoryStringAttributeSyntaxCfg currentConfig; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(DirectoryStringAttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | allowZeroLengthValues = currentConfig.isAllowZeroLengthValues(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any finalization that may be necessary for this attribute syntax. |
| | | */ |
| | |
| | | currentConfig.removeDirectoryStringChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DIRECTORY_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DIRECTORY_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DIRECTORY_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether zero-length values will be allowed. This is technically |
| | | * forbidden by the LDAP specification, but it was allowed in earlier versions |
| | |
| | | return allowZeroLengthValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable( |
| | | DirectoryStringAttributeSyntaxCfg configuration, |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | DirectoryStringAttributeSyntaxCfg configuration) |
| | |
| | | return new ConfigChangeResult(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class DistinguishedNameEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getDistinguishedNameMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DN_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DN_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_DN_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class DoubleMetaphoneApproximateMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getInstance().getMatchingRule("1.3.6.1.4.1.26027.1.4.1"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_ENHANCED_GUIDE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_ENHANCED_GUIDE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_ENHANCED_GUIDE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return GuideSyntax.criteriaIsValid(criteria, valueStr, invalidReason); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.util.HashSet; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the facsimile telephone number attribute syntax, which |
| | | * contains a printable string (the number) followed by zero or more parameters. |
| | |
| | | ALLOWED_FAX_PARAMETERS.add("uncompressed"); |
| | | } |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_FAXNUMBER_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_FAXNUMBER_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_FAXNUMBER_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_FAX_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_FAX_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_FAX_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getGeneralizedTimeMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getGeneralizedTimeOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2009 D. J. Hagberg, Millibits Consulting, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.GregorianCalendar; |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines the generalized time attribute syntax, which is a way of |
| | | * representing time in a form like "YYYYMMDDhhmmssZ". The actual form is |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // UTC TimeZone is assumed to never change over JVM lifetime |
| | | /** UTC TimeZone is assumed to never change over JVM lifetime. */ |
| | | private static final TimeZone TIME_ZONE_UTC_OBJ = |
| | | TimeZone.getTimeZone(TIME_ZONE_UTC); |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_GENERALIZED_TIME_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_GENERALIZED_TIME_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_GENERALIZED_TIME_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the generalized time representation of the provided date. |
| | | * |
| | |
| | | return d == null ? null : format(d.getTime()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the generalized time representation of the provided date. |
| | | * |
| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves an attribute value containing a generalized time representation |
| | | * of the provided date. |
| | |
| | | return ByteString.valueOf(format(time)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the provided normalized value as a generalized time value and |
| | | * retrieves a timestamp containing its representation. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Completes decoding the generalized time value containing a fractional |
| | | * component. It will also decode the trailing 'Z' or offset. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes a time zone offset from the provided value. |
| | | * |
| | |
| | | return TimeZone.getTimeZone("GMT" + offSetStr); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_GUIDE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_GUIDE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_GUIDE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | && criteriaIsValid(valueStr.substring(sharpPos+1), valueStr, invalidReason); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Determines whether the provided string represents a valid criteria |
| | | * according to the guide syntax. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_IA5_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_IA5_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_IA5_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getIntegerMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class IntegerFirstComponentEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getIntegerFirstComponentMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getIntegerOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_INTEGER_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_INTEGER_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_INTEGER_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | // The current configuration for this JPEG syntax. |
| | | /** The current configuration for this JPEG syntax. */ |
| | | private volatile JPEGAttributeSyntaxCfg config; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(JPEGAttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | config.addJPEGChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_JPEG_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_JPEG_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_JPEG_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | JPEGAttributeSyntaxCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | JPEGAttributeSyntaxCfg configuration) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getKeywordMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_LDAP_SYNTAX_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_LDAP_SYNTAX_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_LDAP_SYNTAX_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the contents of the provided byte sequence as an ldap syntax |
| | | * definition according to the rules of this syntax. Note that the provided |
| | |
| | | description,extraProperties); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class provides a substitution mechanism where one unimplemented |
| | | * syntax can be substituted by another defined syntax. A substitution syntax |
| | |
| | | private static class SubstitutionSyntax extends |
| | | LDAPSyntaxDescriptionSyntax |
| | | { |
| | | // The syntax that will substitute the unimplemented syntax. |
| | | /** The syntax that will substitute the unimplemented syntax. */ |
| | | private AttributeSyntax<?> subSyntax; |
| | | |
| | | // The description of this syntax. |
| | | /** The description of this syntax. */ |
| | | private String description; |
| | | |
| | | // The definition of this syntax. |
| | | /** The definition of this syntax. */ |
| | | private String definition; |
| | | |
| | | |
| | | //The oid of this syntax. |
| | | /** The oid of this syntax. */ |
| | | private String oid; |
| | | |
| | | |
| | | |
| | | //Creates a new instance of this syntax. |
| | | /** Creates a new instance of this syntax. */ |
| | | private SubstitutionSyntax(AttributeSyntax<?> subSyntax, |
| | | String definition, |
| | | String description, |
| | |
| | | this.oid = oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | return description; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return definition; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | |
| | | return subSyntax.valueIsAcceptable(value, invalidReason); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return subSyntax.getEqualityMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return subSyntax.getOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return subSyntax.getSubstringMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class provides a regex mechanism where a new syntax and its |
| | | * corresponding matching rules can be created on-the-fly. A regex |
| | |
| | | private static class RegexSyntax extends |
| | | LDAPSyntaxDescriptionSyntax |
| | | { |
| | | // The Pattern associated with the regex. |
| | | /** The Pattern associated with the regex. */ |
| | | private Pattern pattern; |
| | | |
| | | // The description of this syntax. |
| | | /** The description of this syntax. */ |
| | | private String description; |
| | | |
| | | //The oid of this syntax. |
| | | /** The oid of this syntax. */ |
| | | private String oid; |
| | | |
| | | //The definition of this syntax. |
| | | /** The definition of this syntax. */ |
| | | private String definition; |
| | | |
| | | //The equality matching rule. |
| | | /** The equality matching rule. */ |
| | | private MatchingRule equalityMatchingRule; |
| | | |
| | | //The substring matching rule. |
| | | /** The substring matching rule. */ |
| | | private MatchingRule substringMatchingRule; |
| | | |
| | | //The ordering matching rule. |
| | | /** The ordering matching rule. */ |
| | | private MatchingRule orderingMatchingRule; |
| | | |
| | | //The approximate matching rule. |
| | | /** The approximate matching rule. */ |
| | | private MatchingRule approximateMatchingRule; |
| | | |
| | | |
| | | //Creates a new instance of this syntax. |
| | | /** Creates a new instance of this syntax. */ |
| | | private RegexSyntax(Pattern pattern, |
| | | String definition, |
| | | String description, |
| | |
| | | this.oid = oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return definition; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | |
| | | return matches; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return equalityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return orderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return substringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class provides an enumeration-based mechanism where a new syntax |
| | | * and its corresponding matching rules can be created on-the-fly. An enum |
| | |
| | | private static class EnumSyntax extends |
| | | LDAPSyntaxDescriptionSyntax |
| | | { |
| | | //Set of read-only enum entries. |
| | | /** Set of read-only enum entries. */ |
| | | LinkedList<ByteSequence> entries; |
| | | |
| | | // The description of this syntax. |
| | | /** The description of this syntax. */ |
| | | private String description; |
| | | |
| | | //The oid of this syntax. |
| | | /** The oid of this syntax. */ |
| | | private String oid; |
| | | |
| | | //The equality matching rule. |
| | | /** The equality matching rule. */ |
| | | private MatchingRule equalityMatchingRule; |
| | | |
| | | //The substring matching rule. |
| | | /** The substring matching rule. */ |
| | | private MatchingRule substringMatchingRule; |
| | | |
| | | //The ordering matching rule. |
| | | /** The ordering matching rule. */ |
| | | private MatchingRule orderingMatchingRule; |
| | | |
| | | //The approximate matching rule. |
| | | /** The approximate matching rule. */ |
| | | private MatchingRule approximateMatchingRule; |
| | | |
| | | //The definition of this syntax. |
| | | /** The definition of this syntax. */ |
| | | private String definition; |
| | | |
| | | |
| | | //Creates a new instance of this syntax. |
| | | /** Creates a new instance of this syntax. */ |
| | | private EnumSyntax(LinkedList<ByteSequence> entries, |
| | | String definition, |
| | | String description, |
| | |
| | | this.oid = oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return oid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return definition; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | return description; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void finalizeSyntax() |
| | | { |
| | | DirectoryServer.deregisterMatchingRule(orderingMatchingRule); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | |
| | | return isAllowed; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return equalityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return orderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return substringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the matching rule description syntax, which is used to |
| | | * hold matching rule definitions in the server schema. The format of this |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_MATCHING_RULE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_MATCHING_RULE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_MATCHING_RULE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the next token name from the matching rule definition, skipping over |
| | | * any leading or trailing spaces, and appends it to the provided buffer. |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the attribute type/objectclass description or numeric OID from the |
| | | * provided string, skipping over any leading or trailing spaces, and |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value for an "extra" parameter. It will handle a single unquoted |
| | | * word (which is technically illegal, but we'll allow it), a single quoted |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.LinkedList; |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the matching rule use description syntax, which is used |
| | | * to hold matching rule use definitions in the server schema. The format of |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException, InitializationException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getName() |
| | | { |
| | | return SYNTAX_MATCHING_RULE_USE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getOID() |
| | | { |
| | | return SYNTAX_MATCHING_RULE_USE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getDescription() |
| | | { |
| | | return SYNTAX_MATCHING_RULE_USE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getEqualityMatchingRule() |
| | | { |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getOrderingMatchingRule() |
| | | { |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getSubstringMatchingRule() |
| | | { |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public MatchingRule getApproximateMatchingRule() |
| | | { |
| | | // There is no approximate matching rule by default. |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the contents of the provided ASN.1 octet string as a matching rule |
| | | * use definition according to the rules of this syntax. Note that the |
| | |
| | | extraProperties); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the next token name from the matching rule use definition, skipping |
| | | * over any leading or trailing spaces, and appends it to the provided buffer. |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the attribute type description or numeric OID from the provided |
| | | * string, skipping over any leading or trailing spaces, and appending the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value for an "extra" parameter. It will handle a single unquoted |
| | | * word (which is technically illegal, but we'll allow it), a single quoted |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_NAME_AND_OPTIONAL_UID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_NAME_AND_OPTIONAL_UID_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_NAME_AND_OPTIONAL_UID_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | // If there is an "optional uid", then normalize it and make sure it only |
| | | // contains valid binary digits. |
| | | if (sharpPos > 0) |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SYNTAX_NAME_FORM_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return SYNTAX_NAME_FORM_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | return SYNTAX_NAME_FORM_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getEqualityMatchingRule() |
| | | { |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getOrderingMatchingRule() |
| | | { |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getSubstringMatchingRule() |
| | | { |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getApproximateMatchingRule() |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the contents of the provided ASN.1 octet string as a name form |
| | | * definition according to the rules of this syntax. Note that the provided |
| | |
| | | optionalAttributes, extraProperties); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the next token name from the name form definition, skipping over any |
| | | * leading or trailing spaces, and appends it to the provided buffer. |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the attribute type description or numeric OID from the provided |
| | | * string, skipping over any leading or trailing spaces, and appending the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value for an "extra" parameter. It will handle a single unquoted |
| | | * word (which is technically illegal, but we'll allow it), a single quoted |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class NumericStringEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getNumericStringMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class NumericStringOrderingMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getNumericStringOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class NumericStringSubstringMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getNumericStringSubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_NUMERIC_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_NUMERIC_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_NUMERIC_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OID_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OID_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | invalidReason); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getName() |
| | | { |
| | | return SYNTAX_OBJECTCLASS_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getOID() |
| | | { |
| | | return SYNTAX_OBJECTCLASS_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | return SYNTAX_OBJECTCLASS_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getEqualityMatchingRule() |
| | | { |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getOrderingMatchingRule() |
| | | { |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getSubstringMatchingRule() |
| | | { |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MatchingRule getApproximateMatchingRule() |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean valueIsAcceptable(ByteSequence value, |
| | | LocalizableMessageBuilder invalidReason) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the contents of the provided ASN.1 octet string as an objectclass |
| | | * definition according to the rules of this syntax. Note that the provided |
| | |
| | | extraProperties); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the next token name from the objectclass definition, skipping over |
| | | * any leading or trailing spaces, and appends it to the provided buffer. |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value of a string enclosed in single quotes, skipping over the |
| | | * quotes and any leading or trailing spaces, and appending the string to the |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the attribute type/objectclass description or numeric OID from the |
| | | * provided string, skipping over any leading or trailing spaces, and |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads the value for an "extra" parameter. It will handle a single unquoted |
| | | * word (which is technically illegal, but we'll allow it), a single quoted |
| | |
| | | valueList.add(valueBuffer.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | // Skip over any trailing spaces. |
| | | while ((startPos < length) && (valueStr.charAt(startPos) == ' ')) |
| | | { |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided objectclass or any of its superiors is equal |
| | | * to the "top" objectclass. |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class ObjectIdentifierEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getObjectIdentifierMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class ObjectIdentifierFirstComponentEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getObjectIdentifierFirstComponentMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class OctetStringEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getOctetStringMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class OctetStringOrderingMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getOctetStringOrderingMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getOctetStringSubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OCTET_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OCTET_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OCTET_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OTHER_MAILBOX_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OTHER_MAILBOX_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_OTHER_MAILBOX_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_POSTAL_ADDRESS_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_POSTAL_ADDRESS_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_POSTAL_ADDRESS_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | | package org.opends.server.schema; |
| | | |
| | | import java.util.Collection; |
| | |
| | | public final class PresentationAddressEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getPresentationAddressMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | |
| | | |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | /** |
| | | * This class implements the presentation address attribute syntax, which is |
| | | * defined in RFC 1278. However, because this LDAP syntax is being deprecated, |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PRESENTATION_ADDRESS_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PRESENTATION_ADDRESS_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PRESENTATION_ADDRESS_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PRINTABLE_STRING_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PRINTABLE_STRING_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PRINTABLE_STRING_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getProtocolInformationMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default approximate matching rule for this syntax. |
| | | /** The default approximate matching rule for this syntax. */ |
| | | private MatchingRule defaultApproximateMatchingRule; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PROTOCOL_INFORMATION_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PROTOCOL_INFORMATION_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_PROTOCOL_INFORMATION_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultApproximateMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_SUBSTRING_ASSERTION_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_SUBSTRING_ASSERTION_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_SUBSTRING_ASSERTION_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | /** |
| | |
| | | // No implementation required. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isHumanReadable() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_SUPPORTED_ALGORITHM_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_SUPPORTED_ALGORITHM_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_SUPPORTED_ALGORITHM_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class TelephoneNumberEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getTelephoneNumberMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getTelephoneNumberSubstringsMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Indicates whether this matching rule should operate in strict mode. |
| | | /** Indicates whether this matching rule should operate in strict mode. */ |
| | | private boolean strictMode; |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | // The current configuration for this telephone number syntax. |
| | | /** The current configuration for this telephone number syntax. */ |
| | | private TelephoneNumberAttributeSyntaxCfg currentConfig; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(TelephoneNumberAttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any finalization that may be necessary for this attribute syntax. |
| | | */ |
| | |
| | | currentConfig.removeTelephoneNumberChangeListener(this); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELEPHONE_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELEPHONE_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELEPHONE_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided character is a valid separator for telephone |
| | | * number components when operating in strict mode. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | TelephoneNumberAttributeSyntaxCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | TelephoneNumberAttributeSyntaxCfg configuration) |
| | | { |
| | |
| | | return new ConfigChangeResult(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.util.HashSet; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the teletex terminal identifier attribute syntax, which |
| | | * contains a printable string (the terminal identifier) followed by zero or |
| | |
| | | ALLOWED_TTX_PARAMETERS.add("private"); |
| | | } |
| | | |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELETEX_TERM_ID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELETEX_TERM_ID_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELETEX_TERM_ID_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELEX_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELEX_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_TELEX_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements the UTC time attribute syntax. This is very similar to |
| | | * the generalized time syntax (and actually has been deprecated in favor of |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * The lock that will be used to provide threadsafe access to the date |
| | | * formatter. |
| | | */ |
| | | private static Object dateFormatLock; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The date formatter that will be used to convert dates into UTC time values. |
| | | * Note that all interaction with it must be synchronized. |
| | |
| | | private static Date datum2000; |
| | | |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | // The default substring matching rule for this syntax. |
| | | /** The default substring matching rule for this syntax. */ |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | |
| | | |
| | | /* |
| | | /** |
| | | * Create the date formatter that will be used to construct and parse |
| | | * normalized UTC time values. |
| | | */ |
| | |
| | | dateFormatLock = new Object(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_UTC_TIME_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_UTC_TIME_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_UTC_TIME_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided string contains a valid set of two or four |
| | | * UTC offset digits. The provided string must have either two or four |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves an attribute value containing a UTC time representation of the |
| | | * provided date. |
| | |
| | | return ByteString.valueOf(valueString); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the provided normalized value as a UTC time value and |
| | | * retrieves a Java <CODE>Date</CODE> object containing its representation. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class UUIDEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | // Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getUUIDMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class UUIDOrderingMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getUUIDOrderingMatchingRule(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | // The default ordering matching rule for this syntax. |
| | | /** The default ordering matching rule for this syntax. */ |
| | | private MatchingRule defaultOrderingMatchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this syntax. Note that the only thing that |
| | | * should be done here is to invoke the default constructor for the |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_UUID_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_UUID_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_UUID_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class UniqueMemberEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getUniqueMemberMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | { |
| | | private MatchingRule matchingRule; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | .toSchema().getMatchingRule(EMR_USER_PASSWORD_OID); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class UserPasswordExactEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getInstance().getMatchingRule("1.3.6.1.4.1.26027.1.4.2"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default equality matching rule for this syntax. |
| | | /** The default equality matching rule for this syntax. */ |
| | | private MatchingRule defaultEqualityMatchingRule; |
| | | |
| | | /** |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the common name for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_USER_PASSWORD_NAME; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_USER_PASSWORD_OID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a description for this attribute syntax. |
| | | * |
| | |
| | | return SYNTAX_USER_PASSWORD_DESCRIPTION; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default equality matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default ordering matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default substring matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default approximate matching rule that will be used for |
| | | * attributes with this syntax. |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in an attribute |
| | | * with this syntax. If it is not, then the reason may be appended to the |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Decodes the provided user password value into its component parts. |
| | | * |
| | |
| | | return new String[] { toLowerCase(schemeName), encodedValue }; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is encoded using the user password |
| | | * syntax. |
| | |
| | | && closingBracePos != value.length() - 1; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | public final class WordEqualityMatchingRuleFactory |
| | | extends MatchingRuleFactory<MatchingRuleCfg> |
| | | { |
| | | //Associated Matching Rule. |
| | | /** Associated Matching Rule. */ |
| | | private org.forgerock.opendj.ldap.schema.MatchingRule matchingRule; |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void initializeMatchingRule(MatchingRuleCfg configuration) |
| | | throws ConfigException, InitializationException |
| | |
| | | matchingRule = CoreSchema.getWordMatchingRule(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Collection<org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.tasks; |
| | | |
| | |
| | | /** The list of files to be added to the server schema. */ |
| | | private TreeSet<String> filesToAdd; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public LocalizableMessage getDisplayName() { |
| | | return INFO_TASK_ADD_SCHEMA_FILE_NAME.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeTask() |
| | | throws DirectoryException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected TaskState runTask() |
| | | { |
| | |
| | | |
| | | private ArrayList<Backend<?>> backendsToArchive; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public LocalizableMessage getDisplayName() { |
| | | return INFO_TASK_BACKUP_NAME.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public LocalizableMessage getAttributeDisplayName(String attrName) { |
| | | return argDisplayMap.get(attrName); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override public void initializeTask() throws DirectoryException |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeTask() throws DirectoryException |
| | | { |
| | | // If the client connection is available, then make sure the associated |
| | | // client has the BACKEND_BACKUP privilege. |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void interruptTask(TaskState interruptState, LocalizableMessage interruptReason) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isInterruptable() { |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected TaskState runTask() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tasks; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | extends Task |
| | | { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getDisplayName() { |
| | | return INFO_TASK_ENTER_LOCKDOWN_MODE_NAME.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeTask() |
| | | throws DirectoryException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected TaskState runTask() |
| | | { |
| | | DirectoryServer.setLockdownMode(true); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tasks; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | extends Task |
| | | { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getDisplayName() { |
| | | return INFO_TASK_LEAVE_LOCKDOWN_MODE_NAME.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeTask() |
| | | throws DirectoryException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected TaskState runTask() |
| | | { |
| | | DirectoryServer.setLockdownMode(false); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tasks; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.api.DirectoryThread; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a thread that will be spawned to invoke a Directory Server |
| | | * in-core restart. That is, the server will perform an internal shutdown, and |
| | |
| | | |
| | | |
| | | |
| | | // The shutdown message that will be used. |
| | | /** The shutdown message that will be used. */ |
| | | private LocalizableMessage shutdownMessage; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tasks; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Indicates whether to use an exit code that indicates the server should be |
| | | // restarted. |
| | | /** |
| | | * Indicates whether to use an exit code that indicates the server should be |
| | | * restarted. |
| | | */ |
| | | private boolean restart; |
| | | |
| | | // The shutdown message that will be used. |
| | | /** The shutdown message that will be used. */ |
| | | private LocalizableMessage shutdownMessage; |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getDisplayName() { |
| | | return INFO_TASK_SHUTDOWN_NAME.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tasks; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | |
| | | |
| | | |
| | | // The shutdown message that will be used. |
| | | /** The shutdown message that will be used. */ |
| | | private LocalizableMessage shutdownMessage; |
| | | |
| | | |
| | |
| | | */ |
| | | public class JavaPropertiesTool extends ConsoleApplication |
| | | { |
| | | // The argument parser |
| | | /** The argument parser. */ |
| | | private JavaPropertiesToolArgumentParser argParser; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isQuiet() |
| | | { |
| | | return argParser.quietArg.isPresent(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isInteractive() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isMenuDrivenMode() { |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isScriptFriendly() { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isAdvancedMode() { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isVerbose() { |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | public class LDAPAuthenticationHandler |
| | | implements PrivilegedExceptionAction<Object>, CallbackHandler |
| | | { |
| | | // The bind DN for GSSAPI authentication. |
| | | /** The bind DN for GSSAPI authentication. */ |
| | | private ByteSequence gssapiBindDN; |
| | | |
| | | // The LDAP reader that will be used to read data from the server. |
| | | /** The LDAP reader that will be used to read data from the server. */ |
| | | private final LDAPReader reader; |
| | | |
| | | // The LDAP writer that will be used to send data to the server. |
| | | /** The LDAP writer that will be used to send data to the server. */ |
| | | private final LDAPWriter writer; |
| | | |
| | | // The atomic integer that will be used to obtain message IDs for request |
| | | // messages. |
| | | /** |
| | | * The atomic integer that will be used to obtain message IDs for request |
| | | * messages. |
| | | */ |
| | | private final AtomicInteger nextMessageID; |
| | | |
| | | // An array filled with the inner pad byte. |
| | | /** An array filled with the inner pad byte. */ |
| | | private byte[] iPad; |
| | | |
| | | // An array filled with the outer pad byte. |
| | | /** An array filled with the outer pad byte. */ |
| | | private byte[] oPad; |
| | | |
| | | // The authentication password for GSSAPI authentication. |
| | | /** The authentication password for GSSAPI authentication. */ |
| | | private char[] gssapiAuthPW; |
| | | |
| | | // The message digest that will be used to create MD5 hashes. |
| | | /** The message digest that will be used to create MD5 hashes. */ |
| | | private MessageDigest md5Digest; |
| | | |
| | | // The secure random number generator for use by this authentication handler. |
| | | /** The secure random number generator for use by this authentication handler. */ |
| | | private SecureRandom secureRandom; |
| | | |
| | | // The authentication ID for GSSAPI authentication. |
| | | /** The authentication ID for GSSAPI authentication. */ |
| | | private String gssapiAuthID; |
| | | |
| | | // The authorization ID for GSSAPI authentication. |
| | | /** The authorization ID for GSSAPI authentication. */ |
| | | private String gssapiAuthzID; |
| | | |
| | | // The quality of protection for GSSAPI authentication. |
| | | /** The quality of protection for GSSAPI authentication. */ |
| | | private String gssapiQoP; |
| | | |
| | | // The host name used to connect to the remote system. |
| | | /** The host name used to connect to the remote system. */ |
| | | private final String hostName; |
| | | |
| | | // The SASL mechanism that will be used for callback authentication. |
| | | /** The SASL mechanism that will be used for callback authentication. */ |
| | | private String saslMechanism; |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The hostname to connect to. |
| | | /** The hostname to connect to. */ |
| | | private String hostName; |
| | | |
| | | // The port number on which the directory server is accepting requests. |
| | | /** The port number on which the directory server is accepting requests. */ |
| | | private int portNumber = 389; |
| | | |
| | | private LDAPConnectionOptions connectionOptions; |
| | |
| | | |
| | | |
| | | |
| | | // The LDAP reader used to read responses from the server. |
| | | /** The LDAP reader used to read responses from the server. */ |
| | | private static LDAPReader ldapReader; |
| | | |
| | | // The LDAP writer used to send requests to the server. |
| | | /** The LDAP writer used to send requests to the server. */ |
| | | private static LDAPWriter ldapWriter; |
| | | |
| | | // The counter that will be used for LDAP message IDs. |
| | | /** The counter that will be used for LDAP message IDs. */ |
| | | private static AtomicInteger nextMessageID; |
| | | |
| | | // The connection to the server. |
| | | /** The connection to the server. */ |
| | | private static LDAPConnection connection; |
| | | |
| | | // The print stream to use when writing messages to standard error. |
| | | /** The print stream to use when writing messages to standard error. */ |
| | | private static PrintStream err; |
| | | |
| | | // The print stream to use when writing messages to standard output. |
| | | /** The print stream to use when writing messages to standard output. */ |
| | | private static PrintStream out; |
| | | |
| | | // The DN of the user to target with the operation. |
| | | /** The DN of the user to target with the operation. */ |
| | | private static String targetDNString; |
| | | |
| | | // The argument parser for this tool. |
| | | /** The argument parser for this tool. */ |
| | | private static SubCommandArgumentParser argParser; |
| | | |
| | | |
| | |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isAdvancedMode() { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isInteractive() { |
| | | return !noPrompt.isPresent(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isMenuDrivenMode() { |
| | | return !task.isPresent() && !cancel.isPresent() && !summary.isPresent() && |
| | | !noPrompt.isPresent(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isQuiet() { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isScriptFriendly() { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isVerbose() { |
| | | return false; |
| | |
| | | private static abstract class TopMenuCallback |
| | | implements MenuCallback<Void> { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MenuResult<Void> invoke(ConsoleApplication app) throws ClientException { |
| | | return invoke((ManageTasks)app); |
| | |
| | | this.taskId = taskId; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MenuResult<TaskEntry> invoke(ConsoleApplication app) |
| | | throws ClientException |
| | |
| | | this.taskId = taskId; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MenuResult<Void> invoke(ManageTasks app) throws ClientException { |
| | | MenuResult<TaskEntry> res = new PrintTaskInfo(taskId).invoke(app); |
| | |
| | | super(taskId); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MenuResult<TaskEntry> invoke(ManageTasks app) |
| | | throws ClientException |
| | |
| | | super(taskId); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected MenuResult<TaskEntry> invoke(ManageTasks app) |
| | | throws ClientException |
| | |
| | | this.cancelableIndices = cancelableIndices; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MenuResult<Void> invoke(ManageTasks app) |
| | | throws ClientException |
| | |
| | | super(taskId); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MenuResult<TaskEntry> invoke(ManageTasks app) |
| | | throws ClientException |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | |
| | | |
| | | |
| | | // The singleton trust manager array for this class. |
| | | /** The singleton trust manager array for this class. */ |
| | | private static TrustManager[] trustManagerArray = |
| | | new TrustManager[] { new PromptTrustManager() }; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isAdvancedMode() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isInteractive() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isMenuDrivenMode() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isQuiet() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isScriptFriendly() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isVerbose() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.dsreplication; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addTaskAttributes(List<RawAttribute> attributes) |
| | | { |
| | | ArrayList<ByteString> baseDNs = new ArrayList<ByteString>(); |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public List<String> getDependencyIds() |
| | | { |
| | | return taskSchedule.getDependencyIds(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public FailedDependencyAction getFailedDependencyAction() |
| | | { |
| | | return taskSchedule.getFailedDependencyAction(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public List<String> getNotifyUponCompletionEmailAddresses() |
| | | { |
| | | return taskSchedule.getNotifyUponCompletionEmailAddresses(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public List<String> getNotifyUponErrorEmailAddresses() |
| | | { |
| | | return taskSchedule.getNotifyUponErrorEmailAddresses(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getRecurringDateTime() |
| | | { |
| | | return taskSchedule.getRecurringDateTime(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Date getStartDateTime() |
| | | { |
| | | return taskSchedule.getStartDate(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<?> getTaskClass() |
| | | { |
| | | return org.opends.server.tasks.PurgeConflictsHistoricalTask.class; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getTaskId() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getTaskObjectclass() |
| | | { |
| | | return "ds-task-purge-conflicts-historical"; |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.tools.dsreplication; |
| | |
| | | */ |
| | | public enum ReplicationCliReturnCode |
| | | { |
| | | /** |
| | | * successful. |
| | | */ |
| | | /** Successful. */ |
| | | SUCCESSFUL(0, INFO_REPLICATION_SUCCESSFUL.get()), |
| | | |
| | | /** |
| | | * successful but no operation was performed. |
| | | */ |
| | | /** Successful but no operation was performed. */ |
| | | SUCCESSFUL_NOP(SUCCESSFUL.getReturnCode(), |
| | | INFO_REPLICATION_SUCCESSFUL_NOP.get()), |
| | | |
| | | /** |
| | | * Unable to initialize arguments. |
| | | */ |
| | | /** Unable to initialize arguments. */ |
| | | CANNOT_INITIALIZE_ARGS(1, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | |
| | | */ |
| | | ERROR_USER_DATA(2, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * The user canceled the operation in interactive mode. |
| | | */ |
| | | /** The user canceled the operation in interactive mode. */ |
| | | USER_CANCELLED(3, ERR_REPLICATION_USER_CANCELLED.get()), |
| | | |
| | | /** |
| | | * Conflicting arguments. |
| | | */ |
| | | /** Conflicting arguments. */ |
| | | CONFLICTING_ARGS(4, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * The provided base DNs cannot be used to enable replication. |
| | | */ |
| | | /** The provided base DNs cannot be used to enable replication. */ |
| | | REPLICATION_CANNOT_BE_ENABLED_ON_BASEDN(5, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * The provided base DNs cannot be used to disable replication. |
| | | */ |
| | | /** The provided base DNs cannot be used to disable replication. */ |
| | | REPLICATION_CANNOT_BE_DISABLED_ON_BASEDN(6, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | |
| | | */ |
| | | INITIALIZING_TRIES_COMPLETED(10, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error enabling replication on a base DN. |
| | | */ |
| | | /** Error enabling replication on a base DN. */ |
| | | ERROR_ENABLING_REPLICATION_ON_BASEDN(11, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error initializing base DN. |
| | | */ |
| | | /** Error initializing base DN. */ |
| | | ERROR_INITIALIZING_BASEDN_GENERIC(12, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error reading configuration. |
| | | */ |
| | | /** Error reading configuration. */ |
| | | ERROR_READING_CONFIGURATION(13, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error updating ADS. |
| | | */ |
| | | /** Error updating ADS. */ |
| | | ERROR_UPDATING_ADS(14, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error reading ADS. |
| | | */ |
| | | /** Error reading ADS. */ |
| | | ERROR_READING_ADS(15, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error reading TopologyCache. |
| | | */ |
| | | /** Error reading TopologyCache. */ |
| | | ERROR_READING_TOPOLOGY_CACHE(16, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error configuring replication server. |
| | | */ |
| | | /** Error configuring replication server. */ |
| | | ERROR_CONFIGURING_REPLICATIONSERVER(17, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Unsupported ADS scenario. |
| | | */ |
| | | /** Unsupported ADS scenario. */ |
| | | REPLICATION_ADS_MERGE_NOT_SUPPORTED(18, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error disabling replication on base DN. |
| | | */ |
| | | /** Error disabling replication on base DN. */ |
| | | ERROR_DISABLING_REPLICATION_ON_BASEDN(19, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error removing replication port reference on base DN. |
| | | */ |
| | | /** Error removing replication port reference on base DN. */ |
| | | ERROR_DISABLING_REPLICATION_REMOVE_REFERENCE_ON_BASEDN(20, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error initializing Administration Framework. |
| | | */ |
| | | /** Error initializing Administration Framework. */ |
| | | ERROR_INITIALIZING_ADMINISTRATION_FRAMEWORK(21, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error seeding trustore. |
| | | */ |
| | | /** Error seeding trustore. */ |
| | | ERROR_SEEDING_TRUSTORE(22, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error launching pre external initialization. |
| | | */ |
| | | /** Error launching pre external initialization. */ |
| | | ERROR_LAUNCHING_PRE_EXTERNAL_INITIALIZATION(23, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error launching pre external initialization. |
| | | */ |
| | | /** Error launching pre external initialization. */ |
| | | ERROR_LAUNCHING_POST_EXTERNAL_INITIALIZATION(24, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error disabling replication server. |
| | | */ |
| | | /** Error disabling replication server. */ |
| | | ERROR_DISABLING_REPLICATION_SERVER(25, ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error executing purge historical. |
| | | */ |
| | | /** Error executing purge historical. */ |
| | | ERROR_EXECUTING_PURGE_HISTORICAL(26, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * The provided base DNs cannot be purged. |
| | | */ |
| | | /** The provided base DNs cannot be purged. */ |
| | | HISTORICAL_CANNOT_BE_PURGED_ON_BASEDN(27, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error launching purge historical. |
| | | */ |
| | | /** Error launching purge historical. */ |
| | | ERROR_LAUNCHING_PURGE_HISTORICAL(28, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error loading configuration class in local purge historical. |
| | | */ |
| | | /** Error loading configuration class in local purge historical. */ |
| | | ERROR_LOCAL_PURGE_HISTORICAL_CLASS_LOAD(29, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Error starting server in local purge historical. |
| | | */ |
| | | /** Error starting server in local purge historical. */ |
| | | ERROR_LOCAL_PURGE_HISTORICAL_SERVER_START(30, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Timeout error in local purge historical. |
| | | */ |
| | | /** Timeout error in local purge historical. */ |
| | | ERROR_LOCAL_PURGE_HISTORICAL_TIMEOUT(31, |
| | | ERR_REPLICATION_NO_MESSAGE.get()), |
| | | |
| | | /** |
| | | * Generic error executing local purge historical. |
| | | */ |
| | | /** Generic error executing local purge historical. */ |
| | | ERROR_LOCAL_PURGE_HISTORICAL_EXECUTING(32, |
| | | ERR_REPLICATION_NO_MESSAGE.get()); |
| | | |
| | |
| | | private LocalizableMessage message; |
| | | private int returnCode; |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private ReplicationCliReturnCode(int returnCode, LocalizableMessage message) |
| | | { |
| | | this.returnCode = returnCode; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class AttributeValueTag |
| | | extends Tag |
| | | { |
| | | // The attribute type that specifies which value should be used. |
| | | /** The attribute type that specifies which value should be used. */ |
| | | private AttributeType attributeType; |
| | | |
| | | // The maximum number of characters to include from the value. |
| | | /** The maximum number of characters to include from the value. */ |
| | | private int numCharacters; |
| | | |
| | | |
| | |
| | | */ |
| | | public class Branch |
| | | { |
| | | // The DN for this branch entry. |
| | | /** The DN for this branch entry. */ |
| | | private DN branchDN; |
| | | |
| | | // The number of entries that should be created below this branch for each |
| | | // subordinate template. |
| | | /** |
| | | * The number of entries that should be created below this branch for each |
| | | * subordinate template. |
| | | */ |
| | | private int[] numEntriesPerTemplate; |
| | | |
| | | // The names of the subordinate templates for this branch. |
| | | /** The names of the subordinate templates for this branch. */ |
| | | private String[] subordinateTemplateNames; |
| | | |
| | | // The set of subordinate templates for this branch. |
| | | /** The set of subordinate templates for this branch. */ |
| | | private Template[] subordinateTemplates; |
| | | |
| | | // The set of template lines that correspond to the RDN components. |
| | | /** The set of template lines that correspond to the RDN components. */ |
| | | private TemplateLine[] rdnLines; |
| | | |
| | | // The set of extra lines that should be included in this branch entry. |
| | | /** The set of extra lines that should be included in this branch entry. */ |
| | | private TemplateLine[] extraLines; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class DNTag |
| | | extends Tag |
| | | { |
| | | // The number of DN components to include. |
| | | /** The number of DN components to include. */ |
| | | private int numComponents; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class FileTag |
| | | extends Tag |
| | | { |
| | | // Indicates whether the values should be selected sequentially or at random. |
| | | /** Indicates whether the values should be selected sequentially or at random. */ |
| | | private boolean sequential; |
| | | |
| | | // The file containing the data. |
| | | /** The file containing the data. */ |
| | | private File dataFile; |
| | | |
| | | // The index used for sequential access. |
| | | /** The index used for sequential access. */ |
| | | private int nextIndex; |
| | | |
| | | // The random number generator for this tag. |
| | | /** The random number generator for this tag. */ |
| | | private Random random; |
| | | |
| | | // The array of lines read from the file. |
| | | /** The array of lines read from the file. */ |
| | | private String[] fileLines; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class FirstNameTag |
| | | extends Tag |
| | | { |
| | | // The template file with which this tag is associated. |
| | | /** The template file with which this tag is associated. */ |
| | | private TemplateFile templateFile; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class IfAbsentTag |
| | | extends Tag |
| | | { |
| | | // The attribute type for which to make the determination. |
| | | /** The attribute type for which to make the determination. */ |
| | | private AttributeType attributeType; |
| | | |
| | | // The value for which to make the determination. |
| | | /** The value for which to make the determination. */ |
| | | private String assertionValue; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class IfPresentTag |
| | | extends Tag |
| | | { |
| | | // The attribute type for which to make the determination. |
| | | /** The attribute type for which to make the determination. */ |
| | | private AttributeType attributeType; |
| | | |
| | | // The value for which to make the determination. |
| | | /** The value for which to make the determination. */ |
| | | private String assertionValue; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class LastNameTag |
| | | extends Tag |
| | | { |
| | | // The template file with which this tag is associated. |
| | | /** The template file with which this tag is associated. */ |
| | | private TemplateFile templateFile; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | |
| | |
| | | public class ListTag |
| | | extends Tag |
| | | { |
| | | // The ultimate cumulative weight. |
| | | /** The ultimate cumulative weight. */ |
| | | private int cumulativeWeight; |
| | | |
| | | // The set of cumulative weights for the list items. |
| | | /** The set of cumulative weights for the list items. */ |
| | | private int[] valueWeights; |
| | | |
| | | // The set of values in the list. |
| | | /** The set of values in the list. */ |
| | | private String[] valueStrings; |
| | | |
| | | // The random number generator for this tag. |
| | | /** The random number generator for this tag. */ |
| | | private Random random; |
| | | |
| | | |
| | |
| | | extends InputStream |
| | | implements EntryWriter |
| | | { |
| | | // Indicates whether all of the entries have been generated. |
| | | /** Indicates whether all of the entries have been generated. */ |
| | | private boolean allGenerated; |
| | | |
| | | // Indicates whether this input stream has been closed. |
| | | /** Indicates whether this input stream has been closed. */ |
| | | private boolean closed; |
| | | |
| | | // The byte array output stream that will be used to convert entries to byte |
| | | // arrays with their LDIF representations. |
| | | /** |
| | | * The byte array output stream that will be used to convert entries to byte |
| | | * arrays with their LDIF representations. |
| | | */ |
| | | private ByteArrayOutputStream entryOutputStream; |
| | | |
| | | // The byte array that will hold the LDIF representation of the next entry to |
| | | // be read. |
| | | /** |
| | | * The byte array that will hold the LDIF representation of the next entry to |
| | | * be read. |
| | | */ |
| | | private ByteBuffer entryBytes; |
| | | |
| | | // The IOException that should be thrown the next time a read is requested. |
| | | /** The IOException that should be thrown the next time a read is requested. */ |
| | | private IOException ioException; |
| | | |
| | | // The LDIF writer that will be used to write the entries to LDIF. |
| | | /** The LDIF writer that will be used to write the entries to LDIF. */ |
| | | private LDIFWriter ldifWriter; |
| | | |
| | | // The queue used to hold generated entries until they can be read. |
| | | /** The queue used to hold generated entries until they can be read. */ |
| | | private LinkedBlockingQueue<TemplateEntry> entryQueue; |
| | | |
| | | // The background thread being used to actually generate the entries. |
| | | /** The background thread being used to actually generate the entries. */ |
| | | private MakeLDIFInputStreamThread generatorThread; |
| | | |
| | | // The template file to use to generate the entries. |
| | | /** The template file to use to generate the entries. */ |
| | | private TemplateFile templateFile; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean writeEntry(TemplateEntry entry) |
| | | throws IOException, MakeLDIFException |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void closeEntryWriter() |
| | | { |
| | | allGenerated = true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | |
| | |
| | | class MakeLDIFInputStreamThread |
| | | extends DirectoryThread |
| | | { |
| | | // The MakeLDIF input stream that this thread is feeding. |
| | | /** The MakeLDIF input stream that this thread is feeding. */ |
| | | private MakeLDIFInputStream inputStream; |
| | | |
| | | // The template file to use to generate the entries. |
| | | /** The template file to use to generate the entries. */ |
| | | private TemplateFile templateFile; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of this MakeLDIF input stream thread that will feed |
| | | * the provided input strema. |
| | | * the provided input stream. |
| | | * |
| | | * @param inputStream The MakeLDIF input stream that this thread will feed. |
| | | * @param templateFile The template file to use to generate the entries. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class PresenceTag |
| | | extends Tag |
| | | { |
| | | // The percentage of the entries in which this attribute value should appear. |
| | | /** The percentage of the entries in which this attribute value should appear. */ |
| | | private int percentage; |
| | | |
| | | // The random number generator for this tag. |
| | | /** The random number generator for this tag. */ |
| | | private Random random; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The character set that should be used to generate the values. |
| | | /** The character set that should be used to generate the values. */ |
| | | private char[] characterSet; |
| | | |
| | | // The decimal format used to format numeric values. |
| | | /** The decimal format used to format numeric values. */ |
| | | private DecimalFormat decimalFormat; |
| | | |
| | | // The number of characters between the minimum and maximum length |
| | | // (inclusive). |
| | | /** |
| | | * The number of characters between the minimum and maximum length |
| | | * (inclusive). |
| | | */ |
| | | private int lengthRange; |
| | | |
| | | // The maximum number of characters to include in the value. |
| | | /** The maximum number of characters to include in the value. */ |
| | | private int maxLength; |
| | | |
| | | // The minimum number of characters to include in the value. |
| | | /** The minimum number of characters to include in the value. */ |
| | | private int minLength; |
| | | |
| | | // The type of random value that should be generated. |
| | | /** The type of random value that should be generated. */ |
| | | private int randomType; |
| | | |
| | | // The maximum numeric value that should be generated. |
| | | /** The maximum numeric value that should be generated. */ |
| | | private long maxValue; |
| | | |
| | | // The minimum numeric value that should be generated. |
| | | /** The minimum numeric value that should be generated. */ |
| | | private long minValue; |
| | | |
| | | // The number of values between the minimum and maximum value (inclusive). |
| | | /** The number of values between the minimum and maximum value (inclusive). */ |
| | | private long valueRange; |
| | | |
| | | // The random number generator for this tag. |
| | | /** The random number generator for this tag. */ |
| | | private Random random; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class SequentialTag |
| | | extends Tag |
| | | { |
| | | // Indicates whether to reset for each parent. |
| | | /** Indicates whether to reset for each parent. */ |
| | | private boolean resetOnNewParents; |
| | | |
| | | // The initial value in the sequence. |
| | | /** The initial value in the sequence. */ |
| | | private int initialValue; |
| | | |
| | | // The next value in the sequence. |
| | | /** The next value in the sequence. */ |
| | | private int nextValue; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class StaticTextTag |
| | | extends Tag |
| | | { |
| | | // The static text to include in the LDIF. |
| | | /** The static text to include in the LDIF. */ |
| | | private String text; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Indicates whether to keep processing the associated line. |
| | | /** Indicates whether to keep processing the associated line. */ |
| | | private boolean keepProcessingLine; |
| | | |
| | | // Indicates whether to keep processing the associated entry. |
| | | /** Indicates whether to keep processing the associated entry. */ |
| | | private boolean keepProcessingEntry; |
| | | |
| | | // Indicates whether to keep processing entries below the associated parent. |
| | | /** Indicates whether to keep processing entries below the associated parent. */ |
| | | private boolean keepProcessingParent; |
| | | |
| | | // Indicates whether to keep processing entries for the template file. |
| | | /** Indicates whether to keep processing entries for the template file. */ |
| | | private boolean keepProcessingTemplateFile; |
| | | |
| | | |
| | |
| | | */ |
| | | public class Template |
| | | { |
| | | // The attribute types that are used in the RDN for entries generated using |
| | | // this template. |
| | | /** |
| | | * The attribute types that are used in the RDN for entries generated using |
| | | * this template. |
| | | */ |
| | | private AttributeType[] rdnAttributes; |
| | | |
| | | // The number of entries to create for each subordinate template. |
| | | /** The number of entries to create for each subordinate template. */ |
| | | private int[] numEntriesPerTemplate; |
| | | |
| | | // The name for this template. |
| | | /** The name for this template. */ |
| | | private String name; |
| | | |
| | | // The names of the subordinate templates below this template. |
| | | /** The names of the subordinate templates below this template. */ |
| | | private String[] subordinateTemplateNames; |
| | | |
| | | // The subordinate templates below this template. |
| | | /** The subordinate templates below this template. */ |
| | | private Template[] subordinateTemplates; |
| | | |
| | | // The template file that contains this template. |
| | | /** The template file that contains this template. */ |
| | | private TemplateFile templateFile; |
| | | |
| | | // The set of template lines for this template. |
| | | /** The set of template lines for this template. */ |
| | | private TemplateLine[] templateLines; |
| | | |
| | | |
| | |
| | | */ |
| | | public class TemplateEntry |
| | | { |
| | | // The branch used to generate this entry (if it is associated with a branch). |
| | | /** The branch used to generate this entry (if it is associated with a branch). */ |
| | | private Branch branch; |
| | | |
| | | // The DN for this template entry, if it is known. |
| | | /** The DN for this template entry, if it is known. */ |
| | | private DN dn; |
| | | |
| | | // The DN of the parent entry for this template entry, if it is available. |
| | | /** The DN of the parent entry for this template entry, if it is available. */ |
| | | private DN parentDN; |
| | | |
| | | // The set of attributes associated with this template entry, mapped from the |
| | | // lowercase name of the attribute to the list of generated values. |
| | | /** |
| | | * The set of attributes associated with this template entry, mapped from the |
| | | * lowercase name of the attribute to the list of generated values. |
| | | */ |
| | | private LinkedHashMap<AttributeType,ArrayList<TemplateValue>> attributes; |
| | | |
| | | // The template used to generate this entry (if it is associated with a |
| | | // template). |
| | | /** |
| | | * The template used to generate this entry (if it is associated with a |
| | | * template). |
| | | */ |
| | | private Template template; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | |
| | | |
| | | |
| | | // A map of the contents of various text files used during the parsing |
| | | // process, mapped from absolute path to the array of lines in the file. |
| | | /** |
| | | * A map of the contents of various text files used during the parsing |
| | | * process, mapped from absolute path to the array of lines in the file. |
| | | */ |
| | | private HashMap<String,String[]> fileLines; |
| | | |
| | | // The index of the next first name value that should be used. |
| | | /** The index of the next first name value that should be used. */ |
| | | private int firstNameIndex; |
| | | |
| | | // The index of the next last name value that should be used. |
| | | /** The index of the next last name value that should be used. */ |
| | | private int lastNameIndex; |
| | | |
| | | // A counter used to keep track of the number of times that the larger of the |
| | | // first/last name list has been completed. |
| | | /** |
| | | * A counter used to keep track of the number of times that the larger of the |
| | | * first/last name list has been completed. |
| | | */ |
| | | private int nameLoopCounter; |
| | | |
| | | // A counter that will be used in case we have exhausted all possible first |
| | | // and last name combinations. |
| | | /** |
| | | * A counter that will be used in case we have exhausted all possible first |
| | | * and last name combinations. |
| | | */ |
| | | private int nameUniquenessCounter; |
| | | |
| | | // The set of branch definitions for this template file. |
| | | /** The set of branch definitions for this template file. */ |
| | | private LinkedHashMap<DN,Branch> branches; |
| | | |
| | | // The set of constant definitions for this template file. |
| | | /** The set of constant definitions for this template file. */ |
| | | private LinkedHashMap<String,String> constants; |
| | | |
| | | // The set of registered tags for this template file. |
| | | /** The set of registered tags for this template file. */ |
| | | private LinkedHashMap<String,Tag> registeredTags; |
| | | |
| | | // The set of template definitions for this template file. |
| | | /** The set of template definitions for this template file. */ |
| | | private LinkedHashMap<String,Template> templates; |
| | | |
| | | // The random number generator for this template file. |
| | | /** The random number generator for this template file. */ |
| | | private Random random; |
| | | |
| | | // The next first name that should be used. |
| | | /** The next first name that should be used. */ |
| | | private String firstName; |
| | | |
| | | // The next last name that should be used. |
| | | /** The next last name that should be used. */ |
| | | private String lastName; |
| | | |
| | | // The resource path to use for filesystem elements that cannot be found |
| | | // anywhere else. |
| | | /** |
| | | * The resource path to use for filesystem elements that cannot be found |
| | | * anywhere else. |
| | | */ |
| | | private String resourcePath; |
| | | |
| | | // The path to the directory containing the template file, if available. |
| | | /** The path to the directory containing the template file, if available. */ |
| | | private String templatePath; |
| | | |
| | | // The set of first names to use when generating the LDIF. |
| | | /** The set of first names to use when generating the LDIF. */ |
| | | private String[] firstNames; |
| | | |
| | | // The set of last names to use when generating the LDIF. |
| | | /** The set of last names to use when generating the LDIF. */ |
| | | private String[] lastNames; |
| | | |
| | | |
| | |
| | | */ |
| | | public class TemplateLine |
| | | { |
| | | // The attribute type for this template line. |
| | | /** The attribute type for this template line. */ |
| | | private AttributeType attributeType; |
| | | |
| | | // The line number on which this template line appears in the template file. |
| | | /** The line number on which this template line appears in the template file. */ |
| | | private int lineNumber; |
| | | |
| | | // The set of tags for this template line. |
| | | /** The set of tags for this template line. */ |
| | | private Tag[] tags; |
| | | |
| | | // Whether this line corresponds to an URL value or not. |
| | | /** Whether this line corresponds to an URL value or not. */ |
| | | private boolean isURL; |
| | | |
| | | // Whether this line corresponds to a base64 encoded value or not. |
| | | /** Whether this line corresponds to a base64 encoded value or not. */ |
| | | private boolean isBase64; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | |
| | |
| | | */ |
| | | public class TemplateValue |
| | | { |
| | | // The generated template value. |
| | | /** The generated template value. */ |
| | | private StringBuilder templateValue; |
| | | |
| | | // The template line used to generate this value. |
| | | /** The template line used to generate this value. */ |
| | | private TemplateLine templateLine; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | public class UnderscoreDNTag |
| | | extends Tag |
| | | { |
| | | // The number of DN components to include. |
| | | /** The number of DN components to include. */ |
| | | private int numComponents; |
| | | |
| | | |
| | |
| | | |
| | | private int hashCode; |
| | | |
| | | // These attributes associated with the ds-task object |
| | | // class are all handled explicitly below in the constructor |
| | | /** |
| | | * These attributes associated with the ds-task object |
| | | * class are all handled explicitly below in the constructor. |
| | | */ |
| | | private static Set<String> supAttrNames = new HashSet<String>(); |
| | | static { |
| | | supAttrNames.add("ds-task-id"); |
| | |
| | | return hashCode; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean equals(Object o) |
| | | { |
| | |
| | | */ |
| | | private static final int RUN_ONLINE = 52; |
| | | |
| | | // Number of milliseconds this utility will wait before reloading |
| | | // this task's entry in the directory while it is polling for status |
| | | /** |
| | | * Number of milliseconds this utility will wait before reloading |
| | | * this task's entry in the directory while it is polling for status. |
| | | */ |
| | | private static final int SYNCHRONOUS_TASK_POLL_INTERVAL = 1000; |
| | | |
| | | private LDAPConnectionArgumentParser argParser; |
| | | |
| | | private TaskScheduleArgs taskScheduleArgs; |
| | | |
| | | // Argument used to know whether we must test if we must run in off-line |
| | | // mode. |
| | | /** |
| | | * Argument used to know whether we must test if we must run in off-line mode. |
| | | */ |
| | | private BooleanArgument testIfOfflineArg; |
| | | |
| | | // This CLI is always using the administration connector with SSL |
| | | /** This CLI is always using the administration connector with SSL. */ |
| | | private static final boolean alwaysSSL = true; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Date getStartDateTime() { |
| | | return taskScheduleArgs.getStartDateTime(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getRecurringDateTime() { |
| | | return taskScheduleArgs.getRecurringDateTime(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public List<String> getDependencyIds() { |
| | | return taskScheduleArgs.getDependencyIds(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public FailedDependencyAction getFailedDependencyAction() { |
| | | return taskScheduleArgs.getFailedDependencyAction(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public List<String> getNotifyUponCompletionEmailAddresses() { |
| | | return taskScheduleArgs.getNotifyUponCompletionEmailAddresses(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public List<String> getNotifyUponErrorEmailAddresses() { |
| | | return taskScheduleArgs.getNotifyUponErrorEmailAddresses(); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2013-2014 ForgeRock AS |
| | | * Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools.upgrade; |
| | | |
| | |
| | | // No implementation required. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void interact(UpgradeContext context) |
| | | throws ClientException |
| | |
| | | // Nothing to do. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void perform(UpgradeContext context) throws ClientException |
| | | { |
| | | // Must be implemented. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void verify(UpgradeContext context) |
| | | throws ClientException |
| | |
| | | // Nothing to do. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void postUpgrade(UpgradeContext context) |
| | | throws ClientException |
| | |
| | | // Nothing to do. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void postponePostUpgrade(UpgradeContext context) |
| | | throws ClientException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public FileOperation copyForChild(File child) |
| | | { |
| | | return new CopyOperation(child, destination, overwrite); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void apply() throws IOException |
| | | { |
| | | final File objectFile = getObjectFile(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public FileOperation copyForChild(File child) |
| | | { |
| | | return new DeleteOperation(child, deletionPolicy); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void apply() throws IOException |
| | | { |
| | | File file = getObjectFile(); |
| | |
| | | return modifiedLines; |
| | | } |
| | | |
| | | // Prevent instantiation. |
| | | /** Prevent instantiation. */ |
| | | private UpgradeUtils() |
| | | { |
| | | throw new AssertionError(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final boolean equals(Object o) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final String toString() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The human-readable name for this policy. |
| | | /** The human-readable name for this policy. */ |
| | | private String policyName; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | * Portions Copyright 2011-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class AccountStatusNotification |
| | | { |
| | | // The notification type for this account status notification. |
| | | /** The notification type for this account status notification. */ |
| | | private AccountStatusNotificationType notificationType; |
| | | |
| | | // The entry for the user to whom this notification applies. |
| | | /** The entry for the user to whom this notification applies. */ |
| | | private Entry userEntry; |
| | | |
| | | // A set of additional properties that may be useful for this |
| | | // notification. |
| | | /** |
| | | * A set of additional properties that may be useful for this |
| | | * notification. |
| | | */ |
| | | private Map<AccountStatusNotificationProperty,List<String>> |
| | | notificationProperties; |
| | | |
| | | // A message that provides additional information for this account |
| | | // status notification. |
| | | /** |
| | | * A message that provides additional information for this account |
| | | * status notification. |
| | | */ |
| | | private LocalizableMessage message; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | * Portions Copyright 2011-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The notification type name. |
| | | /** The notification type name. */ |
| | | private String name; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The notification type name. |
| | | /** The notification type name. */ |
| | | private String name; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | |
| | | { |
| | | return key; |
| | | } |
| | | else |
| | | { |
| | | final StringBuilder builder = new StringBuilder(key.length() + 16); |
| | | toString(builder); |
| | | return builder.toString(); |
| | | } |
| | | final StringBuilder builder = new StringBuilder(key.length() + 16); |
| | | toString(builder); |
| | | return builder.toString(); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The attribute type for this attribute. |
| | | /** The attribute type for this attribute. */ |
| | | private final AttributeType attributeType; |
| | | |
| | | // The name of this attribute as provided by the end user. |
| | | /** The name of this attribute as provided by the end user. */ |
| | | private final String name; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final ConditionResult approximatelyEqualTo(ByteString assertionValue) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final boolean contains(ByteString value) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final AttributeType getAttributeType() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final String getName() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final ConditionResult greaterThanOrEqualTo(ByteString assertionValue) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final boolean isVirtual() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final Iterator<ByteString> iterator() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final ConditionResult lessThanOrEqualTo(ByteString assertionValue) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final ConditionResult matchesSubstring( |
| | | ByteString subInitial, |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final int size() |
| | | { |
| | |
| | | return hashCode; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | |
| | | extends RealAttribute |
| | | { |
| | | |
| | | // The normalized options. |
| | | /** The normalized options. */ |
| | | private final SortedSet<String> normalizedOptions; |
| | | |
| | | // The options. |
| | | /** The options. */ |
| | | private final Set<String> options; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Set<String> getOptions() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasOption(String option) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasOptions() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getNameWithOptions() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Set<String> getOptions() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasAllOptions(Collection<String> options) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasOption(String option) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasOptions() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean optionsEqual(Set<String> options) |
| | | { |
| | |
| | | extends RealAttribute |
| | | { |
| | | |
| | | // The normalized single option. |
| | | /** The normalized single option. */ |
| | | private final String normalizedOption; |
| | | |
| | | // A singleton set containing the single option. |
| | | /** A singleton set containing the single option. */ |
| | | private final Set<String> option; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Set<String> getOptions() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasOption(String option) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean hasOptions() |
| | | { |
| | |
| | | extends AbstractSet<T> |
| | | { |
| | | |
| | | // The set of elements if there are more than one. |
| | | /** The set of elements if there are more than one. */ |
| | | private LinkedHashSet<T> elements; |
| | | |
| | | // The first element. |
| | | /** The first element. */ |
| | | private T firstElement; |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean add(T e) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean addAll(Collection<? extends T> c) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void clear() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Iterator<T> iterator() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean remove(Object o) |
| | | { |
| | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean contains(Object o) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int size() |
| | | { |
| | |
| | | return type; |
| | | } |
| | | |
| | | // The attribute type for this attribute. |
| | | /** The attribute type for this attribute. */ |
| | | private AttributeType attributeType; |
| | | |
| | | // The name of this attribute as provided by the end user. |
| | | /** The name of this attribute as provided by the end user. */ |
| | | private String name; |
| | | |
| | | // The normalized set of options if there are more than one. |
| | | /** The normalized set of options if there are more than one. */ |
| | | private SortedSet<String> normalizedOptions; |
| | | |
| | | // The set of options. |
| | | /** The set of options. */ |
| | | private final SmallSet<String> options = new SmallSet<String>(); |
| | | |
| | | /** The map of normalized values => values for this attribute. */ |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final String toString() |
| | | { |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The approximate matching rule for this attribute type. |
| | | /** The approximate matching rule for this attribute type. */ |
| | | private final MatchingRule approximateMatchingRule; |
| | | |
| | | // The syntax for this attribute type. |
| | | /** The syntax for this attribute type. */ |
| | | private final AttributeSyntax<?> syntax; |
| | | |
| | | // The superior attribute type from which this attribute type |
| | | // inherits. |
| | | /** The superior attribute type from which this attribute type inherits. */ |
| | | private final AttributeType superiorType; |
| | | |
| | | // The attribute usage for this attribute type. |
| | | /** The attribute usage for this attribute type. */ |
| | | private final AttributeUsage attributeUsage; |
| | | |
| | | // Indicates whether this attribute type is declared "collective". |
| | | /** Indicates whether this attribute type is declared "collective". */ |
| | | private final boolean isCollective; |
| | | |
| | | // Indicates whether this attribute type is declared |
| | | // "no-user-modification". |
| | | /** |
| | | * Indicates whether this attribute type is declared |
| | | * "no-user-modification". |
| | | */ |
| | | private final boolean isNoUserModification; |
| | | |
| | | // Indicates whether this attribute type is the objectclass type. |
| | | /** Indicates whether this attribute type is the objectclass type. */ |
| | | private final boolean isObjectClassType; |
| | | |
| | | // Indicates whether this attribute type is operational. |
| | | /** Indicates whether this attribute type is operational. */ |
| | | private final boolean isOperational; |
| | | |
| | | // Indicates whether this attribute type is declared "single-value". |
| | | /** Indicates whether this attribute type is declared "single-value". */ |
| | | private final boolean isSingleValue; |
| | | |
| | | // Indicates whether there is a possibility that this attribute type |
| | | // may have one or more subtypes that list this type or one of its |
| | | // subtypes as a superior. Note that this variable is intentional |
| | | // not declared "final", but if it ever gets set to "true", then it |
| | | // should never be unset back to "false". |
| | | /** |
| | | * Indicates whether there is a possibility that this attribute type |
| | | * may have one or more subtypes that list this type or one of its |
| | | * subtypes as a superior. Note that this variable is intentional |
| | | * not declared "final", but if it ever gets set to "true", then it |
| | | * should never be unset back to "false". |
| | | */ |
| | | private boolean mayHaveSubordinateTypes; |
| | | |
| | | // The equality matching rule for this attribute type. |
| | | private final MatchingRule equalityMatchingRule; |
| | | |
| | | // The ordering matching rule for this attribute type. |
| | | private final MatchingRule orderingMatchingRule; |
| | | |
| | | // The definition string used to create this attribute type. |
| | | /** The definition string used to create this attribute type. */ |
| | | private final String definition; |
| | | |
| | | // The substring matching rule for this attribute type. |
| | | /** The equality matching rule for this attribute type. */ |
| | | private final MatchingRule equalityMatchingRule; |
| | | /** The ordering matching rule for this attribute type. */ |
| | | private final MatchingRule orderingMatchingRule; |
| | | /** The substring matching rule for this attribute type. */ |
| | | private final MatchingRule substringMatchingRule; |
| | | |
| | | // True once this attribute type has been removed from the schema. |
| | | /** True once this attribute type has been removed from the schema. */ |
| | | private volatile boolean isDirty; |
| | | |
| | | |
| | |
| | | return definition; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int compareTo(AttributeType o) { |
| | | return getNormalizedPrimaryNameOrOID().compareTo( |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The BER type tag that is associated with this authentication |
| | | // type. |
| | | /** The BER type tag that is associated with this authentication type. */ |
| | | private byte berType; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The DN of the configuration entry for the backend with which this |
| | | // backup directory is associated. |
| | | /** |
| | | * The DN of the configuration entry for the backend with which this |
| | | * backup directory is associated. |
| | | */ |
| | | private DN configEntryDN; |
| | | |
| | | // The set of backups in the specified directory. The iteration |
| | | // order will be the order in which the backups were created. |
| | | /** |
| | | * The set of backups in the specified directory. The iteration |
| | | * order will be the order in which the backups were created. |
| | | */ |
| | | private LinkedHashMap<String,BackupInfo> backups; |
| | | |
| | | // The filesystem path to the backup directory. |
| | | /** The filesystem path to the backup directory. */ |
| | | private String path; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The backup directory with which this backup info structure is |
| | | // associated. |
| | | /** |
| | | * The backup directory with which this backup info structure is |
| | | * associated. |
| | | */ |
| | | private BackupDirectory backupDirectory; |
| | | |
| | | // Indicates whether this backup is compressed. |
| | | /** Indicates whether this backup is compressed. */ |
| | | private boolean isCompressed; |
| | | |
| | | // Indicates whether this backup is encrypted. |
| | | /** Indicates whether this backup is encrypted. */ |
| | | private boolean isEncrypted; |
| | | |
| | | // Indicates whether this is an incremental backup. |
| | | /** Indicates whether this is an incremental backup. */ |
| | | private boolean isIncremental; |
| | | |
| | | // The signed hash for this backup, if appropriate. |
| | | /** The signed hash for this backup, if appropriate. */ |
| | | private byte[] signedHash; |
| | | |
| | | // The unsigned hash for this backup, if appropriate. |
| | | /** The unsigned hash for this backup, if appropriate. */ |
| | | private byte[] unsignedHash; |
| | | |
| | | // The time that this backup was created. |
| | | /** The time that this backup was created. */ |
| | | private Date backupDate; |
| | | |
| | | // The set of backup ID(s) on which this backup is dependent. |
| | | /** The set of backup ID(s) on which this backup is dependent. */ |
| | | private HashSet<String> dependencies; |
| | | |
| | | // The set of additional properties associated with this backup. |
| | | // This is intended for use by the backend for storing any kind of |
| | | // state information that it might need to associated with the |
| | | // backup. The mapping will be between a name and a value, where |
| | | // the name must not contain an equal sign and neither the name nor |
| | | // the value may contain line breaks; |
| | | /** |
| | | * The set of additional properties associated with this backup. |
| | | * This is intended for use by the backend for storing any kind of |
| | | * state information that it might need to associated with the |
| | | * backup. The mapping will be between a name and a value, where |
| | | * the name must not contain an equal sign and neither the name nor |
| | | * the value may contain line breaks; |
| | | */ |
| | | private HashMap<String,String> backupProperties; |
| | | |
| | | // The unique ID for this backup. |
| | | /** The unique ID for this backup. */ |
| | | private String backupID; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | notes="This should only be used within a backend") |
| | | public final class CacheEntry |
| | | { |
| | | // The backend with which this cache entry is associated. |
| | | private Backend backend; |
| | | /** The backend with which this cache entry is associated. */ |
| | | private Backend<?> backend; |
| | | |
| | | // The entry itself. |
| | | /** The entry itself. */ |
| | | private Entry entry; |
| | | |
| | | // The entry ID for the entry within the backend. |
| | | /** The entry ID for the entry within the backend. */ |
| | | private long entryID; |
| | | |
| | | |
| | |
| | | * @param backend The backend for this cache entry. |
| | | * @param entryID The entry ID for this cache entry. |
| | | */ |
| | | public CacheEntry(Entry entry, Backend backend, long entryID) |
| | | public CacheEntry(Entry entry, Backend<?> backend, long entryID) |
| | | { |
| | | this.entry = entry; |
| | | this.backend = backend; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class CancelRequest |
| | | { |
| | | // Indicates whether to send a response to the original request if |
| | | // the operation is canceled. |
| | | /** |
| | | * Indicates whether to send a response to the original request if |
| | | * the operation is canceled. |
| | | */ |
| | | private final boolean notifyOriginalRequestor; |
| | | |
| | | // A message that explains the purpose for this cancellation (may be |
| | | // included in the response to the original requestor). |
| | | /** |
| | | * A message that explains the purpose for this cancellation (may be |
| | | * included in the response to the original requestor). |
| | | */ |
| | | private final LocalizableMessage cancelReason; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public class CancelResult |
| | | { |
| | | // The result code associated with this cancel result. |
| | | /** The result code associated with this cancel result. */ |
| | | private final ResultCode resultCode; |
| | | |
| | | // A human-readable response that the server |
| | | // provided for the result of the cancellation. |
| | | /** |
| | | * A human-readable response that the server |
| | | * provided for the result of the cancellation. |
| | | */ |
| | | private final LocalizableMessage responseMessage; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The cancel result that provides information about the status of |
| | | // the cancellation. |
| | | /** |
| | | * The cancel result that provides information about the status of |
| | | * the cancellation. |
| | | */ |
| | | private final CancelRequest cancelRequest; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.types; |
| | |
| | | */ |
| | | public class CollectiveVirtualAttribute extends AbstractAttribute |
| | | { |
| | | // The attribute this collective virtual attribute is based on. |
| | | /** The attribute this collective virtual attribute is based on. */ |
| | | private Attribute attribute; |
| | | |
| | | /** |
| | |
| | | this.attribute = attribute; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConditionResult approximatelyEqualTo(ByteString assertionValue) { |
| | | return attribute.approximatelyEqualTo(assertionValue); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean contains(ByteString value) { |
| | | return attribute.contains(value); |
| | |
| | | return attribute.matchesEqualityAssertion(assertionValue); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public AttributeType getAttributeType() { |
| | | return attribute.getAttributeType(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Set<String> getOptions() { |
| | | return attribute.getOptions(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConditionResult greaterThanOrEqualTo(ByteString assertionValue) { |
| | | return attribute.greaterThanOrEqualTo(assertionValue); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isVirtual() { |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Iterator<ByteString> iterator() { |
| | | return attribute.iterator(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConditionResult lessThanOrEqualTo(ByteString assertionValue) { |
| | | return attribute.lessThanOrEqualTo(assertionValue); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConditionResult matchesSubstring(ByteString subInitial, |
| | | List<ByteString> subAny, ByteString subFinal) { |
| | | return attribute.matchesSubstring(subInitial, subAny, subFinal); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int size() { |
| | | return attribute.size(); |
| | |
| | | return attribute.hashCode(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void toString(StringBuilder buffer) { |
| | | attribute.toString(buffer); |
| | |
| | | mayInvoke=true) |
| | | public abstract class CommonSchemaElements implements SchemaFileElement { |
| | | |
| | | // Indicates whether this definition is declared "obsolete". |
| | | /** Indicates whether this definition is declared "obsolete". */ |
| | | private final boolean isObsolete; |
| | | |
| | | // The hash code for this definition. |
| | | /** The hash code for this definition. */ |
| | | private final int hashCode; |
| | | |
| | | // The set of additional name-value pairs associated with this |
| | | // definition. |
| | | /** |
| | | * The set of additional name-value pairs associated with this |
| | | * definition. |
| | | */ |
| | | private final Map<String, List<String>> extraProperties; |
| | | |
| | | // The set of names for this definition, in a mapping between |
| | | // the all-lowercase form and the user-defined form. |
| | | /** |
| | | * The set of names for this definition, in a mapping between |
| | | * the all-lowercase form and the user-defined form. |
| | | */ |
| | | private final Map<String, String> names; |
| | | |
| | | // The description for this definition. |
| | | /** The description for this definition. */ |
| | | private final String description; |
| | | |
| | | // The OID that may be used to reference this definition. |
| | | /** The OID that may be used to reference this definition. */ |
| | | private final String oid; |
| | | |
| | | // The primary name to use for this definition. |
| | | /** The primary name to use for this definition. */ |
| | | private final String primaryName; |
| | | |
| | | // The lower case name for this definition. |
| | | /** The lower case name for this definition. */ |
| | | private final String lowerName; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Indicates whether this content rule is declared "obsolete". |
| | | /** Indicates whether this content rule is declared "obsolete". */ |
| | | private final boolean isObsolete; |
| | | |
| | | // The set of additional name-value pairs associated with this |
| | | // content rule definition. |
| | | /** |
| | | * The set of additional name-value pairs associated with this |
| | | * content rule definition. |
| | | */ |
| | | private final Map<String,List<String>> extraProperties; |
| | | |
| | | // The set of names for this DIT content rule, in a mapping between |
| | | // the all-lowercase form and the user-defined form. |
| | | /** |
| | | * The set of names for this DIT content rule, in a mapping between |
| | | * the all-lowercase form and the user-defined form. |
| | | */ |
| | | private final Map<String,String> names; |
| | | |
| | | // The structural objectclass for this DIT content rule. |
| | | /** The structural objectclass for this DIT content rule. */ |
| | | private final ObjectClass structuralClass; |
| | | |
| | | // The set of auxiliary objectclasses that entries with this content |
| | | // rule may contain, in a mapping between the objectclass and the |
| | | // user-defined name for that class. |
| | | /** |
| | | * The set of auxiliary objectclasses that entries with this content |
| | | * rule may contain, in a mapping between the objectclass and the |
| | | * user-defined name for that class. |
| | | */ |
| | | private final Set<ObjectClass> auxiliaryClasses; |
| | | |
| | | // The set of optional attribute types for this DIT content rule. |
| | | /** The set of optional attribute types for this DIT content rule. */ |
| | | private final Set<AttributeType> optionalAttributes; |
| | | |
| | | // The set of prohibited attribute types for this DIT content rule. |
| | | /** The set of prohibited attribute types for this DIT content rule. */ |
| | | private final Set<AttributeType> prohibitedAttributes; |
| | | |
| | | // The set of required attribute types for this DIT content rule. |
| | | /** The set of required attribute types for this DIT content rule. */ |
| | | private final Set<AttributeType> requiredAttributes; |
| | | |
| | | // The definition string used to create this DIT content rule. |
| | | /** The definition string used to create this DIT content rule. */ |
| | | private final String definition; |
| | | |
| | | // The description for this DIT content rule. |
| | | /** The description for this DIT content rule. */ |
| | | private final String description; |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Indicates whether this DIT structure rule is declared "obsolete". |
| | | /** Indicates whether this DIT structure rule is declared "obsolete". */ |
| | | private final boolean isObsolete; |
| | | |
| | | // The rule ID for this DIT structure rule. |
| | | /** The rule ID for this DIT structure rule. */ |
| | | private final int ruleID; |
| | | |
| | | // The name form for this DIT structure rule. |
| | | /** The name form for this DIT structure rule. */ |
| | | private final NameForm nameForm; |
| | | |
| | | // The set of additional name-value pairs associated with this DIT |
| | | // structure rule. |
| | | /** |
| | | * The set of additional name-value pairs associated with this DIT |
| | | * structure rule. |
| | | */ |
| | | private final Map<String,List<String>> extraProperties; |
| | | |
| | | // The set of names for this DIT structure rule, in a mapping |
| | | // between the all-lowercase form and the user-defined form. |
| | | /** |
| | | * The set of names for this DIT structure rule, in a mapping |
| | | * between the all-lowercase form and the user-defined form. |
| | | */ |
| | | private final Map<String,String> names; |
| | | |
| | | // The set of superior DIT structure rules. |
| | | /** The set of superior DIT structure rules. */ |
| | | private final Set<DITStructureRule> superiorRules; |
| | | |
| | | // The definition string for this DIT structure rule. |
| | | /** The definition string for this DIT structure rule. */ |
| | | private final String definition; |
| | | |
| | | // The description for this DIT structure rule. |
| | | /** The description for this DIT structure rule. */ |
| | | private final String description; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The disconnect reason. |
| | | /** The disconnect reason. */ |
| | | private LocalizableMessage message; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Indicates whether to compress the attribute descriptions. |
| | | /** Indicates whether to compress the attribute descriptions. */ |
| | | private final boolean compressAttrDescriptions; |
| | | |
| | | // Indicates whether to compress the object class sets. |
| | | /** Indicates whether to compress the object class sets. */ |
| | | private final boolean compressObjectClassSets; |
| | | |
| | | // Indicates whether to exclude the DN. |
| | | /** Indicates whether to exclude the DN. */ |
| | | private final boolean excludeDN; |
| | | |
| | | // The encoded representation of this encode configuration. |
| | | /** The encoded representation of this encode configuration. */ |
| | | private final byte encodedRepresentation; |
| | | |
| | | // The compressed schema handler for this encode configuration. |
| | | /** The compressed schema handler for this encode configuration. */ |
| | | private final CompressedSchema compressedSchema; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The name to use for this existing file behavior. |
| | | /** The name to use for this existing file behavior. */ |
| | | private String name; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Indicates if the Java 7 NIO features can be used, including |
| | | // enhancements to Java 6 {@link java.io.File}. |
| | | /** |
| | | * Indicates if the Java 7 NIO features can be used, including |
| | | * enhancements to Java 6 {@link java.io.File}. |
| | | */ |
| | | private static boolean useNIO; |
| | | |
| | | // The {@link java.io.File#toPath} method if it is available. |
| | | /** The {@link java.io.File#toPath} method if it is available. */ |
| | | private static Method toPath; |
| | | |
| | | // The {@link java.nio.files.Files#setPosixFilePermissions} method if it is |
| | | // available. |
| | | /** |
| | | * The {@link java.nio.files.Files#setPosixFilePermissions} method if it is |
| | | * available. |
| | | */ |
| | | private static Method setPosixFilePermissions; |
| | | |
| | | // The {@link java.nio.file.Files#getFileAttributeView} method if it is |
| | | // available. |
| | | /** |
| | | * The {@link java.nio.file.Files#getFileAttributeView} method if it is |
| | | * available. |
| | | */ |
| | | private static Method getFileAttributeView; |
| | | |
| | | // The {@link java.nio.file.attribute.PosixFilePermissions#fromString} method |
| | | // if it is available. |
| | | /** |
| | | * The {@link java.nio.file.attribute.PosixFilePermissions#fromString} method |
| | | * if it is available. |
| | | */ |
| | | private static Method fromString; |
| | | |
| | | // The {@link java.nio.file.attribute.PosixFilePermissions#asFileAttribute} |
| | | // method if is available. |
| | | /** |
| | | * The {@link java.nio.file.attribute.PosixFilePermissions#asFileAttribute} |
| | | * method if is available. |
| | | */ |
| | | private static Method asFileAttribute; |
| | | |
| | | // The {@link java.nio.file.attribute.PosixFileAttributeView} class if it is |
| | | // available. |
| | | /** |
| | | * The {@link java.nio.file.attribute.PosixFileAttributeView} class if it is |
| | | * available. |
| | | */ |
| | | private static Class<?> posixView; |
| | | |
| | | // The {@link java.nio.file.attribute.AclFileAttributeView} class if it is |
| | | // available. |
| | | /** |
| | | * The {@link java.nio.file.attribute.AclFileAttributeView} class if it is |
| | | * available. |
| | | */ |
| | | private static Class<?> aclView; |
| | | |
| | | // The {@link java.nio.file.LinkOption} class if it is available. |
| | | /** The {@link java.nio.file.LinkOption} class if it is available. */ |
| | | private static Class<?> linkOption; |
| | | |
| | | // The encoded representation for this file permission. |
| | | /** The encoded representation for this file permission. */ |
| | | private int encodedPermission; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The LDAP BER type for this filter type. |
| | | /** The LDAP BER type for this filter type. */ |
| | | private byte berType; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Time-stamp acts as memory barrier for networkInterfaces. |
| | | /** Time-stamp acts as memory barrier for networkInterfaces. */ |
| | | private static final long CACHED_LOCAL_ADDRESSES_TIMEOUT_MS = 30 * 1000; |
| | | private static volatile long localAddressesTimeStamp; |
| | | private static Set<InetAddress> localAddresses = new HashSet<InetAddress>(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The human-readable name for this index type. |
| | | /** The human-readable name for this index type. */ |
| | | private final String indexName; |
| | | |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class IntermediateResponse |
| | | { |
| | | // The value for this intermediate response. |
| | | /** The value for this intermediate response. */ |
| | | private ByteString value; |
| | | |
| | | // The set of controls for this intermediate response. |
| | | /** The set of controls for this intermediate response. */ |
| | | private List<Control> controls; |
| | | |
| | | // The operation with which this intermediate response is |
| | | // associated. |
| | | /** The operation with which this intermediate response is associated. */ |
| | | private Operation operation; |
| | | |
| | | // The OID for this intermediate response. |
| | | /** The OID for this intermediate response. */ |
| | | private String oid; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Indicates whether this method retrieves information about the |
| | | // associated component. |
| | | /** |
| | | * Indicates whether this method retrieves information about the |
| | | * associated component. |
| | | */ |
| | | private boolean retrievesComponentInfo; |
| | | |
| | | // Indicates whether this method updates information about the |
| | | // associated component. |
| | | /** |
| | | * Indicates whether this method updates information about the |
| | | * associated component. |
| | | */ |
| | | private boolean updatesComponentInfo; |
| | | |
| | | // The set of arguments for this method. |
| | | /** The set of arguments for this method. */ |
| | | private ConfigAttribute[] arguments; |
| | | |
| | | // The description for this method. |
| | | /** The description for this method. */ |
| | | private String description; |
| | | |
| | | // The name for this method. |
| | | /** The name for this method. */ |
| | | private String name; |
| | | |
| | | // The return type for this method. |
| | | /** The return type for this method. */ |
| | | private String returnType; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The matched DN associated with this LDAP exception. |
| | | /** The matched DN associated with this LDAP exception. */ |
| | | private final DN matchedDN; |
| | | |
| | | // The LDAP result code associated with this exception. |
| | | /** The LDAP result code associated with this exception. */ |
| | | private final int resultCode; |
| | | |
| | | // The server-provided error message for this LDAP exception. |
| | | /** The server-provided error message for this LDAP exception. */ |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | |
| | |
| | | public final class LDAPSyntaxDescription |
| | | implements SchemaFileElement |
| | | { |
| | | // The set of additional name-value pairs associated with this ldap |
| | | // syntax definition. |
| | | /** |
| | | * The set of additional name-value pairs associated with this ldap |
| | | * syntax definition. |
| | | */ |
| | | private final Map<String,List<String>> extraProperties; |
| | | |
| | | // The definition string used to create this ldap syntax |
| | | //description. |
| | | /** The definition string used to create this ldap syntax description. */ |
| | | private final String definition; |
| | | |
| | | // The description for this ldap syntax description. |
| | | /** The description for this ldap syntax description. */ |
| | | private final String description; |
| | | |
| | | // The OID of the enclosed ldap syntax description. |
| | | /** The OID of the enclosed ldap syntax description. */ |
| | | private final String oid; |
| | | |
| | | //The LDAPSyntaxDescritpionSyntax associated with this ldap syntax. |
| | | /** The LDAPSyntaxDescritpionSyntax associated with this ldap syntax. */ |
| | | private LDAPSyntaxDescriptionSyntax descriptionSyntax; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The base DN for this LDAP URL. |
| | | /** The base DN for this LDAP URL. */ |
| | | private DN baseDN; |
| | | |
| | | // The port number for this LDAP URL. |
| | | /** The port number for this LDAP URL. */ |
| | | private int port; |
| | | |
| | | // The set of attributes for this LDAP URL. |
| | | /** The set of attributes for this LDAP URL. */ |
| | | private LinkedHashSet<String> attributes; |
| | | |
| | | // The set of extensions for this LDAP URL. |
| | | /** The set of extensions for this LDAP URL. */ |
| | | private LinkedList<String> extensions; |
| | | |
| | | // The search scope for this LDAP URL. |
| | | /** The search scope for this LDAP URL. */ |
| | | private SearchScope scope; |
| | | |
| | | // The search filter for this LDAP URL. |
| | | /** The search filter for this LDAP URL. */ |
| | | private SearchFilter filter; |
| | | |
| | | // The host for this LDAP URL. |
| | | /** The host for this LDAP URL. */ |
| | | private String host; |
| | | |
| | | // The raw base DN for this LDAP URL. |
| | | /** The raw base DN for this LDAP URL. */ |
| | | private String rawBaseDN; |
| | | |
| | | // The raw filter for this LDAP URL. |
| | | /** The raw filter for this LDAP URL. */ |
| | | private String rawFilter; |
| | | |
| | | // The scheme (i.e., protocol) for this LDAP URL. |
| | | /** The scheme (i.e., protocol) for this LDAP URL. */ |
| | | private String scheme; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class LDIFImportResult |
| | | { |
| | | // The total number of entries read during the import. |
| | | /** The total number of entries read during the import. */ |
| | | private final long entriesRead; |
| | | |
| | | // The total number of entries rejected during the import. |
| | | /** The total number of entries rejected during the import. */ |
| | | private final long entriesRejected; |
| | | |
| | | // The total number of entries skipped during the import. |
| | | /** The total number of entries skipped during the import. */ |
| | | private final long entriesSkipped; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Initialize the lock table. |
| | | /** Initialize the lock table. */ |
| | | static |
| | | { |
| | | DirectoryEnvironmentConfig environmentConfig = |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The human-readable name for this lock type. |
| | | /** The human-readable name for this lock type. */ |
| | | private String name; |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Indicates whether this matching rule use is declared "obsolete". |
| | | /** Indicates whether this matching rule use is declared "obsolete". */ |
| | | private final boolean isObsolete; |
| | | |
| | | // The set of additional name-value pairs associated with this |
| | | // matching rule use definition. |
| | | /** |
| | | * The set of additional name-value pairs associated with this |
| | | * matching rule use definition. |
| | | */ |
| | | private final Map<String,List<String>> extraProperties; |
| | | |
| | | // The set of names that may be used to refer to this matching rule |
| | | // use, mapped between their all-lowercase representations and the |
| | | // user-defined representations. |
| | | /** |
| | | * The set of names that may be used to refer to this matching rule |
| | | * use, mapped between their all-lowercase representations and the |
| | | * user-defined representations. |
| | | */ |
| | | private final Map<String,String> names; |
| | | |
| | | // The matching rule with which this matching rule use is |
| | | // associated. |
| | | /** |
| | | * The matching rule with which this matching rule use is associated. |
| | | */ |
| | | private final MatchingRule matchingRule; |
| | | |
| | | // The set of attribute types with which this matching rule use is |
| | | // associated. |
| | | /** |
| | | * The set of attribute types with which this matching rule use is associated. |
| | | */ |
| | | private final Set<AttributeType> attributes; |
| | | |
| | | // The definition string used to create this matching rule use. |
| | | /** The definition string used to create this matching rule use. */ |
| | | private final String definition; |
| | | |
| | | // The description for this matching rule use. |
| | | /** The description for this matching rule use. */ |
| | | private final String description; |
| | | |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class Modification |
| | | { |
| | | // The attribute for this modification. |
| | | /** The attribute for this modification. */ |
| | | private Attribute attribute; |
| | | |
| | | // Indicates whether this modification was generated by internal |
| | | // processing and therefore should not be subject to |
| | | // no-user-modification and related checks. |
| | | /** |
| | | * Indicates whether this modification was generated by internal processing |
| | | * and therefore should not be subject to no-user-modification and related checks. |
| | | */ |
| | | private boolean isInternal; |
| | | |
| | | // The modification type for this modification. |
| | | /** The modification type for this modification. */ |
| | | private ModificationType modificationType; |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Indicates whether this name form is declared "obsolete". |
| | | /** Indicates whether this name form is declared "obsolete". */ |
| | | private final boolean isObsolete; |
| | | |
| | | // The set of additional name-value pairs associated with this name |
| | | // form definition. |
| | | /** |
| | | * The set of additional name-value pairs associated with this name |
| | | * form definition. |
| | | */ |
| | | private final Map<String,List<String>> extraProperties; |
| | | |
| | | // The mapping between the lowercase names and the user-provided |
| | | // names for this name form. |
| | | /** |
| | | * The mapping between the lowercase names and the user-provided |
| | | * names for this name form. |
| | | */ |
| | | private final Map<String,String> names; |
| | | |
| | | // The reference to the structural objectclass for this name form. |
| | | /** The reference to the structural objectclass for this name form. */ |
| | | private final ObjectClass structuralClass; |
| | | |
| | | // The set of optional attribute types for this name form. |
| | | /** The set of optional attribute types for this name form. */ |
| | | private final Set<AttributeType> optionalAttributes; |
| | | |
| | | // The set of required attribute types for this name form. |
| | | /** The set of required attribute types for this name form. */ |
| | | private final Set<AttributeType> requiredAttributes; |
| | | |
| | | // The definition string used to create this name form. |
| | | /** The definition string used to create this name form. */ |
| | | private final String definition; |
| | | |
| | | // The description for this name form. |
| | | /** The description for this name form. */ |
| | | private final String description; |
| | | |
| | | // The OID for this name form. |
| | | /** The OID for this name form. */ |
| | | private final String oid; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class NamedCharacterSet |
| | | { |
| | | // The characters contained in this character set. |
| | | /** The characters contained in this character set. */ |
| | | private char[] characters; |
| | | |
| | | // The random number generator to use with this character set. |
| | | /** The random number generator to use with this character set. */ |
| | | private Random random; |
| | | |
| | | // The name assigned to this character set. |
| | | /** The name assigned to this character set. */ |
| | | private String name; |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The set of optional attribute types for this objectclass. |
| | | /** The set of optional attribute types for this objectclass. */ |
| | | private final Set<AttributeType> optionalAttributes; |
| | | |
| | | // The set of optional attribute types for this objectclass and its |
| | | // superclasses. |
| | | /** |
| | | * The set of optional attribute types for this objectclass and its |
| | | * superclasses. |
| | | */ |
| | | private final Set<AttributeType> optionalAttributesChain; |
| | | |
| | | // The set of required attribute types for this objectclass. |
| | | /** The set of required attribute types for this objectclass. */ |
| | | private final Set<AttributeType> requiredAttributes; |
| | | |
| | | // The set of required attribute types for this objectclass and its |
| | | // superclasses. |
| | | /** |
| | | * The set of required attribute types for this objectclass and its |
| | | * superclasses. |
| | | */ |
| | | private final Set<AttributeType> requiredAttributesChain; |
| | | |
| | | // The set of required and optional attributes for this objectclass |
| | | // and its superclasses. |
| | | /** |
| | | * The set of required and optional attributes for this objectclass |
| | | * and its superclasses. |
| | | */ |
| | | private final Set<AttributeType> requiredAndOptionalChain; |
| | | |
| | | // The reference to one or more superior objectclasses. |
| | | /** The reference to one or more superior objectclasses. */ |
| | | private final Set<ObjectClass> superiorClasses; |
| | | |
| | | // The objectclass type for this objectclass. |
| | | /** The objectclass type for this objectclass. */ |
| | | private final ObjectClassType objectClassType; |
| | | |
| | | // Indicates whether or not this object class is allowed to |
| | | // contain any attribute. |
| | | /** |
| | | * Indicates whether or not this object class is allowed to |
| | | * contain any attribute. |
| | | */ |
| | | private final boolean isExtensibleObject; |
| | | |
| | | // The definition string used to create this objectclass. |
| | | /** The definition string used to create this objectclass. */ |
| | | private final String definition; |
| | | |
| | | // True once this object class has been removed from the schema. |
| | | /** True once this object class has been removed from the schema. */ |
| | | private volatile boolean isDirty; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.types; |
| | |
| | | mayInvoke=true) |
| | | public abstract class OperationConfig { |
| | | |
| | | // When true indicates that the operation should stop as soon as |
| | | // possible. |
| | | /** |
| | | * When true indicates that the operation should stop as soon as |
| | | * possible. |
| | | */ |
| | | private boolean cancelled; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The string representation of this operation type. |
| | | /** The string representation of this operation type. */ |
| | | private final String operationName; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | this.buffer = new ByteStringBuilder(32); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public int read() throws IOException { |
| | | int readByte = parentStream.read(); |
| | | if(enableRecording) |
| | |
| | | return readByte; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int read(byte[] bytes) throws IOException { |
| | | int bytesRead = parentStream.read(bytes); |
| | |
| | | return bytesRead; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int read(byte[] bytes, int i, int i1) throws IOException { |
| | | int bytesRead = parentStream.read(bytes, i, i1); |
| | |
| | | return bytesRead; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public long skip(long l) throws IOException { |
| | | return parentStream.skip(l); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int available() throws IOException { |
| | | return parentStream.available(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void close() throws IOException { |
| | | parentStream.close(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void mark(int i) { |
| | | parentStream.mark(i); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void reset() throws IOException { |
| | | parentStream.reset(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean markSupported() { |
| | | return parentStream.markSupported(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | this.buffer = new ByteStringBuilder(32); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void write(int i) throws IOException { |
| | | if(enableRecording) |
| | | { |
| | |
| | | parentStream.write(i); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void write(byte[] bytes) throws IOException { |
| | | if(enableRecording) |
| | |
| | | parentStream.write(bytes); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void write(byte[] bytes, int i, int i1) throws IOException { |
| | | if(enableRecording) |
| | |
| | | parentStream.write(bytes, i, i1); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void flush() throws IOException { |
| | | parentStream.flush(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void close() throws IOException { |
| | | parentStream.close(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class RestoreConfig extends OperationConfig |
| | | { |
| | | // The reference to the directory containing the backup file(s) to |
| | | // restore. |
| | | /** |
| | | * The reference to the directory containing the backup file(s) to restore. |
| | | */ |
| | | private BackupDirectory backupDirectory; |
| | | |
| | | // Indicates whether the "restore" should be verify-only but not |
| | | // actually move or restore any files. |
| | | /** |
| | | * Indicates whether the "restore" should be verify-only but not |
| | | * actually move or restore any files. |
| | | */ |
| | | private boolean verifyOnly; |
| | | |
| | | // The unique ID assigned to the backup that is to be restored. |
| | | /** The unique ID assigned to the backup that is to be restored. */ |
| | | private String backupID; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The human-readable name for this policy. |
| | | /** The human-readable name for this policy. */ |
| | | private String policyName; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | public final class SearchResultEntry |
| | | extends Entry |
| | | { |
| | | // The set of controls associated with this search result entry. |
| | | /** The set of controls associated with this search result entry. */ |
| | | private List<Control> controls; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public final class SearchResultReference |
| | | { |
| | | // The set of controls associated with this search result reference. |
| | | /** The set of controls associated with this search result reference. */ |
| | | private List<Control> controls; |
| | | |
| | | // The set of referral URLs for this search result reference. |
| | | /** The set of referral URLs for this search result reference. */ |
| | | private List<String> referralURLs; |
| | | |
| | | |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The attribute type for this sort key. |
| | | /** The attribute type for this sort key. */ |
| | | private AttributeType attributeType; |
| | | |
| | | // The indication of whether the sort should be ascending. |
| | | /** The indication of whether the sort should be ascending. */ |
| | | private boolean ascending; |
| | | |
| | | // The ordering matching rule to use with this sort key. |
| | | /** The ordering matching rule to use with this sort key. */ |
| | | private MatchingRule orderingRule; |
| | | |
| | | |
| | |
| | | */ |
| | | VIRTUAL_OVERRIDES_REAL("virtual-overrides-real"); |
| | | |
| | | // String representation of the value. |
| | | /** String representation of the value. */ |
| | | private final String name; |
| | | |
| | | /** |
| | |
| | | this.name = name; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | |
| | | public static final String ATTR_INHERIT_COLLECTIVE_ATTR = |
| | | "inheritattribute"; |
| | | |
| | | // Attribute option to mark attributes collective. |
| | | /** Attribute option to mark attributes collective. */ |
| | | private static final String ATTR_OPTION_COLLECTIVE = |
| | | "collective"; |
| | | |
| | | // Entry object. |
| | | /** Entry object. */ |
| | | private Entry entry; |
| | | |
| | | // Subtree specification. |
| | | /** Subtree specification. */ |
| | | private SubtreeSpecification subTreeSpec; |
| | | |
| | | // Collective subentry flag. |
| | | /** Collective subentry flag. */ |
| | | private boolean isCollective; |
| | | |
| | | // Inherited collective subentry flag. |
| | | /** Inherited collective subentry flag. */ |
| | | private boolean isInheritedCollective; |
| | | |
| | | // Inherited collective from DN subentry flag. |
| | | /** Inherited collective from DN subentry flag. */ |
| | | private boolean isInheritedFromDNCollective; |
| | | |
| | | // Inherited collective from RDN subentry flag. |
| | | /** Inherited collective from RDN subentry flag. */ |
| | | private boolean isInheritedFromRDNCollective; |
| | | |
| | | // Inherited collective DN attribute type. |
| | | /** Inherited collective DN attribute type. */ |
| | | private AttributeType inheritFromDNType; |
| | | |
| | | // Inherited collective RDN attribute type. |
| | | /** Inherited collective RDN attribute type. */ |
| | | private AttributeType inheritFromRDNAttrType; |
| | | |
| | | // Inherited collective RDN type attribute type. |
| | | /** Inherited collective RDN type attribute type. */ |
| | | private AttributeType inheritFromRDNType; |
| | | |
| | | // Inherited collective RDN attribute value. |
| | | /** Inherited collective RDN attribute value. */ |
| | | private ByteString inheritFromRDNAttrValue; |
| | | |
| | | // Inherited collective from DN value. |
| | | /** Inherited collective from DN value. */ |
| | | private ByteString inheritFromDNAttrValue; |
| | | |
| | | // Inherited collective from base DN. |
| | | /** Inherited collective from base DN. */ |
| | | private DN inheritFromBaseDN; |
| | | |
| | | // Collective attributes. |
| | | /** Collective attributes. */ |
| | | private List<Attribute> collectiveAttributes; |
| | | |
| | | // Conflict behavior. |
| | | /** Conflict behavior. */ |
| | | private CollectiveConflictBehavior conflictBehavior = |
| | | CollectiveConflictBehavior.REAL_OVERRIDES_VIRTUAL; |
| | | |
| | |
| | | */ |
| | | public SubEntry(Entry entry) throws DirectoryException |
| | | { |
| | | // Entry object. |
| | | this.entry = entry; |
| | | |
| | | // Process subtree specification. |
| | |
| | | */ |
| | | public static final class AndRefinement extends Refinement |
| | | { |
| | | // The set of refinements which must all be true. |
| | | /** The set of refinements which must all be true. */ |
| | | private final Collection<Refinement> refinementSet; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean matches(final Entry entry) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | */ |
| | | public static final class FilterRefinement extends Refinement |
| | | { |
| | | // The search filter. |
| | | /** The search filter. */ |
| | | private final SearchFilter filter; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean matches(final Entry entry) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | */ |
| | | public static final class ItemRefinement extends Refinement |
| | | { |
| | | // The item's object class. |
| | | /** The item's object class. */ |
| | | private final String objectClass; |
| | | |
| | | // The item's normalized object class. |
| | | /** The item's normalized object class. */ |
| | | private final String normalizedObjectClass; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean matches(final Entry entry) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | */ |
| | | public static final class NotRefinement extends Refinement |
| | | { |
| | | // The inverted refinement. |
| | | /** The inverted refinement. */ |
| | | private final Refinement refinement; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean matches(final Entry entry) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | */ |
| | | public static final class OrRefinement extends Refinement |
| | | { |
| | | // The set of refinements of which at least one must be true. |
| | | /** The set of refinements of which at least one must be true. */ |
| | | private final Collection<Refinement> refinementSet; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean matches(final Entry entry) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public abstract boolean equals(Object obj); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public abstract int hashCode(); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final String toString() |
| | | { |
| | |
| | | */ |
| | | protected static final class Parser |
| | | { |
| | | // Text scanner used to parse the string value. |
| | | /** Text scanner used to parse the string value. */ |
| | | private final Scanner scanner; |
| | | |
| | | // Pattern used to detect left braces. |
| | | /** Pattern used to detect left braces. */ |
| | | private static Pattern LBRACE = Pattern.compile("\\{.*"); |
| | | |
| | | // Pattern used to parse left braces. |
| | | /** Pattern used to parse left braces. */ |
| | | private static Pattern LBRACE_TOKEN = Pattern.compile("\\{"); |
| | | |
| | | // Pattern used to detect right braces. |
| | | /** Pattern used to detect right braces. */ |
| | | private static Pattern RBRACE = Pattern.compile("\\}.*"); |
| | | |
| | | // Pattern used to parse right braces. |
| | | /** Pattern used to parse right braces. */ |
| | | private static Pattern RBRACE_TOKEN = Pattern.compile("\\}"); |
| | | |
| | | // Pattern used to detect comma separators. |
| | | /** Pattern used to detect comma separators. */ |
| | | private static Pattern SEP = Pattern.compile(",.*"); |
| | | |
| | | // Pattern used to parse comma separators. |
| | | /** Pattern used to parse comma separators. */ |
| | | private static Pattern SEP_TOKEN = Pattern.compile(","); |
| | | |
| | | // Pattern used to detect colon separators. |
| | | /** Pattern used to detect colon separators. */ |
| | | private static Pattern COLON = Pattern.compile(":.*"); |
| | | |
| | | // Pattern used to parse colon separators. |
| | | /** Pattern used to parse colon separators. */ |
| | | private static Pattern COLON_TOKEN = Pattern.compile(":"); |
| | | |
| | | // Pattern used to detect integer values. |
| | | /** Pattern used to detect integer values. */ |
| | | private static Pattern INT = Pattern.compile("\\d.*"); |
| | | |
| | | // Pattern used to parse integer values. |
| | | /** Pattern used to parse integer values. */ |
| | | private static Pattern INT_TOKEN = Pattern.compile("\\d+"); |
| | | |
| | | // Pattern used to detect name values. |
| | | /** Pattern used to detect name values. */ |
| | | private static Pattern NAME = Pattern.compile("[\\w_;-].*"); |
| | | |
| | | // Pattern used to parse name values. |
| | | /** Pattern used to parse name values. */ |
| | | private static Pattern NAME_TOKEN = Pattern.compile("[\\w_;-]+"); |
| | | |
| | | // Pattern used to detect RFC3641 string values. |
| | | /** Pattern used to detect RFC3641 string values. */ |
| | | private static Pattern STRING_VALUE = Pattern.compile("\".*"); |
| | | |
| | | // Pattern used to parse RFC3641 string values. |
| | | /** Pattern used to parse RFC3641 string values. */ |
| | | private static Pattern STRING_VALUE_TOKEN = Pattern |
| | | .compile("\"([^\"]|(\"\"))*\""); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The absolute base of the subtree. |
| | | /** The absolute base of the subtree. */ |
| | | private final DN baseDN; |
| | | |
| | | // Optional minimum depth (<=0 means unlimited). |
| | | /** Optional minimum depth (<=0 means unlimited). */ |
| | | private final int minimumDepth; |
| | | |
| | | // Optional maximum depth (<0 means unlimited). |
| | | /** Optional maximum depth (<0 means unlimited). */ |
| | | private final int maximumDepth; |
| | | |
| | | // Optional set of chop before absolute DNs (mapping to their |
| | | // local-names). |
| | | /** Optional set of chop before absolute DNs (mapping to their local-names). */ |
| | | private final Map<DN, DN> chopBefore; |
| | | |
| | | // Optional set of chop after absolute DNs (mapping to their |
| | | // local-names). |
| | | /** Optional set of chop after absolute DNs (mapping to their local-names). */ |
| | | private final Map<DN, DN> chopAfter; |
| | | |
| | | // The root DN. |
| | | /** The root DN. */ |
| | | private final DN rootDN; |
| | | |
| | | // The optional relative base DN. |
| | | /** The optional relative base DN. */ |
| | | private final DN relativeBaseDN; |
| | | |
| | | // The optional specification filter refinements. |
| | | /** The optional specification filter refinements. */ |
| | | private final Refinement refinements; |
| | | |
| | | |
| | |
| | | public class ContinueProcessing |
| | | implements SynchronizationProviderResult |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ResultCode getResultCode() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DN getMatchedDN() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public List<String> getReferralURLs() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean continueProcessing() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | |
| | | public class StopProcessing |
| | | implements SynchronizationProviderResult |
| | | { |
| | | // The matched DN for this result. |
| | | /** The matched DN for this result. */ |
| | | private final DN matchedDN; |
| | | |
| | | // The set of referral URLs for this result. |
| | | /** The set of referral URLs for this result. */ |
| | | private final List<String> referralURLs; |
| | | |
| | | // The result code for this result. |
| | | /** The result code for this result. */ |
| | | private final ResultCode resultCode; |
| | | |
| | | private final LocalizableMessage errorMessage; |
| | |
| | | this.referralURLs = null; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ResultCode getResultCode() |
| | | { |
| | | return resultCode; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DN getMatchedDN() |
| | | { |
| | | return matchedDN; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public List<String> getReferralURLs() |
| | | { |
| | | return referralURLs; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean continueProcessing() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The human-readable name for this writability mode. |
| | | /** The human-readable name for this writability mode. */ |
| | | private String modeName; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | |
| | | */ |
| | | public static final String KEY_STORE_PATH_PKCS11 = "NONE"; |
| | | |
| | | //Error message strings. |
| | | /** Error message strings. */ |
| | | private static final String KEYSTORE_PATH_MSG = "key store path"; |
| | | private static final String KEYSTORE_TYPE_MSG = "key store type"; |
| | | private static final String SUBJECT_DN_MSG = "subject DN"; |
| | | private static final String CERT_ALIAS_MSG = "certificate alias"; |
| | | private static final String CERT_REQUEST_FILE_MSG = |
| | | "certificate request file"; |
| | | // The parsed key store backing this certificate manager. |
| | | /** The parsed key store backing this certificate manager. */ |
| | | private KeyStore keyStore; |
| | | |
| | | // The path to the key store that we should be using. |
| | | /** The path to the key store that we should be using. */ |
| | | private final String keyStorePath; |
| | | |
| | | // The name of the key store type we are using. |
| | | /** The name of the key store type we are using. */ |
| | | private final String keyStoreType; |
| | | |
| | | private final char[] password; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | mayInvoke=true) |
| | | public abstract class ChangeRecordEntry |
| | | { |
| | | // The DN for this entry. |
| | | /** The DN for this entry. */ |
| | | private DN dn; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | // The addresses of the recipients to whom this message should be sent. |
| | | /** The addresses of the recipients to whom this message should be sent. */ |
| | | private List<String> recipients; |
| | | |
| | | // The set of attachments to include in this message. |
| | | /** The set of attachments to include in this message. */ |
| | | private LinkedList<MimeBodyPart> attachments; |
| | | |
| | | // The MIME type for the message body. |
| | | /** The MIME type for the message body. */ |
| | | private String bodyMIMEType; |
| | | |
| | | // The address of the sender for this message. |
| | | /** The address of the sender for this message. */ |
| | | private String sender; |
| | | |
| | | // The subject for the mail message. |
| | | /** The subject for the mail message. */ |
| | | private String subject; |
| | | |
| | | // The body for the mail message. |
| | | /** The body for the mail message. */ |
| | | private LocalizableMessageBuilder body; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The trust manager that is wrapped by this trust manager. |
| | | /** The trust manager that is wrapped by this trust manager. */ |
| | | private X509TrustManager trustManager; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | |
| | | |
| | | |
| | | // Indicates whether this exception is severe enough that it is no longer |
| | | // possible to keep reading. |
| | | /** |
| | | * Indicates whether this exception is severe enough that it is no longer |
| | | * possible to keep reading. |
| | | */ |
| | | private final boolean canContinueReading; |
| | | |
| | | // The line number of the last line read from the LDIF source. |
| | | /** The line number of the last line read from the LDIF source. */ |
| | | private final long lineNumber; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | |
| | | mayInvoke=true) |
| | | public final class ModifyDNChangeRecordEntry extends ChangeRecordEntry |
| | | { |
| | | // The new RDN. |
| | | /** The new RDN. */ |
| | | private final RDN newRDN; |
| | | |
| | | // The new superior DN. |
| | | /** The new superior DN. */ |
| | | private final DN newSuperiorDN; |
| | | |
| | | // Delete the old RDN? |
| | | /** Delete the old RDN? */ |
| | | private final boolean deleteOldRDN; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The set of target output streams to which all messages will be written; |
| | | /** The set of target output streams to which all messages will be written. */ |
| | | private final OutputStream[] targetStreams; |
| | | |
| | | |
| | |
| | | public final class Platform |
| | | { |
| | | |
| | | // Prefix that determines which security package to use. |
| | | /** Prefix that determines which security package to use. */ |
| | | private static final String pkgPrefix; |
| | | |
| | | // The two security package prefixes (IBM and SUN). |
| | | /** The two security package prefixes (IBM and SUN). */ |
| | | private static final String IBM_SEC = "com.ibm.security"; |
| | | private static final String SUN_SEC = "sun.security"; |
| | | |
| | |
| | | private static abstract class PlatformIMPL |
| | | { |
| | | |
| | | // Key size, key algorithm and signature algorithms used. |
| | | /** Key size, key algorithm and signature algorithms used. */ |
| | | private static final int KEY_SIZE = 1024; |
| | | private static final String KEY_ALGORITHM = "rsa"; |
| | | private static final String SIG_ALGORITHM = "SHA1WithRSA"; |
| | | |
| | | // Time values used in validity calculations. |
| | | /** Time values used in validity calculations. */ |
| | | private static final int SEC_IN_DAY = 24 * 60 * 60; |
| | | |
| | | // Methods pulled from the classes. |
| | | /** Methods pulled from the classes. */ |
| | | private static final String GENERATE_METHOD = "generate"; |
| | | private static final String GET_PRIVATE_KEY_METHOD = "getPrivateKey"; |
| | | private static final String GET_SELFSIGNED_CERT_METHOD = |
| | | "getSelfCertificate"; |
| | | |
| | | // Classes needed to manage certificates. |
| | | /** Classes needed to manage certificates. */ |
| | | private static final Class<?> certKeyGenClass, X500NameClass; |
| | | |
| | | // Constructors for each of the above classes. |
| | | /** Constructors for each of the above classes. */ |
| | | private static Constructor<?> certKeyGenCons, X500NameCons; |
| | | |
| | | static |
| | |
| | | |
| | | |
| | | |
| | | // Prevent instantiation. |
| | | /** Prevent instantiation. */ |
| | | private Platform() |
| | | { |
| | | } |
| | |
| | | */ |
| | | private static class DefaultPlatformIMPL extends PlatformIMPL |
| | | { |
| | | // normalize method. |
| | | /** Normalize method. */ |
| | | private static final Method NORMALIZE; |
| | | // Normalized form method. |
| | | /** Normalized form method. */ |
| | | private static final Object FORM_NFKC; |
| | | |
| | | static |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | public final class SelectableCertificateKeyManager |
| | | extends X509ExtendedKeyManager |
| | | { |
| | | // The alias of the certificate that should be selected from the key manager. |
| | | /** The alias of the certificate that should be selected from the key manager. */ |
| | | private final String alias; |
| | | |
| | | // The key manager that is wrapped by this key manager. |
| | | /** The key manager that is wrapped by this key manager. */ |
| | | private final X509KeyManager keyManager; |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | this.readLimit = readLimit; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public int available() throws IOException |
| | | { |
| | | int streamAvail = parentStream.available(); |
| | |
| | | return limitedAvail < streamAvail ? limitedAvail : streamAvail; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public synchronized void mark(int readlimit) |
| | | { |
| | | parentStream.mark(readlimit); |
| | | markBytesRead = bytesRead; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public int read() throws IOException |
| | | { |
| | | if(bytesRead >= readLimit) |
| | |
| | | return b; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public int read(byte b[], int off, int len) throws IOException |
| | | { |
| | | if(off < 0 || len < 0 || off+len > b.length) |
| | |
| | | return readLen; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public synchronized void reset() throws IOException |
| | | { |
| | | parentStream.reset(); |
| | | bytesRead = markBytesRead; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public long skip(long n) throws IOException |
| | | { |
| | | if(bytesRead + n > readLimit) |
| | |
| | | return parentStream.skip(n); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean markSupported() { |
| | | return parentStream.markSupported(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void close() throws IOException { |
| | | parentStream.close(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | * Portions Copyright 2011-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void run() |
| | | { |
| | |
| | | ThreadFactory |
| | | { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Thread newThread(Runnable r) |
| | | { |
| | |
| | | /** Indicate if we need to display the heading. */ |
| | | private boolean isHeadingDisplayed; |
| | | |
| | | /** the Console application. */ |
| | | /** The console application. */ |
| | | private ConsoleApplication app; |
| | | |
| | | /** Indicate if the trust store in in memory. */ |
| | |
| | | */ |
| | | public final class AdminTestCaseUtils { |
| | | |
| | | // The relation name which will be used for dummy configurations. A |
| | | // deliberately obfuscated name is chosen to avoid clashes. |
| | | /** |
| | | * The relation name which will be used for dummy configurations. A |
| | | * deliberately obfuscated name is chosen to avoid clashes. |
| | | */ |
| | | private static final String DUMMY_TEST_RELATION = "*dummy*test*relation*"; |
| | | |
| | | // Indicates if the dummy relation profile has been registered. |
| | | /** Indicates if the dummy relation profile has been registered. */ |
| | | private static boolean isProfileRegistered; |
| | | |
| | | // Prevent instantiation. |
| | | /** Prevent instantiation. */ |
| | | private AdminTestCaseUtils() { |
| | | // No implementation required. |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | // Construct a dummy path. |
| | | /** Construct a dummy path. */ |
| | | private static synchronized <C extends ConfigurationClient, S extends Configuration> |
| | | ManagedObjectPath<C, S> getPath(AbstractManagedObjectDefinition<C, S> d) { |
| | | if (!isProfileRegistered) { |
| | | LDAPProfile.Wrapper profile = new LDAPProfile.Wrapper() { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getRelationRDNSequence(RelationDefinition<?, ?> r) { |
| | | if (r.getName().equals(DUMMY_TEST_RELATION)) { |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | }; |
| | | |
| | | LDAPProfile.getInstance().pushWrapper(profile); |
| | |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.testng.annotations.BeforeSuite; |
| | |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | public class QuickSetupTestCase extends DirectoryServerTestCase { |
| | | @BeforeSuite |
| | | public final void initServer() |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * null out all test parameters except the ones used in failed tests |
| | | * Null out all test parameters except the ones used in failed tests |
| | | * since we might need these again. |
| | | */ |
| | | @AfterClass(alwaysRun = true) |
| | |
| | | } |
| | | } |
| | | |
| | | // Accessed by listener on test class completion. |
| | | /** Accessed by listener on test class completion. */ |
| | | long startTime; |
| | | long endTime; |
| | | List<String> threadNamesBeforeClass; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | * Portions Copyright 2013 Manuel Gaupp |
| | | */ |
| | | package org.opends.server; |
| | |
| | | config.setConfigClass(ConfigFileHandler.class); |
| | | config.setConfigFile(new File(testConfigDir, "config.ldif")); |
| | | |
| | | /** Initialize the configuration framework for DSConfig. */ |
| | | // Initialize the configuration framework for DSConfig. |
| | | ConfigurationFramework.getInstance() |
| | | .initialize(testInstallRoot.getAbsolutePath(), |
| | | testInstanceRoot.getAbsolutePath()); |
| | |
| | | |
| | | //////////////////////////////////////////////////////////////////////////// |
| | | //////////////////////////////////////////////////////////////////////////// |
| | | // |
| | | // Various methods for converting LDIF Strings to Entries |
| | | // |
| | | //////////////////////////////////////////////////////////////////////////// |
| | | //////////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server; |
| | | |
| | |
| | | |
| | | public class TestTextWriter implements TextWriter |
| | | { |
| | | // The list that will hold the messages logged. |
| | | /** The list that will hold the messages logged. */ |
| | | private final LinkedList<String> messageList; |
| | | |
| | | public TestTextWriter() |
| | |
| | | messageList.add(record); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void flush() |
| | | { |
| | | // No implementation is required. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void shutdown() |
| | | { |
| | | messageList.clear(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public long getBytesWritten() |
| | | { |
| | | // No implemention is required. Just return 0; |
| | | // No implementation is required. Just return 0; |
| | | return 0; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | |
| | | |
| | | |
| | | /** |
| | | * AttributeTypePropertyDefinition Tester. |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * Tests validateValue() with valid data |
| | | * Tests validateValue() with valid data. |
| | | */ |
| | | @Test |
| | | public void testValidateValue() { |
| | |
| | | |
| | | |
| | | /** |
| | | * Tests decodeValue() |
| | | * Tests decodeValue(). |
| | | * |
| | | * @param value |
| | | * to decode |
| | |
| | | |
| | | |
| | | /** |
| | | * Tests encodeValue() |
| | | * Tests encodeValue(). |
| | | * |
| | | * @param value |
| | | * to decode/encode |
| | |
| | | |
| | | |
| | | /** |
| | | * Tests decodeValue() with illegal data |
| | | * Tests decodeValue() with illegal data. |
| | | * |
| | | * @param value |
| | | * to decode |
| | |
| | | |
| | | |
| | | |
| | | // Create a new definition. |
| | | /** Create a new definition. */ |
| | | private AttributeTypePropertyDefinition createPropertyDefinition() { |
| | | AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition |
| | | .createBuilder(RootCfgDefn.getInstance(), "test-property"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests validateValue() with valid data |
| | | * Tests validateValue() with valid data. |
| | | */ |
| | | @Test |
| | | public void testValidateValue1() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests validateValue() with illegal data |
| | | * Tests validateValue() with illegal data. |
| | | */ |
| | | @Test(expectedExceptions = NullPointerException.class) |
| | | public void testValidateValue2() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests decodeValue() |
| | | * Tests decodeValue(). |
| | | * @param value to decode |
| | | * @param expected value |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests decodeValue() with illegal data |
| | | * Tests decodeValue() with illegal data. |
| | | * @param value to decode |
| | | */ |
| | | @Test(dataProvider = "testDecodeValueData2", |
| | |
| | | */ |
| | | public class ClassPropertyDefinitionTest extends DirectoryServerTestCase { |
| | | |
| | | // Dummy class for testing. |
| | | /** Dummy class for testing. */ |
| | | public static final class Dummy |
| | | { |
| | | public class X {} |
| | |
| | | ClassPropertyDefinition.Builder builder; |
| | | |
| | | /** |
| | | * Sets up tests |
| | | * Sets up tests. |
| | | */ |
| | | @BeforeClass |
| | | public void setUp() { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests creation of builder succeeds |
| | | * Tests creation of builder succeeds. |
| | | */ |
| | | @Test |
| | | public void testCreateBuilder() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests setting/getting of lower limit as long |
| | | * Tests setting/getting of lower limit as long. |
| | | */ |
| | | @Test |
| | | public void testLowerLimit1() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates data for testing string-based limit values |
| | | * Creates data for testing string-based limit values. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "longLimitData") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates data for testing limit values |
| | | * Creates data for testing limit values. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "illegalLimitData") |
| | |
| | | |
| | | |
| | | /** |
| | | * Tests setting/getting of lower limit as String |
| | | * Tests setting/getting of lower limit as String. |
| | | * @param limit unit limit |
| | | * @param expectedValue to compare |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates data for testing string-based limit values |
| | | * Creates data for testing string-based limit values. |
| | | * |
| | | * @return data |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests setting/getting of lower limit as long |
| | | * Tests setting/getting of lower limit as long. |
| | | */ |
| | | @Test |
| | | public void testUpperLimit1() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests setting/getting of lower limit as String |
| | | * Tests setting/getting of lower limit as String. |
| | | * @param limit upper limit |
| | | * @param expectedValue to compare |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests setting/getting of lower limit as String |
| | | * Tests setting/getting of lower limit as String. |
| | | * @param upper upper limit |
| | | * @param lower lower limit |
| | | * @param lowerFirst when true sets the lower limit property first |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests the allowUnlimited property |
| | | * Tests the allowUnlimited property. |
| | | */ |
| | | @Test |
| | | public void testIsAllowUnlimited1() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests the allowUnlimited property |
| | | * Tests the allowUnlimited property. |
| | | */ |
| | | @Test(expectedExceptions = PropertyException.class) |
| | | public void testIsAllowUnlimited2() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests the allowUnlimited property |
| | | * Tests the allowUnlimited property. |
| | | */ |
| | | @Test(expectedExceptions = PropertyException.class) |
| | | public void testIsAllowUnlimited3() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates illegal data for validate value |
| | | * Creates illegal data for validate value. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "validateValueData") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests that validateValue works |
| | | * Tests that validateValue works. |
| | | * @param allowUnlimited when true allows unlimited |
| | | * @param high upper limit |
| | | * @param low lower limit |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates illegal data for validate value |
| | | * Creates illegal data for validate value. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "illegalValidateValueData") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests that validateValue throws exceptions |
| | | * Tests that validateValue throws exceptions. |
| | | * @param low lower limit |
| | | * @param high upper limit |
| | | * @param allowUnlimited when true allows unlimited |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates encode test data |
| | | * Creates encode test data. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "encodeValueData") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests encode value |
| | | * Tests encode value. |
| | | * @param value to encode |
| | | * @param expectedValue to compare |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test that accept doesn't throw and exception |
| | | * Test that accept doesn't throw and exception. |
| | | */ |
| | | @Test |
| | | public void testAccept() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Make sure toString doesn't barf |
| | | * Make sure toString doesn't barf. |
| | | */ |
| | | @Test |
| | | public void testToString() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Make sure toString doesn't barf |
| | | * Make sure toString doesn't barf. |
| | | */ |
| | | @Test |
| | | public void testToString2() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates encode test data |
| | | * Creates encode test data. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "decodeValueData") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests decodeValue() |
| | | * Tests decodeValue(). |
| | | * @param value to decode |
| | | * @param expectedValue for comparison |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates encode test data |
| | | * Creates encode test data. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "decodeValueData2") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests decodeValue() |
| | | * Tests decodeValue(). |
| | | * @param value to decode |
| | | */ |
| | | @Test(dataProvider = "decodeValueData2", |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests that exception thrown when no enum class |
| | | * specified by builder |
| | | * Tests that exception thrown when no enum class specified by builder. |
| | | */ |
| | | @Test |
| | | public void testBuildInstance() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests that exception thrown when no enum class |
| | | * specified by builder |
| | | * Tests that exception thrown when no enum class specified by builder. |
| | | */ |
| | | @Test(expectedExceptions = {IllegalStateException.class}) |
| | | public void testBuildInstance2() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates data decodeValue test |
| | | * Creates data decodeValue test. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "decodeValueData") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests decodeValue() |
| | | * Tests decodeValue(). |
| | | * @param value to decode |
| | | * @param expectedValue enum expected |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates illegal data for decode value test |
| | | * Creates illegal data for decode value test. |
| | | * @return data |
| | | */ |
| | | @DataProvider(name = "decodeValueData2") |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests decodeValue() |
| | | * Tests decodeValue(). |
| | | * @param value to decode |
| | | */ |
| | | @Test(dataProvider = "decodeValueData2", |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests normalization |
| | | * Tests normalization. |
| | | */ |
| | | @Test |
| | | public void testNormalizeValue() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests validation |
| | | * Tests validation. |
| | | */ |
| | | @Test |
| | | public void testValidateValue() { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | |
| | | /** |
| | | * Tests execution of getObjectClasses() and makes sure the |
| | | * returned list contains "top" |
| | | * returned list contains "top". |
| | | */ |
| | | @Test |
| | | public void testGetObjectClasses() { |
| | |
| | | ManagedObjectDefinitionI18NResource modr; |
| | | |
| | | /** |
| | | * Creates the resource |
| | | * Creates the resource. |
| | | */ |
| | | @BeforeClass |
| | | public void setUp() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests ability to get a message |
| | | * Tests ability to get a message. |
| | | */ |
| | | @Test |
| | | public void testGetMessage() { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | // No implementation required. |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, |
| | | PropertyDefinition<?> pd) { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getRelationChildRDNType( |
| | | InstantiableRelationDefinition<?, ?> r) { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) { |
| | | if (d == TestParentCfgDefn.getInstance()) { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getRelationRDNSequence(RelationDefinition<?, ?> r) { |
| | | if (r == TestCfg.getTestOneToManyParentRelationDefinition()) { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | |
| | | |
| | | import static org.testng.Assert.assertEquals; |
| | | |
| | | import org.opends.server.admin.std.meta.RootCfgDefn; |
| | | import org.opends.server.DirectoryServerTestCase; |
| | | import org.testng.annotations.Test; |
| | | |
| | | |
| | | |
| | | /** |
| | | * StringPropertyDefinition Tester. |
| | | */ |
| | |
| | | |
| | | |
| | | |
| | | // Create a string property definition. |
| | | /** Create a string property definition. */ |
| | | private StringPropertyDefinition getDefinition( |
| | | boolean isCaseInsensitive, String pattern) { |
| | | StringPropertyDefinition.Builder builder = StringPropertyDefinition |
| | |
| | | */ |
| | | private static final OptionalRelationDefinition<TestParentCfgClient, TestParentCfg> RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT; |
| | | |
| | | // Create a one-to-many relation for test-parent components. |
| | | /** Create a one-to-many relation for test-parent components. */ |
| | | static { |
| | | InstantiableRelationDefinition.Builder<TestParentCfgClient, TestParentCfg> builder = new InstantiableRelationDefinition.Builder<TestParentCfgClient, TestParentCfg>( |
| | | RootCfgDefn.getInstance(), "test-one-to-many-parent", |
| | |
| | | RD_TEST_ONE_TO_MANY_PARENT = builder.getInstance(); |
| | | } |
| | | |
| | | // Create a one-to-many relation for test-parent components. |
| | | /** Create a one-to-many relation for test-parent components. */ |
| | | static { |
| | | OptionalRelationDefinition.Builder<TestParentCfgClient, TestParentCfg> builder = new OptionalRelationDefinition.Builder<TestParentCfgClient, TestParentCfg>( |
| | | RootCfgDefn.getInstance(), "test-one-to-zero-or-one-parent", |
| | |
| | | RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT = builder.getInstance(); |
| | | } |
| | | |
| | | // Test parent object class definition. |
| | | /** Test parent object class definition. */ |
| | | private static ObjectClass TEST_PARENT_OCD; |
| | | |
| | | // Test child object class definition. |
| | | /** Test child object class definition. */ |
| | | private static ObjectClass TEST_CHILD_OCD; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Prevent instantiation. |
| | | /** Prevent instantiation. */ |
| | | private TestCfg() { |
| | | // No implementation required. |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | */ |
| | | public final class TestChildCfgDefn extends ManagedObjectDefinition<TestChildCfgClient, TestChildCfg> { |
| | | |
| | | // The singleton configuration definition instance. |
| | | /** The singleton configuration definition instance. */ |
| | | private static final TestChildCfgDefn INSTANCE = new TestChildCfgDefn(); |
| | | |
| | | |
| | | |
| | | // The "aggregation-property" property definition. |
| | | /** The "aggregation-property" property definition. */ |
| | | private static final AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> PD_AGGREGATION_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-boolean-property" property definition. |
| | | /** The "mandatory-boolean-property" property definition. */ |
| | | private static final BooleanPropertyDefinition PD_MANDATORY_BOOLEAN_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-class-property" property definition. |
| | | /** The "mandatory-class-property" property definition. */ |
| | | private static final ClassPropertyDefinition PD_MANDATORY_CLASS_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-read-only-attribute-type-property" property definition. |
| | | /** The "mandatory-read-only-attribute-type-property" property definition. */ |
| | | private static final AttributeTypePropertyDefinition PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "optional-multi-valued-dn-property1" property definition. |
| | | /** The "optional-multi-valued-dn-property1" property definition. */ |
| | | private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY1; |
| | | |
| | | |
| | | |
| | | // The "optional-multi-valued-dn-property2" property definition. |
| | | /** The "optional-multi-valued-dn-property2" property definition. */ |
| | | private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY2; |
| | | |
| | | |
| | | |
| | | // Build the "aggregation-property" property definition. |
| | | /** Build the "aggregation-property" property definition. */ |
| | | static { |
| | | AggregationPropertyDefinition.Builder<ConnectionHandlerCfgClient, ConnectionHandlerCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "aggregation-property"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-boolean-property" property definition. |
| | | /** Build the "mandatory-boolean-property" property definition. */ |
| | | static { |
| | | BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "mandatory-boolean-property"); |
| | | builder.setOption(PropertyOption.MANDATORY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-class-property" property definition. |
| | | /** Build the "mandatory-class-property" property definition. */ |
| | | static { |
| | | ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "mandatory-class-property"); |
| | | builder.setOption(PropertyOption.MANDATORY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-read-only-attribute-type-property" property definition. |
| | | /** Build the "mandatory-read-only-attribute-type-property" property definition. */ |
| | | static { |
| | | AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "mandatory-read-only-attribute-type-property"); |
| | | builder.setOption(PropertyOption.READ_ONLY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "optional-multi-valued-dn-property1" property definition. |
| | | /** Build the "optional-multi-valued-dn-property1" property definition. */ |
| | | static { |
| | | DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE, "optional-multi-valued-dn-property1"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "optional-multi-valued-dn-property2" property definition. |
| | | /** Build the "optional-multi-valued-dn-property2" property definition. */ |
| | | static { |
| | | DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE, "optional-multi-valued-dn-property2"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfgClient createClientConfiguration( |
| | | ManagedObject<? extends TestChildCfgClient> impl) { |
| | | return new TestChildCfgClientImpl(impl); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfg createServerConfiguration( |
| | | ServerManagedObject<? extends TestChildCfg> impl) { |
| | | return new TestChildCfgServerImpl(impl); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<TestChildCfg> getServerConfigurationClass() { |
| | | return TestChildCfg.class; |
| | | } |
| | |
| | | private static class TestChildCfgClientImpl implements |
| | | TestChildCfgClient { |
| | | |
| | | // Private implementation. |
| | | /** Private implementation. */ |
| | | private ManagedObject<? extends TestChildCfgClient> impl; |
| | | |
| | | |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private TestChildCfgClientImpl( |
| | | ManagedObject<? extends TestChildCfgClient> impl) { |
| | | this.impl = impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<String> getAggregationProperty() { |
| | | return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setAggregationProperty(Collection<String> values) { |
| | | impl.setPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Boolean isMandatoryBooleanProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryBooleanProperty(boolean value) { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getMandatoryClassProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryClassProperty(String value) { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AttributeType getMandatoryReadOnlyAttributeTypeProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyException { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty1() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setOptionalMultiValuedDNProperty1(Collection<DN> values) { |
| | | impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty2() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setOptionalMultiValuedDNProperty2(Collection<DN> values) { |
| | | impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition() { |
| | | return INSTANCE; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public PropertyProvider properties() { |
| | | return impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void commit() throws ManagedObjectAlreadyExistsException, |
| | | MissingMandatoryPropertiesException, ConcurrentModificationException, |
| | | OperationRejectedException, AuthorizationException, |
| | |
| | | private static class TestChildCfgServerImpl implements |
| | | TestChildCfg { |
| | | |
| | | // Private implementation. |
| | | /** Private implementation. */ |
| | | private ServerManagedObject<? extends TestChildCfg> impl; |
| | | |
| | | |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private TestChildCfgServerImpl(ServerManagedObject<? extends TestChildCfg> impl) { |
| | | this.impl = impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addChangeListener( |
| | | ConfigurationChangeListener<TestChildCfg> listener) { |
| | | impl.registerChangeListener(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeChangeListener( |
| | | ConfigurationChangeListener<TestChildCfg> listener) { |
| | | impl.deregisterChangeListener(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<String> getAggregationProperty() { |
| | | return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isMandatoryBooleanProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getMandatoryClassProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AttributeType getMandatoryReadOnlyAttributeTypeProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty1() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty2() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<? extends TestChildCfg> configurationClass() { |
| | | return TestChildCfg.class; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ServerManagedObject<? extends TestChildCfg> managedObject() { |
| | | return impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public DN dn() { |
| | | return impl.getDN(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | */ |
| | | public final class TestParentCfgDefn extends ManagedObjectDefinition<TestParentCfgClient, TestParentCfg> { |
| | | |
| | | // The singleton configuration definition instance. |
| | | /** The singleton configuration definition instance. */ |
| | | private static final TestParentCfgDefn INSTANCE = new TestParentCfgDefn(); |
| | | |
| | | |
| | | |
| | | // The "mandatory-boolean-property" property definition. |
| | | /** The "mandatory-boolean-property" property definition. */ |
| | | private static final BooleanPropertyDefinition PD_MANDATORY_BOOLEAN_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-class-property" property definition. |
| | | /** The "mandatory-class-property" property definition. */ |
| | | private static final ClassPropertyDefinition PD_MANDATORY_CLASS_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-read-only-attribute-type-property" property definition. |
| | | /** The "mandatory-read-only-attribute-type-property" property definition. */ |
| | | private static final AttributeTypePropertyDefinition PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "optional-multi-valued-dn-property" property definition. |
| | | /** The "optional-multi-valued-dn-property" property definition. */ |
| | | private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "test-children" relation definition. |
| | | /** The "test-children" relation definition. */ |
| | | private static final InstantiableRelationDefinition<TestChildCfgClient, TestChildCfg> RD_TEST_CHILDREN; |
| | | |
| | | |
| | | |
| | | // The "optional-test-child" relation definition. |
| | | /** The "optional-test-child" relation definition. */ |
| | | private static final OptionalRelationDefinition<TestChildCfgClient, TestChildCfg> RD_OPTIONAL_TEST_CHILD; |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-boolean-property" property definition. |
| | | /** Build the "mandatory-boolean-property" property definition. */ |
| | | static { |
| | | BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "mandatory-boolean-property"); |
| | | builder.setOption(PropertyOption.MANDATORY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-class-property" property definition. |
| | | /** Build the "mandatory-class-property" property definition. */ |
| | | static { |
| | | ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "mandatory-class-property"); |
| | | builder.setOption(PropertyOption.MANDATORY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-read-only-attribute-type-property" property definition. |
| | | /** Build the "mandatory-read-only-attribute-type-property" property definition. */ |
| | | static { |
| | | AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "mandatory-read-only-attribute-type-property"); |
| | | builder.setOption(PropertyOption.READ_ONLY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "optional-multi-valued-dn-property" property definition. |
| | | /** Build the "optional-multi-valued-dn-property" property definition. */ |
| | | static { |
| | | DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE, "optional-multi-valued-dn-property"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "test-children" relation definition. |
| | | /** Build the "test-children" relation definition. */ |
| | | static { |
| | | InstantiableRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder = |
| | | new InstantiableRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>( |
| | |
| | | |
| | | |
| | | |
| | | // Build the "optional-test-child" relation definition. |
| | | /** Build the "optional-test-child" relation definition. */ |
| | | static { |
| | | OptionalRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder = |
| | | new OptionalRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>( |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestParentCfgClient createClientConfiguration( |
| | | ManagedObject<? extends TestParentCfgClient> impl) { |
| | | return new TestParentCfgClientImpl(impl); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestParentCfg createServerConfiguration( |
| | | ServerManagedObject<? extends TestParentCfg> impl) { |
| | | return new TestParentCfgServerImpl(impl); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<TestParentCfg> getServerConfigurationClass() { |
| | | return TestParentCfg.class; |
| | | } |
| | |
| | | private static class TestParentCfgClientImpl implements |
| | | TestParentCfgClient { |
| | | |
| | | // Private implementation. |
| | | /** Private implementation. */ |
| | | private ManagedObject<? extends TestParentCfgClient> impl; |
| | | |
| | | |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private TestParentCfgClientImpl( |
| | | ManagedObject<? extends TestParentCfgClient> impl) { |
| | | this.impl = impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Boolean isMandatoryBooleanProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryBooleanProperty(boolean value) { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getMandatoryClassProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryClassProperty(String value) { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AttributeType getMandatoryReadOnlyAttributeTypeProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyException { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setOptionalMultiValuedDNProperty(Collection<DN> values) { |
| | | impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String[] listTestChildren() throws ConcurrentModificationException, |
| | | AuthorizationException, CommunicationException { |
| | | return impl.listChildren(INSTANCE.getTestChildrenRelationDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfgClient getTestChild(String name) |
| | | throws DefinitionDecodingException, ManagedObjectDecodingException, |
| | | ManagedObjectNotFoundException, ConcurrentModificationException, |
| | |
| | | return impl.getChild(INSTANCE.getTestChildrenRelationDefinition(), name).getConfiguration(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public <M extends TestChildCfgClient> M createTestChild( |
| | | ManagedObjectDefinition<M, ? extends TestChildCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException { |
| | | return impl.createChild(INSTANCE.getTestChildrenRelationDefinition(), d, name, exceptions).getConfiguration(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeTestChild(String name) |
| | | throws ManagedObjectNotFoundException, ConcurrentModificationException, |
| | | OperationRejectedException, AuthorizationException, CommunicationException { |
| | | impl.removeChild(INSTANCE.getTestChildrenRelationDefinition(), name); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean hasOptionalTestChild() throws ConcurrentModificationException, |
| | | AuthorizationException, CommunicationException { |
| | | return impl.hasChild(INSTANCE.getOptionalTestChildRelationDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfgClient getOptionalChild() |
| | | throws DefinitionDecodingException, ManagedObjectDecodingException, |
| | | ManagedObjectNotFoundException, ConcurrentModificationException, |
| | |
| | | return impl.getChild(INSTANCE.getOptionalTestChildRelationDefinition()).getConfiguration(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public <M extends TestChildCfgClient> M createOptionalTestChild( |
| | | ManagedObjectDefinition<M, ? extends TestChildCfg> d, Collection<PropertyException> exceptions) { |
| | | return impl.createChild(INSTANCE.getOptionalTestChildRelationDefinition(), d, exceptions).getConfiguration(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeOptionalTestChild() |
| | | throws ManagedObjectNotFoundException, ConcurrentModificationException, |
| | | OperationRejectedException, AuthorizationException, CommunicationException { |
| | | impl.removeChild(INSTANCE.getOptionalTestChildRelationDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ManagedObjectDefinition<? extends TestParentCfgClient, ? extends TestParentCfg> definition() { |
| | | return INSTANCE; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public PropertyProvider properties() { |
| | | return impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void commit() throws ManagedObjectAlreadyExistsException, |
| | | MissingMandatoryPropertiesException, ConcurrentModificationException, |
| | | OperationRejectedException, AuthorizationException, |
| | |
| | | private static class TestParentCfgServerImpl implements |
| | | TestParentCfg { |
| | | |
| | | // Private implementation. |
| | | /** Private implementation. */ |
| | | private ServerManagedObject<? extends TestParentCfg> impl; |
| | | |
| | | |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private TestParentCfgServerImpl(ServerManagedObject<? extends TestParentCfg> impl) { |
| | | this.impl = impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addChangeListener( |
| | | ConfigurationChangeListener<TestParentCfg> listener) { |
| | | impl.registerChangeListener(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeChangeListener( |
| | | ConfigurationChangeListener<TestParentCfg> listener) { |
| | | impl.deregisterChangeListener(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isMandatoryBooleanProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getMandatoryClassProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AttributeType getMandatoryReadOnlyAttributeTypeProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String[] listTestChildren() { |
| | | return impl.listChildren(INSTANCE.getTestChildrenRelationDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfg getTestChild(String name) throws ConfigException { |
| | | return impl.getChild(INSTANCE.getTestChildrenRelationDefinition(), name).getConfiguration(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addTestChildAddListener( |
| | | ConfigurationAddListener<TestChildCfg> listener) throws ConfigException { |
| | | impl.registerAddListener(INSTANCE.getTestChildrenRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeTestChildAddListener( |
| | | ConfigurationAddListener<TestChildCfg> listener) { |
| | | impl.deregisterAddListener(INSTANCE.getTestChildrenRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addTestChildDeleteListener( |
| | | ConfigurationDeleteListener<TestChildCfg> listener) throws ConfigException { |
| | | impl.registerDeleteListener(INSTANCE.getTestChildrenRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeTestChildDeleteListener( |
| | | ConfigurationDeleteListener<TestChildCfg> listener) { |
| | | impl.deregisterDeleteListener(INSTANCE.getTestChildrenRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean hasOptionalTestChild() { |
| | | return impl.hasChild(INSTANCE.getOptionalTestChildRelationDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfg getOptionalTestChild() throws ConfigException { |
| | | return impl.getChild(INSTANCE.getOptionalTestChildRelationDefinition()).getConfiguration(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addOptionalTestChildAddListener( |
| | | ConfigurationAddListener<TestChildCfg> listener) throws ConfigException { |
| | | impl.registerAddListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeOptionalTestChildAddListener( |
| | | ConfigurationAddListener<TestChildCfg> listener) { |
| | | impl.deregisterAddListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addOptionalChildTestDeleteListener( |
| | | ConfigurationDeleteListener<TestChildCfg> listener) throws ConfigException { |
| | | impl.registerDeleteListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeOptionalTestChildDeleteListener( |
| | | ConfigurationDeleteListener<TestChildCfg> listener) { |
| | | impl.deregisterDeleteListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<? extends TestParentCfg> configurationClass() { |
| | | return TestParentCfg.class; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ServerManagedObject<? extends TestParentCfg> managedObject() { |
| | | return impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public DN dn() { |
| | | return impl.getDN(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | TestCaseUtils.startServer(); |
| | | } |
| | | |
| | | /** |
| | | * Returns all AbstractManagedObjectDefinition objects that are |
| | | * defined in |
| | | */ |
| | | /** Returns all AbstractManagedObjectDefinition objects that are defined in. */ |
| | | @DataProvider |
| | | public Object[][] enumrateManageObjectDefns() throws Exception { |
| | | TopCfgDefn topCfgDefn = TopCfgDefn.getInstance(); |
| | |
| | | return params; |
| | | } |
| | | |
| | | // Exceptions to config objects having a different objectclass |
| | | /** Exceptions to config objects having a different objectclass. */ |
| | | private static final List<String> CLASS_OBJECT_CLASS_EXCEPTIONS = |
| | | Arrays.asList( |
| | | "org.opends.server.admin.std.meta.RootCfgDefn", |
| | |
| | | "The configuration definition for " + objectDef.getName() + " has the following problems: " + EOL + errors); |
| | | } |
| | | |
| | | // Exceptions to properties ending in -class being exactly 'java-class'. |
| | | /** Exceptions to properties ending in -class being exactly 'java-class'. */ |
| | | private static final List<String> CLASS_PROPERTY_EXCEPTIONS = |
| | | Arrays.asList( |
| | | // e.g. "prop-name-ending-with-class" |
| | | ); |
| | | |
| | | // Exceptions to properties ending in -enabled being exactly 'enabled'. |
| | | /** Exceptions to properties ending in -enabled being exactly 'enabled'. */ |
| | | private static final List<String> ENABLED_PROPERTY_EXCEPTIONS = |
| | | Arrays.asList( |
| | | "index-filter-analyzer-enabled", |
| | |
| | | // e.g. "prop-name-ending-with-enabled" |
| | | ); |
| | | |
| | | // Exceptions to properties not starting with the name of their config object |
| | | /** Exceptions to properties not starting with the name of their config object. */ |
| | | private static final List<String> OBJECT_PREFIX_PROPERTY_EXCEPTIONS = |
| | | Arrays.asList( |
| | | "backend-id", |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | @Test(sequential = true) |
| | | public class AggregationClientTest extends AdminTestCase { |
| | | |
| | | // Test LDIF. |
| | | /** Test LDIF. */ |
| | | private static final String[] TEST_LDIF = new String[] { |
| | | // Base entries. |
| | | "dn: cn=config", |
| | |
| | | |
| | | |
| | | |
| | | // Retrieve the named test parent managed object. |
| | | /** Retrieve the named test parent managed object. */ |
| | | private TestParentCfgClient getTestParent(ManagementContext context, |
| | | String name) throws DefinitionDecodingException, |
| | | ManagedObjectDecodingException, AuthorizationException, |
| | |
| | | |
| | | |
| | | |
| | | // Asserts that the actual set of DNs contains the expected values. |
| | | /** Asserts that the actual set of DNs contains the expected values. */ |
| | | private void assertSetEquals(SortedSet<String> actual, String... expected) { |
| | | SortedSet<String> values = new TreeSet<String>(TestChildCfgDefn |
| | | .getInstance().getAggregationPropertyPropertyDefinition()); |
| | |
| | | */ |
| | | public final class CreateEntryMockLDAPConnection extends MockLDAPConnection { |
| | | |
| | | // Detect multiple calls. |
| | | /** Detect multiple calls. */ |
| | | private boolean alreadyAdded; |
| | | |
| | | // The expected set of attributes (attribute name -> list of |
| | | // values). |
| | | /** The expected set of attributes (attribute name -> list of values). */ |
| | | private final Map<String, List<String>> attributes = new HashMap<String, List<String>>(); |
| | | |
| | | // The expected DN. |
| | | /** The expected DN. */ |
| | | private final LdapName expectedDN; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void createEntry(LdapName dn, Attributes attributes) |
| | | throws NamingException { |
| | |
| | | */ |
| | | public final class DeleteSubtreeMockLDAPConnection extends MockLDAPConnection { |
| | | |
| | | // Detect multiple calls. |
| | | /** Detect multiple calls. */ |
| | | private boolean alreadyDeleted; |
| | | |
| | | // The expected DN. |
| | | /** The expected DN. */ |
| | | private final LdapName expectedDN; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void deleteSubtree(LdapName dn) throws NamingException { |
| | | Assert.assertFalse(alreadyDeleted); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | @Test(sequential=true) |
| | | public final class LDAPClientTest extends AdminTestCase { |
| | | |
| | | // Test LDIF. |
| | | /** Test LDIF. */ |
| | | private static final String[] TEST_LDIF = new String[] { |
| | | // Base entries. |
| | | "dn: cn=config", |
| | |
| | | Class<? extends Exception> expected) { |
| | | MockLDAPConnection c = new MockLDAPConnection() { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void createEntry(LdapName dn, Attributes attributes) |
| | | throws NamingException { |
| | |
| | | Class<? extends Exception> expected) { |
| | | MockLDAPConnection c = new MockLDAPConnection() { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Attributes readEntry(LdapName dn, Collection<String> attrIds) |
| | | throws NamingException { |
| | |
| | | |
| | | |
| | | |
| | | // Asserts that the actual set of DNs contains the expected values. |
| | | /** Asserts that the actual set of DNs contains the expected values. */ |
| | | private void assertDNSetEquals(SortedSet<DN> actual, String... expected) { |
| | | String[] actualStrings = new String[actual.size()]; |
| | | int i = 0; |
| | |
| | | |
| | | |
| | | |
| | | // Create the named test parent managed object. |
| | | /** Create the named test parent managed object. */ |
| | | private TestParentCfgClient createTestParent(ManagementContext context, |
| | | String name) throws ManagedObjectDecodingException, |
| | | AuthorizationException, ManagedObjectAlreadyExistsException, |
| | |
| | | |
| | | |
| | | |
| | | // Retrieve the named test parent managed object. |
| | | /** Retrieve the named test parent managed object. */ |
| | | private TestParentCfgClient getTestParent(ManagementContext context, |
| | | String name) throws DefinitionDecodingException, |
| | | ManagedObjectDecodingException, AuthorizationException, |
| | |
| | | |
| | | |
| | | |
| | | // List test parent managed objects. |
| | | /** List test parent managed objects. */ |
| | | private String[] listTestParents(ManagementContext context) |
| | | throws AuthorizationException, ConcurrentModificationException, |
| | | CommunicationException { |
| | |
| | | |
| | | |
| | | |
| | | // Remove the named test parent managed object. |
| | | /** Remove the named test parent managed object. */ |
| | | private void removeTestParent(ManagementContext context, String name) |
| | | throws AuthorizationException, ManagedObjectNotFoundException, |
| | | OperationRejectedException, ConcurrentModificationException, |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | */ |
| | | private class Handler extends ClientConstraintHandler { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isAddAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isDeleteAcceptable(ManagementContext context, |
| | | ManagedObjectPath<?, ?> path, Collection<LocalizableMessage> unacceptableReasons) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isModifyAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | |
| | | |
| | | } |
| | | |
| | | // Determines if add operations are allowed. |
| | | /** Determines if add operations are allowed. */ |
| | | private final boolean allowAdds; |
| | | |
| | | // Determines if modify operations are allowed. |
| | | /** Determines if modify operations are allowed. */ |
| | | private final boolean allowModifies; |
| | | |
| | | // Determines if delete operations are allowed. |
| | | /** Determines if delete operations are allowed. */ |
| | | private final boolean allowDeletes; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Collection<ClientConstraintHandler> getClientConstraintHandlers() { |
| | | return Collections.<ClientConstraintHandler> singleton(new Handler()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Collection<ServerConstraintHandler> getServerConstraintHandlers() { |
| | | return Collections.emptySet(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | */ |
| | | private static final class MockEntry { |
| | | |
| | | // The entry's attributes. |
| | | /** The entry's attributes. */ |
| | | private final Attributes attributes; |
| | | |
| | | // The entry's children. |
| | | /** The entry's children. */ |
| | | private final List<MockEntry> children; |
| | | |
| | | // The name of this mock entry. |
| | | /** The name of this mock entry. */ |
| | | private final DN dn; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() { |
| | | StringBuilder builder = new StringBuilder(); |
| | |
| | | } |
| | | } |
| | | |
| | | // All the entries. |
| | | /** All the entries. */ |
| | | private final Map<DN, MockEntry> entries; |
| | | |
| | | // The single root entry. |
| | | /** The single root entry. */ |
| | | private final MockEntry rootEntry; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void createEntry(LdapName dn, Attributes attributes) |
| | | throws NamingException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void deleteSubtree(LdapName dn) throws NamingException { |
| | | throw new UnsupportedOperationException("deleteSubtree"); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean entryExists(LdapName dn) throws NamingException { |
| | | return getEntry(dn) != null; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<LdapName> listEntries(LdapName dn, String filter) throws NamingException { |
| | | MockEntry entry = getEntry(dn); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void modifyEntry(LdapName dn, Attributes mods) throws NamingException { |
| | | throw new UnsupportedOperationException("modifyEntry"); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Attributes readEntry(LdapName dn, Collection<String> attrIds) |
| | | throws NamingException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void unbind() { |
| | | // nothing to do |
| | |
| | | */ |
| | | public final class ModifyEntryMockLDAPConnection extends MockLDAPConnection { |
| | | |
| | | // Detect multiple calls. |
| | | /** Detect multiple calls. */ |
| | | private boolean alreadyModified; |
| | | |
| | | // The expected DN. |
| | | /** The expected DN. */ |
| | | private final LdapName expectedDN; |
| | | |
| | | // The expected set of modifications (attribute name -> list of |
| | | // values). |
| | | /** The expected set of modifications (attribute name -> list of values). */ |
| | | private final Map<String, List<String>> modifications = new HashMap<String, List<String>>(); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void modifyEntry(LdapName dn, Attributes mods) throws NamingException { |
| | | Assert.assertFalse(alreadyModified); |
| | |
| | | */ |
| | | public final class AdminTestCaseUtils { |
| | | |
| | | // The relation name which will be used for dummy configurations. A |
| | | // deliberately obfuscated name is chosen to avoid clashes. |
| | | /** |
| | | * The relation name which will be used for dummy configurations. A |
| | | * deliberately obfuscated name is chosen to avoid clashes. |
| | | */ |
| | | private static final String DUMMY_TEST_RELATION = "*dummy*test*relation*"; |
| | | |
| | | // Indicates if the dummy relation profile has been registered. |
| | | /** Indicates if the dummy relation profile has been registered. */ |
| | | private static boolean isProfileRegistered; |
| | | |
| | | |
| | | |
| | | // Prevent instantiation. |
| | | /** Prevent instantiation. */ |
| | | private AdminTestCaseUtils() { |
| | | // No implementation required. |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | // Construct a dummy path. |
| | | /** Construct a dummy path. */ |
| | | private static synchronized <C extends ConfigurationClient, S extends Configuration> |
| | | ManagedObjectPath<C, S> getPath(AbstractManagedObjectDefinition<C, S> d) { |
| | | if (!isProfileRegistered) { |
| | | LDAPProfile.Wrapper profile = new LDAPProfile.Wrapper() { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getRelationRDNSequence(RelationDefinition<?, ?> r) { |
| | | if (r.getName().equals(DUMMY_TEST_RELATION)) { |
| | |
| | | private static final class DummyChangeListener implements |
| | | ConfigurationChangeListener<TestChildCfg> { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | TestChildCfg configuration) { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable(TestChildCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | |
| | | private static final class DummyDeleteListener implements |
| | | ConfigurationDeleteListener<TestChildCfg> { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationDelete( |
| | | TestChildCfg configuration) { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationDeleteAcceptable(TestChildCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | final SingletonRelationDefinition<TestChildCfgClient, TestChildCfg> r2 = b.getInstance(); |
| | | LDAPProfile.Wrapper wrapper = new LDAPProfile.Wrapper() { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getRelationRDNSequence(RelationDefinition<?, ?> r) { |
| | | if (r == r2) { |
| | |
| | | private static class AddListener implements |
| | | ConfigurationAddListener<TestChildCfg> { |
| | | |
| | | // The child configuration that was added. |
| | | /** The child configuration that was added. */ |
| | | private TestChildCfg child; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationAdd(TestChildCfg configuration) { |
| | | return new ConfigChangeResult(); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationAddAcceptable(TestChildCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | | child = configuration; |
| | |
| | | private static class ChangeListener implements |
| | | ConfigurationChangeListener<TestChildCfg> { |
| | | |
| | | // The child configuration that was changed. |
| | | /** The child configuration that was changed. */ |
| | | private TestChildCfg child; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) { |
| | | return new ConfigChangeResult(); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationChangeAcceptable(TestChildCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | | child = configuration; |
| | |
| | | |
| | | } |
| | | |
| | | // Test child 1 LDIF. |
| | | /** Test child 1 LDIF. */ |
| | | private static final String[] TEST_CHILD_1 = new String[] { |
| | | "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config", |
| | | "objectclass: top", |
| | |
| | | "ds-cfg-conflict-behavior: virtual-overrides-real" |
| | | }; |
| | | |
| | | // Test child 2 LDIF. |
| | | /** Test child 2 LDIF. */ |
| | | private static final String[] TEST_CHILD_2 = new String[] { |
| | | "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config", |
| | | "objectclass: top", |
| | |
| | | "ds-cfg-base-dn: dc=default value c2v2,dc=com" |
| | | }; |
| | | |
| | | // Test child 3 LDIF. |
| | | /** Test child 3 LDIF. */ |
| | | private static final String[] TEST_CHILD_3 = new String[] { |
| | | "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config", |
| | | "objectclass: top", |
| | |
| | | "ds-cfg-group-dn: dc=default value c3v4,dc=com" |
| | | }; |
| | | |
| | | // Test child 4 LDIF. |
| | | /** Test child 4 LDIF. */ |
| | | private static final String[] TEST_CHILD_4 = new String[] { |
| | | "dn: cn=test child 4,cn=test children,cn=test parent 2,cn=test parents,cn=config", |
| | | "objectclass: top", |
| | |
| | | "ds-cfg-conflict-behavior: virtual-overrides-real" |
| | | }; |
| | | |
| | | // Test LDIF. |
| | | /** Test LDIF. */ |
| | | private static final String[] TEST_LDIF = new String[] { |
| | | // Base entries. |
| | | "dn: cn=test parents,cn=config", |
| | |
| | | "" |
| | | }; |
| | | |
| | | // JNDI LDAP context. |
| | | /** JNDI LDAP context. */ |
| | | private JNDIDirContextAdaptor adaptor; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // Assert that the values of child 1 are correct. |
| | | /** Assert that the values of child 1 are correct. */ |
| | | private void assertChild1(TestChildCfg child) { |
| | | Assert.assertEquals(child.getMandatoryClassProperty(), |
| | | "org.opends.server.extensions.UserDefinedVirtualAttributeProvider"); |
| | |
| | | |
| | | |
| | | |
| | | // Assert that the values of child 2 are correct. |
| | | /** Assert that the values of child 2 are correct. */ |
| | | private void assertChild2(TestChildCfg child) { |
| | | Assert.assertEquals(child.getMandatoryClassProperty(), |
| | | "org.opends.server.extensions.UserDefinedVirtualAttributeProvider"); |
| | |
| | | |
| | | |
| | | |
| | | // Assert that the values of child 3 are correct. |
| | | /** Assert that the values of child 3 are correct. */ |
| | | private void assertChild3(TestChildCfg child) { |
| | | Assert.assertEquals(child.getMandatoryClassProperty(), |
| | | "org.opends.server.extensions.UserDefinedVirtualAttributeProvider"); |
| | |
| | | |
| | | |
| | | |
| | | // Assert that the values of child 4 are correct. |
| | | /** Assert that the values of child 4 are correct. */ |
| | | private void assertChild4(TestChildCfg child) { |
| | | Assert.assertEquals(child.getMandatoryClassProperty(), |
| | | "org.opends.server.extensions.UserDefinedVirtualAttributeProvider"); |
| | |
| | | |
| | | |
| | | |
| | | // Asserts that the actual set of DNs contains the expected values. |
| | | /** Asserts that the actual set of DNs contains the expected values. */ |
| | | private void assertDNSetEquals(SortedSet<DN> actual, String... expected) { |
| | | String[] actualStrings = new String[actual.size()]; |
| | | int i = 0; |
| | |
| | | |
| | | |
| | | |
| | | // Deletes the named sub-tree. |
| | | /** Deletes the named sub-tree. */ |
| | | private void deleteSubtree(String dn) throws Exception { |
| | | getAdaptor().deleteSubtree(new LdapName(dn)); |
| | | } |
| | | |
| | | |
| | | |
| | | // Gets the JNDI connection for the test server instance. |
| | | /** Gets the JNDI connection for the test server instance. */ |
| | | private synchronized JNDIDirContextAdaptor getAdaptor() throws Exception { |
| | | if (adaptor == null) { |
| | | adaptor = JNDIDirContextAdaptor.simpleSSLBind("127.0.0.1", TestCaseUtils |
| | |
| | | |
| | | |
| | | |
| | | // Gets the named parent configuration. |
| | | /** Gets the named parent configuration. */ |
| | | private TestParentCfg getParent(String name) throws IllegalArgumentException, |
| | | ConfigException { |
| | | ServerManagementContext ctx = ServerManagementContext.getInstance(); |
| | |
| | | */ |
| | | public final class ListenerTest extends AdminTestCase { |
| | | |
| | | // Add listener implementation. |
| | | /** Add listener implementation. */ |
| | | private static final class TestParentAddListener implements |
| | | ConfigurationAddListener<TestParentCfg> { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationAdd(TestParentCfg configuration) { |
| | | // No implementation required. |
| | | return null; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationAddAcceptable(TestParentCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | | // No implementation required. |
| | |
| | | |
| | | |
| | | |
| | | // Delete listener implementation. |
| | | /** Delete listener implementation. */ |
| | | private static final class TestParentDeleteListener implements |
| | | ConfigurationDeleteListener<TestParentCfg> { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationDelete( |
| | | TestParentCfg configuration) { |
| | | // No implementation required. |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationDeleteAcceptable(TestParentCfg configuration, |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | | // No implementation required. |
| | |
| | | |
| | | |
| | | |
| | | // Attempt to extract an add listener from the provided adaptor. |
| | | /** Attempt to extract an add listener from the provided adaptor. */ |
| | | private ConfigurationAddListener<?> extractListener( |
| | | ConfigAddListenerAdaptor<?> al) { |
| | | ServerManagedObjectAddListener<?> al2 = al |
| | |
| | | |
| | | |
| | | |
| | | // Attempt to extract a delete listener from the provided adaptor. |
| | | /** Attempt to extract a delete listener from the provided adaptor. */ |
| | | private ConfigurationDeleteListener<?> extractListener( |
| | | ConfigDeleteListenerAdaptor<?> al) { |
| | | ServerManagedObjectDeleteListener<?> al2 = al |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | */ |
| | | private class Handler extends ServerConstraintHandler { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isDeleteAllowed(ServerManagedObject<?> managedObject, |
| | | Collection<LocalizableMessage> unacceptableReasons) throws ConfigException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isUsable(ServerManagedObject<?> managedObject, |
| | | Collection<LocalizableMessage> unacceptableReasons) throws ConfigException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void performPostAdd(ServerManagedObject<?> managedObject) |
| | | throws ConfigException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void performPostDelete(ServerManagedObject<?> managedObject) |
| | | throws ConfigException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void performPostModify(ServerManagedObject<?> managedObject) |
| | | throws ConfigException { |
| | |
| | | |
| | | } |
| | | |
| | | // Determines if delete operations are allowed. |
| | | /** Determines if delete operations are allowed. */ |
| | | private final boolean isDeleteAllowed; |
| | | |
| | | // Determines if configurations can be decoded. |
| | | /** Determines if configurations can be decoded. */ |
| | | private final boolean isUsable; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Collection<ClientConstraintHandler> getClientConstraintHandlers() { |
| | | return Collections.emptySet(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Collection<ServerConstraintHandler> getServerConstraintHandlers() { |
| | | return Collections.<ServerConstraintHandler> singleton(new Handler()); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public DN getDN() |
| | | { |
| | | return policyDN; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AuthenticationPolicyState createAuthenticationPolicyState( |
| | | Entry userEntry, long time) throws DirectoryException |
| | | { |
| | | return new AuthenticationPolicyState(userEntry) |
| | | { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean passwordMatches(ByteString password) |
| | | throws DirectoryException |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isDisabled() |
| | | { |
| | | return MockPolicy.this.isDisabled; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void finalizeStateAfterBind() throws DirectoryException |
| | | { |
| | | isStateFinalized = true; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AuthenticationPolicy getAuthenticationPolicy() |
| | | { |
| | | return MockPolicy.this; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void finalizeAuthenticationPolicy() |
| | | { |
| | | isPolicyFinalized = true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processBackupBegin(Backend backend, BackupConfig config) |
| | | { |
| | | backupBeginCount.incrementAndGet(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processBackupEnd(Backend backend, BackupConfig config, |
| | | boolean successful) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processRestoreBegin(Backend backend, RestoreConfig config) |
| | | { |
| | | restoreBeginCount.incrementAndGet(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processRestoreEnd(Backend backend, RestoreConfig config, |
| | | boolean successful) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processExportBegin(Backend backend, LDIFExportConfig config) |
| | | { |
| | | exportBeginCount.incrementAndGet(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processExportEnd(Backend backend, LDIFExportConfig config, |
| | | boolean successful) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processImportBegin(Backend backend, LDIFImportConfig config) |
| | | { |
| | | importBeginCount.incrementAndGet(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void processImportEnd(Backend backend, LDIFImportConfig config, |
| | | boolean successful) |
| | | { |
| | |
| | | // TODO: Test ldap:///parent |
| | | // TODO: Test userattr |
| | | |
| | | // Tests are disabled this way because a class-level @Test(enabled=false) |
| | | // doesn't appear to work. |
| | | /** |
| | | * Tests are disabled this way because a class-level @Test(enabled=false) |
| | | * doesn't appear to work. |
| | | */ |
| | | private static final boolean TESTS_ARE_DISABLED = false; |
| | | |
| | | |
| | | // This is used to lookup the day of the week from the calendar field. |
| | | // The calendar field is 1 based and starts with sun. We make [0] point |
| | | // to 'sat' instead of a bogus value since we need to be able to find the set of days without a |
| | | // specific day. It needs to be at the top since it's used by other |
| | | // static initialization. |
| | | /** |
| | | * This is used to lookup the day of the week from the calendar field. |
| | | * The calendar field is 1 based and starts with sun. We make [0] point |
| | | * to 'sat' instead of a bogus value since we need to be able to find the set of days without a |
| | | * specific day. It needs to be at the top since it's used by other |
| | | * static initialization. |
| | | */ |
| | | private static final String[] DAYS_OF_WEEK = |
| | | {"sat", "sun", "mon", "tue", "wed", "thu", "fri", "sat"}; |
| | | |
| | |
| | | private static final String OU_GROUP_1_DN = "cn=group1," + OU_GROUPS_DN; |
| | | private static final String OU_GROUP_2_DN = "cn=group2," + OU_GROUPS_DN; |
| | | //End group entries. |
| | | //Used by modrdn new superior |
| | | /** Used by modrdn new superior */ |
| | | private static final String MANAGER_NEW_DN = |
| | | "cn=new managers," + OU_BASE_DN; |
| | | private static final String MGR_NEW_DN_URL = "ldap:///" + MANAGER_NEW_DN; |
| | |
| | | private static final String SALES_USER_3 = "cn=sales3 person," + SALES_DN; |
| | | private static final String LEVEL_1_USER_URL = |
| | | "ldap:///??base?(cn=level1 user)"; |
| | | private static final String LDAP_URL_OU_BASE = "ldap:///" + OU_BASE_DN; |
| | | //End userattr entries. |
| | | private static final String OU_INNER_DN = "ou=inner," + OU_BASE_DN; |
| | | private static final String LDAP_URL_OU_INNER = "ldap:///" + OU_INNER_DN; |
| | |
| | | private static final String LEVEL_1_USER_DN = "cn=level1 user," + OU_BASE_DN; |
| | | private static final String LEVEL_2_USER_DN = "cn=level2 user," + OU_INNER_DN; |
| | | private static final String LEVEL_3_USER_DN = "cn=level3 user," + OU_LEAF_DN; |
| | | //The proxy DN. |
| | | /** The proxy DN. */ |
| | | private static final String PROXY_USER_DN = "cn=proxy user," + OU_BASE_DN; |
| | | |
| | | // We need to delete all of these between each test. This list needs to be |
| | | // bottom up so that it can be handed to LDAPDelete. |
| | | /** |
| | | * We need to delete all of these between each test. This list needs to be |
| | | * bottom up so that it can be handed to LDAPDelete. |
| | | */ |
| | | private static final String[] ALL_TEST_ENTRY_DNS_BOTTOM_UP = { |
| | | SALES_USER_1, |
| | | SALES_USER_2, |
| | |
| | | private static final String BIND_RULE_USERDN_ALL = "userdn=\"ldap:///all\""; |
| | | private static final String BIND_RULE_USERDN_ADMIN = "userdn=\"ldap:///" + ADMIN_DN + "\""; |
| | | private static final String BIND_RULE_USERDN_LEVEL_1 = "userdn=\"ldap:///" + LEVEL_1_USER_DN + "\""; |
| | | //The proxy userdn bind rule. |
| | | /** The proxy userdn bind rule. */ |
| | | private static final String BIND_RULE_USERDN_PROXY = |
| | | "userdn=\"ldap:///" + PROXY_USER_DN + "\""; |
| | | |
| | |
| | | private static final String BIND_RULE_USERDN_NOT_UID_RDN = "userdn!=\"ldap:///uid=*,dc=example,dc=com\""; |
| | | private static final String BIND_RULE_USERDN_UID_OR_CN_RDN = "userdn=\"ldap:///uid=*,dc=example,dc=com || ldap:///cn=*,dc=example,dc=com\""; |
| | | private static final String BIND_RULE_USERDN_ALL_CN_ADMINS = "userdn=\"ldap:///dc=example,dc=com??sub?(cn=*admin*)\""; |
| | | private static final String BIND_RULE_USERDN_TOP_LEVEL_CN_ADMINS = "userdn=\"ldap:///dc=example,dc=com??one?(cn=*admin*)\""; // TODO: this might be invalid? |
| | | /** TODO: this might be invalid? */ |
| | | private static final String BIND_RULE_USERDN_TOP_LEVEL_CN_ADMINS = "userdn=\"ldap:///dc=example,dc=com??one?(cn=*admin*)\""; |
| | | private static final String BIND_RULE_GROUPDN_GROUP_1 = |
| | | "groupdn=\"ldap:///" + OU_GROUP_1_DN + "\""; |
| | | private static final String BIND_RULE_IP_LOCALHOST = "ip=\"127.0.0.1\""; |
| | |
| | | private static final String BIND_RULE_AUTHMETHOD_SSL = "authmethod=\"ssl\""; |
| | | private static final String BIND_RULE_AUTHMETHOD_SASL_DIGEST_MD5 = "authmethod=\"sasl DIGEST-MD5\""; |
| | | |
| | | // Admin, but not anonymous |
| | | /** Admin, but not anonymous. */ |
| | | private static final String BIND_RULE_USERDN_NOT_ADMIN = and(not(BIND_RULE_USERDN_ADMIN), BIND_RULE_AUTHMETHOD_SIMPLE); |
| | | |
| | | private static final String BIND_RULE_TODAY = "dayofweek=\"" + getThisDayOfWeek() + "\""; |
| | |
| | | "targetattr", "cn || sn", "deny(read)", BIND_RULE_USERDN_ALL); |
| | | |
| | | //The ACIs for the proxy tests. |
| | | |
| | | |
| | | private static final String ALLOW_PROXY_CONTROL_TO_LEVEL_1= |
| | | buildAciValue("name", "allow proxy control", "targetcontrol", |
| | | OID_PROXIED_AUTH_V2, "allow(read)", |
| | |
| | | private static final String DENY_ALL_NOT_LOCALHOST_OR_ADMIN = |
| | | buildAciValue("name", "deny if not localhost or admin", "targetattr", "*", "deny(all)", BIND_RULE_IP_NOT_LOCALHOST_OR_USERDN_ADMIN); |
| | | |
| | | // This makes more sense as an allow all. |
| | | /** This makes more sense as an allow all. */ |
| | | private static final String DENY_ALL_TO_ADMIN_AND_LOCALHOST_OR_SSL = |
| | | buildAciValue("name", "deny if admin and localhost or ssl", "targetattr", "*", "deny(all)", BIND_RULE_ADMIN_AND_LOCALHOST_OR_SSL); |
| | | |
| | |
| | | "userpassword: " + ADMIN_PW, |
| | | "ds-privilege-name: modify-acl" ); |
| | | |
| | | // By default aci admin can do anything! |
| | | /** By default aci admin can do anything! */ |
| | | private static final String OU_LDIF_VALDITY_TESTS = TestCaseUtils.makeLdif( |
| | | "dn: " + OU_BASE_DN, |
| | | "objectclass: organizationalunit", |
| | |
| | | // </PASSES> |
| | | }; |
| | | |
| | | // This is a little bit confusing. The first element of each array of two elements contains |
| | | // the aci that is valid but becomes invalid if any single character is removed. |
| | | // There has to be a lot of redundancy between the two arrays because of what |
| | | // it takes for an aci to be minimally valid, and hence we end up doing a lot of |
| | | // work twice. This takes time and also reports some identical failures. |
| | | // Therefore, we also provide a mask in the second element in the array |
| | | // But since the aci has \" characters that are single characters, taking up |
| | | // the space of two, we have to use another "two-column" character in the mask. |
| | | // By convention, a character is removed if the corresponding mask character |
| | | // is a - or a \" characer. X and \' imply that it was previously tested and |
| | | // does not need to be tested again. |
| | | /** |
| | | * This is a little bit confusing. The first element of each array of two elements contains |
| | | * the aci that is valid but becomes invalid if any single character is removed. |
| | | * There has to be a lot of redundancy between the two arrays because of what |
| | | * it takes for an aci to be minimally valid, and hence we end up doing a lot of |
| | | * work twice. This takes time and also reports some identical failures. |
| | | * Therefore, we also provide a mask in the second element in the array |
| | | * But since the aci has \" characters that are single characters, taking up |
| | | * the space of two, we have to use another "two-column" character in the mask. |
| | | * By convention, a character is removed if the corresponding mask character |
| | | * is a - or a \" character. X and \' imply that it was previously tested and |
| | | * does not need to be tested again. |
| | | */ |
| | | private static final String[][] INVALID_ACIS_IF_ANY_CHAR_REMOVED = |
| | | { |
| | | // TODO: this generates some failures. |
| | |
| | | return buildAciValidationParams(acis, false /*test once per aci*/); |
| | | } |
| | | |
| | | // This makes sure that all of the acis in the INVALID_ACIS_IF_ANY_CHAR_REMOVED |
| | | // tests are valid acis. |
| | | /** |
| | | * This makes sure that all of the acis in the INVALID_ACIS_IF_ANY_CHAR_REMOVED |
| | | * tests are valid acis. |
| | | */ |
| | | @Test(dataProvider = "validBasisOfValidityTests") |
| | | public void testBasisOfInvalidityTestsAreValid(String modifierDn, String modifierPw, String aciModLdif) throws Throwable { |
| | | if (TESTS_ARE_DISABLED) { // This is a hack to make sure we can disable the tests. |
| | |
| | | return buildAciValidationParams(invalid, false /*test once per aci*/); |
| | | } |
| | | |
| | | // We use this with acis that are crafted in such a way so that they are |
| | | // invalid if any character is removed. By convention, the character |
| | | // is only removed if the corresponding mask character is a - or \" |
| | | /** |
| | | * We use this with acis that are crafted in such a way so that they are |
| | | * invalid if any character is removed. By convention, the character |
| | | * is only removed if the corresponding mask character is a - or \" |
| | | */ |
| | | protected List<String> getAciMissingCharCombos(String aci, String mask) { |
| | | List <String> acisMissingOneChar = new ArrayList<String>(); |
| | | for (int i = 0; i < aci.length(); i++) { |
| | |
| | | |
| | | |
| | | |
| | | // Common between validAcis and invalidAcis |
| | | /** Common between validAcis and invalidAcis. */ |
| | | private Object[][] buildAciValidationParams(List<String> acis, boolean testMultipleCombos) { |
| | | List<String[]> paramsList = new ArrayList<String[]>(); |
| | | |
| | |
| | | GLOBAL_DSE_ACI, GLOBAL_USER_OP_ATTRS_ACI, |
| | | GLOBAL_CONTROL_ACI, GLOBAL_EXT_OP_ACI); |
| | | |
| | | // ACI used to test LDAP compare. |
| | | /** ACI used to test LDAP compare. */ |
| | | private static final String COMPARE_ACI = makeAddAciLdif(OU_LEAF_DN, ALLOW_ALL_TO_COMPARE); |
| | | |
| | | // ACI used to test LDAP search with attributes. |
| | | /** ACI used to test LDAP search with attributes. */ |
| | | private static final String SEARCH_ATTRIBUTES_ALLOW_ACI = makeAddAciLdif( |
| | | OU_LEAF_DN, ALLOW_ALL_TO_ALL); |
| | | private static final String SEARCH_ATTRIBUTES_DENY_ACI = makeAddAciLdif( |
| | | OU_LEAF_DN, DENY_READ_CN_SN_IF_PERSON); |
| | | |
| | | //ACI used to test selfwrite |
| | | /** ACI used to test selfwrite. */ |
| | | private static final String SELFWRITE_ACI = makeAddAciLdif( |
| | | OU_GROUP_1_DN, ALLOW_ALL_TO_SELFWRITE); |
| | | |
| | |
| | | private static final String ACI_PROXY_MOVED_ENTRY = |
| | | makeAddAciLdif(SALES_USER_1, ALLOW_PROXY_TO_MOVED_ENTRY); |
| | | |
| | | //ACI used in testing the groupdn bind rule keywords. |
| | | /** ACI used in testing the groupdn bind rule keywords. */ |
| | | |
| | | private static final |
| | | String GROUP1_GROUPDN_MODS = makeAddAciLdif(OU_LEAF_DN, |
| | | ALLOW_SEARCH_TO_GROUP1_GROUPDN); |
| | | |
| | | //Aci to test dns="*". |
| | | /** Aci to test dns="*". */ |
| | | private static final |
| | | String DNS_ALL_ACI = makeAddAciLdif(OU_LEAF_DN, ALLOW_ALL_TO_DNS_ALL); |
| | | |
| | | // ou=leaf,ou=inner,ou=acitest,dc=example,dc=com and everything under it |
| | | /** ou=leaf,ou=inner,ou=acitest,dc=example,dc=com and everything under it */ |
| | | private static final String LEAF_OU_FULL_LDIF__SEARCH_TESTS = |
| | | LEAF_OU_LDIF__SEARCH_TESTS + |
| | | LEVEL_3_USER_LDIF__SEARCH_TESTS; |
| | | |
| | | // ou=inner,ou=acitest,dc=example,dc=com and everything under it |
| | | /** ou=inner,ou=acitest,dc=example,dc=com and everything under it */ |
| | | private static final String INNER_OU_FULL_LDIF__SEARCH_TESTS = |
| | | INNER_OU_LDIF__SEARCH_TESTS + |
| | | LEVEL_2_USER_LDIF__SEARCH_TESTS + |
| | | LEAF_OU_FULL_LDIF__SEARCH_TESTS; |
| | | |
| | | // ou=acitest,dc=example,dc=com and everything under it |
| | | /** ou=acitest,dc=example,dc=com and everything under it */ |
| | | private static final String BASE_OU_FULL_LDIF__SEARCH_TESTS = |
| | | BASE_OU_LDIF__SEARCH_TESTS + |
| | | LEVEL_1_USER_LDIF__SEARCH_TESTS + |
| | |
| | | // Potential dimensions |
| | | // * Who sets the ACIs to start with |
| | | // * Whether the entries were created with the ACIs or they were added later. LDIFModify would work here. |
| | | // |
| | | |
| | | private static List<SearchTestParams> SEARCH_TEST_PARAMS = new ArrayList<SearchTestParams>(); |
| | | private static SearchTestParams registerNewTestParams(String initialDitLdif, String... aciLdif) { |
| | |
| | | static { |
| | | SearchTestParams testParams; |
| | | |
| | | // |
| | | // ACIs that allow 'cn=Directory Manager' but deny the searches below to everyone else |
| | | // in some way. |
| | | // |
| | | testParams = registerNewTestParams(BASIC_LDIF__SEARCH_TESTS, |
| | | NO_ACIS_LDIF, |
| | | ALLOW_ALL_BASE_DENY_ALL_BASE_LDIF, |
| | |
| | | |
| | | // ------------------------------------------------------------------------ |
| | | |
| | | // |
| | | // ACIs that allow 'cn=Directory Manager' but deny the searches below to everyone else |
| | | // in some way. |
| | | // |
| | | testParams = registerNewTestParams(BASIC_LDIF__SEARCH_TESTS, |
| | | // These ACIs are all equivalent for the single search test cases below |
| | | // (but most likely not equivalent in general). |
| | |
| | | |
| | | // ------------------------------------------------------------------------ |
| | | |
| | | // |
| | | // ACIs that allow cn=admin, but deny the searches below to anonymous |
| | | // in some way. |
| | | // |
| | | |
| | | testParams = registerNewTestParams(BASIC_LDIF__SEARCH_TESTS, |
| | | ALLOW_ALL_BASE_TO_ADMIN, |
| | | ALLOW_ALL_BASE_TO_LOCALHOST, |
| | |
| | | } |
| | | |
| | | |
| | | // TODO: add explicit attribute list support to this. |
| | | /** TODO: add explicit attribute list support to this. */ |
| | | private static class SingleSearchParams { |
| | | private final String _bindDn; |
| | | private final String _bindPw; |
| | |
| | | return args.toArray(new String[args.size()]); |
| | | } |
| | | |
| | | // This is primarily used for debug output on a failure. |
| | | /** This is primarily used for debug output on a failure. */ |
| | | public String getCombinedSearchArgs() { |
| | | return "-h 127.0.0.1" + |
| | | " -p " + getServerLdapPort() + |
| | |
| | | return stripAttrs(ldif, "userpassword"); |
| | | } |
| | | |
| | | // This won't catch attrs that wrap to the next line, but that shouldn't happen. |
| | | /** This won't catch attrs that wrap to the next line, but that shouldn't happen. */ |
| | | private static String stripAttrs(String ldif, String... attrs) { |
| | | // Generate "((cn)|(givenname))" |
| | | String anyAttr = "("; |
| | |
| | | return pattern.matcher(ldif).replaceAll(""); |
| | | } |
| | | |
| | | // This won't catch passwords that wrap to the next line, but that shouldn't happen. |
| | | /** This won't catch passwords that wrap to the next line, but that shouldn't happen. */ |
| | | private static final Pattern COMMENTS_REGEX = Pattern.compile("#.*", Pattern.MULTILINE | Pattern.CASE_INSENSITIVE); |
| | | private static String stripComments(String ldif) { |
| | | return COMMENTS_REGEX.matcher(ldif).replaceAll(""); |
| | |
| | | |
| | | private static ThreadLocal<Map<String,File>> _tempLdifFilesByName = new ThreadLocal<Map<String,File>>(); |
| | | |
| | | // To avoid a proliferation of temporary files, use the same ones over and over. |
| | | // We expect to use a single thread for the tests, but use a threadlocal |
| | | // just in case. |
| | | /** |
| | | * To avoid a proliferation of temporary files, use the same ones over and over. |
| | | * We expect to use a single thread for the tests, but use a threadlocal |
| | | * just in case. |
| | | */ |
| | | private File getTemporaryLdifFile(String name) throws IOException { |
| | | Map<String,File> tempFilesForThisThread = _tempLdifFilesByName.get(); |
| | | if (tempFilesForThisThread == null) { |
| | |
| | | return tempFile; |
| | | } |
| | | |
| | | // Convenience for when we only need one at time. |
| | | /** Convenience for when we only need one at time. */ |
| | | private File getTemporaryLdifFile() throws IOException { |
| | | return getTemporaryLdifFile("aci-tests"); |
| | | } |
| | |
| | | "(version 3.0; acl \"proxy" + user3 + "\";" + |
| | | "allow (proxy) userdn=\"ldap:///" + user3 + "\";)"; |
| | | |
| | | /** Need an ACI to allow proxy control */ |
| | | /** Need an ACI to allow proxy control. */ |
| | | private static final |
| | | String controlACI = "(targetcontrol=\"" + OID_PROXIED_AUTH_V2 + "\")" + |
| | | "(version 3.0; acl \"control\";" + |
| | |
| | | private static final String peopleBase="ou=People,o=test"; |
| | | private static final String adminBase="ou=Admins,o=test"; |
| | | |
| | | //Allow either reportauthzID or passwordpolicy controls. Used in the |
| | | //bind tests. |
| | | /** |
| | | * Allow either reportauthzID or passwordpolicy controls. Used in the bind tests. |
| | | */ |
| | | private static final |
| | | String pwdControls = |
| | | "(targetcontrol=\"" + OID_AUTHZID_REQUEST + "||" + |
| | |
| | | "allow(read) userdn=\"ldap:///" + "anyone" + "\";)"; |
| | | |
| | | |
| | | //Allow only password modify extended op. |
| | | /** Allow only password modify extended op. */ |
| | | private static final |
| | | String extOp = |
| | | "(extop=\"" + OID_PASSWORD_MODIFY_REQUEST + "\")" + |
| | |
| | | "allow(read) userdn=\"ldap:///" + "anyone" + "\";)"; |
| | | |
| | | |
| | | //Allow all extended ops based on extop = *. |
| | | /** Allow all extended ops based on extop = *. */ |
| | | private static final |
| | | String extOpWC = |
| | | "(extop=\"" + "*" + "\")" + |
| | |
| | | "allow(read) userdn=\"ldap:///" + "anyone" + "\";)"; |
| | | |
| | | |
| | | //Dis-allow all extended ops based on extop != *" |
| | | /** Dis-allow all extended ops based on extop != *" */ |
| | | private static final |
| | | String extOpNotWC = |
| | | "(extop!=\"" + "*" + "\")" + |
| | |
| | | "allow(read) userdn=\"ldap:///" + "anyone" + "\";)"; |
| | | |
| | | |
| | | //Allow all attributes to be modified - so the password can be changed. |
| | | /** Allow all attributes to be modified - so the password can be changed. */ |
| | | private static final |
| | | String ALLOW_ALL = "(targetattr=\"*\")" + |
| | | "(version 3.0;acl \"all access\";" + |
| | | "allow (all) " + |
| | | "userdn=\"ldap:///self\";)"; |
| | | |
| | | //Allow pwd modify to people branch. |
| | | /** Allow pwd modify to people branch. */ |
| | | private static final |
| | | String extOpPeople = "(extop=\"" + |
| | | OID_PASSWORD_MODIFY_REQUEST + "\")" + |
| | |
| | | "(version 3.0; acl \"extended op\";" + |
| | | "allow(read) userdn=\"ldap:///" + "anyone" + "\";)"; |
| | | |
| | | //Dis-allow pwd modify to admin branch. |
| | | /** Dis-allow pwd modify to admin branch. */ |
| | | private static final |
| | | String extOpAdmin = |
| | | "(extop!=\"" + OID_PASSWORD_MODIFY_REQUEST + "\")" + |
| | |
| | | "(version 3.0; acl \"extended op\";" + |
| | | "allow(read) userdn=\"ldap:///" + "anyone" + "\";)"; |
| | | |
| | | //Test for side effect -- targetattr rule gives access to denied extended |
| | | //op. |
| | | /** Test for side effect -- targetattr rule gives access to denied extended op. */ |
| | | private static final |
| | | String complicated = |
| | | "(extop = \"1.2.3.4\")" + |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | | import org.testng.annotations.Test; |
| | |
| | | /** |
| | | * Test of IP bind rule address decoding and address matching. |
| | | */ |
| | | @SuppressWarnings("javadoc") |
| | | public class IPTestCase extends AciTestCase { |
| | | |
| | | //Various patterns and addresses that can be put in IP bind rule |
| | |
| | | mixed="::ffff:72.56.78.9,45.*.33.*,[12ab:0:0:cd30::]/60," + |
| | | "56.56.78.0+255.255.255.0"; |
| | | |
| | | //Providers that test the above expressions. |
| | | //Mix of Ipv6 and Ipv4 addresses. |
| | | /** |
| | | * Providers that test the above expressions. |
| | | * Mix of Ipv6 and Ipv4 addresses. |
| | | */ |
| | | @DataProvider(name = "mixedMatches") |
| | | public Object[][] mixedData() { |
| | | return new Object[][] { |
| | |
| | | |
| | | }; |
| | | } |
| | | //Ipv6 addresses in long and various compressed forms. |
| | | /** Ipv6 addresses in long and various compressed forms. */ |
| | | @DataProvider(name = "v6Matches") |
| | | public Object[][] v6MatchData() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Ipv6 addresses used in cidr tests. |
| | | /** Ipv6 addresses used in cidr tests. */ |
| | | @DataProvider(name = "v6Matches1") |
| | | public Object[][] v6MatchData1() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Ipv4 addresses. |
| | | /** Ipv4 addresses. */ |
| | | @DataProvider(name = "v4Matches") |
| | | public Object[][] v4MatchData() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Valid IPv4 expressions. |
| | | /** Valid IPv4 expressions. */ |
| | | @DataProvider(name = "validRules") |
| | | public Object[][] validData() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Valid IPv6 expressions. |
| | | /** Valid IPv6 expressions. */ |
| | | @DataProvider(name = "valid6Rules") |
| | | public Object[][] valid6Data() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Invalid Ipv4 expressions. |
| | | /** Invalid Ipv4 expressions. */ |
| | | @DataProvider(name = "invalidRules") |
| | | public Object[][] inValidData() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Invalid IPv6 expressions. |
| | | /** Invalid IPv6 expressions. */ |
| | | @DataProvider(name = "invalid6Rules") |
| | | public Object[][] inValid6Data() { |
| | | return new Object[][] { |
| | |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | /** |
| | | * Unit test to test the proxy bind functionality. |
| | | */ |
| | | |
| | | |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | | import java.util.Hashtable; |
| | |
| | | import org.testng.annotations.BeforeMethod; |
| | | import org.testng.annotations.Test; |
| | | |
| | | /* |
| | | * This test tests the proxy bind access control support added to allow |
| | | * authzid's in Sasl Binds. |
| | | /** |
| | | * Tests the proxy bind functionality, via the proxy bind access control support |
| | | * added to allow authzid's in Sasl Binds. |
| | | */ |
| | | |
| | | public class ProxyBindTestCase extends AciTestCase { |
| | | private static final String factory = "com.sun.jndi.ldap.LdapCtxFactory"; |
| | | private static final String aciEntry = "o=test"; |
| | |
| | | "uid=smart referral admin,uid=proxyuser,ou=admins," + suffix; |
| | | private static final String ctrlString = OID_MANAGE_DSAIT_CONTROL + ":false"; |
| | | |
| | | //Allow based on plus operator. |
| | | /** Allow based on plus operator. */ |
| | | private static final |
| | | String ALLOW_OC_PLUS = "(targetattr=\"objectclass || +\")" + |
| | | "(version 3.0;acl \"plus\";" + |
| | | "allow (search, read) " + |
| | | "userdn=\"ldap:///" + level5User + "\";)"; |
| | | |
| | | //Allow based on ref name. |
| | | /** Allow based on ref name. */ |
| | | private static final |
| | | String ALLOW_OC = "(targetattr=\"objectclass || ref\")" + |
| | | "(version 3.0;acl \"ref name\";" + |
| | | "allow (search, read) " + |
| | | "userdn=\"ldap:///" + level5User + "\";)"; |
| | | |
| | | //Allow based on target keyword. |
| | | /** Allow based on target keyword. */ |
| | | private static final |
| | | String ALLOW_PEOPLE = |
| | | "(target=\"ldap:///" + peopleBase + "\")" + |
| | |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | /** |
| | | * Unit test to test the ssf ACI bind rule keyword. |
| | | */ |
| | | |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | | import java.util.Hashtable; |
| | |
| | | import org.testng.annotations.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | |
| | | /** |
| | | * Unit test to test the ssf ACI bind rule keyword. |
| | | */ |
| | | public class SSFTestCase extends AciTestCase { |
| | | |
| | | private static final String newUser="uid=new.user,ou=People,o=test"; |
| | |
| | | |
| | | } |
| | | |
| | | //Valid ssf statements. Not the complete ACI. |
| | | /** Valid ssf statements. Not the complete ACI. */ |
| | | @DataProvider(name = "validStatements") |
| | | public Object[][] valids() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Invalid ssf statements. Not the complete ACI. |
| | | /** Invalid ssf statements. Not the complete ACI. */ |
| | | @DataProvider(name = "invalidStatements") |
| | | public Object[][] invalids() { |
| | | return new Object[][] { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | | import org.testng.annotations.DataProvider; |
| | |
| | | */ |
| | | public class TargAttrFiltersTestCase extends AciTestCase { |
| | | |
| | | //Valid targattrfilters statements. Not the complete ACI. |
| | | /** Valid targattrfilters statements. Not the complete ACI. */ |
| | | @DataProvider(name = "validStatements") |
| | | public Object[][] valids() { |
| | | return new Object[][] { |
| | |
| | | }; |
| | | } |
| | | |
| | | //Invalid targattrfilters statements. |
| | | /** Invalid targattrfilters statements. */ |
| | | @DataProvider(name = "invalidStatements") |
| | | public Object[][] invalids() { |
| | | return new Object[][] { |
| | |
| | | return new ModifyDNMsg(localOp); |
| | | } |
| | | |
| | | //TODO : share this code with other classes ? |
| | | /** TODO : share this code with other classes ? */ |
| | | private void waitForSearchOpResult(Operation operation, ResultCode expectedResult) throws Exception |
| | | { |
| | | int i = 0; |
| | |
| | | */ |
| | | public class SchemaTestMatchingRuleImpl implements MatchingRuleImpl |
| | | { |
| | | // The matching rule impl that will do all the real work behind the scenes. |
| | | /** The matching rule impl that will do all the real work behind the scenes. */ |
| | | private final MatchingRule caseIgnoreMatchingRule; |
| | | |
| | | /** |
| | |
| | | TestCaseUtils.disableBackend("importRoot"); |
| | | } |
| | | |
| | | // Note: this test has been rewritten to avoid expectedException in the test annotation because |
| | | // it was skipping all tests that depends on this method |
| | | /** |
| | | * Note: this test has been rewritten to avoid expectedException in the test annotation because |
| | | * it was skipping all tests that depends on this method |
| | | */ |
| | | @Test |
| | | public void testAddNoParent() throws Exception { |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | |
| | | private String beID="indexRoot"; |
| | | private BackendImpl be; |
| | | |
| | | // The DN for "Aaccf Johnson" |
| | | /** The DN for "Aaccf Johnson". */ |
| | | private DN aaccfJohnsonDN; |
| | | |
| | | // The DN for "Aaron Zimmerman" |
| | | /** The DN for "Aaron Zimmerman". */ |
| | | private DN aaronZimmermanDN; |
| | | |
| | | // The DN for "Albert Smith" |
| | | /** The DN for "Albert Smith". */ |
| | | private DN albertSmithDN; |
| | | |
| | | // The DN for "Albert Zimmerman" |
| | | /** The DN for "Albert Zimmerman". */ |
| | | private DN albertZimmermanDN; |
| | | |
| | | // The DN for "lowercase mcgee" |
| | | /** The DN for "lowercase mcgee". */ |
| | | private DN lowercaseMcGeeDN; |
| | | |
| | | // The DN for "Mararet Jones" |
| | | /** The DN for "Mararet Jones". */ |
| | | private DN margaretJonesDN; |
| | | |
| | | // The DN for "Mary Jones" |
| | | /** The DN for "Mary Jones". */ |
| | | private DN maryJonesDN; |
| | | |
| | | // The DN for "Sam Zweck" |
| | | /** The DN for "Sam Zweck". */ |
| | | private DN samZweckDN; |
| | | |
| | | // The DN for "Zorro" |
| | | /** The DN for "Zorro". */ |
| | | private DN zorroDN; |
| | | |
| | | // The DN for suffix |
| | | /** The DN for suffix. */ |
| | | private DN suffixDN; |
| | | |
| | | private TreeSet<SortValues> expectedSortedValues; |
| | | |
| | | private List<Entry> entries; |
| | | |
| | | @BeforeClass |
| | |
| | | { |
| | | |
| | | /** |
| | | * Create values for External Changelog Request Control |
| | | * Create values for External Changelog Request Control. |
| | | */ |
| | | @DataProvider(name = "eclRequestControl") |
| | | public Object[][] createECLRequestControlTest() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test ExternalChangelogRequestControl |
| | | * Test ExternalChangelogRequestControl. |
| | | */ |
| | | @Test(dataProvider = "eclRequestControl") |
| | | public void checkECLRequestControlTest(boolean critical, String value) |
| | |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** |
| | | * Test password control |
| | | * Test password control. |
| | | */ |
| | | public class PasswordControlTest |
| | | extends ControlsTestCase |
| | | { |
| | | |
| | | /** |
| | | * Create values for PasswordPolicyErrorType |
| | | * Create values for PasswordPolicyErrorType. |
| | | */ |
| | | @DataProvider(name = "passwordPolicyErrorTypeData") |
| | | public Object[][] createPasswordPolicyErrorTypeData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test if int value are ok |
| | | * Test if int value are ok. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyErrorTypeData") |
| | | public void checkIntValuePasswordPolicyErrorTypeTest( |
| | |
| | | |
| | | |
| | | /** |
| | | * Test If we have only the required values |
| | | * Test If we have only the required values. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyErrorTypeData") |
| | | public void checkRequiredValuesPasswordPolicyErrorTypeTest( |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test invalid int values |
| | | * Test invalid int values. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyErrorTypeData") |
| | | public void checkInvalidIntPasswordPolicyErrorTypeTest( |
| | |
| | | } |
| | | |
| | | /** |
| | | * Create correct values |
| | | * Create correct values. |
| | | */ |
| | | @DataProvider(name = "passwordPolicyWarningTypeData") |
| | | public Object[][] createPasswordPolicyWarningTypeData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test if byte values are ok |
| | | * Test if byte values are ok. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyWarningTypeData") |
| | | public void checkIntValuePasswordPolicyWarningTypeTest( |
| | |
| | | |
| | | |
| | | /** |
| | | * Test If we have only the required values |
| | | * Test If we have only the required values. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyWarningTypeData") |
| | | public void checkRequiredValuesPasswordPolicyWarningTypeTest( |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test invalid int values |
| | | * Test invalid int values. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyWarningTypeData") |
| | | public void checkInvalidIntPasswordPolicyWarningTypeTest( |
| | |
| | | } |
| | | |
| | | /** |
| | | * Create values for PasswordExpiredControl |
| | | * Create values for PasswordExpiredControl. |
| | | */ |
| | | @DataProvider(name = "passwordExpiredControlData") |
| | | public Object[][] createPasswordExpiredControlData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test OID |
| | | * Test OID. |
| | | */ |
| | | @Test |
| | | public void checkPasswordOID() throws Exception |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test "Netscape password expired control" implementation |
| | | * Test "Netscape password expired control" implementation. |
| | | */ |
| | | @Test(dataProvider = "passwordExpiredControlData") |
| | | public void passwordExpiredControlTest( |
| | |
| | | } |
| | | |
| | | /** |
| | | * Create values for PasswordControl |
| | | * Create values for PasswordControl. |
| | | */ |
| | | @DataProvider(name = "passwordExpiringControlData") |
| | | public Object[][] createPasswordExpiringControlData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test "Netscape password expired control" implementation |
| | | * Test "Netscape password expired control" implementation. |
| | | */ |
| | | @Test(dataProvider = "passwordExpiringControlData") |
| | | public void passwordExpiringControlTest( |
| | |
| | | } |
| | | |
| | | /** |
| | | * Create values for PasswordControl |
| | | * Create values for PasswordControl. |
| | | */ |
| | | @DataProvider(name = "passwordPolicyRequestControlData") |
| | | public Object[][] createPasswordPolicyRequestControlData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test PasswordPolicyRequestControl |
| | | * Test PasswordPolicyRequestControl. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyRequestControlData") |
| | | public void passwordPolicyRequestControlTest( |
| | |
| | | |
| | | |
| | | /** |
| | | * Create values for PasswordControl |
| | | * Create values for PasswordControl. |
| | | */ |
| | | @DataProvider(name = "passwordPolicyResponseControl") |
| | | public Object[][] createPasswordPolicyResponseControlData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test PasswordPolicyResponseControl |
| | | * Test PasswordPolicyResponseControl. |
| | | */ |
| | | @Test(dataProvider = "passwordPolicyResponseControl") |
| | | public void passwordPolicyResponseControlTest( |
| | |
| | | "Cannot decode the provided persistent search control because it does not have a value"; |
| | | |
| | | /** |
| | | * Create correct values |
| | | * Create correct values. |
| | | */ |
| | | @DataProvider(name = "persistentSearchChangeTypeData") |
| | | public Object[][] createPersistentSearchChangeTypeData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test if int value are ok |
| | | * Test if int value are ok. |
| | | */ |
| | | @Test(dataProvider = "persistentSearchChangeTypeData") |
| | | public void checkIntValueTest(Map<Integer, String> expectedValues) |
| | |
| | | |
| | | |
| | | /** |
| | | * Test If we have only the required values |
| | | * Test If we have only the required values. |
| | | */ |
| | | @Test(dataProvider = "persistentSearchChangeTypeData") |
| | | public void checkRequiredValuesTest(Map<Integer, String> exceptedValues) |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test invalid int values |
| | | * Test invalid int values. |
| | | */ |
| | | @Test(dataProvider = "persistentSearchChangeTypeData") |
| | | public void checkInvalidIntTest(Map<Integer, String> exceptedValues) |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test int to type |
| | | * Test int to type. |
| | | */ |
| | | @Test(dataProvider = "persistentSearchChangeTypeData") |
| | | public void checkIntToTypeTest(Map<Integer, String> exceptedValues) |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test type to int |
| | | * Test type to int. |
| | | */ |
| | | @Test(dataProvider = "persistentSearchChangeTypeData", dependsOnMethods= {"checkIntToTypeTest"}) |
| | | public void checkTypesToIntTest(Map<Integer, String> exceptedValues) |
| | |
| | | } |
| | | |
| | | /** |
| | | * Create values for PersistentSearchControl |
| | | * Create values for PersistentSearchControl. |
| | | */ |
| | | @DataProvider(name = "persistentSearchControl") |
| | | public Object[][] createPasswordPolicyResponseControlData() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test PersistentSearchControl |
| | | * Test PersistentSearchControl. |
| | | */ |
| | | @Test(dataProvider = "persistentSearchControl") |
| | | public void checkPersistentSearchControlTest( |
| | |
| | | |
| | | |
| | | /** |
| | | * Create values for EntryChangeNotificationControl |
| | | * Create values for EntryChangeNotificationControl. |
| | | */ |
| | | @DataProvider(name = "entryChangeNotificationControl") |
| | | public Object[][] createEntryChangeNotificationControlData() |
| | |
| | | { false, 4, "cn= new test, dc=example,dc=com" } }; |
| | | } |
| | | /** |
| | | * Test EntryChangeNotificationControl |
| | | * Test EntryChangeNotificationControl. |
| | | */ |
| | | @Test(dataProvider = "entryChangeNotificationControl") |
| | | public void checkEntryChangeNotificationControlTest( |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.controls; |
| | | |
| | |
| | | public class ServerSideSortControlTestCase |
| | | extends ControlsTestCase |
| | | { |
| | | // The givenName attribute type. |
| | | /** The givenName attribute type. */ |
| | | private AttributeType givenNameType; |
| | | |
| | | // The sn attribute type. |
| | | /** The sn attribute type. */ |
| | | private AttributeType snType; |
| | | |
| | | // The DN for "Aaccf Johnson" |
| | | /** The DN for "Aaccf Johnson". */ |
| | | DN aaccfJohnsonDN; |
| | | |
| | | // The DN for "Aaron Zimmerman" |
| | | /** The DN for "Aaron Zimmerman". */ |
| | | DN aaronZimmermanDN; |
| | | |
| | | // The DN for "Albert Smith" |
| | | /** The DN for "Albert Smith". */ |
| | | DN albertSmithDN; |
| | | |
| | | // The DN for "Albert Zimmerman" |
| | | /** The DN for "Albert Zimmerman". */ |
| | | DN albertZimmermanDN; |
| | | |
| | | // The DN for "lowercase mcgee" |
| | | /** The DN for "lowercase mcgee". */ |
| | | DN lowercaseMcGeeDN; |
| | | |
| | | // The DN for "Mararet Jones" |
| | | /** The DN for "Mararet Jones". */ |
| | | DN margaretJonesDN; |
| | | |
| | | // The DN for "Mary Jones" |
| | | /** The DN for "Mary Jones". */ |
| | | DN maryJonesDN; |
| | | |
| | | // The DN for "Sam Zweck" |
| | | /** The DN for "Sam Zweck". */ |
| | | DN samZweckDN; |
| | | |
| | | // The DN for "Zorro" |
| | | /** The DN for "Zorro". */ |
| | | DN zorroDN; |
| | | |
| | | |
| | |
| | | public class VLVControlTestCase |
| | | extends ControlsTestCase |
| | | { |
| | | // The givenName attribute type. |
| | | /** The givenName attribute type. */ |
| | | private AttributeType givenNameType; |
| | | |
| | | // The sn attribute type. |
| | | /** The sn attribute type. */ |
| | | private AttributeType snType; |
| | | |
| | | // The DN for "Aaccf Johnson" |
| | | /** The DN for "Aaccf Johnson". */ |
| | | private DN aaccfJohnsonDN; |
| | | |
| | | // The DN for "Aaron Zimmerman" |
| | | /** The DN for "Aaron Zimmerman". */ |
| | | private DN aaronZimmermanDN; |
| | | |
| | | // The DN for "Albert Smith" |
| | | /** The DN for "Albert Smith". */ |
| | | private DN albertSmithDN; |
| | | |
| | | // The DN for "Albert Zimmerman" |
| | | /** The DN for "Albert Zimmerman". */ |
| | | private DN albertZimmermanDN; |
| | | |
| | | // The DN for "lowercase mcgee" |
| | | /** The DN for "lowercase mcgee". */ |
| | | private DN lowercaseMcGeeDN; |
| | | |
| | | // The DN for "Mararet Jones" |
| | | /** The DN for "Mararet Jones". */ |
| | | private DN margaretJonesDN; |
| | | |
| | | // The DN for "Mary Jones" |
| | | /** The DN for "Mary Jones". */ |
| | | private DN maryJonesDN; |
| | | |
| | | // The DN for "Sam Zweck" |
| | | /** The DN for "Sam Zweck". */ |
| | | private DN samZweckDN; |
| | | |
| | | // The DN for "Zorro" |
| | | /** The DN for "Zorro". */ |
| | | private DN zorroDN; |
| | | |
| | | |
| | |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** |
| | | * A set of test cases for abandon operations |
| | | * A set of test cases for abandon operations. |
| | | */ |
| | | public class AbandonOperationTestCase |
| | | extends OperationTestCase |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected Operation[] createTestOperations() |
| | | throws Exception |
| | |
| | | configHandler.addEntry(new LinkedHashMapEntry(DN_CORE_SCHEMA)); |
| | | } |
| | | |
| | | // TODO : disabled because fail when converting to server DN. Re-enable once migrated to SDK DN. |
| | | /** TODO : disabled because fail when converting to server DN. Re-enable once migrated to SDK DN. */ |
| | | @Test(enabled=false, expectedExceptions=DirectoryException.class) |
| | | public void testAddEntryParentUnknown() throws Exception |
| | | { |
| | |
| | | assertFalse(configHandler.hasEntry(DN_CORE_SCHEMA)); |
| | | } |
| | | |
| | | // TODO : disabled because fail when converting to server DN. Re-enable once migrated to SDK DN. |
| | | /** TODO : disabled because fail when converting to server DN. Re-enable once migrated to SDK DN. */ |
| | | @Test(enabled=false, expectedExceptions=DirectoryException.class) |
| | | public void testDeleteEntryUnexistingEntry() throws Exception |
| | | { |
| | |
| | | configHandler.deleteEntry(DN_SCHEMA_PROVIDERS); |
| | | } |
| | | |
| | | // TODO : disabled because fail when converting to server DN. Re-enable once migrated to SDK DN. |
| | | /** TODO : disabled because fail when converting to server DN. Re-enable once migrated to SDK DN. */ |
| | | @Test(enabled=false, expectedExceptions=DirectoryException.class) |
| | | public void testDeleteEntryUnknownParent() throws Exception |
| | | { |
| | |
| | | import org.testng.annotations.Test; |
| | | |
| | | /** |
| | | * A set of generic test cases for operations |
| | | * A set of generic test cases for operations. |
| | | */ |
| | | public abstract class OperationTestCase |
| | | extends CoreTestCase |
| | |
| | | } |
| | | |
| | | |
| | | //Sets a value of the allid threshold. |
| | | /** Sets a value of the allid threshold. */ |
| | | private void setAllIdThreshold(int value) throws Exception |
| | | { |
| | | //Change the allid threshold value. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.core; |
| | | |
| | | import java.util.HashMap; |
| | |
| | | * An abstract base class for all subtree specification tests. |
| | | */ |
| | | public abstract class SubtreeSpecificationTestCase extends CoreTestCase { |
| | | // Cached set of entry object classes. |
| | | /** Cached set of entry object classes. */ |
| | | private Set<ObjectClass> objectClasses; |
| | | |
| | | /** |
| | |
| | | // assertEquals(InvocationCounterPlugin.getPostResponseCount(), 1); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected Operation[] createTestOperations() throws Exception |
| | | { |
| | |
| | | |
| | | /** |
| | | * Test if it's possible to modify an rdn to a value that matches the current value |
| | | * by changing the case of some characters |
| | | * by changing the case of some characters. |
| | | */ |
| | | @Test |
| | | public void testModifySameDN() throws Exception |
| | |
| | | } |
| | | |
| | | /** |
| | | * Add another attribute to the RDN and change case of the existing value |
| | | * Add another attribute to the RDN and change case of the existing value. |
| | | */ |
| | | @Test |
| | | public void testModifyDNchangeCaseAndAddValue() throws Exception |
| | |
| | | } |
| | | |
| | | /** |
| | | * Add a value to the RDN which is already part of the entry, but with another string representation |
| | | * Add a value to the RDN which is already part of the entry, but with another string representation. |
| | | */ |
| | | @Test |
| | | public void testModifyDNchangeCaseOfExistingEntryValue() throws Exception |
| | |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** |
| | | * A set of test cases for unbind operations |
| | | * A set of test cases for unbind operations. |
| | | */ |
| | | public class UnbindOperationTestCase extends OperationTestCase |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2010-2014 ForgeRock AS. |
| | | * Portions Copyright 2010-2015 ForgeRock AS. |
| | | * Portions Copyright 2012 Dariusz Janny <dariusz.janny@gmail.com> |
| | | */ |
| | | package org.opends.server.extensions; |
| | |
| | | public class CryptPasswordStorageSchemeTestCase |
| | | extends ExtensionsTestCase |
| | | { |
| | | // Names of all the crypt algorithms we want to test. |
| | | /** Names of all the crypt algorithms we want to test. */ |
| | | private static final String[] names = { "unix", "md5", "sha256", "sha512" }; |
| | | |
| | | /** |
| | |
| | | Entry cacheSoftReferenceConfigEntry; |
| | | Entry cacheFIFOConfigEntry; |
| | | |
| | | // The entry cache order map sorted by the cache level. |
| | | /** The entry cache order map sorted by the cache level. */ |
| | | private SortedMap<Integer, EntryCache<? extends EntryCacheCfg>> |
| | | cacheOrderMap = new TreeMap<Integer, |
| | | EntryCache<? extends EntryCacheCfg>>(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testContainsEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry1() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry2() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry3() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntryID() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testPutEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testPutEntryIfAbsent() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testRemoveEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClear() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClearBackend() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClearSubtree() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testHandleLowMemory() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test(groups = { "slow", "testDefaultCacheConcurrency" }, |
| | | threadPoolSize = 10, |
| | | invocationCount = 10, |
| | |
| | | public class EntryDNVirtualAttributeProviderTestCase |
| | | extends ExtensionsTestCase |
| | | { |
| | | // The attribute type for the entryDN attribute. |
| | | /** The attribute type for the entryDN attribute. */ |
| | | private AttributeType entryDNType; |
| | | |
| | | |
| | |
| | | public class EntryUUIDVirtualAttributeProviderTestCase |
| | | extends ExtensionsTestCase |
| | | { |
| | | // The attribute type for the entryUUID attribute. |
| | | /** The attribute type for the entryUUID attribute. */ |
| | | private AttributeType entryUUIDType; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testContainsEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry1() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry2() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry3() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntryID() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testPutEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testPutEntryIfAbsent() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testRemoveEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClear() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClearBackend() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClearSubtree() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testHandleLowMemory() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test(groups = { "slow", "testFIFOCacheConcurrency" }, |
| | | threadPoolSize = 10, |
| | | invocationCount = 10, |
| | |
| | | public class GoverningStructureRuleVirtualAttributeProviderTestCase |
| | | extends ExtensionsTestCase |
| | | { |
| | | // The attribute type for the governingStructureRule attribute. |
| | | /** The attribute type for the governingStructureRule attribute. */ |
| | | private AttributeType governingStructureRuleType; |
| | | |
| | | |
| | |
| | | |
| | | @SuppressWarnings("javadoc") |
| | | public class HasSubordinatesVirtualAttributeProviderTestCase extends DirectoryServerTestCase { |
| | | // The attribute type for the hasSubordinates attribute. |
| | | /** The attribute type for the hasSubordinates attribute. */ |
| | | private AttributeType hasSubordinatesType; |
| | | |
| | | private List<Entry> entries; |
| | |
| | | this.getConnectionEvent = getConnectionEvent; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | boolean matchesEvent(final Event<?> event) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | this.resultCode = resultCode; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | DirectoryException getResult() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | boolean matchesEvent(final Event<?> event) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | boolean matchesEvent(final Event<?> event) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void close() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ByteString search(final DN baseDN, final SearchScope scope, |
| | | final SearchFilter filter) throws DirectoryException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void simpleBind(final ByteString username, final ByteString password) |
| | | throws DirectoryException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void close() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Connection getConnection() throws DirectoryException |
| | | { |
| | |
| | | private MappingPolicy mappingPolicy = MappingPolicy.UNMAPPED; |
| | | private final SortedSet<String> primaryServers = new TreeSet<String>(); |
| | | private final SortedSet<String> secondaryServers = new TreeSet<String>(); |
| | | private int timeoutMS; // unlimited |
| | | /** Unlimited. */ |
| | | private int timeoutMS; |
| | | private DN mappedSearchBindDN = searchBindDN; |
| | | private String mappedSearchBindPassword = "searchPassword"; |
| | | private String mappedSearchBindPasswordEnvVar; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getMappedSearchBindPasswordEnvironmentVariable() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getMappedSearchBindPasswordFile() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getMappedSearchBindPasswordProperty() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public long getCachedPasswordTTL() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getCachedPasswordStorageScheme() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DN getCachedPasswordStorageSchemeDN() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isUsePasswordCaching() |
| | | { |
| | |
| | | private final List<MockScheduledFuture> monitorRunnables = new LinkedList<MockScheduledFuture>(); |
| | | private String currentTime = TimeThread.getGMTTime(); |
| | | |
| | | // All methods unused excepted scheduleWithFixedDelay. |
| | | /** All methods unused excepted scheduleWithFixedDelay. */ |
| | | private final ScheduledExecutorService mockScheduler = new ScheduledExecutorService() |
| | | { |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConnectionFactory getLDAPConnectionFactory(final String host, |
| | | final int port, final LDAPPassThroughAuthenticationPolicyCfg options) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ScheduledExecutorService getScheduledExecutorService() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String getCurrentTime() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public long getCurrentTimeMS() |
| | | { |
| | |
| | | |
| | | final class MockServer |
| | | { |
| | | // Waits for an incoming client connection. |
| | | /** Waits for an incoming client connection. */ |
| | | class AcceptAction extends Action |
| | | { |
| | | @Override |
| | |
| | | |
| | | |
| | | |
| | | // Blocks the server until it is released. |
| | | /** Blocks the server until it is released. */ |
| | | class BlockAction extends Action |
| | | { |
| | | private final CountDownLatch latch = new CountDownLatch(1); |
| | |
| | | |
| | | |
| | | |
| | | // Close the client socket. |
| | | /** Close the client socket. */ |
| | | class CloseAction extends Action |
| | | { |
| | | @Override |
| | |
| | | |
| | | |
| | | |
| | | // Read the next message and check it matches the expected message. |
| | | /** Read the next message and check it matches the expected message. */ |
| | | class ReceiveAction extends Action |
| | | { |
| | | private final int messageID; |
| | |
| | | |
| | | |
| | | |
| | | // Sends a message. |
| | | /** Sends a message. */ |
| | | class SendAction extends Action |
| | | { |
| | | private final int messageID; |
| | |
| | | { |
| | | serverThread = new Thread(new Runnable() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void run() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | Object getResult() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | boolean matchesEvent(final Event<?> event) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | DirectoryException getResult() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | boolean matchesEvent(final Event<?> event) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | StringBuilder toString(final StringBuilder builder) |
| | | { |
| | |
| | | |
| | | @SuppressWarnings("javadoc") |
| | | public class NumSubordinatesVirtualAttributeProviderTestCase extends DirectoryServerTestCase { |
| | | // The attribute type for the numSubordinates attribute. |
| | | /** The attribute type for the numSubordinates attribute. */ |
| | | private AttributeType numSubordinatesType; |
| | | |
| | | private List<Entry> entries; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testContainsEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry1() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry2() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntry3() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testGetEntryID() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testPutEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testPutEntryIfAbsent() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testRemoveEntry() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClear() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClearBackend() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testClearSubtree() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test |
| | | @Override |
| | | public void testHandleLowMemory() |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Test(groups = { "slow", "testSoftRefCacheConcurrency" }, |
| | | threadPoolSize = 10, |
| | | invocationCount = 10, |
| | |
| | | public class StructuralObjectClassVirtualAttributeProviderTestCase |
| | | extends ExtensionsTestCase |
| | | { |
| | | // The attribute type for the structuralobjectclass attribute. |
| | | /** The attribute type for the structuralobjectclass attribute. */ |
| | | private AttributeType structuralObjectClassType; |
| | | |
| | | |
| | |
| | | public class SubschemaSubentryVirtualAttributeProviderTestCase |
| | | extends ExtensionsTestCase |
| | | { |
| | | // The attribute type for the subschemaSubentry attribute. |
| | | /** The attribute type for the subschemaSubentry attribute. */ |
| | | private AttributeType subschemaSubentryType; |
| | | |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2012-2013 ForgeRock AS |
| | | * Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | { |
| | | |
| | | /** |
| | | * Cipher suite hardcoded from the IANA registry on internet |
| | | * Cipher suite hardcoded from the IANA registry on internet. |
| | | */ |
| | | static final String[][] HARDCODED_CIPHER_SUITE = new String[][] { |
| | | { "TLS_NULL_WITH_NULL_NULL" }, |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | | |
| | | |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | import org.opends.server.admin.std.server. |
| | |
| | | import org.opends.server.types.AccountStatusNotification; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.types.AccountStatusNotificationProperty.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class implements a simple account status notification handler that may |
| | | * be used to ensure that all notifications are generated properly. |
| | |
| | | public class TestAccountStatusNotificationHandler |
| | | extends AccountStatusNotificationHandler<AccountStatusNotificationHandlerCfg> |
| | | { |
| | | // The number of notifications that this handler has processed. |
| | | /** The number of notifications that this handler has processed. */ |
| | | private static AtomicInteger notificationsProcessed = new AtomicInteger(0); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeStatusNotificationHandler( |
| | | AccountStatusNotificationHandlerCfg configuration) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void handleStatusNotification(AccountStatusNotification notification) |
| | | { |
| | | notificationsProcessed.incrementAndGet(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // The DN of the "configuration entry" for this alert generator. |
| | | /** The DN of the "configuration entry" for this alert generator. */ |
| | | private DN configEntryDN; |
| | | |
| | | // The alert description used for testing purposes. |
| | | /** The alert description used for testing purposes. */ |
| | | private String alertDescription; |
| | | |
| | | // The alert type used for testing purposes. |
| | | /** The alert type used for testing purposes. */ |
| | | private String alertType; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public DN getComponentEntryDN() |
| | | { |
| | | return configEntryDN; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getClassName() |
| | | { |
| | | return CLASS_NAME; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LinkedHashMap<String,String> getAlerts() |
| | | { |
| | | LinkedHashMap<String,String> alerts = new LinkedHashMap<String,String>(); |
| | |
| | | |
| | | |
| | | |
| | | // The next value to return from the passwordIsAcceptable method. |
| | | /** The next value to return from the passwordIsAcceptable method. */ |
| | | private boolean nextReturnValue; |
| | | |
| | | // The last new password provided to the passwordIsAcceptable method. |
| | | /** The last new password provided to the passwordIsAcceptable method. */ |
| | | private ByteString lastNewPassword; |
| | | |
| | | // The last user entry provided to the passwordIsAcceptable method. |
| | | /** The last user entry provided to the passwordIsAcceptable method. */ |
| | | private Entry lastUserEntry; |
| | | |
| | | // The last operation provided to the passwordIsAcceptable method. |
| | | /** The last operation provided to the passwordIsAcceptable method. */ |
| | | private Operation lastOperation; |
| | | |
| | | // The last set of current passwords provided to the passwordIsAcceptable |
| | | // method. |
| | | /** |
| | | * The last set of current passwords provided to the passwordIsAcceptable method. |
| | | */ |
| | | private Set<ByteString> lastCurrentPasswords; |
| | | |
| | | // The next invalid reason that should be used in the passwordIsAcceptable |
| | | // method. |
| | | /** |
| | | * The next invalid reason that should be used in the passwordIsAcceptable method. |
| | | */ |
| | | private String nextInvalidReason; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializePasswordValidator( |
| | | PasswordValidatorCfg configuration) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean passwordIsAcceptable(ByteString newPassword, |
| | | Set<ByteString> currentPasswords, |
| | |
| | | |
| | | |
| | | |
| | | // The attribute type for the member attribute. |
| | | /** The attribute type for the member attribute. */ |
| | | private AttributeType memberType; |
| | | |
| | | // The attribute type for the uniqueMember attribute. |
| | | /** The attribute type for the uniqueMember attribute. */ |
| | | private AttributeType uniqueMemberType; |
| | | |
| | | // The server group manager. |
| | | /** The server group manager. */ |
| | | private GroupManager groupManager; |
| | | |
| | | // The DNs of the various entries in the data set. |
| | | /** The DNs of the various entries in the data set. */ |
| | | private DN u1; |
| | | private DN u2; |
| | | private DN u3; |
| | |
| | | public abstract class GenericMonitorTestCase |
| | | extends MonitorTestCase |
| | | { |
| | | // The configuration entry for this test case. |
| | | /** The configuration entry for this test case. */ |
| | | protected ConfigEntry configEntry; |
| | | |
| | | |
| | |
| | | private static final class Decoder |
| | | implements ControlDecoder<DelayRequestControl> |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DelayRequestControl decode(boolean isCritical, ByteString value) |
| | | throws DirectoryException |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializePlugin(Set<PluginType> pluginTypes, |
| | | PluginCfg configuration) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationBindOperation bindOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationCompareOperation compareOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationDeleteOperation deleteOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationExtendedOperation extendedOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationSearchOperation searchOperation) |
| | |
| | | private static final class Decoder |
| | | implements ControlDecoder<DisconnectClientControl> |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DisconnectClientControl decode(boolean isCritical, ByteString value) throws DirectoryException |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializePlugin(Set<PluginType> pluginTypes, |
| | | PluginCfg configuration) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse doPreParse( |
| | | PreParseAbandonOperation abandonOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse doPreParse(PreParseAddOperation addOperation) |
| | | throws CanceledOperationException { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse doPreParse(PreParseBindOperation bindOperation) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseCompareOperation compareOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseDeleteOperation deleteOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseExtendedOperation extendedOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseModifyOperation modifyOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseModifyDNOperation modifyDNOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseSearchOperation searchOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseUnbindOperation unbindOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationBindOperation bindOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationCompareOperation compareOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationDeleteOperation deleteOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationExtendedOperation extendedOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationSearchOperation searchOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationAbandonOperation abandonOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationAddOperation addOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationBindOperation bindOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationCompareOperation compareOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationDeleteOperation deleteOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationExtendedOperation extendedOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationModifyOperation modifyOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationModifyDNOperation modifyDNOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationSearchOperation searchOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationUnbindOperation unbindOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseAddOperation addOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseBindOperation bindOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseCompareOperation compareOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseDeleteOperation deleteOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseExtendedOperation extendedOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseModifyOperation modifyOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseModifyDNOperation modifyDNOperation) |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseSearchOperation searchOperation) |
| opendj-server-legacy/src/test/java/org/opends/server/plugins/InvocationCounterPlugin.java
opendj-server-legacy/src/test/java/org/opends/server/plugins/NullPlugin.java
opendj-server-legacy/src/test/java/org/opends/server/plugins/ShortCircuitPlugin.java
opendj-server-legacy/src/test/java/org/opends/server/plugins/UpdatePreOpPlugin.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/internal/TestInternalSearchListener.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/jmx/JmxConnectTest.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/ASN1ByteChannelReaderTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestAddResponseProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestBindRequestProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestCompareRequestProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestCompareResponseProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestDeleteResponseProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestModifyDNResponseProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestModifyResponseProtocolOp.java
opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/InitOnLineTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/ProtocolWindowTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/ReSyncTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/ReplicationTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/replication/StressTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/common/CSNGeneratorTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/common/CSNTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/common/ServerStateTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrInfoTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/DomainFakeCfg.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ExternalChangelogDomainFakeCfg.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/GenerationIdChecksumTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/TopologyViewTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ValueInfoTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/SynchronizationMsgTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/MonitorTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/ReplServerFakeConfiguration.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/ReplicationServerDynamicConfTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/ReplicationServerTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/FileReplicaDBTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/LogTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/je/JEReplicaDBTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/service/ComputeBestServerTest.java
opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/AttributeTypeSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/BitStringSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/CertificateSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/CountryStringSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/DITContentRuleSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/EqualityMatchingRuleTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/GeneralizedTimeSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/GuideSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/IA5StringSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/IntegerSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/JPEGSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/MatchingRuleSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/MatchingRuleUseSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/OtherMailboxSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/TelexSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/TimeBasedMatchingRuleTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/UTCTimeSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/schema/UUIDSyntaxTest.java
opendj-server-legacy/src/test/java/org/opends/server/tasks/DummyTask.java
opendj-server-legacy/src/test/java/org/opends/server/tasks/LdifFileWriter.java
opendj-server-legacy/src/test/java/org/opends/server/tools/EncodePasswordTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPCompareTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPDeleteTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPPasswordModifyTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/LDIFDiffTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/ListBackendsTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/RebuildIndexTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/VerifyIndexTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/dsconfig/DsconfigLdapConnectionTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/tools/makeldif/MakeLDIFTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java
opendj-server-legacy/src/test/java/org/opends/server/types/TestAttributeType.java
opendj-server-legacy/src/test/java/org/opends/server/types/TestCommonSchemaElements.java
opendj-server-legacy/src/test/java/org/opends/server/types/TestObjectClass.java
opendj-server-legacy/src/test/java/org/opends/server/types/TestRDN.java
opendj-server-legacy/src/test/java/org/opends/server/types/TestSubtreeSpecification.java
opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeRuleTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/types/VirtualAttributeTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/util/CertificateManagerTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/util/PackageInfoTestCase.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestAddChangeRecordEntry.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestBase64.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestChangeRecordEntry.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestCrypt.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFWriter.java
opendj-server-legacy/src/test/java/org/opends/server/util/TestModifyChangeRecordEntry.java |