org.commonjava.aprox.model.core.Group.getConstituents()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(74)

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

Group.getConstituents介绍

暂无

代码示例

代码示例来源:origin: org.commonjava.aprox/aprox-db-memory

private synchronized boolean groupContains( final Group g, final StoreKey key )
{
  if ( g == null || g.getConstituents() == null )
  {
    return false;
  }
  if ( g.getConstituents()
     .contains( key ) )
  {
    return true;
  }
  else
  {
    for ( final StoreKey constituent : g.getConstituents() )
    {
      if ( constituent.getType() == group )
      {
        final Group embedded = (Group) stores.get( constituent );
        if ( embedded != null && groupContains( embedded, key ) )
        {
          return true;
        }
      }
    }
  }
  return false;
}

代码示例来源:origin: org.commonjava.aprox/aprox-db-memory

private synchronized void recurseGroup( final Group master, final List<ArtifactStore> result,
                    final boolean includeGroups, final boolean recurseGroups )
{
  if ( master == null )
  {
    return;
  }
  if ( includeGroups )
  {
    result.add( master );
  }
  for ( final StoreKey key : master.getConstituents() )
  {
    final StoreType type = key.getType();
    if ( recurseGroups && type == StoreType.group )
    {
      // if we're here, we're definitely recursing groups...
      recurseGroup( (Group) stores.get( key ), result, includeGroups, true );
    }
    else
    {
      final ArtifactStore store = stores.get( key );
      if ( store != null )
      {
        result.add( store );
      }
    }
  }
}

代码示例来源:origin: org.commonjava.aprox/aprox-autoprox-common

private void evalSupplementalStores( final Group store, final List<ArtifactStore> supplemental )
  throws AutoProxRuleException
  for ( final StoreKey key : store.getConstituents() )

代码示例来源:origin: org.commonjava.aprox/aprox-autoprox-common

for ( final StoreKey key : new ArrayList<StoreKey>( g.getConstituents() ) )
if ( g.getConstituents()
   .isEmpty() )

代码示例来源:origin: org.commonjava.aprox/aprox-core

private HostedRepository findDeployPoint( final Group group )
  throws AproxDataException
{
  for ( final StoreKey key : group.getConstituents() )
  {
    if ( StoreType.hosted == key.getType() )
    {
      return dataManager.getHostedRepository( key.getName() );
    }
    else if ( StoreType.group == key.getType() )
    {
      final Group grp = dataManager.getGroup( key.getName() );
      final HostedRepository dp = findDeployPoint( grp );
      if ( dp != null )
      {
        return dp;
      }
    }
  }
  return null;
}

代码示例来源:origin: org.commonjava.aprox/aprox-promote-common

if ( validation.isValid() )
  if ( !request.isDryRun() && !target.getConstituents().contains( request.getSource() ) )

代码示例来源:origin: org.commonjava.aprox/aprox-promote-common

if ( target.getConstituents().contains( request.getSource() ) )

相关文章