Examples of OidRegistry


Examples of org.apache.directory.server.schema.registries.OidRegistry

     * @return true if the objectClass values require the attribute, false otherwise
     * @throws Exception if the attribute is not recognized
     */
    private boolean isRequired( String attrId, EntryAttribute objectClasses ) throws Exception
    {
        OidRegistry oidRegistry = registries.getOidRegistry();
        ObjectClassRegistry registry = registries.getObjectClassRegistry();

        if ( !oidRegistry.hasOid( attrId ) )
        {
            return false;
        }

        String attrOid = oidRegistry.getOid( attrId );

        for ( Value<?> objectClass : objectClasses )
        {
            ObjectClass ocSpec = registry.lookup( objectClass.getString() );

View Full Code Here

Examples of org.apache.directory.server.schema.registries.OidRegistry

     */
    public void init( DirectoryService directoryService ) throws Exception
    {
        LOG.debug( "Initialiazing the NormalizationInterceptor" );
       
        OidRegistry oidRegistry = directoryService.getRegistries().getOidRegistry();
        attributeRegistry = directoryService.getRegistries().getAttributeTypeRegistry();
        NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( attributeRegistry, oidRegistry );
        normVisitor = new FilterNormalizingVisitor( ncn, directoryService.getRegistries() );
        attrNormalizers = attributeRegistry.getNormalizerMapping();
    }
View Full Code Here

Examples of org.apache.directory.server.schema.registries.OidRegistry

     * operations remove RDN attributes.
     */
    @Test
    public void testPreventRdnChangeOnModifyRemoveAttribute() throws Exception
    {
        OidRegistry registry = new MockOidRegistry();
        ModificationOperation mod = ModificationOperation.REMOVE_ATTRIBUTE;
        LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
        AttributeType cnAt = registries.getAttributeTypeRegistry().lookup( "cn" );
        AttributeType ouAt = registries.getAttributeTypeRegistry().lookup( "ou" );
        AttributeType snAt = registries.getAttributeTypeRegistry().lookup( "sn" );
View Full Code Here

Examples of org.apache.directory.server.schema.registries.OidRegistry

            // add all attribute oids of index configs to a hashset
            if ( override instanceof JdbmPartition )
            {
                Set<Index<?,ServerEntry>> indices = ( ( JdbmPartition ) override ).getIndexedAttributes();
                Set<String> indexOids = new HashSet<String>();
                OidRegistry registry = registries.getOidRegistry();

                for ( Index<?,ServerEntry> index : indices )
                {
                    indexOids.add( registry.getOid( index.getAttributeId() ) );
                }

                if ( ! indexOids.contains( registry.getOid( SchemaConstants.OBJECT_CLASS_AT ) ) )
                {
                    LOG.warn( "CAUTION: You have not included objectClass as an indexed attribute" +
                            "in the system partition configuration.  This will lead to poor " +
                            "performance.  The server is automatically adding this index for you." );
                    JdbmIndex<?,ServerEntry> index = new JdbmIndex<Object,ServerEntry>();
View Full Code Here

Examples of org.apache.directory.server.schema.registries.OidRegistry

        tupleCache = new TupleCache( adminSession );
        groupCache = new GroupCache( adminSession );
        registries = directoryService.getRegistries();
        atRegistry = registries.getAttributeTypeRegistry();
        OidRegistry oidRegistry = registries.getOidRegistry();
       
        // look up some constant information
        String objectClassOid = oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT );
        subentryOid = oidRegistry.getOid( SchemaConstants.SUBENTRY_OC );
        String acSubentryOid = oidRegistry.getOid( AC_SUBENTRY_ATTR );
        objectClassType = atRegistry.lookup( objectClassOid );
        acSubentryType = atRegistry.lookup( acSubentryOid );
        entryAciType = atRegistry.lookup( SchemaConstants.ENTRY_ACI_AT_OID );
        subentryAciType = atRegistry.lookup( SchemaConstants.SUBENTRY_ACI_AT_OID );
       
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.registries.OidRegistry

    private final boolean returnOperational;


    public DummyAttributeTypeRegistry( boolean returnOperational )
    {
        super( SchemaObjectType.ATTRIBUTE_TYPE, new OidRegistry() );
        this.returnOperational = returnOperational;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.registries.OidRegistry

    private final boolean returnOperational;


    public DummyAttributeTypeRegistry( boolean returnOperational )
    {
        super( SchemaObjectType.ATTRIBUTE_TYPE, new OidRegistry() );
        this.returnOperational = returnOperational;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.registries.OidRegistry

    private final boolean returnOperational;


    public DummyAttributeTypeRegistry(boolean returnOperational)
    {
        super( SchemaObjectType.ATTRIBUTE_TYPE, new OidRegistry() );
        this.returnOperational = returnOperational;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.registries.OidRegistry

    {
        LOG.info( "Initializing ..." );
        super.init( ds );
       
        this.ds = ds;
        OidRegistry oidRegistry = ds.getSchemaManager().getGlobalOidRegistry();
        SchemaManager schemaManager = ds.getSchemaManager();
        NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( schemaManager );
        filterNormalizer = new FilterNormalizingVisitor( ncn, schemaManager );
        evaluator = new ExpressionEvaluator( oidRegistry, schemaManager );
        executor = new ThreadPoolExecutor( 1, 10, 1000, TimeUnit.MILLISECONDS,
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.registries.OidRegistry

     * @return true if the objectClass values require the attribute, false otherwise
     * @throws Exception if the attribute is not recognized
     */
    private boolean isRequired( String attrId, EntryAttribute objectClasses ) throws Exception
    {
        OidRegistry oidRegistry = schemaManager.getGlobalOidRegistry();

        if ( !oidRegistry.contains( attrId ) )
        {
            return false;
        }

        String attrOid = schemaManager.getAttributeTypeRegistry().getOidByName( attrId );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.