org.apache.directory.server.core.api.partition.Partition.moveAndRename()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.apache.directory.server.core.api.partition.Partition.moveAndRename()方法的一些代码示例,展示了Partition.moveAndRename()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Partition.moveAndRename()方法的具体详情如下:
包路径:org.apache.directory.server.core.api.partition.Partition
类名称:Partition
方法名:moveAndRename

Partition.moveAndRename介绍

[英]Transplants a child entry, to a position in the namespace under a new parent entry and changes the RN of the child entry which can optionally have its old RN attributes removed. The removal of old RN attributes may not make sense in all namespaces. If the concept is undefined in a namespace this parameters is ignored. An example of a namespace where this parameter is significant is the LDAP namespace.
[中]将子项移植到命名空间中新父项下的某个位置,并更改子项的RN,该子项可以选择删除其旧的RN属性。删除旧的RN属性可能在所有名称空间中都没有意义。如果名称空间中未定义该概念,则忽略该参数。这个参数很重要的名称空间的一个例子是LDAP名称空间。

代码示例

代码示例来源:origin: org.apache.directory.server/apacheds-core-shared

/**
 * {@inheritDoc}
 */
@Override
public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
{
  Partition partition = getPartition( moveAndRenameContext.getDn() );
  partition.moveAndRename( moveAndRenameContext );
}

代码示例来源:origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
{
  boolean cascade = moveAndRenameContext.hasRequestControl( Cascade.OID );
  CoreSession session = moveAndRenameContext.getSession();
  LookupOperationContext lookupContext = new LookupOperationContext( session, moveAndRenameContext.getDn(),
    SchemaConstants.ALL_ATTRIBUTES_ARRAY );
  lookupContext.setPartition( this );
  lookupContext.setTransaction( moveAndRenameContext.getTransaction() );
  Entry entry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
  synchronizer.moveAndRename( moveAndRenameContext, entry, cascade );
  wrapped.moveAndRename( moveAndRenameContext );
  updateSchemaModificationAttributes( moveAndRenameContext );
}

相关文章