• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SchemaConstants类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.directory.api.ldap.model.constants.SchemaConstants的典型用法代码示例。如果您正苦于以下问题:Java SchemaConstants类的具体用法?Java SchemaConstants怎么用?Java SchemaConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SchemaConstants类属于org.apache.directory.api.ldap.model.constants包,在下文中一共展示了SchemaConstants类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: exists

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean exists( Dn dn ) throws LdapException
{
    try
    {
        Entry entry = lookup( dn, SchemaConstants.NO_ATTRIBUTE_ARRAY );

        return entry != null;
    }
    catch ( LdapNoPermissionException lnpe )
    {
        // Special case to deal with insufficient permissions
        return false;
    }
    catch ( LdapException le )
    {
        throw le;
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:23,代码来源:LdapNetworkConnection.java


示例2: defineTriggerExecutionSpecificPoint

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * Defines the Administration point and administrative role for the TriggerExecution specific point
 * @param apCtx The administrative point context
 * @throws NamingException If the operation failed
 */
public static void defineTriggerExecutionSpecificPoint( LdapContext apCtx ) throws NamingException
{
    Attributes ap = apCtx.getAttributes( "", new String[] { SchemaConstants.ADMINISTRATIVE_ROLE_AT } );
    Attribute administrativeRole = ap.get( SchemaConstants.ADMINISTRATIVE_ROLE_AT );
    
    if ( administrativeRole == null
        || !AttributeUtils.containsValueCaseIgnore( administrativeRole, SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA ) )
    {
        Attributes changes = new BasicAttributes( SchemaConstants.ADMINISTRATIVE_ROLE_AT,
            SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA, true );
        apCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:19,代码来源:TriggerUtils.java


示例3: setUp

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception
{
    // DC normalizer
    OidNormalizer dcOidNormalizer = new OidNormalizer( "dc", new DeepTrimToLowerNormalizer(
        SchemaConstants.DOMAIN_COMPONENT_AT_OID ) );

    oids.put( "dc", dcOidNormalizer );
    oids.put( "domaincomponent", dcOidNormalizer );
    oids.put( "0.9.2342.19200300.100.1.25", dcOidNormalizer );

    // OU normalizer
    OidNormalizer ouOidNormalizer = new OidNormalizer( "ou", new DeepTrimToLowerNormalizer(
        SchemaConstants.OU_AT_OID ) );

    oids.put( "ou", ouOidNormalizer );
    oids.put( "organizationalUnitName", ouOidNormalizer );
    oids.put( "2.5.4.11", ouOidNormalizer );

    // ObjectClass normalizer
    OidNormalizer objectClassOidNormalizer = new OidNormalizer( "objectClass", new DeepTrimToLowerNormalizer(
        SchemaConstants.OBJECT_CLASS_AT_OID ) );

    oids.put( "objectclass", objectClassOidNormalizer );
    oids.put( "2.5.4.0", objectClassOidNormalizer );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SearchRequestMatchingRuleAssertionTest.java


示例4: createTriggerExecutionSubentry

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * Create the Trigger execution subentry
 * 
 * @param apCtx The administration point context
 * @param subentryCN The CN used by the suentry
 * @param subtreeSpec The subtree specification
 * @param prescriptiveTriggerSpec The prescriptive trigger specification
 * @throws NamingException If the operation failed
 */
public static void createTriggerExecutionSubentry(
    LdapContext apCtx,
    String subentryCN,
    String subtreeSpec,
    String prescriptiveTriggerSpec ) throws NamingException
{
    Attributes subentry = new BasicAttributes( SchemaConstants.CN_AT, subentryCN, true );
    Attribute objectClass = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT );
    subentry.put( objectClass );
    objectClass.add( SchemaConstants.TOP_OC );
    objectClass.add( SchemaConstants.SUBENTRY_OC );
    objectClass.add( SchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC );
    subentry.put( SchemaConstants.SUBTREE_SPECIFICATION_AT, subtreeSpec );
    subentry.put( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION_AT, prescriptiveTriggerSpec );
    apCtx.createSubcontext( "cn=" + subentryCN, subentry );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:26,代码来源:TriggerUtils.java


示例5: setUp

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    // DC normalizer
    OidNormalizer dcOidNormalizer = new OidNormalizer( "dc", new DeepTrimToLowerNormalizer(
        SchemaConstants.DOMAIN_COMPONENT_AT_OID ) );

    oids.put( "dc", dcOidNormalizer );
    oids.put( "domaincomponent", dcOidNormalizer );
    oids.put( "0.9.2342.19200300.100.1.25", dcOidNormalizer );

    // OU normalizer
    OidNormalizer ouOidNormalizer = new OidNormalizer( "ou", new DeepTrimToLowerNormalizer(
        SchemaConstants.OU_AT_OID ) );

    oids.put( "ou", ouOidNormalizer );
    oids.put( "organizationalUnitName", ouOidNormalizer );
    oids.put( "2.5.4.11", ouOidNormalizer );

    // ObjectClass normalizer
    OidNormalizer objectClassOidNormalizer = new OidNormalizer( "objectClass", new DeepTrimToLowerNormalizer(
        SchemaConstants.OBJECT_CLASS_AT_OID ) );

    oids.put( "objectclass", objectClassOidNormalizer );
    oids.put( "2.5.4.0", objectClassOidNormalizer );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SearchRequestTest.java


示例6: getEntry

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
private Entry getEntry( LdapComparatorDescription comparatorDescription )
{
    Entry entry = new DefaultEntry();

    entry.put( SchemaConstants.OBJECT_CLASS_AT,
        SchemaConstants.TOP_OC,
        MetaSchemaConstants.META_TOP_OC,
        MetaSchemaConstants.META_COMPARATOR_OC );

    entry.put( MetaSchemaConstants.M_OID_AT, comparatorDescription.getOid() );
    entry.put( MetaSchemaConstants.M_FQCN_AT, comparatorDescription.getFqcn() );

    if ( comparatorDescription.getBytecode() != null )
    {
        entry.put( MetaSchemaConstants.M_BYTECODE_AT,
            Base64.decode( comparatorDescription.getBytecode().toCharArray() ) );
    }

    if ( comparatorDescription.getDescription() != null )
    {
        entry.put( MetaSchemaConstants.M_DESCRIPTION_AT, comparatorDescription.getDescription() );
    }

    return entry;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:26,代码来源:DefaultSchemaLoader.java


示例7: loadSyntaxes

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadSyntaxes( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> syntaxList = new ArrayList<>();

    if ( schemas == null )
    {
        return syntaxList;
    }

    for ( Schema schema : schemas )
    {
        File syntaxesDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.SYNTAXES_PATH );

        if ( !syntaxesDirectory.exists() )
        {
            return syntaxList;
        }

        File[] syntaxFiles = syntaxesDirectory.listFiles( ldifFilter );

        if ( syntaxFiles != null )
        {
            for ( File ldifFile : syntaxFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                syntaxList.add( entry.getEntry() );
            }
        }
    }

    return syntaxList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:LdifSchemaLoader.java


示例8: loadComparators

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadComparators( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> comparatorList = new ArrayList<>();

    if ( schemas == null )
    {
        return comparatorList;
    }

    for ( Schema schema : schemas )
    {
        File comparatorsDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.COMPARATORS_PATH );

        if ( !comparatorsDirectory.exists() )
        {
            return comparatorList;
        }

        File[] comparators = comparatorsDirectory.listFiles( ldifFilter );

        if ( comparators != null )
        {
            for ( File ldifFile : comparators )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                comparatorList.add( entry.getEntry() );
            }
        }
    }

    return comparatorList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:LdifSchemaLoader.java


示例9: loadDitContentRules

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitContentRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditContentRulesList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditContentRulesList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.DIT_CONTENT_RULES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "ditContentRule LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                ditContentRulesList.add( entry.getEntry() );
            }
        }
    }

    return ditContentRulesList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java


示例10: convert

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * Converts a Schema to an Entry
 * 
 * @param schema The Schema to convert
 * @param schemaManager The SchemaManager
 * @return An Entry containing the converted Schema
 * @throws LdapException If the conversion failed
 */
public Entry convert( Schema schema, SchemaManager schemaManager ) throws LdapException
{
    Entry entry = new DefaultEntry( schemaManager );

    entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SCHEMA_OC );
    entry.put( SchemaConstants.CN_AT, schema.getSchemaName() );
    entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
    entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );

    if ( schema.isDisabled() )
    {
        entry.put( MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
    }

    String[] dependencies = schema.getDependencies();

    if ( dependencies != null && dependencies.length > 0 )
    {
        Attribute attr = new DefaultAttribute(
            schemaManager.getAttributeType( MetaSchemaConstants.M_DEPENDENCIES_AT ) );

        for ( String dependency : dependencies )
        {
            attr.add( dependency );
        }

        entry.put( attr );
    }

    return entry;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:AttributesFactory.java


示例11: loadDitContentRules

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitContentRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditContentRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditContentRuleList;
    }

    for ( Schema schema : schemas )
    {
        File ditContentRulesDirectory = new File( getSchemaDirectory( schema ),
            SchemaConstants.DIT_CONTENT_RULES_PATH );

        if ( !ditContentRulesDirectory.exists() )
        {
            return ditContentRuleList;
        }

        File[] ditContentRuleFiles = ditContentRulesDirectory.listFiles( ldifFilter );

        if ( ditContentRuleFiles != null )
        {
            for ( File ldifFile : ditContentRuleFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                ditContentRuleList.add( entry.getEntry() );
            }
        }
    }

    return ditContentRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:41,代码来源:LdifSchemaLoader.java


示例12: getNormalizer

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Normalizer getNormalizer( SchemaManager schemaManager, NormalizerDescription normalizerDescription,
    Registries targetRegistries, String schemaName ) throws LdapException
{
    checkDescription( normalizerDescription, SchemaConstants.NORMALIZER );

    // The Comparator OID
    String oid = getOid( normalizerDescription, SchemaConstants.NORMALIZER );

    // Get the schema
    Schema schema = getSchema( schemaName, targetRegistries );

    if ( schema == null )
    {
        // The schema is not loaded. We can't create the requested Normalizer
        String msg = I18n.err( I18n.ERR_10018, normalizerDescription.getName(), schemaName );
        LOG.warn( msg );
        throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
    }

    // The FQCN
    String fqcn = getFqcn( normalizerDescription, SchemaConstants.NORMALIZER );

    // get the byteCode
    Attribute byteCode = getByteCode( normalizerDescription, SchemaConstants.NORMALIZER );

    // Class load the normalizer
    Normalizer normalizer = classLoadNormalizer( schemaManager, oid, fqcn, byteCode );

    // Update the common fields
    setSchemaObjectProperties( normalizer, normalizerDescription, schema );

    return normalizer;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:38,代码来源:SchemaEntityFactory.java


示例13: loadNormalizers

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadNormalizers( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> normalizerList = new ArrayList<>();

    if ( schemas == null )
    {
        return normalizerList;
    }

    for ( Schema schema : schemas )
    {
        File normalizersDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.NORMALIZERS_PATH );

        if ( !normalizersDirectory.exists() )
        {
            return normalizerList;
        }

        File[] normalizerFiles = normalizersDirectory.listFiles( ldifFilter );

        if ( normalizerFiles != null )
        {
            for ( File ldifFile : normalizerFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                normalizerList.add( entry.getEntry() );
            }
        }
    }

    return normalizerList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:LdifSchemaLoader.java


示例14: loadSyntaxCheckers

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadSyntaxCheckers( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> syntaxCheckerList = new ArrayList<>();

    if ( schemas == null )
    {
        return syntaxCheckerList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.SYNTAX_CHECKERS_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "syntaxChecker LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                syntaxCheckerList.add( entry.getEntry() );
            }
        }
    }

    return syntaxCheckerList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java


示例15: dnToLdif

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * Transform a schema name to a Dn pointing to the correct position in the DIT
 * 
 * @param schemaName The schema name
 * @return the Dn associated with this schema in the DIT
 */
@Override
public String dnToLdif( String schemaName ) throws LdapException
{
    StringBuilder sb = new StringBuilder();

    String dn = "m-oid=" + oid + ", " + SchemaConstants.ATTRIBUTE_TYPES_PATH + ", cn="
        + Rdn.escapeValue( schemaName ) + ", ou=schema";

    // First dump the Dn only
    Entry entry = new DefaultEntry( dn );
    sb.append( LdifUtils.convertToLdif( entry ) );

    return sb.toString();
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:21,代码来源:AttributeTypeHolder.java


示例16: loadDitStructureRules

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitStructureRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditStructureRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditStructureRuleList;
    }

    for ( Schema schema : schemas )
    {
        File ditStructureRulesDirectory = new File( getSchemaDirectory( schema ),
            SchemaConstants.DIT_STRUCTURE_RULES_PATH );

        if ( !ditStructureRulesDirectory.exists() )
        {
            return ditStructureRuleList;
        }

        File[] ditStructureRuleFiles = ditStructureRulesDirectory.listFiles( ldifFilter );

        if ( ditStructureRuleFiles != null )
        {
            for ( File ldifFile : ditStructureRuleFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                ditStructureRuleList.add( entry.getEntry() );
            }
        }
    }

    return ditStructureRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:41,代码来源:LdifSchemaLoader.java


示例17: loadPrescriptiveTriggerSpecification

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * Load an prescriptive trigger specification
 * 
 * @param apCtx The administrative point context
 * @param subentryCN The subentry CN
 * @param triggerSpec The trigger specification
 * @throws NamingException If the operation failed
 */
public static void loadPrescriptiveTriggerSpecification(
    LdapContext apCtx,
    String subentryCN,
    String triggerSpec ) throws NamingException
{
    Attributes changes = new BasicAttributes( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION_AT, triggerSpec, true );
    apCtx.modifyAttributes( "cn=" + subentryCN, DirContext.ADD_ATTRIBUTE, changes );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:17,代码来源:TriggerUtils.java


示例18: loadMatchingRules

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadMatchingRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> matchingRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return matchingRuleList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.MATCHING_RULES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "matchingRules LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                matchingRuleList.add( entry.getEntry() );
            }
        }
    }

    return matchingRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java


