コード例 #1
0
 private Repository generateSimpleRepository() {
   if (simpleRepository == null) {
     simpleRepository = new Repository();
     simpleRepository.setId(TESTCASE_REPOSITORY_ID);
   }
   return simpleRepository;
 }
コード例 #2
0
 private PermissionsData generateFullAccessPermissionsForRepository(
     Repository repository, ServerEnvironment environment) {
   PermissionsData permissionData = new PermissionsData();
   permissionData.setUser(generateUser());
   ArrayList<Permission> permissions = new ArrayList<Permission>();
   Permission permission = new Permission();
   permission.setRepositoryId(repository.getId());
   permission.setFullDeploymentAccess(true);
   permissions.add(permission);
   permissionData.setPermissions(permissions);
   return permissionData;
 }
コード例 #3
0
 private PermissionsData generateWriteablePermissionsForRepository(
     Repository repository, ServerEnvironment environment) {
   PermissionsData permissionData = new PermissionsData();
   permissionData.setUser(generateUser());
   ArrayList<Permission> permissions = new ArrayList<Permission>();
   Permission permission = new Permission();
   permission.setRepositoryId(repository.getId());
   permission.setServerEnvironmentId(environment.getId());
   permissions.add(permission);
   permissionData.setPermissions(permissions);
   return permissionData;
 }