gpt4 book ai didi

org.guvnor.common.services.shared.preferences.WorkbenchPreferenceScopeResolutionStrategies.getUserInfoFor()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 18:13:05 27 4
gpt4 key购买 nike

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

WorkbenchPreferenceScopeResolutionStrategies.getUserInfoFor介绍

[英]Returns a scope resolution strategy with the scopes (in that order): scope (parameter) by user, user and global.
[中]返回范围解析策略,其范围(按顺序):按用户、用户和全局返回范围(参数)。

代码示例

代码示例来源:origin: org.uberfire/uberfire-project-client

@Override
  public PreferenceScopeResolutionStrategyInfo get() {
    if (module == null) {
      return scopeResolutionStrategies.getUserInfoFor(null, null);
    }

    final String projectIdentifier = module.getEncodedIdentifier();
    return scopeResolutionStrategies.getUserInfoFor("project", projectIdentifier);
  }
}

代码示例来源:origin: org.guvnor/guvnor-project-client

@Override
  public PreferenceScopeResolutionStrategyInfo get() {
    if (project == null) {
      return scopeResolutionStrategies.getUserInfoFor(null,
                              null);
    }

    final String projectIdentifier = project.getEncodedIdentifier();
    return scopeResolutionStrategies.getUserInfoFor("project",
                            projectIdentifier);
  }
}

代码示例来源:origin: kiegroup/appformer

@Override
  public PreferenceScopeResolutionStrategyInfo get() {
    if (module == null) {
      return scopeResolutionStrategies.getUserInfoFor(null, null);
    }

    final String projectIdentifier = module.getEncodedIdentifier();
    return scopeResolutionStrategies.getUserInfoFor("project", projectIdentifier);
  }
}

代码示例来源:origin: org.uberfire/uberfire-project-client

@Test
public void getWithoutProjectTest() {
  final PreferenceScopeResolutionStrategyInfo preferenceScopeResolutionStrategyInfo = projectScopedResolutionStrategySupplier.get();
  verify(scopeResolutionStrategies).getUserInfoFor(null,
                           null);
}

代码示例来源:origin: org.guvnor/guvnor-project-client

@Test
public void getWithoutProjectTest() {
  final PreferenceScopeResolutionStrategyInfo preferenceScopeResolutionStrategyInfo = projectScopedResolutionStrategySupplier.get();
  verify(scopeResolutionStrategies).getUserInfoFor(null,
                           null);
}

代码示例来源:origin: kiegroup/appformer

@Test
public void getWithoutProjectTest() {
  final PreferenceScopeResolutionStrategyInfo preferenceScopeResolutionStrategyInfo = projectScopedResolutionStrategySupplier.get();
  verify(scopeResolutionStrategies).getUserInfoFor(null,
                           null);
}

代码示例来源:origin: org.uberfire/uberfire-project-backend

final MavenRepositoryMetadata... filter) {
GAVPreferences gavPreferences = gavPreferencesProvider.get();
final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo = scopeResolutionStrategies.getUserInfoFor(GuvnorPreferenceScopes.PROJECT,
                                                          module.getEncodedIdentifier());
gavPreferences.load(scopeResolutionStrategyInfo);

代码示例来源:origin: org.guvnor/guvnor-project-backend

final MavenRepositoryMetadata... filter) {
GAVPreferences gavPreferences = gavPreferencesProvider.get();
final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo = scopeResolutionStrategies.getUserInfoFor(GuvnorPreferenceScopes.PROJECT,
                                                          project.getEncodedIdentifier());
gavPreferences.load(scopeResolutionStrategyInfo);

代码示例来源:origin: kiegroup/appformer

final MavenRepositoryMetadata... filter) {
GAVPreferences gavPreferences = gavPreferencesProvider.get();
final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo = scopeResolutionStrategies.getUserInfoFor(GuvnorPreferenceScopes.PROJECT,
                                                          module.getEncodedIdentifier());
gavPreferences.load(scopeResolutionStrategyInfo);

代码示例来源:origin: org.uberfire/uberfire-project-client

@Test
  public void getWithProjectTest() {
    WorkspaceProjectContextChangeEvent event = mock(WorkspaceProjectContextChangeEvent.class);
    doReturn(module).when(event).getModule();

    projectScopedResolutionStrategySupplier.selectedProjectChanged(event);
    final PreferenceScopeResolutionStrategyInfo preferenceScopeResolutionStrategyInfo = projectScopedResolutionStrategySupplier.get();

    verify(scopeResolutionStrategies).getUserInfoFor("project",
                             "projectIdentifierEncoded");
  }
}

代码示例来源:origin: org.guvnor/guvnor-project-client

@Test
  public void getWithProjectTest() {
    ProjectContextChangeEvent event = mock(ProjectContextChangeEvent.class);
    doReturn(project).when(event).getProject();

    projectScopedResolutionStrategySupplier.selectedProjectChanged(event);
    final PreferenceScopeResolutionStrategyInfo preferenceScopeResolutionStrategyInfo = projectScopedResolutionStrategySupplier.get();

    verify(scopeResolutionStrategies).getUserInfoFor("project",
                             "projectIdentifierEncoded");
  }
}

代码示例来源:origin: kiegroup/appformer

@Test
  public void getWithProjectTest() {
    WorkspaceProjectContextChangeEvent event = mock(WorkspaceProjectContextChangeEvent.class);
    doReturn(module).when(event).getModule();

    projectScopedResolutionStrategySupplier.selectedProjectChanged(event);
    final PreferenceScopeResolutionStrategyInfo preferenceScopeResolutionStrategyInfo = projectScopedResolutionStrategySupplier.get();

    verify(scopeResolutionStrategies).getUserInfoFor("project",
                             "projectIdentifierEncoded");
  }
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-api

@Test
public void getInfoTest() {
  final PreferenceScopeResolutionStrategyInfo scopeInfo = scopeResolutionStrategies.getUserInfoFor( null,
                                                   null);
  final List<PreferenceScope> order = scopeInfo.order();
  assertEquals( 2, order.size() );
  final PreferenceScope firstScope = order.get( 0 );
  assertEquals( "user", firstScope.type() );
  assertEquals( "admin", firstScope.key() );
  final PreferenceScope secondScope = order.get( 1 );
  assertEquals( "global", secondScope.type() );
  assertEquals( "global", secondScope.key() );
  final PreferenceScope defaultScope = scopeInfo.defaultScope();
  assertEquals( "user", defaultScope.type() );
  assertEquals( "admin", defaultScope.key() );
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-api

@Test
public void getInfoWithScopeTest() {
  final PreferenceScopeResolutionStrategyInfo scopeInfo = scopeResolutionStrategies.getUserInfoFor( WorkbenchPreferenceScopes.PROJECT,
                                                   "my-project" );

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com