示例19: getSupportedControls

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<String> getSupportedControls() throws LdapException
{
    if ( supportedControls != null )
    {
        return supportedControls;
    }

    if ( rootDse == null )
    {
        fetchRootDSE();
    }

    supportedControls = new ArrayList<>();

    Attribute attr = rootDse.get( SchemaConstants.SUPPORTED_CONTROL_AT );

    if ( attr == null )
    {
        // Unlikely. Perhaps the server does not respond properly to "+" attribute query
        // (such as 389ds server). So let's try again and let's be more explicit.
        fetchRootDSE( SchemaConstants.ALL_USER_ATTRIBUTES, 
            SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.SUPPORTED_CONTROL_AT );
        attr = rootDse.get( SchemaConstants.SUPPORTED_CONTROL_AT );
        if ( attr == null )
        {
            return supportedControls;
        }
    }
    
    for ( Value value : attr )
    {
        supportedControls.add( value.getValue() );
    }

    return supportedControls;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:41,代码来源:LdapNetworkConnection.java


示例20: loadObjectClasses

import org.apache.directory.api.ldap.model.constants.SchemaConstants; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadObjectClasses( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> objectClassList = new ArrayList<>();

    if ( schemas == null )
    {
        return objectClassList;
    }

    for ( Schema schema : schemas )
    {
        // get objectClasses directory, check if exists, return if not
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.OBJECT_CLASSES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "objectClass LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                objectClassList.add( entry.getEntry() );
            }
        }
    }

    return objectClassList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:37,代码来源:JarLdifSchemaLoader.java



注:本文中的org.apache.directory.api.ldap.model.constants.SchemaConstants类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Parser类代码示例发布时间:2022-05-22
下一篇:
Java ResourceBlacklistRequestProto类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap