]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7738 support in code use of *_UUID instead of PROJECTS._*ID 1044/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 14 Jun 2016 13:22:05 +0000 (15:22 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 16 Jun 2016 11:49:19 +0000 (13:49 +0200)
184 files changed:
server/sonar-server/src/main/java/org/sonar/server/component/ComponentService.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/AppAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java
server/sonar-server/src/main/java/org/sonar/server/computation/component/ProjectViewAttributes.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistComponentsStep.java
server/sonar-server/src/main/java/org/sonar/server/duplication/ws/DuplicationsJsonWriter.java
server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueAuthorizationDao.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java
server/sonar-server/src/main/java/org/sonar/server/measure/MeasureFilterRow.java
server/sonar-server/src/main/java/org/sonar/server/measure/MeasureFilterSql.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentDtoToWsComponent.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeData.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java
server/sonar-server/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java
server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/TaskFormatterTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/AppActionTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/queue/InternalCeQueueImplTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistMeasuresStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/ReportPersistComponentsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/ViewsPersistComponentsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsJsonWriterTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryServiceTest.java
server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterExecutorTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileProjectOperationsMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/test/ws/ListActionTest.java
server/sonar-server/src/test/resources/org/sonar/server/component/ws/SearchViewComponentsActionTest/return_only_authorized_projects_from_view.xml
server/sonar-server/src/test/resources/org/sonar/server/component/ws/SearchViewComponentsActionTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/measure/MeasureRepositoryImplTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/empty.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/no_previous_version.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/previous_version_deleted.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/previous_version_is_last_one.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/unprocessed_snapshots.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/load_component_id_from_db.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/load_project_id_from_db.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/should_insert_new_issues.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/should_update_issues.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationDaoTest/no_authorization.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationDaoTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueAuthorizationIndexerTest/index.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueIndexerTest/index.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueIndexerTest/index_project.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueResultSetIteratorTest/extract_directory_path.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueResultSetIteratorTest/extract_file_path.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueResultSetIteratorTest/many_projects.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueResultSetIteratorTest/one_issue.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/index/IssueResultSetIteratorTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/ignore_person_measures.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/sort_by_alert.xml
server/sonar-server/src/test/resources/org/sonar/server/platform/BackendCleanupMediumTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/source/ws/HashActionTest/no_source.xml
server/sonar-server/src/test/resources/org/sonar/server/source/ws/HashActionTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/source/ws/HashActionTest/show_hashes_on_test_file.xml
server/sonar-server/src/test/resources/org/sonar/server/view/index/ViewIndexerTest/index.xml
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/project.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/resource_index.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/snapshot.rb
server/sonar-web/src/main/webapp/WEB-INF/lib/default_authorizer.rb
server/sonar-web/src/main/webapp/WEB-INF/lib/need_authorization.rb
sonar-db/src/main/java/org/sonar/db/component/ComponentDto.java
sonar-db/src/main/java/org/sonar/db/component/ComponentDtoFunctions.java
sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java
sonar-db/src/main/java/org/sonar/db/component/ResourceDto.java
sonar-db/src/main/java/org/sonar/db/component/ResourceKeyUpdaterDao.java
sonar-db/src/main/java/org/sonar/db/component/ResourceKeyUpdaterMapper.java
sonar-db/src/main/java/org/sonar/db/component/ResourceMapper.java
sonar-db/src/main/java/org/sonar/db/issue/IssueDao.java
sonar-db/src/main/java/org/sonar/db/purge/PurgeDao.java
sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml
sonar-db/src/main/resources/org/sonar/db/component/ResourceIndexMapper.xml
sonar-db/src/main/resources/org/sonar/db/component/ResourceKeyUpdaterMapper.xml
sonar-db/src/main/resources/org/sonar/db/component/ResourceMapper.xml
sonar-db/src/main/resources/org/sonar/db/issue/IssueMapper.xml
sonar-db/src/main/resources/org/sonar/db/purge/PurgeMapper.xml
sonar-db/src/main/resources/org/sonar/db/user/AuthorizationMapper.xml
sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java
sonar-db/src/test/java/org/sonar/db/component/ComponentDtoTest.java
sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java
sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java
sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java
sonar-db/src/test/java/org/sonar/db/component/ResourceKeyUpdaterDaoTest.java
sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_ghost_projects.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/fixture-including-ghost-projects-and-technical-project.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/fixture.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/select_project_ids_from_query_and_view_or_sub_view_uuid.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotIndexPackages.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceKeyUpdaterDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/has_last_snapshot_by_component_uuid.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml
sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml
sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml
sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/apply_default_permission_template.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_add_user_permission-result.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_add_user_permission.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_apply_permission_template.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_delete_group_permission-result.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_delete_group_permission.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_delete_user_permission-result.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_delete_user_permission.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_insert_anyone_group_permission-result.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_insert_anyone_group_permission.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_insert_group_permission-result.xml
sonar-db/src/test/resources/org/sonar/db/permission/PermissionRepositoryTest/should_insert_group_permission.xml
sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/delete_project_property.xml
sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/findNotificationSubscribers.xml
sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/selectProjectProperties.xml
sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml
sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/shouldFindUsersForNotification.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/disable_resources_without_last_snapshot-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/disable_resources_without_last_snapshot.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml
sonar-db/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/anonymous_should_be_authorized.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/group_should_be_authorized.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml
sonar-db/src/test/resources/org/sonar/db/user/AuthorizationDaoTest/user_should_be_authorized.xml

index 670dfea5f9cb1320c97af269f6958552a1ed4b6e..5af8eddb2206cbf1d422777a9e99a4555c0ffefb 100644 (file)
@@ -31,9 +31,9 @@ import java.util.Map;
 import java.util.Set;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
+import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.i18n.I18n;
 import org.sonar.api.resources.Scopes;
-import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.server.ServerSide;
 import org.sonar.api.utils.System2;
 import org.sonar.api.web.UserRole;
@@ -112,7 +112,7 @@ public class ComponentService {
     try {
       ComponentDto projectOrModule = getByKey(session, projectOrModuleKey);
       userSession.checkComponentUuidPermission(UserRole.ADMIN, projectOrModule.projectUuid());
-      dbClient.resourceKeyUpdaterDao().updateKey(projectOrModule.getId(), newKey);
+      dbClient.resourceKeyUpdaterDao().updateKey(projectOrModule.uuid(), newKey);
       session.commit();
 
       session.commit();
@@ -126,7 +126,7 @@ public class ComponentService {
     try {
       ComponentDto project = getByKey(projectKey);
       userSession.checkComponentUuidPermission(UserRole.ADMIN, project.projectUuid());
-      return dbClient.resourceKeyUpdaterDao().checkModuleKeysBeforeRenaming(project.getId(), stringToReplace, replacementString);
+      return dbClient.resourceKeyUpdaterDao().checkModuleKeysBeforeRenaming(project.uuid(), stringToReplace, replacementString);
     } finally {
       session.close();
     }
@@ -138,7 +138,7 @@ public class ComponentService {
     try {
       ComponentDto project = getByKey(session, projectKey);
       userSession.checkComponentUuidPermission(UserRole.ADMIN, project.projectUuid());
-      dbClient.resourceKeyUpdaterDao().bulkUpdateKey(session, project.getId(), stringToReplace, replacementString);
+      dbClient.resourceKeyUpdaterDao().bulkUpdateKey(session, project.uuid(), stringToReplace, replacementString);
       session.commit();
     } finally {
       session.close();
@@ -185,6 +185,7 @@ public class ComponentService {
     String uuid = Uuids.create();
     ComponentDto component = new ComponentDto()
       .setUuid(uuid)
+      .setRootUuid(uuid)
       .setModuleUuid(null)
       .setModuleUuidPath(ComponentDto.MODULE_UUID_PATH_SEP + uuid + ComponentDto.MODULE_UUID_PATH_SEP)
       .setProjectUuid(uuid)
index 7158081180539f6dd6f705632db2ecfd6052695d..5e3291dbeb08c366a3c1ed39bdd590b85668b217 100644 (file)
@@ -134,11 +134,11 @@ public class AppAction implements RequestHandler {
     json.prop("longName", component.longName());
     json.prop("q", component.qualifier());
 
-    ComponentDto parentProject = nullableComponentById(component.parentProjectId(), session);
+    ComponentDto parentProject = retrieveRootIfNotCurrentComponent(component, session);
     ComponentDto project = dbClient.componentDao().selectOrFailByUuid(session, component.projectUuid());
 
     // Do not display parent project if parent project and project are the same
-    boolean displayParentProject = parentProject != null && !parentProject.getId().equals(project.getId());
+    boolean displayParentProject = parentProject != null && !parentProject.uuid().equals(project.uuid());
     json.prop("subProject", displayParentProject ? parentProject.key() : null);
     json.prop("subProjectName", displayParentProject ? parentProject.longName() : null);
     json.prop("project", project.key());
@@ -188,11 +188,11 @@ public class AppAction implements RequestHandler {
   }
 
   @CheckForNull
-  private ComponentDto nullableComponentById(@Nullable Long componentId, DbSession session) {
-    if (componentId != null) {
-      return dbClient.componentDao().selectOrFailById(session, componentId);
+  private ComponentDto retrieveRootIfNotCurrentComponent(ComponentDto componentDto, DbSession session) {
+    if (componentDto.uuid().equals(componentDto.getRootUuid())) {
+      return null;
     }
-    return null;
+    return dbClient.componentDao().selectOrFailByUuid(session, componentDto.getRootUuid());
   }
 
   @CheckForNull
index b538fd7e56b7562504051a32cf0a476bf4936594..3fadd22a6c6251143e7de840fc18e24f8190cc15 100644 (file)
@@ -50,11 +50,11 @@ class ComponentDtoToWsComponent {
     return wsComponent;
   }
 
-  static WsComponents.Component.Builder componentDtoToWsComponent(ComponentDto component, Map<Long, ComponentDto> referenceComponentsById) {
+  static WsComponents.Component.Builder componentDtoToWsComponent(ComponentDto component, Map<String, ComponentDto> referenceComponentsByUuid) {
     WsComponents.Component.Builder wsComponent = componentDtoToWsComponent(component);
 
-    ComponentDto referenceComponent = referenceComponentsById.get(component.getCopyResourceId());
-    if (!referenceComponentsById.isEmpty() && referenceComponent != null) {
+    ComponentDto referenceComponent = referenceComponentsByUuid.get(component.getCopyResourceUuid());
+    if (referenceComponent != null) {
       wsComponent.setRefId(referenceComponent.uuid());
       wsComponent.setRefKey(referenceComponent.key());
     }
index 3ba6e4d9c969529ff66df709e2716a877bc80002..41225d4d5c24bc038937d77ad9fa3cb71555f377 100644 (file)
  */
 package org.sonar.server.component.ws;
 
-import com.google.common.base.Function;
 import com.google.common.base.Predicates;
 import com.google.common.collect.ImmutableSortedSet;
 import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
 import org.sonar.api.i18n.I18n;
 import org.sonar.api.resources.ResourceTypes;
 import org.sonar.api.server.ws.Request;
@@ -179,31 +176,26 @@ public class TreeAction implements ComponentsWsAction {
         default:
           throw new IllegalStateException("Unknown component tree strategy");
       }
-      Map<Long, ComponentDto> referenceComponentUuidsById = searchReferenceComponentUuidsById(dbSession, components);
+      Map<String, ComponentDto> referenceComponentsByUuid = searchreferenceComponentsByUuid(dbSession, components);
 
-      return buildResponse(baseComponent, components, referenceComponentUuidsById,
+      return buildResponse(baseComponent, components, referenceComponentsByUuid,
         Paging.forPageIndex(query.getPage()).withPageSize(query.getPageSize()).andTotal(total));
     } finally {
       dbClient.closeSession(dbSession);
     }
   }
 
-  private Map<Long, ComponentDto> searchReferenceComponentUuidsById(DbSession dbSession, List<ComponentDtoWithSnapshotId> components) {
-    List<Long> referenceComponentIds = from(components)
-      .transform(ComponentDtoWithSnapshotIdToCopyResourceIdFunction.INSTANCE)
-      .filter(Predicates.<Long>notNull())
+  private Map<String, ComponentDto> searchreferenceComponentsByUuid(DbSession dbSession, List<ComponentDtoWithSnapshotId> components) {
+    List<String> referenceComponentIds = from(components)
+      .transform(ComponentDto::getCopyResourceUuid)
+      .filter(Predicates.<String>notNull())
       .toList();
     if (referenceComponentIds.isEmpty()) {
       return emptyMap();
     }
 
-    List<ComponentDto> referenceComponents = dbClient.componentDao().selectByIds(dbSession, referenceComponentIds);
-    Map<Long, ComponentDto> referenceComponentUuidsById = new HashMap<>();
-    for (ComponentDto referenceComponent : referenceComponents) {
-      referenceComponentUuidsById.put(referenceComponent.getId(), referenceComponent);
-    }
-
-    return referenceComponentUuidsById;
+    return from(dbClient.componentDao().selectByUuids(dbSession, referenceComponentIds))
+      .uniqueIndex(ComponentDto::uuid);
   }
 
   private void checkPermissions(ComponentDto baseComponent) {
@@ -215,8 +207,8 @@ public class TreeAction implements ComponentsWsAction {
     }
   }
 
-  private static TreeWsResponse buildResponse(ComponentDto baseComponent, List<ComponentDtoWithSnapshotId> components, Map<Long, ComponentDto> referenceComponentsById,
-    Paging paging) {
+  private static TreeWsResponse buildResponse(ComponentDto baseComponent, List<ComponentDtoWithSnapshotId> components,
+    Map<String, ComponentDto> referenceComponentsByUuid, Paging paging) {
     TreeWsResponse.Builder response = TreeWsResponse.newBuilder();
     response.getPagingBuilder()
       .setPageIndex(paging.pageIndex())
@@ -224,9 +216,9 @@ public class TreeAction implements ComponentsWsAction {
       .setTotal(paging.total())
       .build();
 
-    response.setBaseComponent(componentDtoToWsComponent(baseComponent, referenceComponentsById));
+    response.setBaseComponent(componentDtoToWsComponent(baseComponent, referenceComponentsByUuid));
     for (ComponentDto dto : components) {
-      response.addComponents(componentDtoToWsComponent(dto, referenceComponentsById));
+      response.addComponents(componentDtoToWsComponent(dto, referenceComponentsByUuid));
     }
 
     return response.build();
@@ -238,7 +230,7 @@ public class TreeAction implements ComponentsWsAction {
       .setTotal(0)
       .setPageIndex(request.getPage())
       .setPageSize(request.getPageSize());
-    response.setBaseComponent(componentDtoToWsComponent(baseComponent, Collections.<Long, ComponentDto>emptyMap()));
+    response.setBaseComponent(componentDtoToWsComponent(baseComponent, Collections.<String, ComponentDto>emptyMap()));
 
     return response.build();
   }
@@ -302,11 +294,4 @@ public class TreeAction implements ComponentsWsAction {
     return treeWsRequest;
   }
 
-  private enum ComponentDtoWithSnapshotIdToCopyResourceIdFunction implements Function<ComponentDtoWithSnapshotId, Long> {
-    INSTANCE;
-    @Override
-    public Long apply(@Nonnull ComponentDtoWithSnapshotId input) {
-      return input.getCopyResourceId();
-    }
-  }
 }
index 2b1b0cb2c873ed4e1369243c1500b2415c35a3b6..646db69d9a2aafc9e4c241893a3245433da26271 100644 (file)
@@ -25,18 +25,12 @@ import static java.util.Objects.requireNonNull;
 
 @Immutable
 public class ProjectViewAttributes {
-  private final long projectId;
   private final String projectUuid;
 
-  public ProjectViewAttributes(long projectId, String projectUuid) {
-    this.projectId = projectId;
+  public ProjectViewAttributes(String projectUuid) {
     this.projectUuid = requireNonNull(projectUuid, "projectUuid can't be null");
   }
 
-  public long getProjectId() {
-    return projectId;
-  }
-
   public String getProjectUuid() {
     return projectUuid;
   }
@@ -44,7 +38,6 @@ public class ProjectViewAttributes {
   @Override
   public String toString() {
     return "ProjectViewAttributes{" +
-        "projectId=" + projectId +
         ", projectUuid='" + projectUuid + '\'' +
         '}';
   }
index d70fd5cce3ecba145fca27ef4bf963dd3e98f75d..823361a13a8ec51e3697ca821f42af3d535866e8 100644 (file)
@@ -192,6 +192,7 @@ public class PersistComponentsStep implements ComputationStep {
     res.setLongName(res.name());
     res.setDescription(project.getDescription());
     res.setProjectUuid(res.uuid());
+    res.setRootUuid(res.uuid());
     res.setModuleUuidPath(MODULE_UUID_PATH_SEP + res.uuid() + MODULE_UUID_PATH_SEP);
 
     return res;
@@ -250,6 +251,7 @@ public class PersistComponentsStep implements ComputationStep {
     res.setDescription(view.getDescription());
     res.setLongName(res.name());
     res.setProjectUuid(res.uuid());
+    res.setRootUuid(res.uuid());
     res.setModuleUuidPath(MODULE_UUID_PATH_SEP + res.uuid() + MODULE_UUID_PATH_SEP);
 
     return res;
@@ -276,7 +278,7 @@ public class PersistComponentsStep implements ComputationStep {
     res.setQualifier(Qualifiers.PROJECT);
     res.setName(projectView.getName());
     res.setLongName(res.name());
-    res.setCopyResourceId(projectView.getProjectViewAttributes().getProjectId());
+    res.setCopyComponentUuid(projectView.getProjectViewAttributes().getProjectUuid());
 
     setRootAndParentModule(res, path);
 
@@ -301,7 +303,7 @@ public class PersistComponentsStep implements ComputationStep {
    */
   private static void setRootAndParentModule(ComponentDto res, PathAwareVisitor.Path<ComponentDtoHolder> path) {
     ComponentDto projectDto = from(path.getCurrentPath()).last().get().getElement().getDto();
-    res.setParentProjectId(projectDto.getId());
+    res.setRootUuid(projectDto.uuid());
     res.setProjectUuid(projectDto.uuid());
 
     ComponentDto parentModule = path.parent().getDto();
@@ -318,7 +320,7 @@ public class PersistComponentsStep implements ComputationStep {
       .first()
       .get()
       .getElement().getDto();
-    componentDto.setParentProjectId(parentModule.getId());
+    componentDto.setRootUuid(parentModule.uuid());
     componentDto.setProjectUuid(parentModule.projectUuid());
     componentDto.setModuleUuid(parentModule.uuid());
     componentDto.setModuleUuidPath(parentModule.moduleUuidPath());
@@ -350,12 +352,12 @@ public class PersistComponentsStep implements ComputationStep {
       existingComponent.setModuleUuidPath(newComponent.moduleUuidPath());
       modified = true;
     }
-    if (!ObjectUtils.equals(existingComponent.parentProjectId(), newComponent.parentProjectId())) {
-      existingComponent.setParentProjectId(newComponent.parentProjectId());
+    if (!ObjectUtils.equals(existingComponent.getRootUuid(), newComponent.getRootUuid())) {
+      existingComponent.setRootUuid(newComponent.getRootUuid());
       modified = true;
     }
-    if (!ObjectUtils.equals(existingComponent.getCopyResourceId(), newComponent.getCopyResourceId())) {
-      existingComponent.setCopyResourceId(newComponent.getCopyResourceId());
+    if (!ObjectUtils.equals(existingComponent.getCopyResourceUuid(), newComponent.getCopyResourceUuid())) {
+      existingComponent.setCopyComponentUuid(newComponent.getCopyResourceUuid());
       modified = true;
     }
     if (!existingComponent.isEnabled()) {
index c741633990c782891b21516db41123e11bac7706..1e6cee7f95623f862a792fdb5f85cabda7bc1fa6 100644 (file)
@@ -84,7 +84,7 @@ public class DuplicationsJsonWriter {
 
   private void writeFiles(Map<String, String> refByComponentKey, JsonWriter json, DbSession session) {
     Map<String, ComponentDto> projectsByUuid = newHashMap();
-    Map<Long, ComponentDto> parentProjectsById = newHashMap();
+    Map<String, ComponentDto> parentProjectsByUuid = newHashMap();
     for (Map.Entry<String, String> entry : refByComponentKey.entrySet()) {
       String componentKey = entry.getKey();
       String ref = entry.getValue();
@@ -95,7 +95,7 @@ public class DuplicationsJsonWriter {
 
         addFile(json, file);
         ComponentDto project = getProject(file.projectUuid(), projectsByUuid, session);
-        ComponentDto parentProject = getParentProject(file.parentProjectId(), parentProjectsById, session);
+        ComponentDto parentProject = getParentProject(file.getRootUuid(), parentProjectsByUuid, session);
         addProject(json, project, parentProject);
 
         json.endObject();
@@ -116,7 +116,7 @@ public class DuplicationsJsonWriter {
       json.prop("projectName", project.longName());
 
       // Do not return sub project if sub project and project are the same
-      boolean displaySubProject = subProject != null && !subProject.getId().equals(project.getId());
+      boolean displaySubProject = subProject != null && !subProject.uuid().equals(project.uuid());
       if (displaySubProject) {
         json.prop("subProject", subProject.key());
         json.prop("subProjectUuid", subProject.uuid());
@@ -137,13 +137,13 @@ public class DuplicationsJsonWriter {
     return project;
   }
 
-  private ComponentDto getParentProject(@Nullable Long projectId, Map<Long, ComponentDto> subProjectsById, DbSession session) {
-    ComponentDto project = subProjectsById.get(projectId);
-    if (project == null && projectId != null) {
-      Optional<ComponentDto> projectOptional = componentDao.selectById(session, projectId);
+  private ComponentDto getParentProject(String rootUuid, Map<String, ComponentDto> subProjectsByUuid, DbSession session) {
+    ComponentDto project = subProjectsByUuid.get(rootUuid);
+    if (project == null) {
+      Optional<ComponentDto> projectOptional = componentDao.selectByUuid(session, rootUuid);
       if (projectOptional.isPresent()) {
         project = projectOptional.get();
-        subProjectsById.put(project.getId(), project);
+        subProjectsByUuid.put(project.uuid(), project);
       }
     }
     return project;
index 5fa880c1cf7b2519d42012dbc2d8d8066f7208b8..266214b6ed3a0ba35f8acdffc87b1d61271aca61 100644 (file)
@@ -69,9 +69,7 @@ import static com.google.common.collect.FluentIterable.from;
 import static com.google.common.collect.Lists.newArrayList;
 import static java.lang.String.format;
 import static org.sonar.api.utils.DateUtils.longToDate;
-import static org.sonar.db.component.ComponentDtoFunctions.toCopyResourceId;
 import static org.sonar.db.component.ComponentDtoFunctions.toProjectUuid;
-import static org.sonar.db.component.ComponentDtoFunctions.toUuid;
 import static org.sonar.server.ws.WsUtils.checkFoundWithOptional;
 import static org.sonar.server.ws.WsUtils.checkRequest;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENTS;
@@ -403,9 +401,7 @@ public class IssueQueryService {
     Collection<String> developerUuids = Collections2.transform(technicalProjects, toProjectUuid());
     Collection<String> authorsFromProjects = authorsFromParamsOrFromDeveloper(session, developerUuids, authors);
     builder.authors(authorsFromProjects);
-    Collection<Long> projectIds = Collections2.transform(technicalProjects, toCopyResourceId());
-    List<ComponentDto> originalProjects = dbClient.componentDao().selectByIds(session, projectIds);
-    Collection<String> projectUuids = Collections2.transform(originalProjects, toUuid());
+    Collection<String> projectUuids = Collections2.transform(technicalProjects, ComponentDto::getCopyResourceUuid);
     builder.projectUuids(projectUuids);
   }
 
index d61b0ff76a2c717cdf3d632191e7cdfeaf179a27..96d06a875b14f6ce193d14943bf03f2595d0005e 100644 (file)
@@ -92,7 +92,7 @@ public class IssueAuthorizationDao {
       "      FROM projects " +
       "      WHERE " +
       "        projects.qualifier = 'TRK' " +
-      "        AND projects.copy_resource_id is NULL " +
+      "        AND projects.copy_component_uuid is NULL " +
       "        {dateCondition} " +
       "      UNION " +
 
@@ -108,7 +108,7 @@ public class IssueAuthorizationDao {
       "      INNER JOIN users ON users.id = user_roles.user_id " +
       "      WHERE " +
       "        projects.qualifier = 'TRK' " +
-      "        AND projects.copy_resource_id is NULL " +
+      "        AND projects.copy_component_uuid is NULL " +
       "        {dateCondition} " +
       "      UNION " +
 
@@ -124,7 +124,7 @@ public class IssueAuthorizationDao {
       "      INNER JOIN groups ON groups.id = group_roles.group_id " +
       "      WHERE " +
       "        projects.qualifier = 'TRK' " +
-      "        AND projects.copy_resource_id is NULL " +
+      "        AND projects.copy_component_uuid is NULL " +
       "        {dateCondition} " +
       "        AND group_id IS NOT NULL " +
       "      UNION " +
@@ -140,7 +140,7 @@ public class IssueAuthorizationDao {
       "      INNER JOIN group_roles ON group_roles.resource_id = projects.id AND group_roles.role='user' " +
       "      WHERE " +
       "        projects.qualifier = 'TRK' " +
-      "        AND projects.copy_resource_id is NULL " +
+      "        AND projects.copy_component_uuid is NULL " +
       "        {dateCondition} " +
       "        AND group_roles.group_id IS NULL " +
       "    ) project_authorization";
index f3d9f339afb51345fb4f8616995efc72239ac7d8..e9385a5c47d32ff33a03da9afc970937ecaa4b3a 100644 (file)
@@ -304,10 +304,11 @@ public class SearchResponseFormat {
     Collection<ComponentDto> components = data.getComponents();
     if (components != null) {
       for (ComponentDto dto : components) {
+        String uuid = dto.uuid();
         Issues.Component.Builder builder = Issues.Component.newBuilder()
           .setId(dto.getId())
           .setKey(dto.key())
-          .setUuid(dto.uuid())
+          .setUuid(uuid)
           .setQualifier(dto.qualifier())
           .setName(nullToEmpty(dto.name()))
           .setLongName(nullToEmpty(dto.longName()))
@@ -320,12 +321,11 @@ public class SearchResponseFormat {
         }
 
         // On a root project, parentProjectId is null but projectId is equal to itself, which make no sense.
-        if (dto.projectUuid() != null && dto.parentProjectId() != null) {
+        if (!uuid.equals(dto.getRootUuid())) {
           ComponentDto project = data.getComponentByUuid(dto.projectUuid());
           builder.setProjectId(project.getId());
-        }
-        if (dto.parentProjectId() != null) {
-          builder.setSubProjectId(dto.parentProjectId());
+          ComponentDto subProject = data.getComponentByUuid(dto.getRootUuid());
+          builder.setSubProjectId(subProject.getId());
         }
         result.add(builder.build());
       }
index 0a8669bddd5efe8b894118d6184b1e8d975bc3cb..21fd8e7bf19749b3378c11b86a0e426771ce4631 100644 (file)
@@ -24,15 +24,15 @@ import org.apache.commons.lang.StringUtils;
 public class MeasureFilterRow {
   private final long snapshotId;
   private final long resourceId;
-  private final long resourceRootId;
+  private final String rootComponentUuid;
   private String sortText = null;
   private Long sortDate = null;
   private Double sortDouble = null;
 
-  MeasureFilterRow(long snapshotId, long resourceId, long resourceRootId) {
+  MeasureFilterRow(long snapshotId, long resourceId, String rootComponentUuid) {
     this.snapshotId = snapshotId;
     this.resourceId = resourceId;
-    this.resourceRootId = resourceRootId;
+    this.rootComponentUuid = rootComponentUuid;
   }
 
   public long getSnapshotId() {
@@ -43,8 +43,8 @@ public class MeasureFilterRow {
     return resourceId;
   }
 
-  public long getResourceRootId() {
-    return resourceRootId;
+  public String getRootComponentUuid() {
+    return rootComponentUuid;
   }
 
   public String getSortText() {
index 125fe79428e52e80694aa8c966146d5ec72709b5..211b867bcb68372a65bb638493f418328c7188b5 100644 (file)
@@ -96,7 +96,7 @@ class MeasureFilterSql {
 
   private String generateSql() {
     StringBuilder sb = new StringBuilder(1000);
-    sb.append("SELECT s.id, p.id, root.id, ");
+    sb.append("SELECT s.id, p.id, root.uuid, ");
     sb.append(filter.sort().column());
     sb.append(" FROM snapshots s");
     sb.append(" INNER JOIN projects p ON s.component_uuid=p.uuid ");
@@ -134,7 +134,7 @@ class MeasureFilterSql {
   private void appendResourceConditions(StringBuilder sb) {
     sb.append(" s.status='P' AND s.islast=").append(database.getDialect().getTrueSqlValue());
     if (context.getBaseSnapshot() == null) {
-      sb.append(" AND p.copy_resource_id IS NULL ");
+      sb.append(" AND p.copy_component_uuid IS NULL ");
     }
     if (!filter.getResourceQualifiers().isEmpty()) {
       sb.append(" AND s.qualifier IN ");
@@ -259,7 +259,7 @@ class MeasureFilterSql {
   static class TextSortRowProcessor extends RowProcessor {
     @Override
     MeasureFilterRow fetch(ResultSet rs) throws SQLException {
-      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getLong(3));
+      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getString(3));
       row.setSortText(rs.getString(4));
       return row;
     }
@@ -304,7 +304,7 @@ class MeasureFilterSql {
 
     @Override
     MeasureFilterRow fetch(ResultSet rs) throws SQLException {
-      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getLong(3));
+      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getString(3));
       double value = rs.getDouble(4);
       if (!rs.wasNull()) {
         row.setSortDouble(value);
@@ -333,7 +333,7 @@ class MeasureFilterSql {
 
     @Override
     MeasureFilterRow fetch(ResultSet rs) throws SQLException {
-      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getLong(3));
+      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getString(3));
       row.setSortDate(rs.getTimestamp(4).getTime());
       return row;
     }
@@ -352,7 +352,7 @@ class MeasureFilterSql {
 
     @Override
     MeasureFilterRow fetch(ResultSet rs) throws SQLException {
-      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getLong(3));
+      MeasureFilterRow row = new MeasureFilterRow(rs.getLong(1), rs.getLong(2), rs.getString(3));
       row.setSortDate(rs.getLong(4));
       return row;
     }
index 5a8f2b7e18e50d786a13671c1d608178d2e5b127..185bd453cfe28543ed783a96bd599024179714d8 100644 (file)
@@ -58,6 +58,8 @@ import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.collect.FluentIterable.from;
 import static java.lang.String.format;
 import static java.util.Collections.emptyList;
+import static java.util.Collections.emptyMap;
+import static java.util.Collections.singletonMap;
 import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
 import static org.sonar.server.component.ComponentFinder.ParamNames.COMPONENT_ID_AND_KEY;
 import static org.sonar.server.component.ComponentFinder.ParamNames.DEVELOPER_ID_AND_KEY;
@@ -156,11 +158,11 @@ public class ComponentAction implements MeasuresWsAction {
   }
 
   private Optional<ComponentDto> getReferenceComponent(DbSession dbSession, ComponentDto component) {
-    if (component.getCopyResourceId() == null) {
+    if (component.getCopyResourceUuid() == null) {
       return Optional.absent();
     }
 
-    return dbClient.componentDao().selectById(dbSession, component.getCopyResourceId());
+    return dbClient.componentDao().selectByUuid(dbSession, component.getCopyResourceUuid());
   }
 
   private static ComponentWsResponse buildResponse(ComponentWsRequest request, ComponentDto component, Optional<ComponentDto> refComponent, List<MeasureDto> measures,
@@ -172,12 +174,12 @@ public class ComponentAction implements MeasuresWsAction {
       MetricDto metric = metricsById.get(measure.getMetricId());
       measuresByMetric.put(metric, measure);
     }
-    Map<Long, ComponentDto> referenceComponentUuidById = new HashMap<>();
     if (refComponent.isPresent()) {
-      referenceComponentUuidById.put(refComponent.get().getId(), refComponent.get());
+      response.setComponent(componentDtoToWsComponent(component, measuresByMetric, singletonMap(refComponent.get().uuid(), refComponent.get())));
+    } else {
+      response.setComponent(componentDtoToWsComponent(component, measuresByMetric, emptyMap()));
     }
 
-    response.setComponent(componentDtoToWsComponent(component, measuresByMetric, referenceComponentUuidById));
 
     List<String> additionalFields = request.getAdditionalFields();
     if (additionalFields != null) {
index 123dfdc9c975486302e276229ecb821a6f9fa1cb..ea97045cd0cb699649b90e2be2d497a9bbf4b39c 100644 (file)
@@ -33,11 +33,11 @@ class ComponentDtoToWsComponent {
   }
 
   static WsMeasures.Component.Builder componentDtoToWsComponent(ComponentDto component, Map<MetricDto, MeasureDto> measuresByMetric,
-    Map<Long, ComponentDto> referenceComponentsById) {
+    Map<String, ComponentDto> referenceComponentsByUuid) {
     WsMeasures.Component.Builder wsComponent = componentDtoToWsComponent(component);
 
-    ComponentDto referenceComponent = referenceComponentsById.get(component.getCopyResourceId());
-    if (!referenceComponentsById.isEmpty() && referenceComponent != null) {
+    ComponentDto referenceComponent = referenceComponentsByUuid.get(component.getCopyResourceUuid());
+    if (referenceComponent != null) {
       wsComponent.setRefId(referenceComponent.uuid());
       wsComponent.setRefKey(referenceComponent.key());
     }
index be23ef35f58d39a78c7254482ebfb3759920d69e..2b872defd6f720c1084751e8dc330d94b0532896 100644 (file)
@@ -216,13 +216,13 @@ public class ComponentTreeAction implements MeasuresWsAction {
       componentDtoToWsComponent(
         data.getBaseComponent(),
         data.getMeasuresByComponentUuidAndMetric().row(data.getBaseComponent().uuid()),
-        data.getReferenceComponentsById()));
+        data.getReferenceComponentsByUuid()));
 
     for (ComponentDto componentDto : data.getComponents()) {
       response.addComponents(componentDtoToWsComponent(
         componentDto,
         data.getMeasuresByComponentUuidAndMetric().row(componentDto.uuid()),
-        data.getReferenceComponentsById()));
+        data.getReferenceComponentsByUuid()));
     }
 
     if (areMetricsInResponse(request)) {
index 7c4505c61bf3a1faaf5b1d65fe5a43ff75c9e221..78e779e4ff341fa4bf1cf95988962a5ed1de76c2 100644 (file)
@@ -35,7 +35,7 @@ class ComponentTreeData {
   private final ComponentDto baseComponent;
   private final List<ComponentDtoWithSnapshotId> components;
   private final int componentCount;
-  private final Map<Long, ComponentDto> referenceComponentsById;
+  private final Map<String, ComponentDto> referenceComponentsByUuid;
   private final List<MetricDto> metrics;
   private final List<WsMeasures.Period> periods;
   private final Table<String, MetricDto, MeasureDto> measuresByComponentUuidAndMetric;
@@ -44,7 +44,7 @@ class ComponentTreeData {
     this.baseComponent = builder.baseComponent;
     this.components = builder.componentsFromDb;
     this.componentCount = builder.componentCount;
-    this.referenceComponentsById = builder.referenceComponentsById;
+    this.referenceComponentsByUuid = builder.referenceComponentsByUuid;
     this.metrics = builder.metrics;
     this.measuresByComponentUuidAndMetric = builder.measuresByComponentUuidAndMetric;
     this.periods = builder.periods;
@@ -65,8 +65,8 @@ class ComponentTreeData {
   }
 
   @CheckForNull
-  public Map<Long, ComponentDto> getReferenceComponentsById() {
-    return referenceComponentsById;
+  public Map<String, ComponentDto> getReferenceComponentsByUuid() {
+    return referenceComponentsByUuid;
   }
 
   @CheckForNull
@@ -91,7 +91,7 @@ class ComponentTreeData {
   static class Builder {
     private ComponentDto baseComponent;
     private List<ComponentDtoWithSnapshotId> componentsFromDb;
-    private Map<Long, ComponentDto> referenceComponentsById;
+    private Map<String, ComponentDto> referenceComponentsByUuid;
     private int componentCount;
     private List<MetricDto> metrics;
     private List<WsMeasures.Period> periods;
@@ -131,8 +131,8 @@ class ComponentTreeData {
       return this;
     }
 
-    public Builder setReferenceComponentsById(Map<Long, ComponentDto> referenceComponentsById) {
-      this.referenceComponentsById = referenceComponentsById;
+    public Builder setReferenceComponentsByUuid(Map<String, ComponentDto> referenceComponentsByUuid) {
+      this.referenceComponentsByUuid = referenceComponentsByUuid;
       return this;
     }
 
index 3b29e1c58a46aa6fbbb7d0ff0d350d73b96dc52c..4063539a8d30b10955bfd9f26b5b5f622ffcda3f 100644 (file)
@@ -24,6 +24,7 @@ import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.HashBasedTable;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
@@ -121,7 +122,7 @@ public class ComponentTreeDataLoader {
       components = sortComponents(components, wsRequest, metrics, measuresByComponentUuidAndMetric);
       int componentCount = computeComponentCount(componentDtosAndTotal.total, components, componentWithMeasuresOnly(wsRequest));
       components = paginateComponents(components, wsRequest);
-      Map<Long, ComponentDto> referenceComponentsById = searchReferenceComponentsById(dbSession, components);
+      Map<String, ComponentDto> referenceComponentsById = searchReferenceComponentsById(dbSession, components);
 
       return ComponentTreeData.builder()
         .setBaseComponent(baseComponent)
@@ -130,7 +131,7 @@ public class ComponentTreeDataLoader {
         .setMeasuresByComponentUuidAndMetric(measuresByComponentUuidAndMetric)
         .setMetrics(metrics)
         .setPeriods(periods)
-        .setReferenceComponentsById(referenceComponentsById)
+        .setReferenceComponentsByUuid(referenceComponentsById)
         .build();
     } finally {
       dbClient.closeSession(dbSession);
@@ -150,22 +151,17 @@ public class ComponentTreeDataLoader {
     return componentFinder.getByUuidOrKey(dbSession, wsRequest.getDeveloperId(), wsRequest.getDeveloperKey(), DEVELOPER_ID_AND_KEY).getId();
   }
 
-  private Map<Long, ComponentDto> searchReferenceComponentsById(DbSession dbSession, List<ComponentDtoWithSnapshotId> components) {
-    List<Long> referenceComponentIds = from(components)
-      .transform(ComponentDtoWithSnapshotIdToCopyResourceIdFunction.INSTANCE)
-      .filter(Predicates.<Long>notNull())
+  private Map<String, ComponentDto> searchReferenceComponentsById(DbSession dbSession, List<ComponentDtoWithSnapshotId> components) {
+    List<String> referenceComponentUUids = from(components)
+      .transform(ComponentDto::getCopyResourceUuid)
+      .filter(Predicates.<String>notNull())
       .toList();
-    if (referenceComponentIds.isEmpty()) {
+    if (referenceComponentUUids.isEmpty()) {
       return emptyMap();
     }
 
-    List<ComponentDto> referenceComponents = dbClient.componentDao().selectByIds(dbSession, referenceComponentIds);
-    Map<Long, ComponentDto> referenceComponentUuidsById = new HashMap<>();
-    for (ComponentDto referenceComponent : referenceComponents) {
-      referenceComponentUuidsById.put(referenceComponent.getId(), referenceComponent);
-    }
-
-    return referenceComponentUuidsById;
+    return FluentIterable.from(dbClient.componentDao().selectByUuids(dbSession, referenceComponentUUids))
+      .uniqueIndex(ComponentDto::uuid);
   }
 
   private ComponentDtosAndTotal searchComponents(DbSession dbSession, ComponentTreeQuery dbQuery, ComponentTreeWsRequest wsRequest) {
@@ -409,15 +405,6 @@ public class ComponentTreeDataLoader {
     }
   }
 
-  private enum ComponentDtoWithSnapshotIdToCopyResourceIdFunction implements Function<ComponentDtoWithSnapshotId, Long> {
-    INSTANCE;
-
-    @Override
-    public Long apply(@Nonnull ComponentDtoWithSnapshotId input) {
-      return input.getCopyResourceId();
-    }
-  }
-
   private static class MatchMetricKey implements Predicate<MetricDto> {
     private final String metricKeyToSort;
 
index e069e6c296b393827b8dc8ae782ac7bd60ac024d..96b877881367aebf89678a61907173accec694e5 100644 (file)
@@ -207,7 +207,7 @@ public class CeQueueImplTest {
   }
 
   private static ComponentDto newComponentDto(String uuid) {
-    return new ComponentDto().setUuid(uuid).setName("name_" + uuid).setKey("key_" + uuid);
+    return new ComponentDto().setUuid(uuid).setRootUuid(uuid).setName("name_" + uuid).setKey("key_" + uuid);
   }
 
   private CeTask submit(String reportType, String componentUuid) {
index cc3683e609890c191f8f2d02fc3ace00800ca6c7..7ff44abc27de26c53dae8f58af839d05afddc2dc 100644 (file)
@@ -80,6 +80,7 @@ public class ProjectDataLoaderTest {
     underTest.load(ProjectDataQuery.create().setModuleKey(key));
   }
 
+  private int uuidCounter = 0;
   @Test
   public void load_fails_with_BRE_if_component_is_neither_a_project_or_a_module() {
     String[][] allScopesAndQualifierButProjectAndModule = {
@@ -96,7 +97,8 @@ public class ProjectDataLoaderTest {
       String scope = scopeAndQualifier[0];
       String qualifier = scopeAndQualifier[1];
       String key = "theKey_" + scope + "_" + qualifier;
-      dbClient.componentDao().insert(dbSession, new ComponentDto().setScope(scope).setQualifier(qualifier).setKey(key));
+      String uuid = "uuid_" + uuidCounter++;
+      dbClient.componentDao().insert(dbSession, new ComponentDto().setUuid(uuid).setRootUuid(uuid).setScope(scope).setQualifier(qualifier).setKey(key));
       dbSession.commit();
 
       try {
index 620b0e7dc5584dc941a7edfa914522483aa83f4d..c2b3c1913544e8bd54f108f1a37ce2241da9d508 100644 (file)
@@ -85,8 +85,9 @@ public class TaskFormatterTest {
   @Test
   public void formatQueue_with_component_and_other_fields() throws IOException {
     when(ceLogging.getFile(any(LogFileRef.class))).thenReturn(Optional.of(temp.newFile()));
+    String uuid = "COMPONENT_UUID";
     db.getDbClient().componentDao().insert(db.getSession(), new ComponentDto()
-      .setUuid("COMPONENT_UUID").setKey("COMPONENT_KEY").setName("Component Name").setQualifier(Qualifiers.PROJECT));
+      .setUuid(uuid).setRootUuid(uuid).setKey("COMPONENT_KEY").setName("Component Name").setQualifier(Qualifiers.PROJECT));
 
     CeQueueDto dto = new CeQueueDto();
     dto.setUuid("UUID");
@@ -94,14 +95,14 @@ public class TaskFormatterTest {
     dto.setStatus(CeQueueDto.Status.IN_PROGRESS);
     dto.setCreatedAt(1_450_000_000_000L);
     dto.setStartedAt(1_451_000_000_000L);
-    dto.setComponentUuid("COMPONENT_UUID");
+    dto.setComponentUuid(uuid);
     dto.setSubmitterLogin("rob");
 
     WsCe.Task wsTask = underTest.formatQueue(db.getSession(), dto);
 
     assertThat(wsTask.getType()).isEqualTo("TYPE");
     assertThat(wsTask.getId()).isEqualTo("UUID");
-    assertThat(wsTask.getComponentId()).isEqualTo("COMPONENT_UUID");
+    assertThat(wsTask.getComponentId()).isEqualTo(uuid);
     assertThat(wsTask.getComponentKey()).isEqualTo("COMPONENT_KEY");
     assertThat(wsTask.getComponentName()).isEqualTo("Component Name");
     assertThat(wsTask.getComponentQualifier()).isEqualTo("TRK");
index c2d7d1f65f08d4168544db628f5bb407f9a6dfa5..545857ebec5d505b544cdaa058533e3ed4b544e7 100644 (file)
@@ -123,9 +123,9 @@ public class AppActionTest {
       .setProjectUuid("THE_PROJECT")
       .setLongName("src/main/java/org/sonar/api/Plugin.java")
       .setPath("src/main/java/org/sonar/api/Plugin.java")
-      .setParentProjectId(5L);
+      .setRootUuid("uuid_5");
     when(componentDao.selectByUuid(session, COMPONENT_UUID)).thenReturn(Optional.of(file));
-    when(componentDao.selectOrFailById(session, 5L)).thenReturn(new ComponentDto().setId(5L).setLongName("SonarQube :: Plugin API").setKey(SUB_PROJECT_KEY));
+    when(componentDao.selectOrFailByUuid(session, "uuid_5")).thenReturn(new ComponentDto().setUuid("uuid_5").setLongName("SonarQube :: Plugin API").setKey(SUB_PROJECT_KEY));
     when(componentDao.selectOrFailByUuid(session, project.uuid())).thenReturn(project);
     when(propertiesDao.selectByQuery(any(PropertyQuery.class), eq(session))).thenReturn(newArrayList(new PropertyDto()));
 
@@ -227,9 +227,9 @@ public class AppActionTest {
       .setName("Plugin.java")
       .setLongName("src/main/java/org/sonar/api/Plugin.java")
       .setPath("src/main/java/org/sonar/api/Plugin.java")
-      .setParentProjectId(5L);
+      .setRootUuid("uuid_5");
     when(componentDao.selectByUuid(session, COMPONENT_UUID)).thenReturn(Optional.of(file));
-    when(componentDao.selectOrFailById(session, 5L)).thenReturn(new ComponentDto().setId(5L).setLongName("SonarQube :: Plugin API").setKey(SUB_PROJECT_KEY));
+    when(componentDao.selectOrFailByUuid(session, "uuid_5")).thenReturn(new ComponentDto().setUuid("uuid_5").setLongName("SonarQube :: Plugin API").setKey(SUB_PROJECT_KEY));
     when(componentDao.selectOrFailByUuid(session, project.uuid())).thenReturn(project);
     return file;
   }
index 9617ea2e474f8e28149599aa080245111ad395d5..80b67c4c27fbd5f7098b3dc16e355206976839c1 100644 (file)
@@ -402,6 +402,7 @@ public class TreeActionTest {
       JsonObject componentAsJsonObject = componentAsJsonElement.getAsJsonObject();
       componentDb.insertComponentAndSnapshot(new ComponentDto()
         .setUuid(getJsonField(componentAsJsonObject, "id"))
+        .setRootUuid("root_uuid")
         .setKey(getJsonField(componentAsJsonObject, "key"))
         .setName(getJsonField(componentAsJsonObject, "name"))
         .setLanguage(getJsonField(componentAsJsonObject, "language"))
index aeedba846ceb364379bbb7f3392fd581feb090cf..5e407ac4fa6ea07505a5d2eae9e7eecc40fa125c 100644 (file)
@@ -307,7 +307,7 @@ public class InternalCeQueueImplTest {
   }
 
   private static ComponentDto newComponentDto(String uuid) {
-    return new ComponentDto().setUuid(uuid).setName("name_" + uuid).setKey("key_" + uuid);
+    return new ComponentDto().setUuid(uuid).setRootUuid(uuid).setName("name_" + uuid).setKey("key_" + uuid);
   }
 
   private CeTask submit(String reportType, String componentUuid) {
index 37d66d469c3c1c94e3d2c21ed299654211e99746..68e97a0758ce784c698a588c9d78314406987c9c 100644 (file)
@@ -391,7 +391,7 @@ public class PersistMeasuresStepTest extends BaseStepTest {
   }
 
   private ComponentDto addComponent(String key, String uuid) {
-    ComponentDto componentDto = new ComponentDto().setKey(key).setUuid(uuid);
+    ComponentDto componentDto = new ComponentDto().setKey(key).setUuid(uuid).setRootUuid(uuid);
     dbClient.componentDao().insert(dbTester.getSession(), componentDto);
     return componentDto;
   }
index 3977c052c7c8a324cb3f0898fc0c719ee0afef96..dbddd340e32983f00a6d6eae3aac946079102432 100644 (file)
@@ -117,7 +117,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(projectDto.projectUuid()).isEqualTo(projectDto.uuid());
     assertThat(projectDto.qualifier()).isEqualTo("TRK");
     assertThat(projectDto.scope()).isEqualTo("PRJ");
-    assertThat(projectDto.parentProjectId()).isNull();
+    assertThat(projectDto.getRootUuid()).isEqualTo("ABCD");
     assertThat(projectDto.getCreatedAt()).isEqualTo(now);
 
     ComponentDto moduleDto = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY").get();
@@ -130,7 +130,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(moduleDto.projectUuid()).isEqualTo(projectDto.uuid());
     assertThat(moduleDto.qualifier()).isEqualTo("BRC");
     assertThat(moduleDto.scope()).isEqualTo("PRJ");
-    assertThat(moduleDto.parentProjectId()).isEqualTo(projectDto.getId());
+    assertThat(moduleDto.getRootUuid()).isEqualTo(projectDto.uuid());
     assertThat(moduleDto.getCreatedAt()).isEqualTo(now);
 
     ComponentDto directoryDto = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY:src/main/java/dir").get();
@@ -143,7 +143,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(directoryDto.projectUuid()).isEqualTo(projectDto.uuid());
     assertThat(directoryDto.qualifier()).isEqualTo("DIR");
     assertThat(directoryDto.scope()).isEqualTo("DIR");
-    assertThat(directoryDto.parentProjectId()).isEqualTo(moduleDto.getId());
+    assertThat(directoryDto.getRootUuid()).isEqualTo(moduleDto.uuid());
     assertThat(directoryDto.getCreatedAt()).isEqualTo(now);
 
     ComponentDto fileDto = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY:src/main/java/dir/Foo.java").get();
@@ -157,7 +157,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(fileDto.projectUuid()).isEqualTo(projectDto.uuid());
     assertThat(fileDto.qualifier()).isEqualTo("FIL");
     assertThat(fileDto.scope()).isEqualTo("FIL");
-    assertThat(fileDto.parentProjectId()).isEqualTo(moduleDto.getId());
+    assertThat(fileDto.getRootUuid()).isEqualTo(moduleDto.uuid());
     assertThat(fileDto.getCreatedAt()).isEqualTo(now);
 
     assertThat(dbIdsRepository.getComponentId(project)).isEqualTo(projectDto.getId());
@@ -254,23 +254,23 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(moduleReloaded.moduleUuid()).isEqualTo(module.moduleUuid());
     assertThat(moduleReloaded.moduleUuidPath()).isEqualTo(module.moduleUuidPath());
     assertThat(moduleReloaded.projectUuid()).isEqualTo(module.projectUuid());
-    assertThat(moduleReloaded.parentProjectId()).isEqualTo(module.parentProjectId());
+    assertThat(moduleReloaded.getRootUuid()).isEqualTo(module.getRootUuid());
 
     ComponentDto directory = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY:src/main/java/dir").get();
     assertThat(directory.moduleUuid()).isEqualTo(module.uuid());
     assertThat(directory.moduleUuidPath()).isEqualTo(module.moduleUuidPath());
     assertThat(directory.projectUuid()).isEqualTo(project.uuid());
-    assertThat(directory.parentProjectId()).isEqualTo(module.getId());
+    assertThat(directory.getRootUuid()).isEqualTo(module.uuid());
 
     ComponentDto file = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY:src/main/java/dir/Foo.java").get();
     assertThat(file.moduleUuid()).isEqualTo(module.uuid());
     assertThat(file.moduleUuidPath()).isEqualTo(module.moduleUuidPath());
     assertThat(file.projectUuid()).isEqualTo(project.uuid());
-    assertThat(file.parentProjectId()).isEqualTo(module.getId());
+    assertThat(file.getRootUuid()).isEqualTo(module.uuid());
   }
 
   @Test
-  public void compute_parent_project_id() {
+  public void compute_root_uuid() {
     treeRootHolder.setRoot(
       builder(PROJECT, 1).setUuid("ABCD").setKey(PROJECT_KEY)
         .setName("Project")
@@ -298,23 +298,23 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
 
     Optional<ComponentDto> project = dbClient.componentDao().selectByKey(dbTester.getSession(), PROJECT_KEY);
     assertThat(project).isPresent();
-    assertThat(project.get().parentProjectId()).isNull();
+    assertThat(project.get().getRootUuid()).isEqualTo("ABCD");
 
     Optional<ComponentDto> module = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY");
     assertThat(module).isPresent();
-    assertThat(module.get().parentProjectId()).isEqualTo(project.get().getId());
+    assertThat(module.get().getRootUuid()).isEqualTo(project.get().uuid());
 
     Optional<ComponentDto> subModule1 = dbClient.componentDao().selectByKey(dbTester.getSession(), "SUB_MODULE_1_KEY");
     assertThat(subModule1).isPresent();
-    assertThat(subModule1.get().parentProjectId()).isEqualTo(project.get().getId());
+    assertThat(subModule1.get().getRootUuid()).isEqualTo(project.get().uuid());
 
     Optional<ComponentDto> subModule2 = dbClient.componentDao().selectByKey(dbTester.getSession(), "SUB_MODULE_2_KEY");
     assertThat(subModule2).isPresent();
-    assertThat(subModule2.get().parentProjectId()).isEqualTo(project.get().getId());
+    assertThat(subModule2.get().getRootUuid()).isEqualTo(project.get().uuid());
 
     Optional<ComponentDto> directory = dbClient.componentDao().selectByKey(dbTester.getSession(), "SUB_MODULE_2_KEY:src/main/java/dir");
     assertThat(directory).isPresent();
-    assertThat(directory.get().parentProjectId()).isEqualTo(subModule2.get().getId());
+    assertThat(directory.get().getRootUuid()).isEqualTo(subModule2.get().uuid());
   }
 
   @Test
@@ -342,22 +342,22 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     ComponentDto project = dbClient.componentDao().selectByKey(dbTester.getSession(), PROJECT_KEY).get();
     assertThat(project.moduleUuid()).isNull();
     assertThat(project.moduleUuidPath()).isEqualTo("." + project.uuid() + ".");
-    assertThat(project.parentProjectId()).isNull();
+    assertThat(project.getRootUuid()).isEqualTo("ABCD");
 
     ComponentDto moduleA = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_A").get();
     assertThat(moduleA.moduleUuid()).isEqualTo(project.uuid());
     assertThat(moduleA.moduleUuidPath()).isEqualTo(project.moduleUuidPath() + moduleA.uuid() + ".");
-    assertThat(moduleA.parentProjectId()).isEqualTo(project.getId());
+    assertThat(moduleA.getRootUuid()).isEqualTo(project.uuid());
 
     ComponentDto subModuleA = dbClient.componentDao().selectByKey(dbTester.getSession(), "SUB_MODULE_A").get();
     assertThat(subModuleA.moduleUuid()).isEqualTo(moduleA.uuid());
     assertThat(subModuleA.moduleUuidPath()).isEqualTo(moduleA.moduleUuidPath() + subModuleA.uuid() + ".");
-    assertThat(subModuleA.parentProjectId()).isEqualTo(project.getId());
+    assertThat(subModuleA.getRootUuid()).isEqualTo(project.uuid());
 
     ComponentDto moduleB = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_B").get();
     assertThat(moduleB.moduleUuid()).isEqualTo(project.uuid());
     assertThat(moduleB.moduleUuidPath()).isEqualTo(project.moduleUuidPath() + moduleB.uuid() + ".");
-    assertThat(moduleB.parentProjectId()).isEqualTo(project.getId());
+    assertThat(moduleB.getRootUuid()).isEqualTo(project.uuid());
   }
 
   @Test
@@ -402,7 +402,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(projectReloaded.moduleUuid()).isEqualTo(project.moduleUuid());
     assertThat(projectReloaded.moduleUuidPath()).isEqualTo(project.moduleUuidPath());
     assertThat(projectReloaded.projectUuid()).isEqualTo(project.projectUuid());
-    assertThat(projectReloaded.parentProjectId()).isEqualTo(project.parentProjectId());
+    assertThat(projectReloaded.getRootUuid()).isEqualTo(project.getRootUuid());
 
     ComponentDto moduleReloaded = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY").get();
     assertThat(moduleReloaded.getId()).isEqualTo(module.getId());
@@ -410,14 +410,14 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(moduleReloaded.moduleUuid()).isEqualTo(module.moduleUuid());
     assertThat(moduleReloaded.moduleUuidPath()).isEqualTo(module.moduleUuidPath());
     assertThat(moduleReloaded.projectUuid()).isEqualTo(module.projectUuid());
-    assertThat(moduleReloaded.parentProjectId()).isEqualTo(module.parentProjectId());
+    assertThat(moduleReloaded.getRootUuid()).isEqualTo(module.getRootUuid());
 
     ComponentDto directoryReloaded = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY:src/main/java/dir").get();
     assertThat(directoryReloaded.uuid()).isEqualTo(directory.uuid());
     assertThat(directoryReloaded.moduleUuid()).isEqualTo(directory.moduleUuid());
     assertThat(directoryReloaded.moduleUuidPath()).isEqualTo(directory.moduleUuidPath());
     assertThat(directoryReloaded.projectUuid()).isEqualTo(directory.projectUuid());
-    assertThat(directoryReloaded.parentProjectId()).isEqualTo(directory.parentProjectId());
+    assertThat(directoryReloaded.getRootUuid()).isEqualTo(directory.getRootUuid());
     assertThat(directoryReloaded.name()).isEqualTo(directory.name());
     assertThat(directoryReloaded.path()).isEqualTo(directory.path());
 
@@ -426,7 +426,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(fileReloaded.moduleUuid()).isEqualTo(file.moduleUuid());
     assertThat(fileReloaded.moduleUuidPath()).isEqualTo(file.moduleUuidPath());
     assertThat(fileReloaded.projectUuid()).isEqualTo(file.projectUuid());
-    assertThat(fileReloaded.parentProjectId()).isEqualTo(file.parentProjectId());
+    assertThat(fileReloaded.getRootUuid()).isEqualTo(file.getRootUuid());
     assertThat(fileReloaded.name()).isEqualTo(file.name());
     assertThat(fileReloaded.path()).isEqualTo(file.path());
   }
@@ -555,7 +555,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(moduleBReloaded.moduleUuid()).isEqualTo(moduleAreloaded.uuid());
     assertThat(moduleBReloaded.moduleUuidPath()).isEqualTo(moduleAreloaded.moduleUuidPath() + moduleBReloaded.uuid() + ".");
     assertThat(moduleBReloaded.projectUuid()).isEqualTo(project.uuid());
-    assertThat(moduleBReloaded.parentProjectId()).isEqualTo(project.getId());
+    assertThat(moduleBReloaded.getRootUuid()).isEqualTo(project.uuid());
 
     ComponentDto directoryReloaded = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_B:src/main/java/dir").get();
     assertThat(directoryReloaded).isNotNull();
@@ -563,7 +563,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(directoryReloaded.moduleUuid()).isEqualTo(moduleBReloaded.uuid());
     assertThat(directoryReloaded.moduleUuidPath()).isEqualTo(moduleBReloaded.moduleUuidPath());
     assertThat(directoryReloaded.projectUuid()).isEqualTo(project.uuid());
-    assertThat(directoryReloaded.parentProjectId()).isEqualTo(moduleBReloaded.getId());
+    assertThat(directoryReloaded.getRootUuid()).isEqualTo(moduleBReloaded.uuid());
 
     ComponentDto fileReloaded = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_B:src/main/java/dir/Foo.java").get();
     assertThat(fileReloaded).isNotNull();
@@ -571,7 +571,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(fileReloaded.moduleUuid()).isEqualTo(moduleBReloaded.uuid());
     assertThat(fileReloaded.moduleUuidPath()).isEqualTo(moduleBReloaded.moduleUuidPath());
     assertThat(fileReloaded.projectUuid()).isEqualTo(project.uuid());
-    assertThat(fileReloaded.parentProjectId()).isEqualTo(moduleBReloaded.getId());
+    assertThat(fileReloaded.getRootUuid()).isEqualTo(moduleBReloaded.uuid());
   }
 
   @Test
@@ -638,7 +638,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(projectReloaded.moduleUuid()).isEqualTo(project.moduleUuid());
     assertThat(projectReloaded.moduleUuidPath()).isEqualTo(project.moduleUuidPath());
     assertThat(projectReloaded.projectUuid()).isEqualTo(project.projectUuid());
-    assertThat(projectReloaded.parentProjectId()).isEqualTo(project.parentProjectId());
+    assertThat(projectReloaded.getRootUuid()).isEqualTo(project.getRootUuid());
     assertThat(projectReloaded.isEnabled()).isTrue();
 
     ComponentDto moduleReloaded = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY").get();
@@ -647,7 +647,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(moduleReloaded.moduleUuid()).isEqualTo(removedModule.moduleUuid());
     assertThat(moduleReloaded.moduleUuidPath()).isEqualTo(removedModule.moduleUuidPath());
     assertThat(moduleReloaded.projectUuid()).isEqualTo(removedModule.projectUuid());
-    assertThat(moduleReloaded.parentProjectId()).isEqualTo(removedModule.parentProjectId());
+    assertThat(moduleReloaded.getRootUuid()).isEqualTo(removedModule.getRootUuid());
     assertThat(moduleReloaded.isEnabled()).isTrue();
 
     ComponentDto directoryReloaded = dbClient.componentDao().selectByKey(dbTester.getSession(), "MODULE_KEY:src/main/java/dir").get();
@@ -656,7 +656,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(directoryReloaded.moduleUuid()).isEqualTo(removedDirectory.moduleUuid());
     assertThat(directoryReloaded.moduleUuidPath()).isEqualTo(removedDirectory.moduleUuidPath());
     assertThat(directoryReloaded.projectUuid()).isEqualTo(removedDirectory.projectUuid());
-    assertThat(directoryReloaded.parentProjectId()).isEqualTo(removedDirectory.parentProjectId());
+    assertThat(directoryReloaded.getRootUuid()).isEqualTo(removedDirectory.getRootUuid());
     assertThat(directoryReloaded.name()).isEqualTo(removedDirectory.name());
     assertThat(directoryReloaded.path()).isEqualTo(removedDirectory.path());
     assertThat(directoryReloaded.isEnabled()).isTrue();
@@ -667,7 +667,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(fileReloaded.moduleUuid()).isEqualTo(removedFile.moduleUuid());
     assertThat(fileReloaded.moduleUuidPath()).isEqualTo(removedFile.moduleUuidPath());
     assertThat(fileReloaded.projectUuid()).isEqualTo(removedFile.projectUuid());
-    assertThat(fileReloaded.parentProjectId()).isEqualTo(removedFile.parentProjectId());
+    assertThat(fileReloaded.getRootUuid()).isEqualTo(removedFile.getRootUuid());
     assertThat(fileReloaded.name()).isEqualTo(removedFile.name());
     assertThat(fileReloaded.path()).isEqualTo(removedFile.path());
     assertThat(fileReloaded.isEnabled()).isTrue();
@@ -717,7 +717,7 @@ public class ReportPersistComponentsStepTest extends BaseStepTest {
     assertThat(fileReloaded.moduleUuid()).isEqualTo(moduleReloaded.uuid());
     assertThat(fileReloaded.moduleUuidPath()).isEqualTo(moduleReloaded.moduleUuidPath());
     assertThat(fileReloaded.projectUuid()).isEqualTo(moduleReloaded.projectUuid());
-    assertThat(fileReloaded.parentProjectId()).isEqualTo(moduleReloaded.getId());
+    assertThat(fileReloaded.getRootUuid()).isEqualTo(moduleReloaded.uuid());
     assertThat(fileReloaded.name()).isEqualTo(removedFile.name());
     assertThat(fileReloaded.path()).isEqualTo(removedFile.path());
     assertThat(fileReloaded.isEnabled()).isTrue();
index 41266b7ed31be2e1cc20ef546ac878850c962758..0aa17f31b5c7286851a5e97d4284e1f7bb0362ce 100644 (file)
@@ -300,7 +300,7 @@ public class ViewsPersistComponentsStepTest extends BaseStepTest {
       .setUuid(PROJECT_VIEW_1_UUID)
       .setName(PROJECT_VIEW_1_NAME)
       .setDescription("project view description is not persisted")
-      .setProjectViewAttributes(new ProjectViewAttributes(project.getId(), project.uuid()));
+      .setProjectViewAttributes(new ProjectViewAttributes(project.uuid()));
   }
 
   private void persistComponents(ComponentDto... componentDtos) {
@@ -333,12 +333,12 @@ public class ViewsPersistComponentsStepTest extends BaseStepTest {
     assertThat(projectDto.path()).isNull();
     assertThat(projectDto.uuid()).isEqualTo(VIEW_UUID);
     assertThat(projectDto.projectUuid()).isEqualTo(projectDto.uuid());
-    assertThat(projectDto.parentProjectId()).isNull();
+    assertThat(projectDto.getRootUuid()).isEqualTo(VIEW_UUID);
     assertThat(projectDto.moduleUuid()).isNull();
     assertThat(projectDto.moduleUuidPath()).isEqualTo("." + projectDto.uuid() + ".");
     assertThat(projectDto.qualifier()).isEqualTo(Qualifiers.VIEW);
     assertThat(projectDto.scope()).isEqualTo(Scopes.PROJECT);
-    assertThat(projectDto.getCopyResourceId()).isNull();
+    assertThat(projectDto.getCopyResourceUuid()).isNull();
     assertThat(projectDto.getCreatedAt()).isEqualTo(now);
   }
 
@@ -352,12 +352,12 @@ public class ViewsPersistComponentsStepTest extends BaseStepTest {
     assertThat(sv1Dto.path()).isNull();
     assertThat(sv1Dto.uuid()).isEqualTo(SUBVIEW_1_UUID);
     assertThat(sv1Dto.projectUuid()).isEqualTo(viewDto.uuid());
-    assertThat(sv1Dto.parentProjectId()).isEqualTo(viewDto.getId());
+    assertThat(sv1Dto.getRootUuid()).isEqualTo(viewDto.uuid());
     assertThat(sv1Dto.moduleUuid()).isEqualTo(viewDto.uuid());
     assertThat(sv1Dto.moduleUuidPath()).isEqualTo(viewDto.moduleUuidPath() + sv1Dto.uuid() + ".");
     assertThat(sv1Dto.qualifier()).isEqualTo(Qualifiers.SUBVIEW);
     assertThat(sv1Dto.scope()).isEqualTo(Scopes.PROJECT);
-    assertThat(sv1Dto.getCopyResourceId()).isNull();
+    assertThat(sv1Dto.getCopyResourceUuid()).isNull();
     assertThat(sv1Dto.getCreatedAt()).isEqualTo(now);
   }
 
@@ -368,12 +368,12 @@ public class ViewsPersistComponentsStepTest extends BaseStepTest {
     assertThat(pv1Dto.path()).isNull();
     assertThat(pv1Dto.uuid()).isEqualTo(PROJECT_VIEW_1_UUID);
     assertThat(pv1Dto.projectUuid()).isEqualTo(viewDto.uuid());
-    assertThat(pv1Dto.parentProjectId()).isEqualTo(viewDto.getId());
+    assertThat(pv1Dto.getRootUuid()).isEqualTo(viewDto.uuid());
     assertThat(pv1Dto.moduleUuid()).isEqualTo(parentViewDto.uuid());
     assertThat(pv1Dto.moduleUuidPath()).isEqualTo(parentViewDto.moduleUuidPath() + pv1Dto.uuid() + ".");
     assertThat(pv1Dto.qualifier()).isEqualTo(Qualifiers.PROJECT);
     assertThat(pv1Dto.scope()).isEqualTo(Scopes.FILE);
-    assertThat(pv1Dto.getCopyResourceId()).isEqualTo(project.getId());
+    assertThat(pv1Dto.getCopyResourceUuid()).isEqualTo(project.uuid());
     assertThat(pv1Dto.getCreatedAt()).isEqualTo(now);
   }
 
index c2dcb26c40abf750fec395ef6aa5c29529d3ef04..5bfda9d6d01d96cad6d4765c17c7651d65b8fb47 100644 (file)
@@ -70,14 +70,14 @@ public class DuplicationsJsonWriterTest {
   @Test
   public void write_duplications() {
     String key1 = "org.codehaus.sonar:sonar-ws-client:src/main/java/org/sonar/wsclient/services/PropertyDeleteQuery.java";
-    ComponentDto file1 = ComponentTesting.newFileDto(project).setId(10L).setKey(key1).setLongName("PropertyDeleteQuery").setParentProjectId(5L);
+    ComponentDto file1 = ComponentTesting.newFileDto(project).setId(10L).setKey(key1).setLongName("PropertyDeleteQuery").setRootUuid("uuid_5");
     String key2 = "org.codehaus.sonar:sonar-ws-client:src/main/java/org/sonar/wsclient/services/PropertyUpdateQuery.java";
-    ComponentDto file2 = ComponentTesting.newFileDto(project).setId(11L).setQualifier("FIL").setKey(key2).setLongName("PropertyUpdateQuery").setParentProjectId(5L);
+    ComponentDto file2 = ComponentTesting.newFileDto(project).setId(11L).setQualifier("FIL").setKey(key2).setLongName("PropertyUpdateQuery").setRootUuid("uuid_5");
 
     when(componentDao.selectByKey(session, key1)).thenReturn(Optional.of(file1));
     when(componentDao.selectByKey(session, key2)).thenReturn(Optional.of(file2));
-    when(componentDao.selectById(session, 5L)).thenReturn(Optional.of(
-      new ComponentDto().setId(5L).setKey("org.codehaus.sonar:sonar-ws-client").setLongName("SonarQube :: Web Service Client")));
+    when(componentDao.selectByUuid(session, "uuid_5")).thenReturn(Optional.of(
+      new ComponentDto().setUuid("uuid_5").setKey("org.codehaus.sonar:sonar-ws-client").setLongName("SonarQube :: Web Service Client")));
     when(componentDao.selectByUuid(session, project.uuid())).thenReturn(Optional.of(project));
 
     List<DuplicationsParser.Block> blocks = newArrayList();
@@ -123,7 +123,7 @@ public class DuplicationsJsonWriterTest {
     verify(componentDao, times(2)).selectByKey(eq(session), anyString());
     // Verify call to dao is cached when searching for project / sub project
     verify(componentDao, times(1)).selectByUuid(eq(session), eq(project.uuid()));
-    verify(componentDao, times(1)).selectById(eq(session), eq(5L));
+    verify(componentDao, times(1)).selectByUuid(eq(session), eq("uuid_5"));
   }
 
   @Test
index a3fc80c56b241e4a4d2eba24c8381a2ea3168016..becabf751633b9039cdab5adab0a46cc3537b2f9 100644 (file)
@@ -347,16 +347,12 @@ public class IssueQueryServiceTest {
     String login2 = "darth.vader";
     String copyProjectUuid = devUuid + ":" + projectUuid;
 
-    long copyResourceId = 42L;
-    ComponentDto technicalProject = new ComponentDto().setProjectUuid(devUuid).setCopyResourceId(copyResourceId);
+    ComponentDto technicalProject = new ComponentDto().setProjectUuid(devUuid).setCopyComponentUuid(projectUuid);
     when(componentDao.selectByUuids(isA(DbSession.class), anyCollection())).thenReturn(Arrays.asList(technicalProject));
 
     when(componentService.getDistinctQualifiers(isA(DbSession.class), anyCollection())).thenReturn(Sets.newHashSet("DEV_PRJ"));
     when(authorDao.selectScmAccountsByDeveloperUuids(isA(DbSession.class), anyCollection())).thenReturn(Lists.newArrayList(login1, login2));
 
-    ComponentDto actualProject = new ComponentDto().setUuid(projectUuid);
-    when(componentDao.selectByIds(isA(DbSession.class), anyCollection())).thenReturn(Arrays.asList(actualProject));
-
     Map<String, Object> map = newHashMap();
     map.put("componentUuids", newArrayList(copyProjectUuid));
     IssueQuery query = underTest.createFromMap(map);
index 6f8d2adabb7010a64d91baff776b9b5319390d3a..d927ffcf25d95f77ee46c1049413bac2d1d942b6 100644 (file)
@@ -19,6 +19,9 @@
  */
 package org.sonar.server.measure;
 
+import static com.google.common.collect.Lists.newArrayList;
+import static org.assertj.core.api.Assertions.assertThat;
+
 import java.sql.SQLException;
 import java.util.Arrays;
 import java.util.Date;
@@ -34,20 +37,19 @@ import org.sonar.db.DbTester;
 import org.sonar.db.component.ResourceDao;
 import org.sonar.db.component.SnapshotDto;
 
-import static com.google.common.collect.Lists.newArrayList;
-import static org.assertj.core.api.Assertions.assertThat;
-
 
 public class MeasureFilterExecutorTest {
 
   private static final long JAVA_PROJECT_ID = 1L;
   private static final long JAVA_FILE_BIG_ID = 3L;
   private static final long JAVA_FILE_TINY_ID = 4L;
+  private static final String JAVA_PROJECT_UUID = "UUID_JAVA_PROJECT";
   private static final long JAVA_PROJECT_SNAPSHOT_ID = 101L;
   private static final long JAVA_FILE_BIG_SNAPSHOT_ID = 103L;
   private static final long JAVA_FILE_TINY_SNAPSHOT_ID = 104L;
   private static final long JAVA_PACKAGE_SNAPSHOT_ID = 102L;
   private static final long PHP_PROJECT_ID = 10L;
+  private static final String PHP_PROJECT_UUID = "UUID_PHP_PROJECT";
   private static final long PHP_SNAPSHOT_ID = 110L;
   private static final Metric METRIC_LINES = new Metric.Builder("lines", "Lines", Metric.ValueType.INT).create().setId(1);
   private static final Metric METRIC_PROFILE = new Metric.Builder("profile", "Profile", Metric.ValueType.STRING).create().setId(2);
@@ -373,7 +375,7 @@ public class MeasureFilterExecutorTest {
     assertThat(rows).hasSize(3);
     verifyPhpProject(rows.get(0));
     verifyJavaProject(rows.get(1));
-    verifyProject(rows.get(2), 120L, 20L, 20L);
+    verifyProject(rows.get(2), 120L, 20L, "CDEF");
   }
 
   @Test
@@ -386,7 +388,7 @@ public class MeasureFilterExecutorTest {
 
     // Js Project ERROR, Java Project WARN, then Php Project OK
     assertThat(rows).hasSize(3);
-    verifyProject(rows.get(0), 120L, 20L, 20L);
+    verifyProject(rows.get(0), 120L, 20L, "CDEF");
     verifyJavaProject(rows.get(1));
     verifyPhpProject(rows.get(2));
   }
@@ -589,24 +591,24 @@ public class MeasureFilterExecutorTest {
   }
 
   private void verifyJavaProject(MeasureFilterRow row) {
-    verifyProject(row, JAVA_PROJECT_SNAPSHOT_ID, JAVA_PROJECT_ID, JAVA_PROJECT_ID);
+    verifyProject(row, JAVA_PROJECT_SNAPSHOT_ID, JAVA_PROJECT_ID, JAVA_PROJECT_UUID);
   }
 
   private void verifyJavaBigFile(MeasureFilterRow row) {
-    verifyProject(row, JAVA_FILE_BIG_SNAPSHOT_ID, JAVA_FILE_BIG_ID, JAVA_PROJECT_ID);
+    verifyProject(row, JAVA_FILE_BIG_SNAPSHOT_ID, JAVA_FILE_BIG_ID, JAVA_PROJECT_UUID);
   }
 
   private void verifyJavaTinyFile(MeasureFilterRow row) {
-    verifyProject(row, JAVA_FILE_TINY_SNAPSHOT_ID, JAVA_FILE_TINY_ID, JAVA_PROJECT_ID);
+    verifyProject(row, JAVA_FILE_TINY_SNAPSHOT_ID, JAVA_FILE_TINY_ID, JAVA_PROJECT_UUID);
   }
 
   private void verifyPhpProject(MeasureFilterRow row) {
-    verifyProject(row, PHP_SNAPSHOT_ID, PHP_PROJECT_ID, PHP_PROJECT_ID);
+    verifyProject(row, PHP_SNAPSHOT_ID, PHP_PROJECT_ID, PHP_PROJECT_UUID);
   }
 
-  private void verifyProject(MeasureFilterRow row, Long snashotId, Long resourceId, Long resourceRootId) {
+  private void verifyProject(MeasureFilterRow row, Long snashotId, Long resourceId, String rootComponentUuid) {
     assertThat(row.getSnapshotId()).isEqualTo(snashotId);
     assertThat(row.getResourceId()).isEqualTo(resourceId);
-    assertThat(row.getResourceRootId()).isEqualTo(resourceRootId);
+    assertThat(row.getRootComponentUuid()).isEqualTo(rootComponentUuid);
   }
 }
index ede524fe811be9adcd5a8b75ec2d7de1d989be99..27c29402afca039554d7168bf5190fba065f290e 100644 (file)
@@ -336,6 +336,7 @@ public class QProfileFactoryMediumTest {
     ComponentDto project = new ComponentDto()
       .setId(1L)
       .setUuid("ABCD")
+      .setRootUuid("ABCD")
       .setKey("org.codehaus.sonar:sonar")
       .setName("SonarQube")
       .setLongName("SonarQube")
index fd054edc264f3bcc3db2701061548e5c0c395425..ef9d30118594542fcaba33a4b5af603b59e4614e 100644 (file)
@@ -68,6 +68,7 @@ public class QProfileProjectOperationsMediumTest {
 
     project = new ComponentDto()
       .setUuid(PROJECT_UUID)
+      .setRootUuid(PROJECT_UUID)
       .setKey(PROJECT_KEY)
       .setName("SonarQube")
       .setLongName("SonarQube")
@@ -123,6 +124,7 @@ public class QProfileProjectOperationsMediumTest {
   public void remove_all_projects() {
     ComponentDto project1 = new ComponentDto()
       .setUuid("BCDE")
+      .setRootUuid("BCDE")
       .setKey("project1")
       .setName("project1")
       .setLongName("project1")
@@ -131,6 +133,7 @@ public class QProfileProjectOperationsMediumTest {
       .setEnabled(true);
     ComponentDto project2 = new ComponentDto()
       .setUuid("CDEF")
+      .setRootUuid("CDEF")
       .setKey("project2")
       .setName("project2")
       .setLongName("project2")
index 36bd0c012f21b595caa635a49ad0e5f2bc7f45f3..d58e2c97b488dfce1c5ee00afeaaf40e5e0840b5 100644 (file)
@@ -444,6 +444,7 @@ public class QProfilesWsMediumTest {
     ComponentDto project = new ComponentDto()
       .setId(1L)
       .setUuid("ABCD")
+      .setRootUuid("ABCD")
       .setKey("org.codehaus.sonar:sonar")
       .setName("SonarQube")
       .setLongName("SonarQube")
@@ -473,6 +474,7 @@ public class QProfilesWsMediumTest {
     ComponentDto project = new ComponentDto()
       .setId(1L)
       .setUuid("ABCD")
+      .setRootUuid("ABCD")
       .setKey("org.codehaus.sonar:sonar")
       .setName("SonarQube")
       .setLongName("SonarQube")
@@ -498,6 +500,7 @@ public class QProfilesWsMediumTest {
     ComponentDto project = new ComponentDto()
       .setId(1L)
       .setUuid("ABCD")
+      .setRootUuid("ABCD")
       .setKey("org.codehaus.sonar:sonar")
       .setName("SonarQube")
       .setLongName("SonarQube")
@@ -563,6 +566,7 @@ public class QProfilesWsMediumTest {
     ComponentDto project = new ComponentDto()
       .setId(1L)
       .setUuid("ABCD")
+      .setRootUuid("ABCD")
       .setKey("org.codehaus.sonar:sonar")
       .setName("SonarQube")
       .setLongName("SonarQube")
@@ -587,6 +591,7 @@ public class QProfilesWsMediumTest {
     ComponentDto project = new ComponentDto()
       .setId(1L)
       .setUuid("ABCD")
+      .setRootUuid("ABCD")
       .setKey("org.codehaus.sonar:sonar")
       .setName("SonarQube")
       .setLongName("SonarQube")
index 5c02d4830aaedf11e93cc7635d6e74c2e080433b..6ba9fc08daf8321463e75aed2feba267a2c7bce0 100644 (file)
@@ -116,6 +116,7 @@ public class ListActionTest {
       TestFile2.dto(),
       new ComponentDto()
         .setUuid(mainFileUuid)
+        .setRootUuid(TestFile1.PROJECT_UUID)
         .setProjectUuid(TestFile1.PROJECT_UUID));
     db.getSession().commit();
 
@@ -140,6 +141,7 @@ public class ListActionTest {
       TestFile2.dto(),
       new ComponentDto()
         .setUuid(sourceFileUuid)
+        .setRootUuid(TestFile1.PROJECT_UUID)
         .setKey(sourceFileKey)
         .setProjectUuid(TestFile1.PROJECT_UUID));
     db.getSession().commit();
@@ -192,7 +194,7 @@ public class ListActionTest {
   public void fail_when_no_sufficient_privilege_on_main_file_uuid() throws Exception {
     userSessionRule.addProjectUuidPermissions(UserRole.USER, TestFile1.PROJECT_UUID);
     String mainFileUuid = "MAIN-FILE-UUID";
-    dbClient.componentDao().insert(db.getSession(), new ComponentDto().setUuid(mainFileUuid).setProjectUuid(TestFile1.PROJECT_UUID));
+    dbClient.componentDao().insert(db.getSession(), new ComponentDto().setUuid(mainFileUuid).setRootUuid(TestFile1.PROJECT_UUID).setProjectUuid(TestFile1.PROJECT_UUID));
     db.getSession().commit();
 
     ws.newGetRequest("api/tests", "list")
@@ -227,6 +229,7 @@ public class ListActionTest {
     public static ComponentDto dto() {
       return new ComponentDto()
         .setUuid(TestFile1.FILE_UUID)
+        .setRootUuid(TestFile1.PROJECT_UUID)
         .setLongName(TestFile1.LONG_NAME)
         .setProjectUuid(TestFile1.PROJECT_UUID)
         .setKey(TestFile1.KEY);
@@ -266,6 +269,7 @@ public class ListActionTest {
     public static ComponentDto dto() {
       return new ComponentDto()
         .setUuid(TestFile2.FILE_UUID)
+        .setRootUuid(TestFile2.PROJECT_UUID)
         .setLongName(TestFile2.LONG_NAME)
         .setProjectUuid(TestFile2.PROJECT_UUID)
         .setKey(TestFile2.KEY);
index 0bf9a7d567ef5cee54853356df88df506b00a189..0c271cedf2d11218e772cc4bc5bb4fe9c6520afd 100644 (file)
@@ -4,24 +4,24 @@
   <group_roles id="1" group_id="[null]" resource_id="100" role="user"/>
 
   <!-- View -->
-  <projects id="11" uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
+  <projects id="11" uuid="EFGH" root_uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_component_uuid="[null]" enabled="[true]"
             kee="LANGUAGE_VIEW" scope="PRJ" qualifier="VW" name="By Language" path="[null]"/>
 
-  <projects id="112" uuid="GHIJ" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="101" enabled="[true]"
+  <projects id="112" uuid="GHIJ" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="KLMN" enabled="[true]"
             kee="VIEW2org.elasticsearch:elasticsearch" scope="FIL" qualifier="TRK" name="Elasticsearch" path="[null]"/>
 
-  <projects id="113" uuid="HIJK" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="100" enabled="[true]"
+  <projects id="113" uuid="HIJK" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="JKLM" enabled="[true]"
             kee="VIEW2org.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
 
   <!-- Real projects -->
 
   <projects id="100" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
-            uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="JKLM" root_uuid="JKLM" root_project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
 
   <projects id="101" scope="PRJ" qualifier="TRK" kee="org.elasticsearch:elasticsearch" name="Elasticsearch"
-            uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="KLMN" root_uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
 
   <resource_index id="1" kee="struts" component_uuid="JKLM" root_component_uuid="JKLM" position="0" name_size="6" qualifier="TRK"/>
   <resource_index id="2" kee="elasticsearch" component_uuid="KLMN" root_component_uuid="KLMN" position="0" name_size="13" qualifier="TRK"/>
index 2f4dbf7348d82d223837d42680d68ee903b95d18..989b7def85e03c9a393ff6a40f8e30be385d15fa 100644 (file)
@@ -5,28 +5,28 @@
   <group_roles id="2" group_id="[null]" resource_id="101" role="user"/>
 
   <!-- View with sub view -->
-  <projects id="11" uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
+  <projects id="11" uuid="EFGH" root_uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_component_uuid="[null]" enabled="[true]"
             kee="LANGUAGE_VIEW" scope="PRJ" qualifier="VW" name="By Language" path="[null]"/>
 
-  <projects id="112" uuid="GHIJ" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="101" enabled="[true]"
+  <projects id="112" uuid="GHIJ" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="KLMN" enabled="[true]"
             kee="VIEW2org.elasticsearch:elasticsearch" scope="FIL" qualifier="TRK" name="Elasticsearch" path="[null]"/>
 
   <!-- Sub view -->
-  <projects id="13" uuid="FGHI" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="[null]" enabled="[true]"
+  <projects id="13" uuid="FGHI" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="[null]" enabled="[true]"
             kee="JAVA_PROJECTS" scope="PRJ" qualifier="SVW" name="Java projects" path="[null]"/>
 
-  <projects id="113" uuid="HIJK" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_resource_id="100" enabled="[true]"
+  <projects id="113" uuid="HIJK" root_uuid="EFGH" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_component_uuid="JKLM" enabled="[true]"
             kee="VIEW2org.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
 
   <!-- Real projects -->
 
   <projects id="100" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
-            uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="JKLM" root_uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
 
   <projects id="101" scope="PRJ" qualifier="TRK" kee="org.elasticsearch:elasticsearch" name="Elasticsearch"
-            uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="KLMN" root_uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
 
   <resource_index id="1" kee="struts" component_uuid="JKLM" root_component_uuid="JKLM" position="0" name_size="6" qualifier="TRK"/>
   <resource_index id="2" kee="elasticsearch" component_uuid="KLMN" root_component_uuid="KLMN" position="0" name_size="13" qualifier="TRK"/>
index 87081a4e2d11fcc28043a9f8705b732cdc4409be..9c4b40ca2939c8e3e8468cc7a18eec3dbe89b15d 100644 (file)
@@ -1,5 +1,5 @@
 <dataset>
-    <projects id="567" uuid="uuid_1" kee="file cpt key" enabled="[true]"/>
+    <projects id="567" uuid="uuid_1" root_uuid="uuid_1" kee="file cpt key" enabled="[true]"/>
     <snapshots id="123" component_uuid="uuid_1" root_component_uuid="uuid_1" islast="[true]"/>
     <snapshots id="369" component_uuid="uuid_1" root_component_uuid="uuid_1" islast="[false]"/>
     <metrics id="1" name="metric 1"  />
index 006696dc8190a2eb1a10e3e2b0a2bd5139e46036..a01559680bc0deed6261dab14d297ff38e2ecfca 100644 (file)
@@ -1,5 +1,5 @@
 <dataset>
 
-  <projects id="1" root_id="[null]" kee="ROOT_KEY" uuid="ABCD"/>
+  <projects id="1" root_uuid="ABCD" kee="ROOT_KEY" uuid="ABCD"/>
 
 </dataset>
index be57cfc6d2191708818e5530ed70fde79c537315..b984a948a3760b2c5059480154907084b2b0d04c 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <projects id="1" kee="ROOT_KEY" name="project" uuid="ABCD"/>
+  <projects id="1" kee="ROOT_KEY" name="project" uuid="ABCD" root_uuid="ABCD"/>
 
   <!-- 2008-11-11 -->
   <!-- Version 0.9 -->
index f8b76a179172afa9e471547c299ba82a0a9ade9b..4008dbdd93d092abf45f0077bb1f11633e45e129 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <projects id="1" root_id="[null]" kee="ROOT_KEY" uuid="ABCD"/>
+  <projects id="1" kee="ROOT_KEY" uuid="ABCD" root_uuid="ABCD"/>
 
   <!-- 2008-11-11 -->
   <!-- Version 0.9 -->
index 6a97946ef19cd44b9cf33bd3448eded5b76ce29b..7f56e78960793e579ba14646a6a050e5d20895ad 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <projects id="1" kee="ROOT_KEY" name="project" uuid="ABCD"/>
+  <projects id="1" kee="ROOT_KEY" name="project" uuid="ABCD" root_uuid="ABCD"/>
 
   <!-- 2008-11-11 -->
   <!-- Version 0.9 -->
index 2c8ae5c913f1d77a3ff22cf03e7e5451f42ecd2c..6f93823e528e45af447a0cd40b30afbabf35ce1f 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <projects id="1" kee="ROOT_KEY" name="project" uuid="ABCD"/>
+  <projects id="1" kee="ROOT_KEY" name="project" uuid="ABCD" root_uuid="ABCD"/>
 
   <!-- 2008-11-11 -->
   <!-- Version 0.9 -->
index 70de478ba1e39018f0e8a468a60d4cb400515ddf..33c2443b3c726b160c2bfac8df7b933a81a2cb6b 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="PROJECT_KEY" name="project" long_name="[null]" description="[null]"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="PROJECT_KEY" name="project" long_name="[null]" description="[null]"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <!-- Unprocessed snapshot -->
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 1a1f7e8466a7c3eab0645af6b51e9f3fa4f87782..ab190db883e9f205cb1e462b7c4614829bd171b9 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD"/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD" root_uuid="ABCD"/>
   <snapshots id="10" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]"/>
 
-  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE"/>
+  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE" root_uuid="ABCD"/>
   <snapshots id="100" component_uuid="BCDE" root_component_uuid="ABCD" islast="[true]"/>
 </dataset>
index f17681470e366bca4bab6d442d7668ce76561763..a1508445b14f9b6a6ad0157173b5b5fcb7f00832 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
-  <projects id="1" kee="struts" root_id="[null]" uuid="ABCD"/>
-  <projects id="2" kee="struts:Action.java" root_id="1" uuid="BCDE"/>
+  <projects id="1" kee="struts" root_uuid="ABCD" uuid="ABCD"/>
+  <projects id="2" kee="struts:Action.java" root_uuid="ABCD" uuid="BCDE"/>
 
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]" islast="[true]" />
   <snapshots id="2" component_uuid="BCDE" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" />
index 1a1f7e8466a7c3eab0645af6b51e9f3fa4f87782..ab190db883e9f205cb1e462b7c4614829bd171b9 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD"/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD" root_uuid="ABCD"/>
   <snapshots id="10" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]"/>
 
-  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE"/>
+  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE" root_uuid="ABCD"/>
   <snapshots id="100" component_uuid="BCDE" root_component_uuid="ABCD" islast="[true]"/>
 </dataset>
index 832058c2eef9740ed34d9c4546a6abcc7d2d44cb..918d755636adef6bc27a8f6662a23a381937ed71 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD"/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD" root_uuid="ABCD"/>
   <snapshots id="10" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]"/>
 
-  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE"/>
+  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE" root_uuid="ABCD"/>
   <snapshots id="100" component_uuid="BCDE" root_component_uuid="ABCD" islast="[true]"/>
 
   <issues id="1"
index 06f424257dcb66831bc65dfe0d888ac48bbd51bf..b24592a016b6fce4f3cb99863cc7d83a8cf06ded 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <projects id="1" uuid="ABC" project_uuid="ABC" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+            root_uuid="ABC" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" path="[null]"
             authorization_updated_at="123456789"/>
 
   <!-- no authorizations project ABC. -->
index c204155e2bc401e9c7c70e75a352de0ca8c7167e..4a8ebf00a64f0a0117fd45b8843f8d857ea41ace 100644 (file)
@@ -1,15 +1,15 @@
 <dataset>
 
   <projects id="1" uuid="ABC" project_uuid="ABC" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+            root_uuid="ABC" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" path="[null]"
             authorization_updated_at="1000000000"/>
 
   <projects id="2" uuid="DEF" project_uuid="DEF" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar.sample" name="Sample"
+            root_uuid="ABC" scope="PRJ" qualifier="TRK" kee="org.sonar.sample" name="Sample"
             description="the description" long_name="Sample"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" path="[null]"
             authorization_updated_at="2000000000"/>
 
   <!-- user1 can access both projects -->
index cc3f8cf7b04e9ee99526cb59906e41b5a6b7794a..6ef3ef25402af983f76facca7da92d10ad2bdc88 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <projects id="1" uuid="ABC" project_uuid="ABC" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+            root_uuid="ABC" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" path="[null]"
             authorization_updated_at="123456789"/>
 
   <users id="10" login="user1" name="User 1" email="user1@company.net" active="[true]"/>
index dcc1e50070dded8766806c13e27e88bcd93bb61a..0651a152049a01e945d0f731a718baa87096b071 100644 (file)
@@ -3,9 +3,9 @@
          plugin_config_key="[null]" plugin_name="squid"/>
 
   <projects id="10" scope="PRJ" qualifier="TRK" kee="the_project" name="TheProject"
-            uuid="THE_PROJECT" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+            uuid="THE_PROJECT" root_uuid="THE_PROJECT" module_uuid="[null]" module_uuid_path="." path="[null]"/>
   <projects id="11" scope="FIL" qualifier="FIL" kee="abcde" name="TheFile"
-            uuid="THE_FILE" module_uuid="THE_PROJECT" module_uuid_path=".THE_PROJECT."
+            uuid="THE_FILE" root_uuid="THE_PROJECT" module_uuid="THE_PROJECT" module_uuid_path=".THE_PROJECT."
             path="src/main/java/TheFile.java"/>
 
   <issues id="1"
index 5d57824f80deeea26ca95dace0807218392c90d0..e5aa741671cefb1bce720944f028e0b14ae94e4a 100644 (file)
@@ -4,9 +4,9 @@
 
   <!-- Project 1 -->
   <projects id="10" scope="PRJ" qualifier="TRK" kee="the_project_1" name="TheProject1"
-            uuid="THE_PROJECT_1" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+            uuid="THE_PROJECT_1" root_uuid="THE_PROJECT_1" module_uuid="[null]" module_uuid_path="." path="[null]"/>
   <projects id="11" scope="FIL" qualifier="FIL" kee="the_file_1" name="TheFile1"
-            uuid="THE_FILE_1" module_uuid="THE_PROJECT_1" module_uuid_path=".THE_PROJECT_1."
+            uuid="THE_FILE_1" root_uuid="THE_PROJECT_1" module_uuid="THE_PROJECT_1" module_uuid_path=".THE_PROJECT_1."
             path="src/main/java/TheFile.java"/>
 
   <issues id="1"
@@ -39,9 +39,9 @@
 
   <!-- Project 2 -->
   <projects id="100" scope="PRJ" qualifier="TRK" kee="the_project_2" name="TheProject2"
-            uuid="THE_PROJECT_2" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+            uuid="THE_PROJECT_2" root_uuid="THE_PROJECT_2" module_uuid="[null]" module_uuid_path="." path="[null]"/>
   <projects id="111" scope="FIL" qualifier="FIL" kee="the_file_2" name="TheFile2"
-            uuid="THE_FILE_2" module_uuid="THE_PROJECT_2" module_uuid_path=".THE_PROJECT_2."
+            uuid="THE_FILE_2" root_uuid="THE_PROJECT_2" module_uuid="THE_PROJECT_2" module_uuid_path=".THE_PROJECT_2."
             path="src/main/java/TheFile.java"/>
 
   <issues id="10"
index 1e3158f86fb6f2aaa31d7eb4dc0e25446060d447..2da877f48999b9f500a738432ff0fee62cdf8130 100644 (file)
@@ -2,10 +2,10 @@
   <rules tags="[null]" system_tags="[null]" id="200" name="Avoid Cycles" plugin_rule_key="AvoidCycles"
          plugin_config_key="[null]" plugin_name="squid"/>
 
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT" path="[null]" module_uuid_path=".PROJECT."/>
-  <projects id="11" scope="PRJ" qualifier="BRC" kee="struts-core" name="Struts Core" uuid="MODULE" path="struts-core" module_uuid_path=".PROJECT.MODULE."/>
-  <projects id="100" scope="FIL" qualifier="FIL" kee="struts:Action" name="Action" uuid="FILE" path="src/main/java/Action.java" module_uuid_path=".PROJECT.MODULE."/>
-  <projects id="101" scope="FIL" qualifier="FIL" kee="pom" name="pom.xml" uuid="ROOT_FILE" path="pom.xml" module_uuid_path=".PROJECT.MODULE."/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT" root_uuid="MODULE" path="[null]" module_uuid_path=".PROJECT."/>
+  <projects id="11" scope="PRJ" qualifier="BRC" kee="struts-core" name="Struts Core" uuid="MODULE" root_uuid="PROJECT" path="struts-core" module_uuid_path=".PROJECT.MODULE."/>
+  <projects id="100" scope="FIL" qualifier="FIL" kee="struts:Action" name="Action" uuid="FILE" root_uuid="MODULE" path="src/main/java/Action.java" module_uuid_path=".PROJECT.MODULE."/>
+  <projects id="101" scope="FIL" qualifier="FIL" kee="pom" name="pom.xml" uuid="ROOT_FILE" root_uuid="MODULE" path="pom.xml" module_uuid_path=".PROJECT.MODULE."/>
 
   <issues
       id="1"
index c68a82fb8c8181cf8e9f5de5ab1cfa6999971a29..f7d0cd8bbdaf48bbf79b09b455ed91bc83a602a3 100644 (file)
@@ -2,10 +2,10 @@
   <rules tags="[null]" system_tags="[null]" id="200" name="Avoid Cycles" plugin_rule_key="AvoidCycles"
          plugin_config_key="[null]" plugin_name="squid"/>
 
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT" path="[null]" module_uuid_path=".PROJECT."/>
-  <projects id="11" scope="PRJ" qualifier="BRC" kee="struts-core" name="Struts Core" uuid="MODULE" path="struts-core" module_uuid_path=".PROJECT.MODULE."/>
-  <projects id="100" scope="FIL" qualifier="FIL" kee="struts:Action" name="Action" uuid="FILE" path="src/main/java/Action.java" module_uuid_path=".PROJECT.MODULE."/>
-  <projects id="101" scope="FIL" qualifier="FIL" kee="pom" name="pom.xml" uuid="ROOT_FILE" path="pom.xml" module_uuid_path=".PROJECT.MODULE."/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT" root_uuid="MODULE" path="[null]" module_uuid_path=".PROJECT."/>
+  <projects id="11" scope="PRJ" qualifier="BRC" kee="struts-core" name="Struts Core" uuid="MODULE" root_uuid="PROJECT" path="struts-core" module_uuid_path=".PROJECT.MODULE."/>
+  <projects id="100" scope="FIL" qualifier="FIL" kee="struts:Action" name="Action" uuid="FILE" root_uuid="MODULE" path="src/main/java/Action.java" module_uuid_path=".PROJECT.MODULE."/>
+  <projects id="101" scope="FIL" qualifier="FIL" kee="pom" name="pom.xml" uuid="ROOT_FILE" root_uuid="MODULE" path="pom.xml" module_uuid_path=".PROJECT.MODULE."/>
 
   <issues
       id="1"
index 3a568be54c883669085957333cb41ff81f1cb332..d7b49d669db3346b176d0ddc5f672345216ef294 100644 (file)
@@ -4,9 +4,9 @@
 
   <!-- Project 1 -->
   <projects id="10" scope="PRJ" qualifier="TRK" kee="the_project_1" name="TheProject1"
-            uuid="THE_PROJECT_1" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+            uuid="THE_PROJECT_1" root_uuid="THE_PROJECT_1" module_uuid="[null]" module_uuid_path="." path="[null]"/>
   <projects id="11" scope="FIL" qualifier="FIL" kee="the_file_1" name="TheFile1"
-            uuid="THE_FILE_1" module_uuid="THE_PROJECT_1" module_uuid_path=".THE_PROJECT_1."
+            uuid="THE_FILE_1" root_uuid="THE_PROJECT_1" module_uuid="THE_PROJECT_1" module_uuid_path=".THE_PROJECT_1."
             path="src/main/java/TheFile.java"/>
 
   <issues id="1"
@@ -67,9 +67,9 @@
 
   <!-- Project 2 -->
   <projects id="100" scope="PRJ" qualifier="TRK" kee="the_project_2" name="TheProject2"
-            uuid="THE_PROJECT_2" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+            uuid="THE_PROJECT_2" root_uuid="THE_PROJECT_2" module_uuid="[null]" module_uuid_path="." path="[null]"/>
   <projects id="111" scope="FIL" qualifier="FIL" kee="the_file_2" name="TheFile2"
-            uuid="THE_FILE_2" module_uuid="THE_PROJECT_2" module_uuid_path=".THE_PROJECT_2."
+            uuid="THE_FILE_2" root_uuid="THE_PROJECT_2" module_uuid="THE_PROJECT_2" module_uuid_path=".THE_PROJECT_2."
             path="src/main/java/TheFile.java"/>
 
   <issues id="10"
index d4343d23191fbddbaa1fcdd4f265763ba5b33896..7b64628aabcb4d4799f0b9d83d07a1d9aca7cbb5 100644 (file)
@@ -2,10 +2,10 @@
   <rules tags="[null]" system_tags="[null]" id="200" name="Avoid Cycles" plugin_rule_key="AvoidCycles"
          plugin_config_key="[null]" plugin_name="squid"/>
 
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT1" path="[null]" module_uuid_path=".PROJECT1."/>
-  <projects id="50" scope="PRJ" qualifier="BRC" kee="struts:struts-tiles" name="Struts Tiles" uuid="MODULE1" path="[null]" module_uuid_path=".PROJECT1.MODULE1."/>
-  <projects id="70" scope="DIR" qualifier="DIR" kee="struts:struts-tiles:/" name="src/main/java/" uuid="DIR1" path="src/main/java" module_uuid_path=".PROJECT1.MODULE1."/>
-  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="FILE1" path="src/main/java/Action.java" module_uuid_path=".PROJECT1."/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT1" root_uuid="PROJECT1" path="[null]" module_uuid_path=".PROJECT1."/>
+  <projects id="50" scope="PRJ" qualifier="BRC" kee="struts:struts-tiles" name="Struts Tiles" uuid="MODULE1" root_uuid="PROJECT1" path="[null]" module_uuid_path=".PROJECT1.MODULE1."/>
+  <projects id="70" scope="DIR" qualifier="DIR" kee="struts:struts-tiles:/" name="src/main/java/" uuid="DIR1" root_uuid="MODULE1" path="src/main/java" module_uuid_path=".PROJECT1.MODULE1."/>
+  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="FILE1" root_uuid="MODULE1" path="src/main/java/Action.java" module_uuid_path=".PROJECT1."/>
 
   <issues
       id="1"
index 018199d9f56d764ee585bd4e0b1a29ee5b5619c2..00a834ce17fa057ab627c0656e8d91818c235963 100644 (file)
@@ -2,10 +2,10 @@
   <rules tags="[null]" system_tags="[null]" id="200" name="Avoid Cycles" plugin_rule_key="AvoidCycles"
          plugin_config_key="[null]" plugin_name="squid"/>
 
-  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT1" path="[null]" module_uuid_path=".PROJECT1."/>
-  <projects id="50" scope="PRJ" qualifier="BRC" kee="struts:struts-tiles" name="Struts Tiles" uuid="MODULE1" path="[null]" module_uuid_path=".PROJECT1.MODULE1."/>
-  <projects id="70" scope="DIR" qualifier="DIR" kee="struts:struts-tiles:/" name="src/main/java/" uuid="DIR1" path="src/main/java" module_uuid_path=".PROJECT1.MODULE1."/>
-  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="FILE1" path="src/main/java/Action.java" module_uuid_path=".PROJECT1."/>
+  <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="PROJECT1" root_uuid="PROJECT1" path="[null]" module_uuid_path=".PROJECT1."/>
+  <projects id="50" scope="PRJ" qualifier="BRC" kee="struts:struts-tiles" name="Struts Tiles" uuid="MODULE1" root_uuid="PROJECT1" path="[null]" module_uuid_path=".PROJECT1.MODULE1."/>
+  <projects id="70" scope="DIR" qualifier="DIR" kee="struts:struts-tiles:/" name="src/main/java/" uuid="DIR1" root_uuid="MODULE1" path="src/main/java" module_uuid_path=".PROJECT1.MODULE1."/>
+  <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="FILE1" root_uuid="MODULE1" path="src/main/java/Action.java" module_uuid_path=".PROJECT1."/>
 
   <issues
     id="1"
index 126b499f803fd7c5a3f8e4842020b16bb830c2c4..f51f08eef2e620372cc950c033f843cee511a29a 100644 (file)
@@ -2,24 +2,24 @@
 
   <!-- java project -->
   <projects kee="java_project:org.sonar.bar" long_name="org.sonar.bar" scope="FIL" qualifier="CLA" name="org.sonar.bar"
-            id="1" root_id="[null]" uuid="ABCD"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="1" root_uuid="ABCD" uuid="ABCD"
+            description="[null]" enabled="[true]" language="[null]" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <projects kee="java_project:org.sonar.foo" scope="FIL" qualifier="CLA" long_name="org.sonar.foo" name="org.sonar.foo"
-            id="2" root_id="1" uuid="BCDE"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            id="2" root_uuid="ABCD" uuid="BCDE"
+            description="[null]" enabled="[true]" language="java" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <projects kee="java project:org.sonar.foo.Big" scope="FIL" qualifier="CLA" long_name="org.sonar.foo.Big"
             name="Big"
-            id="3" root_id="1" uuid="CDEF"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            id="3" root_uuid="ABCD" uuid="CDEF"
+            description="[null]" enabled="[true]" language="java" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <projects kee="java project:org.sonar.foo.Tiny" scope="FIL" qualifier="CLA" long_name="org.sonar.foo.Tiny" name="Tiny"
-            id="4" root_id="1" uuid="DEFG"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            id="4" root_uuid="ABCD" uuid="DEFG"
+            description="[null]" enabled="[true]" language="java" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
index 18a411ee2f80333cde55053e47bd9e2f6beaf4ca..99a098986c34bf3d3cc440052e7a085c21d38645 100644 (file)
@@ -5,10 +5,11 @@
            delete_historical_data="[null]"/>
 
   <projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
-            id="1" root_id="[null]" uuid="ABCD"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"/>
+            id="1" root_uuid="UUID_JAVA_PROJECT" uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="[null]" />
 
-  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="UUID_JAVA_PROJECT" root_component_uuid="UUID_JAVA_PROJECT"
+             root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index f5befccaa1f88b4678ed0b5d89d57e1f967ceba1..f0ccad26c0995cb01f962100588c39bdc76bfc7f 100644 (file)
@@ -5,10 +5,11 @@
            delete_historical_data="[null]"/>
 
   <projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
-            id="1" root_id="[null]" uuid="ABCD"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"/>
+            id="1" root_uuid="UUID_JAVA_PROJECT" uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="[null]"/>
 
-  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="UUID_JAVA_PROJECT" root_component_uuid="UUID_JAVA_PROJECT"
+             root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index 8a1250ea2bacfef53c6ea426a845a3c7f9e588db..0cbb579a2541f65e013e79f5c667205d79f5879b 100644 (file)
 
   <!-- java project -->
   <projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
-            id="1" root_id="[null]" uuid="ABCD" project_uuid="ABCD"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="1" root_uuid="UUID_JAVA_PROJECT" uuid="UUID_JAVA_PROJECT" project_uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="[null]" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <projects kee="java_project:org.sonar.foo" scope="DIR" qualifier="PAC" long_name="org.sonar.foo" name="org.sonar.foo"
-            id="2" root_id="1" uuid="BCDE" project_uuid="ABCD"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="2" root_uuid="UUID_JAVA_PROJECT" uuid="BCDE" project_uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="[null]" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <projects kee="java_project:org.sonar.foo.Big" scope="FIL" qualifier="CLA" long_name="org.sonar.foo.Big"
             name="Big"
-            id="3" root_id="1" uuid="CDEF" project_uuid="ABCD"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            id="3" root_uuid="UUID_JAVA_PROJECT" uuid="CDEF" project_uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="java" 
             created_at="2008-12-19 00:00:00.00"/>
 
   <projects kee="java_project:org.sonar.foo.Tiny" scope="FIL" qualifier="CLA" long_name="org.sonar.foo.Tiny" name="Tiny"
-            id="4" root_id="1" uuid="DEFG" project_uuid="ABCD"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            id="4" root_uuid="UUID_JAVA_PROJECT" uuid="DEFG" project_uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="java" 
             created_at="2008-12-19 00:00:00.00"/>
 
-  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="UUID_JAVA_PROJECT" root_component_uuid="UUID_JAVA_PROJECT"
+             root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -53,7 +54,8 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="102" component_uuid="BCDE" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="101"
+  <snapshots id="102" component_uuid="BCDE" root_component_uuid="UUID_JAVA_PROJECT" root_snapshot_id="101"
+             parent_snapshot_id="101"
              scope="DIR" qualifier="PAC" path="101." depth="1"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -62,7 +64,8 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="103" component_uuid="CDEF" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="102"
+  <snapshots id="103" component_uuid="CDEF" root_component_uuid="UUID_JAVA_PROJECT" root_snapshot_id="101"
+             parent_snapshot_id="102"
              scope="FIL" qualifier="CLA" path="101.102." depth="2"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -71,7 +74,8 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="104" component_uuid="DEFG" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="102"
+  <snapshots id="104" component_uuid="DEFG" root_component_uuid="UUID_JAVA_PROJECT" root_snapshot_id="101"
+             parent_snapshot_id="102"
              scope="FIL" qualifier="CLA" path="101.102." depth="2"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
 
   <!-- php project -->
   <projects kee="php_project" long_name="PHP project" scope="PRJ" qualifier="TRK" name="PHP project"
-            id="10" root_id="[null]" uuid="EFGH" project_uuid="EFGH"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="10" root_uuid="UUID_JAVA_PROJECT" uuid="UUID_PHP_PROJECT" project_uuid="UUID_PHP_PROJECT"
+            description="[null]" enabled="[true]" language="[null]" 
             created_at="2012-12-12 04:06:00.00"/>
 
 
-  <snapshots id="110" component_uuid="EFGH" root_component_uuid="EFGH" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="110" component_uuid="UUID_PHP_PROJECT" root_component_uuid="UUID_PHP_PROJECT" root_snapshot_id="[null]"
+             parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
                     alert_status="[null]" description="[null]"/>
 
 
-  <resource_index id="1" kee="java project" position="0" name_size="12" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/>
-  <resource_index id="2" kee="java projec" position="1" name_size="12" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/>
-  <resource_index id="3" kee="java proje" position="2" name_size="12" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/>
-  <resource_index id="4" kee="java proj" position="3" name_size="12" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/>
+  <resource_index id="1" kee="java project" position="0" name_size="12" component_uuid="UUID_JAVA_PROJECT"
+                  root_component_uuid="UUID_JAVA_PROJECT" qualifier="TRK"/>
+  <resource_index id="2" kee="java projec" position="1" name_size="12" component_uuid="UUID_JAVA_PROJECT"
+                  root_component_uuid="UUID_JAVA_PROJECT" qualifier="TRK"/>
+  <resource_index id="3" kee="java proje" position="2" name_size="12" component_uuid="UUID_JAVA_PROJECT"
+                  root_component_uuid="UUID_JAVA_PROJECT" qualifier="TRK"/>
+  <resource_index id="4" kee="java proj" position="3" name_size="12" component_uuid="UUID_JAVA_PROJECT"
+                  root_component_uuid="UUID_JAVA_PROJECT" qualifier="TRK"/>
   <!-- etc -->
-  <resource_index id="5" kee="php project" position="0" name_size="11" component_uuid="EFGH" root_component_uuid="EFGH" qualifier="TRK"/>
-  <resource_index id="6" kee="php projec" position="1" name_size="11" component_uuid="EFGH" root_component_uuid="EFGH" qualifier="TRK"/>
-  <resource_index id="7" kee="php proje" position="2" name_size="11" component_uuid="EFGH" root_component_uuid="EFGH" qualifier="TRK"/>
-  <resource_index id="8" kee="php proj" position="3" name_size="11" component_uuid="EFGH" root_component_uuid="EFGH" qualifier="TRK"/>
+  <resource_index id="5" kee="php project" position="0" name_size="11" component_uuid="UUID_PHP_PROJECT"
+                  root_component_uuid="UUID_PHP_PROJECT" qualifier="TRK"/>
+  <resource_index id="6" kee="php projec" position="1" name_size="11" component_uuid="UUID_PHP_PROJECT"
+                  root_component_uuid="UUID_PHP_PROJECT" qualifier="TRK"/>
+  <resource_index id="7" kee="php proje" position="2" name_size="11" component_uuid="UUID_PHP_PROJECT"
+                  root_component_uuid="UUID_PHP_PROJECT" qualifier="TRK"/>
+  <resource_index id="8" kee="php proj" position="3" name_size="11" component_uuid="UUID_PHP_PROJECT"
+                  root_component_uuid="UUID_PHP_PROJECT" qualifier="TRK"/>
   <!-- etc -->
 
 
index 3e944c47343082777615e595a6d830f41099957f..32941aa476c8bb808f02691d160457522a5ae319 100644 (file)
@@ -7,11 +7,12 @@
 
   <!-- java project -->
   <projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
-            id="1" root_id="[null]" uuid="ABCD"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="1" root_uuid="UUID_JAVA_PROJECT" uuid="UUID_JAVA_PROJECT"
+            description="[null]" enabled="[true]" language="[null]"
             created_at="2008-12-19 00:00:00.00"/>
 
-  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="UUID_JAVA_PROJECT" root_component_uuid="UUID_JAVA_PROJECT"
+             root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
 
   <!-- php project -->
   <projects kee="php_project" long_name="PHP project" scope="PRJ" qualifier="TRK" name="PHP project"
-            id="10" root_id="[null]" uuid="BCDE"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="10" root_uuid="UUID_PHP_PROJECT" uuid="UUID_PHP_PROJECT"
+            description="[null]" enabled="[true]" language="[null]"
             created_at="2012-12-12 04:06:00.00"/>
 
 
-  <snapshots id="110" component_uuid="BCDE" root_component_uuid="BCDE" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="110" component_uuid="UUID_PHP_PROJECT" root_component_uuid="UUID_PHP_PROJECT" root_snapshot_id="[null]"
+             parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -57,8 +59,8 @@
 
   <!-- js project -->
   <projects kee="js_project" long_name="JS project" scope="PRJ" qualifier="TRK" name="JS project"
-            id="20" root_id="[null]" uuid="CDEF"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            id="20" root_uuid="CDEF" uuid="CDEF"
+            description="[null]" enabled="[true]" language="[null]"
             created_at="2012-12-12 04:06:00.00"/>
 
 
index dbe84a89137edfc6314f6275bdbdfaf2ca319750..5ceeba2fceeb18c8eba3d4b78d28d67ffa2b6ce1 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
   <projects id="100" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
-            uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="JKLM" root_uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" path="[null]"/>
 
   <snapshots id="100" component_uuid="JKLM" parent_snapshot_id="[null]" root_component_uuid="JKLM" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
index 1b668bf1486e782f0af649b839e4f463d4b6600e..a706ac79ac0b3c4157a32e70e18add20269204a2 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
-  <projects id="100" kee="struts" root_id="[null]" qualifier="TRK" scope="PRJ" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." path="[null]"/>
-  <projects id="101" kee="Action.java" root_id="100" qualifier="CLA" scope="PRJ" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
+  <projects id="100" kee="struts" root_uuid="ABCD" qualifier="TRK" scope="PRJ" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+  <projects id="101" kee="Action.java" root_uuid="ABCD" qualifier="CLA" scope="PRJ" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
             path="src/main/java/Action.java"/>
 
 </dataset>
index 2c1b4111c26e45a9ed9e7cfd0f190975fded558d..9e072388a9d2a5bbc4588d8ee4248de87f49749d 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
-  <projects id="100" kee="struts" root_id="[null]" qualifier="TRK" scope="PRJ" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." path="[null]"/>
-  <projects id="101" kee="Action.java" root_id="100" qualifier="CLA" scope="PRJ" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
+  <projects id="100" kee="struts" root_uuid="ABCD" qualifier="TRK" scope="PRJ" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+  <projects id="101" kee="Action.java" root_uuid="ABCD" qualifier="CLA" scope="PRJ" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
             path="src/main/java/Action.java"/>
 
   <file_sources id="101" project_uuid="ABCD" file_uuid="CDEF"
index f577e371d76858279aac1d6f51b17d7e71b9f6ee..5e1cedca4ffae1d145653d8942728728ca2c67ba 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
-  <projects id="100" kee="struts" root_id="[null]" qualifier="TRK" scope="PRJ" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." path="[null]"/>
-  <projects id="101" kee="ActionTest.java" root_id="100" qualifier="CLA" scope="PRJ" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
+  <projects id="100" kee="struts" root_uuid="ABCD" qualifier="TRK" scope="PRJ" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." path="[null]"/>
+  <projects id="101" kee="ActionTest.java" root_uuid="ABCD" qualifier="CLA" scope="PRJ" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
             path="src/test/java/ActionTest.java"/>
 
   <file_sources id="100" project_uuid="ABCD" file_uuid="CDEF"
index 4f0c07b3f5b886c87059f3f60e7e1fc538443db4..d96e1157ea06885d52754d7074d0466f49936436 100644 (file)
@@ -1,14 +1,14 @@
 <dataset>
 
   <!-- Simple View -->
-  <projects id="10" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
+  <projects id="10" uuid="ABCD" root_uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." copy_component_uuid="[null]" enabled="[true]"
             kee="MASTER_PROJECT" scope="PRJ" qualifier="VW" name="All projects" path="[null]"/>
   <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="VW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
 
-  <projects id="110" uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD." copy_resource_id="100" enabled="[true]"
+  <projects id="110" uuid="BCDE" root_uuid="ABCD" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD." copy_component_uuid="JKLM" enabled="[true]"
             kee="MASTER_PROJECTorg.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
   <snapshots id="110" component_uuid="BCDE" parent_snapshot_id="[null]" root_component_uuid="BCDE" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path=""/>
 
   <!-- View with sub view -->
-  <projects id="11" uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
+  <projects id="11" uuid="EFGH" root_uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_component_uuid="[null]" enabled="[true]"
             kee="LANGUAGE_VIEW" scope="PRJ" qualifier="VW" name="By Language" path="[null]"/>
   <snapshots id="11" component_uuid="EFGH" parent_snapshot_id="[null]" root_component_uuid="EFGH" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="VW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <projects id="112" uuid="GHIJ" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="101" enabled="[true]"
+  <projects id="112" uuid="GHIJ" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="KLMN" enabled="[true]"
             kee="VIEW2org.elasticsearch:elasticsearch" scope="FIL" qualifier="TRK" name="SSLR" path="[null]"/>
   <snapshots id="112" component_uuid="GHIJ" parent_snapshot_id="[null]" root_component_uuid="GHIJ" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path=""/>
 
   <!-- Sub view -->
-  <projects id="13" uuid="FGHI" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="[null]" enabled="[true]"
+  <projects id="13" uuid="FGHI" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="[null]" enabled="[true]"
             kee="JAVA_PROJECTS" scope="PRJ" qualifier="SVW" name="Java projects" path="[null]"/>
   <snapshots id="13" component_uuid="FGHI" parent_snapshot_id="[null]" root_component_uuid="FGHI" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="SVW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
 
-  <projects id="113" uuid="HIJK" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_resource_id="100" enabled="[true]"
+  <projects id="113" uuid="HIJK" root_uuid="EFGH" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_component_uuid="JKLM" enabled="[true]"
             kee="VIEW2org.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
   <snapshots id="113" component_uuid="HIJK" parent_snapshot_id="[null]" root_component_uuid="HIJK" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
@@ -45,7 +45,7 @@
              version="[null]" path=""/>
 
   <!-- View without project -->
-  <projects id="14" uuid="IJKL" project_uuid="IJKL" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
+  <projects id="14" uuid="IJKL" root_uuid="IJKL" project_uuid="IJKL" module_uuid="[null]" module_uuid_path="." copy_component_uuid="[null]" enabled="[true]"
             kee="OTHER" scope="PRJ" qualifier="VW" name="Other projects" path="[null]"/>
   <snapshots id="14" component_uuid="IJKL" parent_snapshot_id="[null]" root_component_uuid="IJKL" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
   <!-- Real projects -->
 
   <projects id="100" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
-            uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="JKLM" root_uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
   <snapshots id="100" component_uuid="JKLM" parent_snapshot_id="[null]" root_component_uuid="JKLM" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
 
   <projects id="101" scope="PRJ" qualifier="TRK" kee="org.elasticsearch:elasticsearch" name="Elasticsearch"
-            uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+            uuid="KLMN" root_uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
   <snapshots id="101" component_uuid="KLMN" parent_snapshot_id="[null]" root_component_uuid="KLMN" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
index de02d22c9cdc4b353496a87eaad2ae23d9464d93..6311b14a5e621a0d0f6af367fb79fca409f4e593 100644 (file)
@@ -115,7 +115,7 @@ class Api::ProjectsController < Api::ApiController
     end
 
     # this is really an advanced optimization !
-    select_columns='id,uuid,kee,name,language,long_name,scope,qualifier,root_id'
+    select_columns='id,uuid,kee,name,language,long_name,scope,qualifier,root_uuid'
     select_columns += ',description' if @show_description
 
     projects=Project.find(:all, :select => select_columns, :conditions => [conditions.join(' AND '), values], :order => 'name')
index 9be60b5114a26bacf452240983dfaa841c70df4f..dfec74484a924fa61afde967fef82e4977caf161 100644 (file)
@@ -327,7 +327,6 @@ class Api::ResourcesController < Api::ApiController
     json['version']=snapshot.version if snapshot.version
     json['branch']=resource.branch if resource.branch
     json['description']=resource.description if resource.description
-    json['copy']=resource.copy_resource_id if resource.copy_resource_id
     if include_trends
       json[:p1]=snapshot.period1_mode if snapshot.period1_mode
       json[:p1p]=snapshot.period1_param if snapshot.period1_param
@@ -402,7 +401,6 @@ class Api::ResourcesController < Api::ApiController
       xml.date(Api::Utils.format_datetime(snapshot.created_at))
       xml.creationDate(Api::Utils.format_datetime(resource.created_at))
       xml.description(resource.description) if include_descriptions && resource.description
-      xml.copy(resource.copy_resource_id) if resource.copy_resource_id
 
       if include_trends
         xml.period1(snapshot.period1_mode) if snapshot.period1_mode
index 16fbb908651bc7e9bd1f509a323087200d318cd3..62de84287c3bb01e74ed68ad1a8a484490b1d890 100644 (file)
@@ -85,9 +85,8 @@ class ProjectController < ApplicationController
   def profile
     require_parameters :id
     @project_id = Api::Utils.project_id(params[:id])
-    access_denied unless (is_admin?(@project_id) || has_role?(:profileadmin))
-    # Need to display breadcrumb
     @project = Project.by_key(@project_id)
+    access_denied unless (is_admin?(@project.uuid) || has_role?(:profileadmin))
 
     call_backend do
       @all_quality_profiles = Internal.quality_profiles.allProfiles().to_a
@@ -118,9 +117,8 @@ class ProjectController < ApplicationController
   def qualitygate
     require_parameters :id
     @project_id = Api::Utils.project_id(params[:id])
-    access_denied unless (is_admin?(@project_id) || has_role?(:gateadmin))
-    # Need to display breadcrumb
     @project = Project.by_key(@project_id)
+    access_denied unless (is_admin?(@project.uuid) || has_role?(:gateadmin))
 
     call_backend do
       @all_quality_gates = Internal.quality_gates.list().to_a
index 2a24b78060e0b97a7869863c1ecb623965481813..97a4942536f5033d1b22e9a29a4cdf951993cbca 100644 (file)
@@ -189,7 +189,7 @@ class MeasureFilter < ActiveRecord::Base
 
   def base_resource
     if criteria('base')
-      Project.first(:conditions => ['kee=? and copy_resource_id is null and person_id is null', criteria('base')])
+      Project.first(:conditions => ['kee=? and copy_component_uuid is null and developer_uuid is null', criteria('base')])
     end
   end
 
@@ -241,9 +241,9 @@ class MeasureFilter < ActiveRecord::Base
   end
 
   def filter_authorized_snapshot_ids(rows, controller)
-    project_ids = rows.map { |row| row.getResourceRootId() }.compact.uniq
-    authorized_project_ids = controller.select_authorized(:user, project_ids)
-    snapshot_ids = rows.map { |row| row.getSnapshotId() if authorized_project_ids.include?(row.getResourceRootId()) }.compact
+    project_uuids = rows.map { |row| row.getRootComponentUuid() }.compact.uniq
+    authorized_project_uuids = controller.select_authorized(:user, project_uuids)
+    snapshot_ids = rows.map { |row| row.getSnapshotId() if authorized_project_uuids.include?(row.getRootComponentUuid()) }.compact
     @security_exclusions = (snapshot_ids.size<rows.size)
     @pagination = Api::Pagination.new
     @pagination.per_page=(criteria(:pageSize)||999999).to_i
index b3c0ec0dbc355af67ff8b38d135450ffd9325124..15d50e8682da2cf7689c2fcb2fb2d6236602b87f 100644 (file)
@@ -28,9 +28,9 @@ class Project < ActiveRecord::Base
   has_many :user_roles, :foreign_key => 'resource_id'
   has_many :group_roles, :foreign_key => 'resource_id'
   has_many :manual_measures, :foreign_key => 'component_uuid', :primary_key => 'uuid'
-  belongs_to :root, :class_name => 'Project', :foreign_key => 'root_id'
-  belongs_to :copy_resource, :class_name => 'Project', :foreign_key => 'copy_resource_id'
-  belongs_to :person, :class_name => 'Project', :foreign_key => 'person_id'
+  belongs_to :root, :class_name => 'Project', :foreign_key => 'root_uuid', :primary_key => 'uuid'
+  belongs_to :copy_resource, :class_name => 'Project', :foreign_key => 'copy_component_uuid', :primary_key => 'uuid'
+  belongs_to :person, :class_name => 'Project', :foreign_key => 'developer_uuid', :primary_key => 'uuid'
   has_many :authors, :foreign_key => 'person_id', :dependent => :delete_all
   has_one :index, :class_name => 'ResourceIndex', :foreign_key => 'component_uuid', :primary_key => 'uuid', :conditions => 'position=0', :select => 'kee'
   has_many :resource_index, :foreign_key => 'resource_id'
@@ -79,7 +79,7 @@ class Project < ActiveRecord::Base
   def modules
     @modules ||=
       begin
-        Project.all(:conditions => {:root_id => self.id, :scope => 'PRJ'})
+        Project.all(:conditions => ['root_uuid=? and uuid <> ? and scope=?', self.uuid, self.uuid, 'PRJ'])
       end
   end
 
@@ -178,16 +178,16 @@ class Project < ActiveRecord::Base
     nil
   end
 
-  def resource_id_for_authorization
+  def component_uuid_for_authorization
     if library?
       # no security on libraries
       nil
     elsif set?
-      self.root_id || self.id
+      self.root_uuid || self.uuid
     elsif last_snapshot
-      last_snapshot.resource_id_for_authorization
+      last_snapshot.component_uuid_for_authorization
     else
-      nil
+      self.root_uuid
     end
   end
 
@@ -217,7 +217,7 @@ class Project < ActiveRecord::Base
   end
 
   def parent_module(current_module)
-    current_module.root ? parent_module(current_module.root) : current_module
+    current_module.root.uuid = current_module.uuid ? current_module : parent_module(current_module.root)
   end
 
 end
index 6d3bb81f7fe9a4d641ef80c04a8b4a9e75cd07c3..3e7eadffecb6ce0f5f7160e1aa0256a340afbd8e 100644 (file)
@@ -26,9 +26,8 @@ class ResourceIndex < ActiveRecord::Base
 
   MIN_SEARCH_SIZE=2
 
-  def resource_id_for_authorization
-    # FIXME this generates a join for every resource
-    root_project.id
+  def component_uuid_for_authorization
+    root_component_uuid
   end
 
 end
index 9d17cfe325e082a7afb8a44109fa212bf3dd184a..535bc0e40b8ed800e63d0e97747cf180511d9983 100644 (file)
@@ -216,8 +216,8 @@ class Snapshot < ActiveRecord::Base
     (period1_mode || period2_mode || period3_mode || period4_mode || period5_mode) != nil
   end
 
-  def resource_id_for_authorization
-    root_project.id
+  def component_uuid_for_authorization
+    root_component_uuid
   end
 
   def path_name
index 6a2330139dd199542c3584187b8e7b87c7b5d5b1..1350390f74629434a887f61dfa3ac49916a4740a 100644 (file)
@@ -25,16 +25,16 @@ class DefaultAuthorizer
     global_roles(user).include?(role)
   end
 
-  def has_role_for_resources?(user, role, resource_ids)
-    return [] if resource_ids.empty?
+  def has_role_for_resources?(user, role, component_uuids)
+    return [] if component_uuids.empty?
 
-    compacted_resource_ids=resource_ids.compact
+    compacted_component_uuids=component_uuids.compact
     group_ids=user.groups.map(&:id)
 
     # Oracle is limited to 1000 elements in clause "IN"
     page_size=999
-    page_count=(compacted_resource_ids.size/page_size)
-    page_count+=1 if (compacted_resource_ids.size % page_size)>0
+    page_count=(compacted_component_uuids.size/page_size)
+    page_count+=1 if (compacted_component_uuids.size % page_size)>0
 
     sanitized_role = ActiveRecord::Base.connection.quote_string(role.to_s)
 
@@ -42,9 +42,9 @@ class DefaultAuthorizer
     if group_ids.empty?
       # Some databases do not support empty IN
       page_count.times do |page_index|
-        page_rids=compacted_resource_ids[page_index*page_size...(page_index+1)*page_size]
+        page_component_uuids=compacted_component_uuids[page_index*page_size...(page_index+1)*page_size]
         group_roles.concat(
-          ActiveRecord::Base.connection.execute("SELECT resource_id FROM group_roles WHERE role='#{sanitized_role}' and group_id is null and resource_id in (#{page_rids.join(',')})")
+          ActiveRecord::Base.connection.execute("SELECT p.uuid FROM group_roles gr INNER JOIN projects p ON p.id=gr.resource_id WHERE gr.role='#{sanitized_role}' and gr.group_id is null and p.uuid in (#{page_component_uuids.map{ |u| "'#{u}'" }.join(',')})")
         )
       end
     else
@@ -53,11 +53,11 @@ class DefaultAuthorizer
       gr_page_count+=1 if (compacted_group_ids.size % page_size)>0
 
       page_count.times do |page_index|
-        page_rids=compacted_resource_ids[page_index*page_size...(page_index+1)*page_size]
+        page_component_uuids=compacted_component_uuids[page_index*page_size...(page_index+1)*page_size]
         gr_page_count.times do |gr_page_index|
           page_grids=compacted_group_ids[gr_page_index*page_size...(gr_page_index+1)*page_size]
           group_roles.concat(
-            ActiveRecord::Base.connection.execute("SELECT resource_id FROM group_roles WHERE role='#{sanitized_role}' and (group_id is null or group_id in(#{page_grids.join(',')})) and resource_id in (#{page_rids.join(',')})")
+            ActiveRecord::Base.connection.execute("SELECT p.uuid FROM group_roles gr INNER JOIN projects p ON p.id=gr.resource_id WHERE gr.role='#{sanitized_role}' and (gr.group_id is null or gr.group_id in(#{page_grids.join(',')})) and p.uuid in (#{page_component_uuids.map{ |u| "'#{u}'" }.join(',')})")
           )
         end
       end
@@ -66,21 +66,21 @@ class DefaultAuthorizer
     user_roles=[]
     if user.id
       page_count.times do |page_index|
-        page_rids=compacted_resource_ids[page_index*page_size...(page_index+1)*page_size]
+        page_component_uuids=compacted_component_uuids[page_index*page_size...(page_index+1)*page_size]
         user_roles.concat(
-          ActiveRecord::Base.connection.execute("SELECT resource_id FROM user_roles WHERE role='#{sanitized_role}' and user_id=#{user.id} and resource_id in (#{page_rids.join(',')})")
+          ActiveRecord::Base.connection.execute("SELECT p.uuid FROM user_roles ur INNER JOIN projects p ON p.id=ur.resource_id WHERE ur.role='#{sanitized_role}' and ur.user_id=#{user.id} and p.uuid in (#{page_component_uuids.map{ |u| "'#{u}'" }.join(',')})")
         )
       end
     end
 
-    authorized_resource_ids={}
+    authorized_component_uuids={}
     (group_roles.concat(user_roles)).each do |x|
-      authorized_resource_ids[x['resource_id'].to_i]=true
+      authorized_component_uuids[x['uuid']]=true
     end
 
-    result=Array.new(resource_ids.size)
-    resource_ids.each_with_index do |rid,index|
-      result[index]=((authorized_resource_ids[rid]) || false)
+    result=Array.new(component_uuids.size)
+    component_uuids.each_with_index do |uuid,index|
+      result[index]=((authorized_component_uuids[uuid]) || false)
     end
     result
   end
index 08d1a327b71f4c3ec7ac5b95b9c5ed2340420f2a..9f4912d06731ddc909722e6fb82e1a810bbbe950 100644 (file)
@@ -75,21 +75,21 @@ module NeedAuthorization
     def has_role_for_resources?(role, objects)
       return [] if objects.nil? || objects.size==0
 
-      resource_ids=[]
+      component_uuids=[]
       objects.each do |obj|
-        resource_ids<<to_resource_id(obj)
+        component_uuids<<to_component_uuid(obj)
       end
 
-      compacted_resource_ids=resource_ids.compact.uniq
-      compacted_booleans=AuthorizerFactory.authorizer.has_role_for_resources?(self, role.to_sym, compacted_resource_ids)
-      boolean_per_resource_id={}
-      compacted_resource_ids.each_with_index do |rid, index|
-        boolean_per_resource_id[rid]=compacted_booleans[index]
+      compacted_component_uuids=component_uuids.compact.uniq
+      compacted_booleans=AuthorizerFactory.authorizer.has_role_for_resources?(self, role.to_sym, compacted_component_uuids)
+      boolean_per_component_uuid={}
+      compacted_component_uuids.each_with_index do |uuid, index|
+        boolean_per_component_uuid[uuid]=compacted_booleans[index]
       end
 
-      result=Array.new(resource_ids.size)
-      resource_ids.each_with_index do |rid, index|
-        authorized=boolean_per_resource_id[rid]
+      result=Array.new(component_uuids.size)
+      component_uuids.each_with_index do |uuid, index|
+        authorized=boolean_per_component_uuid[uuid]
 
         # security is sometimes ignored (for example on libraries), so default value is true if no id to check
         authorized=true if authorized.nil?
@@ -106,13 +106,15 @@ module NeedAuthorization
     end
 
     private
-    def to_resource_id(object)
+    def to_component_uuid(object)
       if object.is_a?(Fixnum)
+        raise 'Component ID is no more supported for checking of authorisation. UUID must be used'
+      elsif object.is_a?(String)
         object
-      elsif object.respond_to?(:resource_id_for_authorization)
-        object.resource_id_for_authorization
+      elsif object.respond_to?(:component_uuid_for_authorization)
+        object.component_uuid_for_authorization
       else
-        nil
+        raise 'Specified argument with type #{object.class} can not be converted to a component uuid'
       end
     end
   end
@@ -178,19 +180,6 @@ module NeedAuthorization
       result
     end
 
-    def select_authorized(role, objects, resource_method=nil)
-      if resource_method
-        booleans=has_role?(role, objects.map{|obj| obj.send(resource_method)})
-      else
-        booleans=has_role?(role, objects)
-      end
-      result=[]
-      objects.each_with_index do |obj, index|
-        result<<obj if booleans[index]==true
-      end
-      result
-    end
-
     #
     # Filter method to enforce a login admin requirement.
     #
index d1ba2e6b605f217398609c7415d8285fa0d5362a..9df936cbf36b1de2a68d0749ebd5b9c173bf813d 100644 (file)
@@ -42,9 +42,9 @@ public class ComponentDto implements Component {
   private String projectUuid;
   private String moduleUuid;
   private String moduleUuidPath;
-  private Long parentProjectId;
-  private Long copyResourceId;
-  private Long developerId;
+  private String rootUuid;
+  private String copyComponentUuid;
+  private String developerUuid;
 
   private String path;
   private String deprecatedKey;
@@ -197,13 +197,12 @@ public class ComponentDto implements Component {
     return this;
   }
 
-  @CheckForNull
-  public Long parentProjectId() {
-    return parentProjectId;
+  public String getRootUuid() {
+    return rootUuid;
   }
 
-  public ComponentDto setParentProjectId(@Nullable Long parentProjectId) {
-    this.parentProjectId = parentProjectId;
+  public ComponentDto setRootUuid(String rootUuid) {
+    this.rootUuid = rootUuid;
     return this;
   }
 
@@ -216,21 +215,23 @@ public class ComponentDto implements Component {
     return this;
   }
 
-  public Long getCopyResourceId() {
-    return copyResourceId;
+  @CheckForNull
+  public String getCopyResourceUuid() {
+    return copyComponentUuid;
   }
 
-  public ComponentDto setCopyResourceId(Long copyResourceId) {
-    this.copyResourceId = copyResourceId;
+  public ComponentDto setCopyComponentUuid(@Nullable String copyComponentUuid) {
+    this.copyComponentUuid = copyComponentUuid;
     return this;
   }
 
-  public Long getDeveloperId() {
-    return developerId;
+  @CheckForNull
+  public String getDeveloperUuid() {
+    return developerUuid;
   }
 
-  public ComponentDto setDeveloperId(Long developerId) {
-    this.developerId = developerId;
+  public ComponentDto setDeveloperUuid(@Nullable String developerUuid) {
+    this.developerUuid = developerUuid;
     return this;
   }
 
@@ -302,9 +303,9 @@ public class ComponentDto implements Component {
       .append("projectUuid", projectUuid)
       .append("moduleUuid", moduleUuid)
       .append("moduleUuidPath", moduleUuidPath)
-      .append("parentProjectId", parentProjectId)
-      .append("copyResourceId", copyResourceId)
-      .append("developerId", developerId)
+      .append("rootUuid", rootUuid)
+      .append("copyComponentUuid", copyComponentUuid)
+      .append("developerUuid", developerUuid)
       .append("path", path)
       .append("deprecatedKey", deprecatedKey)
       .append("name", name)
index 39244259134a746067f23603bf3122c0527b2ab8..03cb1623eebf0920cef28210722df8b88367ec86 100644 (file)
@@ -46,10 +46,6 @@ public final class ComponentDtoFunctions {
     return ToUuid.INSTANCE;
   }
 
-  public static Function<ComponentDto, Long> toCopyResourceId() {
-    return ToCopyResourceId.INSTANCE;
-  }
-
   private enum ToId implements Function<ComponentDto, Long> {
     INSTANCE;
 
@@ -86,12 +82,4 @@ public final class ComponentDtoFunctions {
     }
   }
 
-  private enum ToCopyResourceId implements Function<ComponentDto, Long> {
-    INSTANCE;
-
-    @Override
-    public Long apply(ComponentDto input) {
-      return input.getCopyResourceId();
-    }
-  }
 }
index d37fcd7da7b18b8a8b83360e02b857f4cff12070..9400dc07c2a79bf614fd25d4005ca685f1a3526b 100644 (file)
@@ -72,12 +72,17 @@ public class ResourceDao extends AbstractDao {
   public ResourceDto selectResource(String componentUuid) {
     SqlSession session = myBatis().openSession(false);
     try {
-      return session.getMapper(ResourceMapper.class).selectResourceByUuid(componentUuid);
+      return selectResource(componentUuid, session);
     } finally {
       MyBatis.closeQuietly(session);
     }
   }
 
+  @CheckForNull
+  private static ResourceDto selectResource(String componentUuid, SqlSession session) {
+    return session.getMapper(ResourceMapper.class).selectResourceByUuid(componentUuid);
+  }
+
   public ResourceDto selectResource(long projectId, SqlSession session) {
     return session.getMapper(ResourceMapper.class).selectResource(projectId);
   }
@@ -112,11 +117,11 @@ public class ResourceDao extends AbstractDao {
   private ResourceDto getRootProjectByComponentKey(DbSession session, String componentKey) {
     ResourceDto component = selectResource(ResourceQuery.create().setKey(componentKey), session);
     if (component != null) {
-      Long rootId = component.getRootId();
-      if (rootId != null) {
-        return getParentModuleByComponentId(rootId, session);
-      } else {
+      String rootUuid = component.getRootUuid();
+      if (rootUuid.equals(component.getUuid())) {
         return component;
+      } else {
+        return getParentModuleByComponentUuid(rootUuid, session);
       }
     }
     return null;
@@ -133,14 +138,14 @@ public class ResourceDao extends AbstractDao {
   }
 
   @CheckForNull
-  private ResourceDto getParentModuleByComponentId(Long componentId, DbSession session) {
-    ResourceDto component = selectResource(componentId, session);
+  private static ResourceDto getParentModuleByComponentUuid(String componentUUid, DbSession session) {
+    ResourceDto component = selectResource(componentUUid, session);
     if (component != null) {
-      Long rootId = component.getRootId();
-      if (rootId != null) {
-        return getParentModuleByComponentId(rootId, session);
-      } else {
+      String rootUuid = component.getRootUuid();
+      if (rootUuid.equals(component.getUuid())) {
         return component;
+      } else {
+        return getParentModuleByComponentUuid(rootUuid, session);
       }
     }
     return null;
@@ -227,11 +232,6 @@ public class ResourceDao extends AbstractDao {
     return newArrayList(Iterables.transform(resourceDto, ToComponent.INSTANCE));
   }
 
-  public void insertUsingExistingSession(ResourceDto resourceDto, SqlSession session) {
-    ResourceMapper resourceMapper = session.getMapper(ResourceMapper.class);
-    resourceMapper.insert(resourceDto);
-  }
-
   private enum ToComponent implements Function<ResourceDto, Component> {
     INSTANCE;
 
index 844803142958df9d3ca9093d8c06139aac4b4891..01aea4e456dc101029783682dab3e0000c0d7ba6 100644 (file)
@@ -20,6 +20,8 @@
 package org.sonar.db.component;
 
 import java.util.Date;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
 
 import static org.sonar.db.component.ComponentValidator.checkComponentKey;
 import static org.sonar.db.component.ComponentValidator.checkComponentName;
@@ -35,15 +37,15 @@ public class ResourceDto {
   private String deprecatedKey;
   private String name;
   private String longName;
-  private Long rootId;
+  private String rootUuid;
   private String path;
   private String scope;
   private String qualifier;
   private boolean enabled = true;
   private String description;
   private String language;
-  private Long copyResourceId;
-  private Long personId;
+  private String copyComponentUuid;
+  private String developerUuid;
   private Date createdAt;
   private Long authorizationUpdatedAt;
 
@@ -119,12 +121,12 @@ public class ResourceDto {
     return this;
   }
 
-  public Long getRootId() {
-    return rootId;
+  public String getRootUuid() {
+    return rootUuid;
   }
 
-  public ResourceDto setRootId(Long rootId) {
-    this.rootId = rootId;
+  public ResourceDto setRootUuid(String rootUuid) {
+    this.rootUuid = rootUuid;
     return this;
   }
 
@@ -191,21 +193,23 @@ public class ResourceDto {
     return this;
   }
 
-  public Long getCopyResourceId() {
-    return copyResourceId;
+  @CheckForNull
+  public String getCopyComponentUuid() {
+    return copyComponentUuid;
   }
 
-  public ResourceDto setCopyResourceId(Long copyResourceId) {
-    this.copyResourceId = copyResourceId;
+  public ResourceDto setCopyComponentUuid(@Nullable String copyComponentUuid) {
+    this.copyComponentUuid = copyComponentUuid;
     return this;
   }
 
-  public Long getPersonId() {
-    return personId;
+  @CheckForNull
+  public String getDeveloperUuid() {
+    return developerUuid;
   }
 
-  public ResourceDto setPersonId(Long personId) {
-    this.personId = personId;
+  public ResourceDto setDeveloperUuid(@Nullable String developerUuid) {
+    this.developerUuid = developerUuid;
     return this;
   }
 
index a5b4f7db04dc8bd0c98293165649ae4fdeb768cc..c675163fc76d5ed33488bfef76e121194e8f550d 100644 (file)
@@ -44,7 +44,7 @@ public class ResourceKeyUpdaterDao implements Dao {
     this.mybatis = mybatis;
   }
 
-  public void updateKey(long projectId, String newKey) {
+  public void updateKey(String projectUuid, String newKey) {
     DbSession session = mybatis.openSession(true);
     ResourceKeyUpdaterMapper mapper = session.getMapper(ResourceKeyUpdaterMapper.class);
     try {
@@ -53,9 +53,9 @@ public class ResourceKeyUpdaterDao implements Dao {
       }
 
       // must SELECT first everything
-      ResourceDto project = mapper.selectProject(projectId);
+      ResourceDto project = mapper.selectProject(projectUuid);
       String projectOldKey = project.getKey();
-      List<ResourceDto> resources = mapper.selectProjectResources(projectId);
+      List<ResourceDto> resources = mapper.selectProjectResources(projectUuid);
       resources.add(project);
 
       // and then proceed with the batch UPDATE at once
@@ -67,12 +67,12 @@ public class ResourceKeyUpdaterDao implements Dao {
     }
   }
 
-  public Map<String, String> checkModuleKeysBeforeRenaming(long projectId, String stringToReplace, String replacementString) {
+  public Map<String, String> checkModuleKeysBeforeRenaming(String projectUuid, String stringToReplace, String replacementString) {
     SqlSession session = mybatis.openSession(false);
     ResourceKeyUpdaterMapper mapper = session.getMapper(ResourceKeyUpdaterMapper.class);
     Map<String, String> result = Maps.newHashMap();
     try {
-      Set<ResourceDto> modules = collectAllModules(projectId, stringToReplace, mapper);
+      Set<ResourceDto> modules = collectAllModules(projectUuid, stringToReplace, mapper);
       for (ResourceDto module : modules) {
         String newKey = computeNewKey(module, stringToReplace, replacementString);
         if (mapper.countResourceByKey(newKey) > 0) {
@@ -87,14 +87,14 @@ public class ResourceKeyUpdaterDao implements Dao {
     return result;
   }
 
-  public void bulkUpdateKey(DbSession session, long projectId, String stringToReplace, String replacementString) {
+  public void bulkUpdateKey(DbSession session, String projectUuid, String stringToReplace, String replacementString) {
     ResourceKeyUpdaterMapper mapper = session.getMapper(ResourceKeyUpdaterMapper.class);
     // must SELECT first everything
-    Set<ResourceDto> modules = collectAllModules(projectId, stringToReplace, mapper);
+    Set<ResourceDto> modules = collectAllModules(projectUuid, stringToReplace, mapper);
     checkNewNameOfAllModules(modules, stringToReplace, replacementString, mapper);
     Map<ResourceDto, List<ResourceDto>> allResourcesByModuleMap = Maps.newHashMap();
     for (ResourceDto module : modules) {
-      allResourcesByModuleMap.put(module, mapper.selectProjectResources(module.getId()));
+      allResourcesByModuleMap.put(module, mapper.selectProjectResources(module.getUuid()));
     }
 
     // and then proceed with the batch UPDATE at once
@@ -107,16 +107,6 @@ public class ResourceKeyUpdaterDao implements Dao {
     }
   }
 
-  public void bulkUpdateKey(long projectId, String stringToReplace, String replacementString) {
-    DbSession session = mybatis.openSession(true);
-    try {
-      bulkUpdateKey(session, projectId, stringToReplace, replacementString);
-      session.commit();
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
   private static String computeNewKey(ResourceDto resource, String stringToReplace, String replacementString) {
     return resource.getKey().replaceAll(stringToReplace, replacementString);
   }
@@ -135,14 +125,14 @@ public class ResourceKeyUpdaterDao implements Dao {
     }
   }
 
-  private static Set<ResourceDto> collectAllModules(long projectId, String stringToReplace, ResourceKeyUpdaterMapper mapper) {
-    ResourceDto project = mapper.selectProject(projectId);
+  private static Set<ResourceDto> collectAllModules(String projectUuid, String stringToReplace, ResourceKeyUpdaterMapper mapper) {
+    ResourceDto project = mapper.selectProject(projectUuid);
     Set<ResourceDto> modules = Sets.newHashSet();
     if (project.getKey().contains(stringToReplace)) {
       modules.add(project);
     }
-    for (ResourceDto submodule : mapper.selectDescendantProjects(projectId)) {
-      modules.addAll(collectAllModules(submodule.getId(), stringToReplace, mapper));
+    for (ResourceDto submodule : mapper.selectDescendantProjects(projectUuid)) {
+      modules.addAll(collectAllModules(submodule.getUuid(), stringToReplace, mapper));
     }
     return modules;
   }
index 6511e765202120d4d46ff53e156245ef6db22b9f..c38ee177cf143466a49d2cd1f988a4dbce504114 100644 (file)
@@ -20,6 +20,7 @@
 package org.sonar.db.component;
 
 import java.util.List;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * @since 3.2
@@ -28,11 +29,11 @@ public interface ResourceKeyUpdaterMapper {
 
   int countResourceByKey(String key);
 
-  ResourceDto selectProject(long projectId);
+  ResourceDto selectProject(@Param("uuid") String uuid);
 
-  List<ResourceDto> selectProjectResources(long projectId);
+  List<ResourceDto> selectProjectResources(@Param("rootUuid") String rootUuid);
 
-  List<ResourceDto> selectDescendantProjects(long projectId);
+  List<ResourceDto> selectDescendantProjects(@Param("rootUuid") String rootUuid);
 
   void update(ResourceDto resource);
 
index a77f240dad353533595e804ef05737360eb53f5b..86e1f747c27945c0ac547723df73cdf2efbb43bf 100644 (file)
@@ -62,10 +62,6 @@ public interface ResourceMapper {
 
   ResourceDto selectProvisionedProject(@Param("key") String key);
 
-  void insert(ResourceDto resource);
-
-  void update(ResourceDto resource);
-
   void updateAuthorizationDate(@Param("projectId") Long projectId, @Param("authorizationDate") Long authorizationDate);
 
 }
index b2c521bfac738cfff9f6ca7f34f7a11f56658854..d5a0eef5d9ae16255a3060a6dd7d94d23d40846a 100644 (file)
@@ -29,8 +29,6 @@ import java.util.Map;
 import java.util.Set;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import org.apache.ibatis.session.ResultHandler;
-import org.apache.ibatis.session.SqlSession;
 import org.sonar.db.Dao;
 import org.sonar.db.DbSession;
 import org.sonar.db.MyBatis;
@@ -47,16 +45,6 @@ public class IssueDao implements Dao {
     this.mybatis = mybatis;
   }
 
-  public void selectNonClosedIssuesByModule(long componentId, ResultHandler handler) {
-    SqlSession session = mybatis.openSession(false);
-    try {
-      session.select("org.sonar.db.issue.IssueMapper.selectNonClosedIssuesByModule", componentId, handler);
-
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
   public Optional<IssueDto> selectByKey(DbSession session, String key) {
     return Optional.fromNullable(mapper(session).selectByKey(key));
   }
index 403b991e530c7eb541ac2b991af1cc8451894b46..6e77444075a09c86dac6222c140500b56cb0d5d6 100644 (file)
@@ -132,7 +132,7 @@ public class PurgeDao implements Dao {
 
   private void disableOrphanResources(final ResourceDto project, final SqlSession session, final PurgeMapper purgeMapper, final PurgeListener purgeListener) {
     final List<IdUuidPair> componentIdUuids = new ArrayList<>();
-    session.select("org.sonar.db.purge.PurgeMapper.selectComponentIdUuidsToDisable", project.getId(),
+    session.select("org.sonar.db.purge.PurgeMapper.selectComponentIdUuidsToDisable", project.getUuid(),
       resultContext -> {
         IdUuidPair componentIdUuid = (IdUuidPair) resultContext.getResultObject();
         if (componentIdUuid.getId() != null) {
index 59d9e0397b31e27dbdb95923927efd7fc25885d2..5129d2e268149e99e149fced8d8abff26ef2b02c 100644 (file)
     p.qualifier as qualifier,
     p.scope as scope,
     p.language as language,
-    p.root_id as parentProjectId,
+    p.root_uuid as rootUuid,
     p.path as path,
     p.enabled as enabled,
-    p.copy_resource_id as copyResourceId,
-    p.person_id as developerId,
+    p.copy_component_uuid as copyComponentUuid,
+    p.developer_uuid as developerUuid,
     p.authorization_updated_at as authorizationUpdatedAt,
     p.created_at as createdAt
   </sql>
@@ -32,7 +32,7 @@
     p.kee as kee,
     p.qualifier as qualifier,
     p.scope as scope,
-    P.copy_resource_id as copyResourceId,
+    P.copy_component_uuid as copyComponentUuid,
     p.module_uuid as moduleUuid
   </sql>
 
     SELECT
     <include refid="componentColumns"/>
     FROM projects p
-    INNER JOIN projects child ON child.root_id=p.id AND child.enabled=${_true}
+    INNER JOIN projects child ON child.root_uuid=p.uuid AND child.enabled=${_true}
     <where>
       AND p.enabled=${_true}
       AND p.scope='PRJ'
     from projects p
     <where>
       AND p.enabled=${_true}
-      AND p.copy_resource_id is null
+      AND p.copy_component_uuid is null
       AND p.qualifier in
       <foreach collection="qualifiers" open="(" close=")" item="qualifier" separator=",">
         #{qualifier}
     from projects p
     <where>
       AND p.enabled=${_true}
-      AND p.copy_resource_id is null
+      AND p.copy_component_uuid is null
       <if test="query.qualifiers!=null">
       AND p.qualifier in
         <foreach collection="query.qualifiers" item="qualifier" open="(" close=")" separator=",">
           WHERE ri.kee like #{query.nameOrKeyQueryToSqlForResourceIndex} ESCAPE '/'
         )
         OR
-        p.copy_resource_id IN (
-          SELECT p1.id
-          FROM resource_index ri, projects p1
+        p.copy_component_uuid IN (
+          SELECT ri.component_uuid
+          FROM resource_index ri
           WHERE ri.kee like #{query.nameOrKeyQueryToSqlForResourceIndex} ESCAPE '/'
-            and p1.uuid = ri.component_uuid
         )
       )
     </if>
     from projects p
     <where>
       p.enabled=${_true}
-      AND p.copy_resource_id is null
+      AND p.copy_component_uuid is null
       AND p.qualifier in
       <foreach collection="qualifiers" open="(" close=")" item="qualifier" separator=",">
         #{qualifier}
 
   <select id="selectProjectsFromView" resultType="String">
     SELECT p.uuid FROM projects technical_projects
-    INNER JOIN projects p on p.id=technical_projects.copy_resource_id AND p.enabled=${_true}
+    INNER JOIN projects p on p.uuid=technical_projects.copy_component_uuid AND p.enabled=${_true}
     <where>
       technical_projects.enabled=${_true} AND technical_projects.project_uuid=#{projectViewUuid}
       AND technical_projects.module_uuid_path LIKE #{viewUuidLikeQuery}
     s.id is null
     and p.enabled=${_true}
     and p.qualifier=#{qualifier}
-    and p.copy_resource_id is null
+    and p.copy_component_uuid is null
     <if test="query!=null">
       and (
       UPPER(p.name) like #{query}
     where
     s2.id is null
     and p.qualifier=#{qualifier}
-    and p.copy_resource_id is null
+    and p.copy_component_uuid is null
     <if test="query!=null">
       and (
       UPPER(p.name) like #{query}
 
   <sql id="insertSql">
     INSERT INTO projects (kee, deprecated_kee, uuid, project_uuid, module_uuid, module_uuid_path, name, long_name,
-    qualifier, scope, language, description, root_id, path, copy_resource_id, person_id, enabled,
+    qualifier, scope, language, description, root_uuid, path, copy_component_uuid, developer_uuid, enabled,
     created_at, authorization_updated_at)
     VALUES (#{kee,jdbcType=VARCHAR}, #{deprecatedKey,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR},
     #{projectUuid,jdbcType=VARCHAR}, #{moduleUuid,jdbcType=VARCHAR}, #{moduleUuidPath,jdbcType=VARCHAR},
     #{name,jdbcType=VARCHAR}, #{longName,jdbcType=VARCHAR}, #{qualifier,jdbcType=VARCHAR}, #{scope,jdbcType=VARCHAR},
     #{language,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
-    #{parentProjectId,jdbcType=BIGINT}, #{path,jdbcType=VARCHAR}, #{copyResourceId,jdbcType=BIGINT},
-    #{developerId,jdbcType=BIGINT},
+    #{rootUuid,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{copyComponentUuid,jdbcType=VARCHAR},
+    #{developerUuid,jdbcType=VARCHAR},
     #{enabled,jdbcType=BOOLEAN},
     #{createdAt,jdbcType=TIMESTAMP}, #{authorizationUpdatedAt,jdbcType=BIGINT})
   </sql>
     scope=#{scope,jdbcType=VARCHAR},
     language=#{language,jdbcType=VARCHAR},
     description=#{description,jdbcType=VARCHAR},
-    root_id=#{parentProjectId,jdbcType=BIGINT},
+    root_uuid=#{rootUuid,jdbcType=VARCHAR},
     path=#{path,jdbcType=VARCHAR},
-    copy_resource_id=#{copyResourceId,jdbcType=BIGINT},
-    person_id=#{developerId,jdbcType=BIGINT},
+    copy_component_uuid=#{copyComponentUuid,jdbcType=VARCHAR},
+    developer_uuid=#{developerUuid,jdbcType=VARCHAR},
     enabled=#{enabled,jdbcType=BOOLEAN},
     authorization_updated_at=#{authorizationUpdatedAt,jdbcType=BIGINT}
     WHERE uuid=#{uuid}
index de993ded498aa0b45197e416e6c29c23eafb70fc..9e79c6417cbdd511158a81372cf7f9486dee04d9 100644 (file)
@@ -5,7 +5,7 @@
   <select id="selectProjectIdsFromQueryAndViewOrSubViewUuid" parameterType="map" resultType="long">
     SELECT original.id FROM resource_index r
     INNER JOIN projects original ON r.component_uuid = original.uuid
-    INNER JOIN projects copy ON original.id = copy.copy_resource_id
+    INNER JOIN projects copy ON original.uuid = copy.copy_component_uuid
     <where>
       AND copy.module_uuid_path LIKE #{viewUuidQuery}
       AND r.kee LIKE #{query}
@@ -23,7 +23,7 @@
     from projects p, projects root, snapshots s
     <where>
       p.enabled=${_true}
-      and p.copy_resource_id is null
+      and p.copy_component_uuid is null
       and p.uuid=s.component_uuid
       and s.islast=${_true}
       <if test="scopes != null">
index 463b3c06a62c4152fa6b179afe71360d4f4f7a94..0d6bd0f1b6cf81676088d65df3fc9eb9fa75e794 100644 (file)
@@ -6,8 +6,9 @@
   <resultMap id="resourceResultMap" type="Resource">
     <id property="id" column="id"/>
     <result property="key" column="kee"/>
+    <result property="uuid" column="uuid"/>
     <result property="deprecatedKey" column="deprecated_kee"/>
-    <result property="rootId" column="root_id"/>
+    <result property="rootUuid" column="root_uuid"/>
     <result property="scope" column="scope"/>
   </resultMap>
 
     WHERE kee = #{key}
   </select>
 
-  <select id="selectProject" parameterType="long" resultMap="resourceResultMap">
-    select * from projects where id=#{id}
+  <select id="selectProject" parameterType="String" resultMap="resourceResultMap">
+    select * from projects where uuid=#{uuid}
   </select>
 
-  <select id="selectProjectResources" parameterType="long" resultMap="resourceResultMap">
-    select * from projects where root_id=#{id} AND scope!='PRJ'
+  <select id="selectProjectResources" parameterType="String" resultMap="resourceResultMap">
+    select * from projects where root_uuid=#{rootUuid} AND scope!='PRJ'
   </select>
 
-  <select id="selectDescendantProjects" parameterType="long" resultMap="resourceResultMap">
-    select * from projects where scope='PRJ' and root_id=#{id}
+  <select id="selectDescendantProjects" parameterType="String" resultMap="resourceResultMap">
+    select * from projects where scope='PRJ' and root_uuid=#{rootUuid} and uuid!=#{rootUuid}
   </select>
 
   <update id="update" parameterType="Resource">
index ef0fce32d24b3757bc0ac242a8a57623fa64a262..4b317231e88ca0930f6dec4aa52c8e0afc23ee98 100644 (file)
     <result property="path" column="path"/>
     <result property="name" column="name"/>
     <result property="longName" column="long_name"/>
-    <result property="rootId" column="root_id"/>
+    <result property="rootUuid" column="root_uuid"/>
     <result property="scope" column="scope"/>
     <result property="qualifier" column="qualifier"/>
     <result property="enabled" column="enabled"/>
     <result property="description" column="description"/>
     <result property="language" column="language"/>
-    <result property="copyResourceId" column="copy_resource_id"/>
-    <result property="personId" column="person_id"/>
+    <result property="copyComponentUuid" column="copy_component_uuid"/>
+    <result property="developerUuid" column="developer_uuid"/>
     <result property="createdAt" column="created_at"/>
     <result property="authorizationUpdatedAt" column="authorization_updated_at"/>
   </resultMap>
 
   <select id="selectLastSnapshotByResourceKey" parameterType="string" resultMap="snapshotResultMap">
     SELECT s.* FROM snapshots s
-    INNER JOIN projects p on p.uuid=s.component_uuid AND p.enabled=${_true} AND p.copy_resource_id IS NULL
+    INNER JOIN projects p on p.uuid=s.component_uuid AND p.enabled=${_true} AND p.copy_component_uuid  is null
     <where>
       AND p.kee=#{id}
       AND s.islast=${_true}
 
   <select id="selectLastSnapshotByResourceUuid" parameterType="string" resultMap="snapshotResultMap">
     SELECT s.* from snapshots s
-    INNER JOIN projects p on p.uuid=s.component_uuid AND p.enabled=${_true} AND p.copy_resource_id IS NULL
+    INNER JOIN projects p on p.uuid=s.component_uuid AND p.enabled=${_true} AND p.copy_component_uuid  is null
     <where>
       AND p.uuid=#{uuid}
       AND s.islast=${_true}
         </foreach>
       </if>
       and p.enabled=${_true}
-      and p.copy_resource_id is null
+      and p.copy_component_uuid  is null
     </where>
   </select>
 
         </foreach>
       </if>
       and p.enabled=${_true}
-      and p.copy_resource_id is null
+      and p.copy_component_uuid  is null
       and s.islast=${_true}
     </where>
   </sql>
           p.qualifier=#{qualifier}
         </foreach>
       </if>
-      and p.copy_resource_id is null
+      and p.copy_component_uuid  is null
     </where>
   </select>
 
           p.qualifier=#{qualifier}
         </foreach>
       </if>
-      and p.copy_resource_id is null
+      and p.copy_component_uuid  is null
     </where>
   </select>
 
     left join snapshots s on s.component_uuid=p.uuid
     where s.id is null
     and p.kee = #{key}
-    and p.copy_resource_id is null
+    and p.copy_component_uuid  is null
   </select>
 
-  <insert id="insert" parameterType="Resource" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
-    insert into projects
-    (uuid, project_uuid, module_uuid, module_uuid_path, name, long_name, description, scope, qualifier, kee,
-    deprecated_kee, path, language, root_id, copy_resource_id, person_id,
-    enabled, authorization_updated_at, created_at)
-    values (
-    #{uuid,jdbcType=VARCHAR}, #{projectUuid,jdbcType=VARCHAR}, #{moduleUuid,jdbcType=VARCHAR},
-    #{moduleUuidPath,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
-    #{longName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{scope,jdbcType=VARCHAR},
-    #{qualifier,jdbcType=VARCHAR},
-    #{key,jdbcType=VARCHAR}, #{deprecatedKey,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{language,jdbcType=VARCHAR},
-    #{rootId,jdbcType=INTEGER}, #{copyResourceId,jdbcType=INTEGER},
-    #{personId,jdbcType=INTEGER}, #{enabled,jdbcType=BOOLEAN}, #{authorizationUpdatedAt,jdbcType=BIGINT},
-    #{createdAt,jdbcType=TIMESTAMP}
-    )
-  </insert>
-
-  <update id="update" parameterType="Resource">
-    update projects set name=#{name}, long_name=#{longName}, description=#{description},
-    scope=#{scope}, qualifier=#{qualifier}, kee=#{key}, deprecated_kee=#{deprecatedKey}, path=#{path},
-    language=#{language}, root_id=#{rootId}, copy_resource_id=#{copyResourceId},
-    person_id=#{personId}, enabled=#{enabled} where id=#{id}
-  </update>
-
   <update id="updateAuthorizationDate" parameterType="map">
     update projects set authorization_updated_at=#{authorizationDate}
     where id=#{projectId}
index 2888c9aa272a12d6589c2092038776fbd12567b9..909ba71449f36b887c3596e1b9f1d6ab5f3c8416 100644 (file)
     i.status &lt;&gt; 'CLOSED'
   </select>
 
-  <select id="selectNonClosedIssuesByModule" parameterType="long" resultType="Issue">
-    select
-    i.id,
-    i.kee as kee,
-    i.rule_id as ruleId,
-    i.component_uuid as componentUuid,
-    i.project_uuid as projectUuid,
-    i.severity as severity,
-    i.manual_severity as manualSeverity,
-    i.message as message,
-    i.line as line,
-    i.locations as locations,
-    i.gap as gap,
-    i.effort as effort,
-    i.status as status,
-    i.resolution as resolution,
-    i.checksum as checksum,
-    i.assignee as assignee,
-    i.author_login as authorLogin,
-    i.tags as tagsString,
-    i.issue_attributes as issueAttributes,
-    i.issue_creation_date as issueCreationTime,
-    i.issue_update_date as issueUpdateTime,
-    i.issue_close_date as issueCloseTime,
-    i.created_at as createdAt,
-    i.updated_at as updatedAt,
-    i.issue_type as type,
-    r.plugin_rule_key as ruleKey,
-    r.plugin_name as ruleRepo,
-    p.kee as componentKey,
-    root.kee as projectKey
-    from issues i
-    inner join (select p.id, p.uuid,p.kee from projects p where (p.root_id=#{id} and p.qualifier &lt;&gt; 'BRC') or
-    (p.id=#{id})) p on p.uuid=i.component_uuid
-    inner join rules r on r.id=i.rule_id
-    left outer join projects root on root.uuid=i.project_uuid
-    where i.status &lt;&gt; 'CLOSED'
-  </select>
-
   <select id="selectComponentUuidsOfOpenIssuesForProjectUuid" parameterType="string" resultType="string">
     select distinct(i.component_uuid)
     from issues i
index 3b39f3fad051007812ef351e05799348c1921c23..8c4cce48c0dafaa99cf1947c75bef074383ad4ed 100644 (file)
@@ -72,9 +72,9 @@
     not exists(select e.id from events e where e.snapshot_id=s.id)
   </select>
 
-  <select id="selectComponentIdUuidsToDisable" resultType="org.sonar.db.purge.IdUuidPair" parameterType="long">
+  <select id="selectComponentIdUuidsToDisable" resultType="org.sonar.db.purge.IdUuidPair" parameterType="String">
     select p.id, p.uuid from projects p
-    where (p.id=#{id} or p.root_id=#{id}) and p.enabled=${_true}
+    where p.root_uuid=#{uuid} and p.enabled=${_true}
     and not exists(select s.component_uuid from snapshots s where s.islast=${_true} and s.component_uuid=p.uuid)
   </select>
 
index 12bef99c2fd833c3cca50c2b6ad8c288b2f4a566..f670e71ecc87ddabbc5ce3b00d76ca199fbaafc9 100644 (file)
@@ -9,7 +9,20 @@
     WHERE
     gr.role=#{role}
     and (gr.group_id is null or gr.group_id in (select gu.group_id from groups_users gu where gu.user_id=#{userId}))
-    and (gr.resource_id = p.root_id or gr.resource_id = p.id) and
+    and gr.resource_id = p.id
+    and
+    <foreach collection="componentKeys" open="(" close=")" item="element" index="index" separator=" or ">
+      p.kee=#{element}
+    </foreach>
+    UNION
+    SELECT p.kee
+    FROM group_roles gr, projects root, projects p
+    WHERE
+    gr.role=#{role}
+    and (gr.group_id is null or gr.group_id in (select gu.group_id from groups_users gu where gu.user_id=#{userId}))
+    and gr.resource_id = root.id
+    and p.root_uuid = root.uuid
+    and
     <foreach collection="componentKeys" open="(" close=")" item="element" index="index" separator=" or ">
       p.kee=#{element}
     </foreach>
@@ -19,7 +32,8 @@
     INNER JOIN projects p on p.id = ur.resource_id
     WHERE
     ur.role=#{role}
-    and ur.user_id=#{userId} and
+    and ur.user_id=#{userId}
+    and
     <foreach collection="componentKeys" open="(" close=")" item="element" index="index" separator=" or ">
       p.kee=#{element}
     </foreach>
     WHERE
     gr.role=#{role}
     and gr.group_id is null
-    and (gr.resource_id = p.root_id or gr.resource_id = p.id) and
+    and gr.resource_id = p.id
+    and
+    <foreach collection="componentKeys" open="(" close=")" item="element" index="index" separator=" or ">
+      p.kee=#{element}
+    </foreach>
+    UNION
+    SELECT p.kee
+    FROM group_roles gr, projects root, projects p
+    WHERE
+    gr.role=#{role}
+    and gr.group_id is null
+    and gr.resource_id = root.id
+    and p.root_uuid = root.uuid
+    and
     <foreach collection="componentKeys" open="(" close=")" item="element" index="index" separator=" or ">
       p.kee=#{element}
     </foreach>
index c477dc064a3749182c53d91460c6353ae6986db3..2acc84c106d6d0a50db45a83b87d669e733cb7ae 100644 (file)
@@ -68,7 +68,7 @@ public class ComponentDaoTest {
     assertThat(result.uuid()).isEqualTo("KLMN");
     assertThat(result.moduleUuid()).isEqualTo("EFGH");
     assertThat(result.moduleUuidPath()).isEqualTo(".ABCD.EFGH.");
-    assertThat(result.parentProjectId()).isEqualTo(2);
+    assertThat(result.getRootUuid()).isEqualTo("EFGH");
     assertThat(result.projectUuid()).isEqualTo("ABCD");
     assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
     assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
@@ -77,7 +77,8 @@ public class ComponentDaoTest {
     assertThat(result.qualifier()).isEqualTo("FIL");
     assertThat(result.scope()).isEqualTo("FIL");
     assertThat(result.language()).isEqualTo("java");
-    assertThat(result.getCopyResourceId()).isNull();
+    assertThat(result.getCopyResourceUuid()).isNull();
+    assertThat(result.getDeveloperUuid()).isNull();
 
     assertThat(underTest.selectByUuid(dbSession, "UNKNOWN")).isAbsent();
   }
@@ -91,7 +92,7 @@ public class ComponentDaoTest {
     assertThat(result.uuid()).isEqualTo("STUV");
     assertThat(result.moduleUuid()).isEqualTo("OPQR");
     assertThat(result.moduleUuidPath()).isEqualTo(".OPQR.");
-    assertThat(result.parentProjectId()).isEqualTo(11);
+    assertThat(result.getRootUuid()).isEqualTo("OPQR");
     assertThat(result.projectUuid()).isEqualTo("OPQR");
     assertThat(result.key()).isEqualTo("DEV:anakin@skywalker.name:org.struts:struts");
     assertThat(result.path()).isNull();
@@ -100,7 +101,8 @@ public class ComponentDaoTest {
     assertThat(result.qualifier()).isEqualTo("DEV_PRJ");
     assertThat(result.scope()).isEqualTo("PRJ");
     assertThat(result.language()).isNull();
-    assertThat(result.getCopyResourceId()).isEqualTo(1L);
+    assertThat(result.getCopyResourceUuid()).isEqualTo("ABCD");
+    assertThat(result.getDeveloperUuid()).isEqualTo("OPQR");
   }
 
   @Test
@@ -108,7 +110,7 @@ public class ComponentDaoTest {
     db.prepareDbUnit(getClass(), "shared.xml");
 
     ComponentDto result = underTest.selectByUuid(dbSession, "STUV").get();
-    assertThat(result.getDeveloperId()).isEqualTo(11L);
+    assertThat(result.getDeveloperUuid()).isEqualTo("OPQR");
   }
 
   @Test
@@ -144,7 +146,8 @@ public class ComponentDaoTest {
     assertThat(result.qualifier()).isEqualTo("FIL");
     assertThat(result.scope()).isEqualTo("FIL");
     assertThat(result.language()).isEqualTo("java");
-    assertThat(result.parentProjectId()).isEqualTo(2);
+    assertThat(result.uuid()).isEqualTo("KLMN");
+    assertThat(result.getRootUuid()).isEqualTo("EFGH");
 
     assertThat(underTest.selectByKey(dbSession, "unknown")).isAbsent();
   }
@@ -180,7 +183,7 @@ public class ComponentDaoTest {
     assertThat(result.qualifier()).isEqualTo("TRK");
     assertThat(result.scope()).isEqualTo("PRJ");
     assertThat(result.language()).isNull();
-    assertThat(result.parentProjectId()).isNull();
+    assertThat(result.getRootUuid()).isEqualTo("ABCD");
     assertThat(result.getAuthorizationUpdatedAt()).isEqualTo(123456789L);
   }
 
@@ -200,7 +203,7 @@ public class ComponentDaoTest {
     assertThat(result.qualifier()).isEqualTo("FIL");
     assertThat(result.scope()).isEqualTo("FIL");
     assertThat(result.language()).isEqualTo("java");
-    assertThat(result.parentProjectId()).isEqualTo(2);
+    assertThat(result.getRootUuid()).isEqualTo("EFGH");
 
     assertThat(underTest.selectByKeys(dbSession, singletonList("unknown"))).isEmpty();
   }
@@ -221,7 +224,7 @@ public class ComponentDaoTest {
     assertThat(result.qualifier()).isEqualTo("FIL");
     assertThat(result.scope()).isEqualTo("FIL");
     assertThat(result.language()).isEqualTo("java");
-    assertThat(result.parentProjectId()).isEqualTo(2);
+    assertThat(result.getRootUuid()).isEqualTo("EFGH");
 
     assertThat(underTest.selectByIds(dbSession, newArrayList(555L))).isEmpty();
   }
@@ -238,7 +241,7 @@ public class ComponentDaoTest {
     assertThat(result.uuid()).isEqualTo("KLMN");
     assertThat(result.moduleUuid()).isEqualTo("EFGH");
     assertThat(result.moduleUuidPath()).isEqualTo(".ABCD.EFGH.");
-    assertThat(result.parentProjectId()).isEqualTo(2);
+    assertThat(result.getRootUuid()).isEqualTo("EFGH");
     assertThat(result.projectUuid()).isEqualTo("ABCD");
     assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
     assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
@@ -358,7 +361,7 @@ public class ComponentDaoTest {
     assertThat(results.get(0).getKey()).isEqualTo("org.struts:struts");
 
     // Sub project of a project
-    assertThat(underTest.selectSubProjectsByComponentUuids(dbSession, newArrayList("ABCD"))).isEmpty();
+    assertThat(underTest.selectSubProjectsByComponentUuids(dbSession, newArrayList("ABCD"))).extracting("uuid").containsOnly("ABCD");
 
     // SUb projects of a component and a sub module
     assertThat(underTest.selectSubProjectsByComponentUuids(dbSession, newArrayList("HIJK", "FGHI"))).hasSize(2);
@@ -569,9 +572,9 @@ public class ComponentDaoTest {
       .setLanguage("java")
       .setDescription("description")
       .setPath("src/org/struts/RequestContext.java")
-      .setParentProjectId(3L)
-      .setCopyResourceId(5L)
-      .setDeveloperId(7L)
+      .setRootUuid("uuid_3")
+      .setCopyComponentUuid("uuid_5")
+      .setDeveloperUuid("uuid_7")
       .setEnabled(true)
       .setCreatedAt(DateUtils.parseDate("2014-06-18"))
       .setAuthorizationUpdatedAt(123456789L);
@@ -602,9 +605,9 @@ public class ComponentDaoTest {
         .setLanguage("java")
         .setDescription("description")
         .setPath("src/org/struts/RequestContext.java")
-        .setParentProjectId(3L)
-        .setCopyResourceId(5L)
-        .setDeveloperId(7L)
+        .setRootUuid("uuid_3")
+        .setCopyComponentUuid("uuid_5")
+        .setDeveloperUuid("uuid_7")
         .setEnabled(true)
         .setCreatedAt(DateUtils.parseDate("2014-06-18"))
         .setAuthorizationUpdatedAt(123456789L);
@@ -634,7 +637,7 @@ public class ComponentDaoTest {
       .setScope("FIL")
       .setLanguage("java")
       .setPath("src/org/struts/RequestContext.java")
-      .setParentProjectId(3L)
+      .setRootUuid("uuid_3")
       .setEnabled(false)
       .setCreatedAt(DateUtils.parseDate("2014-06-18"))
       .setAuthorizationUpdatedAt(123456789L);
@@ -664,9 +667,9 @@ public class ComponentDaoTest {
       .setLanguage("java2")
       .setDescription("description2")
       .setPath("src/org/struts/RequestContext2.java")
-      .setParentProjectId(4L)
-      .setCopyResourceId(6L)
-      .setDeveloperId(9L)
+      .setRootUuid("uuid_4")
+      .setCopyComponentUuid("uuid_6")
+      .setDeveloperUuid("uuid_9")
       .setEnabled(false)
       .setAuthorizationUpdatedAt(12345678910L);
 
index 836149e32772afa01d77cba8a3831cb4bc7ab898..09b1ffc597bac52bc15eec5ece9024b5865abda4 100644 (file)
@@ -40,8 +40,9 @@ public class ComponentDtoTest {
       .setLanguage("java")
       .setDescription("desc")
       .setPath("src/org/struts/RequestContext.java")
-      .setCopyResourceId(5L)
-      .setParentProjectId(3L)
+      .setCopyComponentUuid("uuid_5")
+      .setRootUuid("uuid_3")
+      .setDeveloperUuid("uuid_6")
       .setAuthorizationUpdatedAt(123456789L);
 
     assertThat(componentDto.getId()).isEqualTo(1L);
@@ -54,8 +55,9 @@ public class ComponentDtoTest {
     assertThat(componentDto.path()).isEqualTo("src/org/struts/RequestContext.java");
     assertThat(componentDto.language()).isEqualTo("java");
     assertThat(componentDto.description()).isEqualTo("desc");
-    assertThat(componentDto.parentProjectId()).isEqualTo(3L);
-    assertThat(componentDto.getCopyResourceId()).isEqualTo(5L);
+    assertThat(componentDto.getRootUuid()).isEqualTo("uuid_3");
+    assertThat(componentDto.getCopyResourceUuid()).isEqualTo("uuid_5");
+    assertThat(componentDto.getDeveloperUuid()).isEqualTo("uuid_6");
     assertThat(componentDto.getAuthorizationUpdatedAt()).isEqualTo(123456789L);
   }
 
index 90b42a41772cf9784d430c3f35c560bbc0808fc9..cc5904b0b5efecc4e3e67b97b2f6b085d9275f43 100644 (file)
@@ -94,7 +94,7 @@ public class ComponentTesting {
       .setUuid(uuid)
       .setProjectUuid(uuid)
       .setModuleUuidPath(MODULE_UUID_PATH_SEP + uuid + MODULE_UUID_PATH_SEP)
-      .setParentProjectId(null)
+      .setRootUuid(uuid)
       .setKey("KEY_" + uuid)
       .setName("NAME_" + uuid)
       .setLongName("LONG_NAME_" + uuid)
@@ -111,7 +111,7 @@ public class ComponentTesting {
       .setUuid(uuid)
       .setProjectUuid(uuid)
       .setModuleUuidPath(MODULE_UUID_PATH_SEP + uuid + MODULE_UUID_PATH_SEP)
-      .setParentProjectId(null)
+      .setRootUuid(uuid)
       .setKey(uuid)
       .setName(name)
       .setLongName(name)
@@ -141,7 +141,7 @@ public class ComponentTesting {
       .setKey(view.key() + project.key())
       .setName(project.name())
       .setLongName(project.longName())
-      .setCopyResourceId(project.getId())
+      .setCopyComponentUuid(project.uuid())
       .setScope(Scopes.FILE)
       .setQualifier(Qualifiers.PROJECT)
       .setPath(null)
@@ -155,7 +155,7 @@ public class ComponentTesting {
       .setKey(developer.key() + ":" + project.key())
       .setName(project.name())
       .setLongName(project.longName())
-      .setCopyResourceId(project.getId())
+      .setCopyComponentUuid(project.uuid())
       .setScope(Scopes.PROJECT)
       .setQualifier("DEV_PRJ")
       .setPath(null)
@@ -168,7 +168,7 @@ public class ComponentTesting {
       .setProjectUuid(module.projectUuid())
       .setModuleUuid(module.uuid())
       .setModuleUuidPath(module.moduleUuidPath())
-      .setParentProjectId(module.getId())
+      .setRootUuid(module.uuid())
       .setCreatedAt(new Date())
       .setEnabled(true);
   }
index 0c13476bde8020fc3cf97b0677448bd23add749f..60bd033b7415cd78ce7833c8fb03f80601bee11f 100644 (file)
@@ -27,8 +27,6 @@ import javax.annotation.Nullable;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonar.api.component.Component;
-import org.sonar.api.resources.Qualifiers;
-import org.sonar.api.resources.Scopes;
 import org.sonar.api.utils.System2;
 import org.sonar.db.DbTester;
 
@@ -87,27 +85,6 @@ public class ResourceDaoTest {
     assertThat(underTest.getRootProjectByComponentKey("unknown")).isNull();
   }
 
-  @Test
-  public void should_insert_using_existing_session() {
-    dbTester.prepareDbUnit(getClass(), "insert.xml");
-
-    ResourceDto file1 = new ResourceDto().setUuid("ABCD")
-      .setKey("org.struts:struts:/src/main/java/org/struts/Action.java")
-      .setDeprecatedKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE)
-      .setLanguage("java").setName("Action").setLongName("org.struts.Action");
-    ResourceDto file2 = new ResourceDto().setUuid("BCDE")
-      .setKey("org.struts:struts:/src/main/java/org/struts/Filter.java")
-      .setDeprecatedKey("org.struts:struts:org.struts.Filter").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE)
-      .setLanguage("java").setName("Filter").setLongName("org.struts.Filter");
-
-    underTest.insertUsingExistingSession(file1, dbTester.getSession());
-    underTest.insertUsingExistingSession(file2, dbTester.getSession());
-
-    dbTester.getSession().rollback();
-
-    assertThat(dbTester.countRowsOfTable("projects")).isZero();
-  }
-
   @Test
   public void should_find_component_by_key() {
     dbTester.prepareDbUnit(getClass(), "fixture.xml");
index cdcce31fb4b3f4dcc8c2626a087713437444f502..ecf6a506df5efe333eb715c4e2a86b8d932b61d1 100644 (file)
@@ -147,7 +147,7 @@ public class ResourceIndexDaoTest {
   @Test
   public void restrict_indexed_combinations_to_400_characters() {
     String longName = repeat("a", 2_000);
-    ComponentDto project = new ComponentDto().setUuid(ROOT_UUID).setKey("the_key").setName(longName).setScope(Scopes.PROJECT).setQualifier(Qualifiers.PROJECT);
+    ComponentDto project = new ComponentDto().setUuid(ROOT_UUID).setRootUuid(ROOT_UUID).setKey("the_key").setName(longName).setScope(Scopes.PROJECT).setQualifier(Qualifiers.PROJECT);
     DbSession session = dbTester.getSession();
     dbTester.getDbClient().componentDao().insert(session, project);
     dbTester.getDbClient().snapshotDao().insert(session, new SnapshotDto().setComponentUuid(project.uuid()).setRootComponentUuid(project.uuid()).setLast(true));
index c44ee35e9e46c1a4f1ec6e8df7372e750aee3910..971aab92c4dcbbb15acb32a0965e4021ec0390e6 100644 (file)
@@ -25,6 +25,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.sonar.api.utils.System2;
+import org.sonar.db.DbSession;
 import org.sonar.db.DbTester;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -38,6 +39,7 @@ public class ResourceKeyUpdaterDaoTest {
 
   @Rule
   public DbTester db = DbTester.create(System2.INSTANCE);
+  private DbSession dbSession = db.getSession();
   ComponentDbTester componentDb = new ComponentDbTester(db);
 
   ResourceKeyUpdaterDao underTest = db.getDbClient().resourceKeyUpdaterDao();
@@ -46,7 +48,7 @@ public class ResourceKeyUpdaterDaoTest {
   public void shouldUpdateKey() {
     db.prepareDbUnit(getClass(), "shared.xml");
 
-    underTest.updateKey(2, "struts:core");
+    underTest.updateKey("B", "struts:core");
 
     db.assertDbUnit(getClass(), "shouldUpdateKey-result.xml", "projects");
   }
@@ -58,14 +60,15 @@ public class ResourceKeyUpdaterDaoTest {
     thrown.expect(IllegalStateException.class);
     thrown.expectMessage("Impossible to update key: a resource with \"org.struts:struts-ui\" key already exists.");
 
-    underTest.updateKey(2, "org.struts:struts-ui");
+    underTest.updateKey("B", "org.struts:struts-ui");
   }
 
   @Test
   public void shouldBulkUpdateKey() {
     db.prepareDbUnit(getClass(), "shared.xml");
 
-    underTest.bulkUpdateKey(1, "org.struts", "org.apache.struts");
+    underTest.bulkUpdateKey(dbSession, "A", "org.struts", "org.apache.struts");
+    dbSession.commit();
 
     db.assertDbUnit(getClass(), "shouldBulkUpdateKey-result.xml", "projects");
   }
@@ -74,7 +77,8 @@ public class ResourceKeyUpdaterDaoTest {
   public void shouldBulkUpdateKeyOnOnlyOneSubmodule() {
     db.prepareDbUnit(getClass(), "shared.xml");
 
-    underTest.bulkUpdateKey(1, "struts-ui", "struts-web");
+    underTest.bulkUpdateKey(dbSession, "A", "struts-ui", "struts-web");
+    dbSession.commit();
 
     db.assertDbUnit(getClass(), "shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml", "projects");
   }
@@ -86,14 +90,16 @@ public class ResourceKeyUpdaterDaoTest {
     thrown.expect(IllegalStateException.class);
     thrown.expectMessage("Impossible to update key: a resource with \"foo:struts-core\" key already exists.");
 
-    underTest.bulkUpdateKey(1, "org.struts", "foo");
+    underTest.bulkUpdateKey(dbSession, "A", "org.struts", "foo");
+    dbSession.commit();
   }
 
   @Test
   public void shouldNotUpdateAllSubmodules() {
     db.prepareDbUnit(getClass(), "shouldNotUpdateAllSubmodules.xml");
 
-    underTest.bulkUpdateKey(1, "org.struts", "org.apache.struts");
+    underTest.bulkUpdateKey(dbSession, "A", "org.struts", "org.apache.struts");
+    dbSession.commit();
 
     db.assertDbUnit(getClass(), "shouldNotUpdateAllSubmodules-result.xml", "projects");
   }
@@ -107,14 +113,14 @@ public class ResourceKeyUpdaterDaoTest {
     thrown.expect(IllegalArgumentException.class);
     thrown.expectMessage("Component key length (405) is longer than the maximum authorized (400). '" + newLongProjectKey + ":file' was provided.");
 
-    underTest.updateKey(project.getId(), newLongProjectKey);
+    underTest.updateKey(project.uuid(), newLongProjectKey);
   }
 
   @Test
   public void shouldCheckModuleKeysBeforeRenaming() {
     db.prepareDbUnit(getClass(), "shared.xml");
 
-    Map<String, String> checkResults = underTest.checkModuleKeysBeforeRenaming(1, "org.struts", "foo");
+    Map<String, String> checkResults = underTest.checkModuleKeysBeforeRenaming("A", "org.struts", "foo");
     assertThat(checkResults.size()).isEqualTo(3);
     assertThat(checkResults.get("org.struts:struts")).isEqualTo("foo:struts");
     assertThat(checkResults.get("org.struts:struts-core")).isEqualTo("#duplicate_key#");
index 4b48ebbce04fd239b13c4fd210252a0211ac0a56..9fe992fd17e03dc1762b29f520ef1c13e23f576d 100644 (file)
@@ -20,7 +20,6 @@
 package org.sonar.db.issue;
 
 import java.util.List;
-import org.apache.ibatis.executor.result.DefaultResultHandler;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -51,52 +50,6 @@ public class IssueDaoTest {
   public DbTester dbTester = DbTester.create(System2.INSTANCE);
   IssueDao underTest = dbTester.getDbClient().issueDao();
 
-  @Test
-  public void select_non_closed_issues_by_module() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml", "should_select_non_closed_issues_by_module.xml");
-
-    // 400 is a non-root module, we should find 2 issues from classes and one on itself
-    DefaultResultHandler handler = new DefaultResultHandler();
-    underTest.selectNonClosedIssuesByModule(400, handler);
-    assertThat(handler.getResultList()).hasSize(3);
-
-    IssueDto issue = (IssueDto) handler.getResultList().get(0);
-    assertThat(issue.getRuleRepo()).isNotNull();
-    assertThat(issue.getRule()).isNotNull();
-    assertThat(issue.getComponentKey()).isNotNull();
-    assertThat(issue.getProjectKey()).isEqualTo("struts");
-
-    // 399 is the root module, we should only find 1 issue on itself
-    handler = new DefaultResultHandler();
-    underTest.selectNonClosedIssuesByModule(399, handler);
-    assertThat(handler.getResultList()).hasSize(1);
-
-    issue = (IssueDto) handler.getResultList().get(0);
-    assertThat(issue.getComponentKey()).isEqualTo("struts");
-    assertThat(issue.getProjectKey()).isEqualTo("struts");
-  }
-
-  /**
-   * SONAR-5218
-   */
-  @Test
-  public void select_non_closed_issues_by_module_on_removed_project() {
-    // All issues are linked on a project that is not existing anymore
-
-    dbTester.prepareDbUnit(getClass(), "shared.xml", "should_select_non_closed_issues_by_module_on_removed_project.xml");
-
-    // 400 is a non-root module, we should find 2 issues from classes and one on itself
-    DefaultResultHandler handler = new DefaultResultHandler();
-    underTest.selectNonClosedIssuesByModule(400, handler);
-    assertThat(handler.getResultList()).hasSize(3);
-
-    IssueDto issue = (IssueDto) handler.getResultList().get(0);
-    assertThat(issue.getRuleRepo()).isNotNull();
-    assertThat(issue.getRule()).isNotNull();
-    assertThat(issue.getComponentKey()).isNotNull();
-    assertThat(issue.getProjectKey()).isNull();
-  }
-
   @Test
   public void selectByKeyOrFail() {
     prepareTables();
index 3097967ba2b7dcadb1bbf3d5af13c63faf6e3614..8d70ce24e52af128acc77bfcf3884f70d0a0058b 100644 (file)
@@ -3,8 +3,8 @@
   <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" deprecated_kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             name="RequestContext.java" long_name="org.struts.RequestContext"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            qualifier="FIL" scope="FIL" language="java" path="src/org/struts/RequestContext.java" root_id="3"
-            description="description" enabled="[true]" copy_resource_id="5" person_id="7"
+            qualifier="FIL" scope="FIL" language="java" path="src/org/struts/RequestContext.java" root_uuid="uuid_3"
+            description="description" enabled="[true]" copy_component_uuid="uuid_5" developer_uuid="uuid_7"
             authorization_updated_at="123456789" created_at="2014-06-18"
       />
 
index a7021383b335f2b41f41bb0a78c4047ea6a0016f..3fe7c2f0512553b6c962a22efa06acfa9098633d 100644 (file)
@@ -2,8 +2,8 @@
 
   <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" name="RequestContext.java" long_name="org.struts.RequestContext"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            qualifier="FIL" scope="FIL" language="java" path="src/org/struts/RequestContext.java" root_id="3"
-            description="[null]" enabled="[false]" copy_resource_id="[null]" person_id="[null]" deprecated_kee="[null]"
+            qualifier="FIL" scope="FIL" language="java" path="src/org/struts/RequestContext.java" root_uuid="uuid_3"
+            description="[null]" enabled="[false]" copy_component_uuid="[null]" developer_uuid="[null]" deprecated_kee="[null]"
             authorization_updated_at="123456789" created_at="2014-06-18"
       />
 
index 81f5bde319dfb1b587d099f89e46f0420af979bb..a60d785a90a684b278e1c5b659ae0be3791cf62b 100644 (file)
@@ -1,57 +1,57 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             scope="PRJ" qualifier="TRK" long_name="Apache Struts" description="the description"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="[null]"/>
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]" islast="[true]" scope="PRJ" qualifier="TRK"/>
   <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]" islast="[false]" scope="PRJ" qualifier="TRK"/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core" description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
   <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="PRJ" qualifier="BRC"/>
 
   <!-- sub module -->
-  <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data"
+  <projects id="3" root_uuid="ABCD" kee="org.struts:struts-data" name="Struts Data"
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
             scope="PRJ" qualifier="BRC" long_name="Struts Data" description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
   <snapshots id="3" component_uuid="FGHI" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="PRJ" qualifier="BRC"/>
 
   <!-- directory -->
-  <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
+  <projects id="4" root_uuid="FGHI" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
             name="src/org/struts" long_name="org.struts" description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
   <snapshots id="4" component_uuid="GHIJ" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="DIR" qualifier="DIR"/>
 
   <!-- file -->
-  <projects id="5" root_id="3" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+  <projects id="5" root_uuid="FGHI" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="HIJK" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
             name="RequestContext.java" long_name="org.struts.RequestContext" description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
   <snapshots id="5" component_uuid="HIJK" parent_snapshot_id="4" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="FIL" qualifier="FIL"/>
 
   <!-- removed sub module -->
-  <projects id="10" root_id="1" kee="org.struts:struts-data-removed" name="Struts Data Removed"
+  <projects id="10" root_uuid="ABCD" kee="org.struts:struts-data-removed" name="Struts Data Removed"
             uuid="IHGF" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.IHGF."
             scope="PRJ" qualifier="BRC" long_name="Struts Data" description="[null]"
-            enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            enabled="[false]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
 
   <!-- removed directory -->
-  <projects id="11" root_id="10" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts-removed"
+  <projects id="11" root_uuid="IHGF" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts-removed"
             uuid="JIHG" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.IHGF."
             name="src/org/struts" long_name="org.struts" description="[null]"
-            enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
+            enabled="[false]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
 
   <!-- removed file -->
-  <projects id="12" root_id="10" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContextRemoved.java"
+  <projects id="12" root_uuid="IHGF" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContextRemoved.java"
             uuid="KJIH" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.IHGF."
             name="RequestContext.java" long_name="org.struts.RequestContext" description="[null]"
-            enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
+            enabled="[false]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
 </dataset>
index c7ad5d723ec03467486e398da7850cb64e4f69e8..934d4757f1f021a6c2e868a66e88e67dd0146475 100644 (file)
@@ -4,16 +4,16 @@
   <group_roles id="1" group_id="[null]" resource_id="1" role="user"/>
 
   <!-- Ghost project -->
-  <projects id="42" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.ghost.project" name="Ghost Project"
+  <projects id="42" root_uuid="PPAA" scope="PRJ" qualifier="TRK" kee="org.ghost.project" name="Ghost Project"
             uuid="PPAA" project_uuid="PPAA" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Ghost Project"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" deprecated_kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" deprecated_kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              version="[null]" path=""/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
   <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -60,9 +60,9 @@
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="src/org/struts" root_id="2"
+            name="src/org/struts" root_uuid="EFGH"
             description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
   <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -76,9 +76,9 @@
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="KLMN" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="RequestContext.java" root_id="2"
+            name="RequestContext.java" root_uuid="EFGH"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
   <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path="1.2.3."/>
 
   <!-- Disabled projects -->
-  <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.disabled.project" name="Disabled Project"
+  <projects id="10" root_uuid="DCBA" scope="PRJ" qualifier="TRK" kee="org.disabled.project" name="Disabled Project"
             uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Disabled project"
-            enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[false]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
 
   <!-- Developer and technical project copy -->
-  <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin@skywalker.name" name="Anakin Skywalker"
+  <projects id="11" root_uuid="OPQR" scope="PRJ" qualifier="DEV" kee="DEV:anakin@skywalker.name" name="Anakin Skywalker"
             uuid="OPQR" project_uuid="OPQR" module_uuid="[null]" module_uuid_path=".OPQR."
             description="the description" long_name="Anakin Skywalker"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
-  <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin@skywalker.name:org.struts:struts" name="Apache Struts"
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
+  <projects id="12" root_uuid="OPQR" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin@skywalker.name:org.struts:struts" name="Apache Struts"
             uuid="STUV" project_uuid="OPQR" module_uuid="OPQR" module_uuid_path=".OPQR."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="1" person_id="11" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="ABCD" developer_uuid="OPQR" path="[null]" authorization_updated_at="123456789"/>
 
 </dataset>
index 703f88968ac46096b50afca8b2857db4b6c456e6..7aab8b98265cc3d4c8addb5336740420f2cf7e03 100644 (file)
@@ -1,23 +1,23 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="[null]"/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
 
   <!-- file attached directly on module -->
   <projects id="3" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:pom.xml"
             uuid="EFGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="pom.xml" long_name="pom.xml" root_id="3"
+            name="pom.xml" long_name="pom.xml" root_uuid="EFGHI"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/pom.xml" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/pom.xml" authorization_updated_at="[null]"/>
 
   <file_sources id="101" project_uuid="ABCD" file_uuid="EFGHI"
                 binary_data=",,,,,,,,,,,,,,,unchanged&#13;&#10;,,,,,,,,,,,,,,,content&#13;&#10;"
                 created_at="1412952242000" updated_at="1412952242000" data_type="SOURCE"/>
 
   <!-- sub module -->
-  <projects id="4" root_id="1" kee="org.struts:struts-data" name="Struts Data"
+  <projects id="4" root_uuid="ABCD" kee="org.struts:struts-data" name="Struts Data"
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects id="5" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
-            name="src/org/struts" long_name="org.struts" root_id="3"
+            name="src/org/struts" long_name="org.struts" root_uuid="EFGHI"
             description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects id="6" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="HIJK" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
-            name="RequestContext.java" long_name="org.struts.RequestContext" root_id="3"
+            name="RequestContext.java" long_name="org.struts.RequestContext" root_uuid="EFGHI"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
   <file_sources id="102" project_uuid="ABCD" file_uuid="HIJK"
                 binary_data=",,,,,,,,,,,,,,,unchanged&#13;&#10;,,,,,,,,,,,,,,,content&#13;&#10;"
index 2e2ae8bad5cea4e717462e6677548c72e80351c5..cae57657d2722b89b0ac3387a77ccd5f48f526c1 100644 (file)
@@ -4,16 +4,16 @@
   <group_roles id="1" group_id="[null]" resource_id="1" role="user"/>
 
   <!-- Provisioned project -->
-  <projects id="42" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.provisioned.project" name="Provisioned Project"
+  <projects id="42" root_uuid="PPAA" scope="PRJ" qualifier="TRK" kee="org.provisioned.project" name="Provisioned Project"
             uuid="PPAA" project_uuid="PPAA" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Provisioned Project"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" deprecated_kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" deprecated_kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              version="[null]" path=""/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
   <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -51,9 +51,9 @@
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="src/org/struts" root_id="2"
+            name="src/org/struts" root_uuid="EFGH"
             description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
   <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -67,9 +67,9 @@
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="KLMN" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="RequestContext.java" root_id="2"
+            name="RequestContext.java" root_uuid="EFGH"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
   <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path="1.2.3."/>
 
   <!-- Disabled projects -->
-  <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.disabled.project" name="Disabled Project"
+  <projects id="10" root_uuid="DCBA" scope="PRJ" qualifier="TRK" kee="org.disabled.project" name="Disabled Project"
             uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Disabled project"
-            enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[false]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
 
   <!-- Developer and technical project copy -->
-  <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin@skywalker.name" name="Anakin Skywalker"
+  <projects id="11" root_uuid="OPQR" scope="PRJ" qualifier="DEV" kee="DEV:anakin@skywalker.name" name="Anakin Skywalker"
             uuid="OPQR" project_uuid="OPQR" module_uuid="[null]" module_uuid_path=".OPQR."
             description="the description" long_name="Anakin Skywalker"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
-  <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin@skywalker.name:org.struts:struts" name="Apache Struts"
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
+  <projects id="12" root_uuid="OPQR" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin@skywalker.name:org.struts:struts" name="Apache Struts"
             uuid="STUV" project_uuid="OPQR" module_uuid="OPQR" module_uuid_path=".OPQR."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="1" person_id="11" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="ABCD" developer_uuid="OPQR" path="[null]" authorization_updated_at="123456789"/>
 
 </dataset>
index adaa8d388efefc800030790d59df405bc065e38a..5fd182fab66f02f09a300c7e4df449e45576011c 100644 (file)
@@ -5,10 +5,10 @@
 
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" deprecated_kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" deprecated_kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              version="[null]" path=""/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]"/>
   <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -46,9 +46,9 @@
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="src/org/struts" root_id="2"
+            name="src/org/struts" root_uuid="EFGH"
             description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
   <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -62,9 +62,9 @@
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="KLMN" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            name="RequestContext.java" root_id="2"
+            name="RequestContext.java" root_uuid="EFGH"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
   <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path="1.2.3."/>
 
   <!-- Disabled projects -->
-  <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.disabled.project" name="Disabled Project"
+  <projects id="10" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.disabled.project" name="Disabled Project"
             uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Disabled project"
-            enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[false]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
 
   <!-- Developer and technical project copy -->
-  <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin@skywalker.name" name="Anakin Skywalker"
+  <projects id="11" root_uuid="OPQR" scope="PRJ" qualifier="DEV" kee="DEV:anakin@skywalker.name" name="Anakin Skywalker"
             uuid="OPQR" project_uuid="OPQR" module_uuid="[null]" module_uuid_path=".OPQR."
             description="the description" long_name="Anakin Skywalker"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
-  <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin@skywalker.name:org.struts:struts" name="Apache Struts"
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="123456789"/>
+  <projects id="12" root_uuid="OPQR" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin@skywalker.name:org.struts:struts" name="Apache Struts"
             uuid="STUV" project_uuid="OPQR" module_uuid="OPQR" module_uuid_path=".OPQR."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="1" person_id="11" path="[null]" authorization_updated_at="123456789"/>
+            enabled="[true]" language="[null]" copy_component_uuid="ABCD" developer_uuid="OPQR" path="[null]" authorization_updated_at="123456789"/>
 
 </dataset>
index 1eca3522d6939137b1dc146e5a817c952d3bd21f..3f62fc3ad787cb0fc64be3ae91c25a74091ab7ac 100644 (file)
@@ -1,35 +1,35 @@
 <dataset>
 
   <!-- Simple View -->
-  <projects id="10" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD." copy_resource_id="[null]" enabled="[true]"
+  <projects id="10" uuid="ABCD" root_uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD." copy_component_uuid="[null]" enabled="[true]"
             kee="MASTER_PROJECT" scope="PRJ" qualifier="VW" name="All projects" path="[null]"/>
 
-  <projects id="110" uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD." copy_resource_id="100" enabled="[true]"
+  <projects id="110" uuid="BCDE" root_uuid="ABCD" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD." copy_component_uuid="JKLM" enabled="[true]"
             kee="MASTER_PROJECTorg.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
 
   <!-- View with sub view -->
-  <projects id="11" uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path=".EFGH." copy_resource_id="[null]" enabled="[true]"
+  <projects id="11" uuid="EFGH" root_uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path=".EFGH." copy_component_uuid="[null]" enabled="[true]"
             kee="LANGUAGE_VIEW" scope="PRJ" qualifier="VW" name="By Language" path="[null]"/>
-  <projects id="112" uuid="GHIJ" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="101" enabled="[true]"
+  <projects id="112" uuid="GHIJ" root_uuid="EFGH" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_component_uuid="KLMN" enabled="[true]"
             kee="VIEW2org.elasticsearch:elasticsearch" scope="FIL" qualifier="TRK" name="SSLR" path="[null]"/>
 
   <!-- Sub view -->
-  <projects id="13" uuid="FGHI" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH.FGHI." copy_resource_id="[null]" enabled="[true]"
+  <projects id="13" uuid="FGHI" root_uuid="FGHI" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH.FGHI." copy_component_uuid="[null]" enabled="[true]"
             kee="JAVA_PROJECTS" scope="PRJ" qualifier="SVW" name="Java projects" path="[null]"/>
 
-  <projects id="113" uuid="HIJK" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_resource_id="100" enabled="[true]"
+  <projects id="113" uuid="HIJK" root_uuid="EFGH" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_component_uuid="JKLM" enabled="[true]"
             kee="VIEW2org.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
 
   <!-- View without project -->
-  <projects id="14" uuid="IJKL" project_uuid="IJKL" module_uuid="[null]" module_uuid_path=".IJKL." copy_resource_id="[null]" enabled="[true]"
+  <projects id="14" uuid="IJKL" root_uuid="IJKL" project_uuid="IJKL" module_uuid="[null]" module_uuid_path=".IJKL." copy_component_uuid="[null]" enabled="[true]"
             kee="OTHER" scope="PRJ" qualifier="VW" name="Other projects" path="[null]"/>
 
   <!-- Real projects -->
-  <projects id="100" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
-            uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path=".JKLM."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
-  <projects id="101" scope="PRJ" qualifier="TRK" kee="org.elasticsearch:elasticsearch" name="Elasticsearch"
-            uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path=".KLMN."
-            enabled="[true]" copy_resource_id="[null]" path="[null]"/>
+  <projects id="100" uuid="JKLM" root_uuid="JKLM" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+            project_uuid="JKLM" module_uuid="[null]" module_uuid_path=".JKLM."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
+  <projects id="101" uuid="KLMN" root_uuid="KLMN" scope="PRJ" qualifier="TRK" kee="org.elasticsearch:elasticsearch" name="Elasticsearch"
+            project_uuid="KLMN" module_uuid="[null]" module_uuid_path=".KLMN."
+            enabled="[true]" copy_component_uuid="[null]" path="[null]"/>
 
 </dataset>
index 62196600389a60e6dbf55ed18808d3c2fe1961ef..6a23654e9ffd7764c05a0d880cd6079e4b550e6f 100644 (file)
@@ -3,8 +3,8 @@
   <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext2.java" deprecated_kee="org.struts:struts-core:src/org/struts/RequestContext2.java"
             name="RequestContext2.java" long_name="org.struts.RequestContext2"
             uuid="GHIJ" project_uuid="DCBA" module_uuid="HGFE" module_uuid_path=".DCBA.HGFE."
-            qualifier="LIF" scope="LIF" language="java2" path="src/org/struts/RequestContext2.java" root_id="4"
-            description="description2" enabled="[false]" copy_resource_id="6" person_id="9"
+            qualifier="LIF" scope="LIF" language="java2" path="src/org/struts/RequestContext2.java" root_uuid="uuid_4"
+            description="description2" enabled="[false]" copy_component_uuid="uuid_6" developer_uuid="uuid_9"
             authorization_updated_at="12345678910" created_at="2014-06-18"
       />
 
index fe171ca444179bd864f2ca430c9bf74a956aff26..68b1156822d52f7acc44d14ea0e4d8efc490f375 100644 (file)
@@ -3,8 +3,8 @@
   <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" deprecated_kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             name="RequestContext.java" long_name="org.struts.RequestContext"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            qualifier="FIL" scope="FIL" language="java" path="src/org/struts/RequestContext.java" root_id="3"
-            description="description" enabled="[true]" copy_resource_id="5" person_id="[null]"
+            qualifier="FIL" scope="FIL" language="java" path="src/org/struts/RequestContext.java" root_uuid="uuid_3"
+            description="description" enabled="[true]" copy_component_uuid="uuid_5" developer_uuid="[null]"
             authorization_updated_at="123456789" created_at="2014-06-18"
       />
 
index 5b314d137e795df62e11bd2536457cff1f85570a..7a309ca3e329d3b4c55e7ed89427ca6a1409667a 100644 (file)
@@ -1,12 +1,12 @@
 CREATE TABLE "PROJECTS" (
   "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
   "KEE" VARCHAR(400),
-  "ROOT_ID" INTEGER,
-  "UUID" VARCHAR(50),
+  "UUID" VARCHAR(50) NOT NULL,
+  "ROOT_UUID" VARCHAR(50) NOT NULL,
   "PROJECT_UUID" VARCHAR(50),
   "MODULE_UUID" VARCHAR(50),
   "MODULE_UUID_PATH" VARCHAR(4000),
-  "NAME" VARCHAR(256),
+  "NAME" VARCHAR(2000),
   "DESCRIPTION" VARCHAR(2000),
   "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE,
   "SCOPE" VARCHAR(3),
@@ -14,16 +14,16 @@ CREATE TABLE "PROJECTS" (
   "DEPRECATED_KEE" VARCHAR(400),
   "PATH" VARCHAR(2000),
   "LANGUAGE" VARCHAR(20),
-  "COPY_RESOURCE_ID" INTEGER,
-  "LONG_NAME" VARCHAR(256),
-  "PERSON_ID" INTEGER,
+  "COPY_COMPONENT_UUID" VARCHAR(50),
+  "LONG_NAME" VARCHAR(2000),
+  "DEVELOPER_UUID" VARCHAR(50),
   "CREATED_AT" TIMESTAMP,
   "AUTHORIZATION_UPDATED_AT" BIGINT
 );
 
 CREATE INDEX "PROJECTS_KEE" ON "PROJECTS" ("KEE");
 
-CREATE INDEX "PROJECTS_ROOT_ID" ON "PROJECTS" ("ROOT_ID");
+CREATE INDEX "PROJECTS_ROOT_UUID" ON "PROJECTS" ("ROOT_UUID");
 
 CREATE UNIQUE INDEX "PROJECTS_UUID" ON "PROJECTS" ("UUID");
 
index 490e8fa0cbec39ae5f3c875f16be369f8138798d..958c16c1150f6b57a88df2f40e3d9ceb7402cf13 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path=""/>
 
   <!-- project -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
   <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts"
-            name="org.struts" root_id="1"
+            name="org.struts" root_uuid="ABCD"
             description="[null]"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
   <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="org.struts:struts:org.struts.RequestContext"
-            name="RequestContext" root_id="1"
+            name="RequestContext" root_uuid="ABCD"
             uuid="KLMN" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              version="[null]" path="1.2.3."/>
 
   <!-- technical project -->
-  <projects id="5" root_id="[null]" scope="PRJ" qualifier="TRK" kee="COPYorg.struts:struts" name="Struts"
+  <projects id="5" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="COPYorg.struts:struts" name="Struts"
             uuid="TECHPROJECT" project_uuid="[null]" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="1" person_id="[null]" authorization_updated_at="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="ABCD" developer_uuid="[null]" authorization_updated_at="[null]"/>
 
   <!-- project without snapshot status=P-->
-  <projects id="6" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.apache.shindig" name="Shinding"
+  <projects id="6" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.apache.shindig" name="Shinding"
             uuid="ONLYERRORS" project_uuid="[null]" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Shinding"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"/>
   <snapshots id="6" component_uuid="ONLYERRORS" parent_snapshot_id="[null]" root_component_uuid="ONLYERRORS" root_snapshot_id="[null]"
              status="U" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
 
 
   <!-- project without snapshot -->
-  <projects id="7" root_id="[null]" kee="org.sample:sample" name="Sample"
+  <projects id="7" root_uuid="ABCD" kee="org.sample:sample" name="Sample"
             scope="PRJ" qualifier="TRK" long_name="Sample"
             uuid="NOSNAPSHOT" project_uuid="[null]" module_uuid="[null]" module_uuid_path="."
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- project not enabled -->
-  <projects id="8" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.apache:tika" name="Tika"
+  <projects id="8" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.apache:tika" name="Tika"
             description="the description" long_name="Tika"
             uuid="DISABLED" project_uuid="[null]" module_uuid="[null]" module_uuid_path="."
-            enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[false]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"/>
   <snapshots id="8" component_uuid="DISABLED" parent_snapshot_id="[null]" root_component_uuid="DISABLED" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
index 98acd8645c7091c2d6591c2bd049dfdc01a62c3c..d4133fab3b50490e3699ed267b24860fedfc754f 100644 (file)
@@ -5,10 +5,10 @@
 
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             created_at="2008-12-02" authorization_updated_at="123456789"/>
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              version="[null]" path=""/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="BCDE" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="2008-12-02" authorization_updated_at="[null]"/>
   <snapshots id="2" component_uuid="BCDE" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
@@ -48,9 +48,9 @@
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="CDEF" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE."
-            name="src/org/struts" root_id="2"
+            name="src/org/struts" root_uuid="BCDE"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts"
             created_at="2008-12-02" authorization_updated_at="[null]"/>
   <snapshots id="3" component_uuid="CDEF" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
@@ -66,9 +66,9 @@
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="FIL"
             kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="DEFG" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE."
-            name="RequestContext.java" root_id="2"
+            name="RequestContext.java" root_uuid="BCDE"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             path="src/org/struts/RequestContext.java"
             created_at="2008-12-02" authorization_updated_at="[null]"/>
 
index a6abf2fab1b6568dd6df26df13dd77c73a16430c..95b4c5b19ccfc35e677412b0fd6cde72f9f4775c 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
-  <projects id="1" root_id="200" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+  <projects id="1" root_uuid="uuid_200" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             scope="PRJ" qualifier="TRK" kee="old key" name="old name"
             description="old name" long_name="old long name"
-            enabled="[false]" language="old" copy_resource_id="2" person_id="3" created_at="[null]" path="/old/foo/bar"
+            enabled="[false]" language="old" copy_component_uuid="uuid_2" developer_uuid="uuid_3" created_at="[null]" path="/old/foo/bar"
             deprecated_kee="old deprecated key"
             authorization_updated_at="987654321"/>
 
index 69e73cdb6df82f79c2a4b3f98dd4984a161bf669..239dcf719b169af402182e665fe4f7c61e43f2b2 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
-  <projects id="1" root_id="200" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+  <projects id="1" root_uuid="uuid_200" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             scope="PRJ" qualifier="TRK" kee="old key" name="old name"
             description="old name" long_name="old long name"
-            enabled="[false]" language="old" copy_resource_id="2" person_id="3" created_at="[null]" path="/old/foo/bar"
+            enabled="[false]" language="old" copy_component_uuid="uuid_2" developer_uuid="uuid_3" created_at="[null]" path="/old/foo/bar"
             deprecated_kee="old deprecated key"
             authorization_updated_at="[null]"/>
 
index e0cc9bc51f3bfee745cbe218c044e5ed7b1c73b5..221eb458280cffae0c24615373b3f2bd2f884282 100644 (file)
@@ -1,15 +1,15 @@
 <dataset>IncreasePrecisionOfNumericsTest.update_column_types:48
 
   <!-- Real projects -->
-  <projects id="1" uuid="ABCD" project_uuid="ABCD" module_uuid_path=".ABCD." kee="project-one" copy_resource_id="[null]" name="Project One" qualifier="TRK" scope="PRJ"/>
-  <projects id="2" uuid="BCDE" project_uuid="BCDE" module_uuid_path=".BCDE." kee="project-two" copy_resource_id="[null]" name="Project Two" qualifier="TRK" scope="PRJ"/>
+  <projects id="1" uuid="ABCD" root_uuid="ABCD" project_uuid="ABCD" module_uuid_path=".ABCD." kee="project-one" copy_component_uuid="[null]" name="Project One" qualifier="TRK" scope="PRJ"/>
+  <projects id="2" uuid="BCDE" root_uuid="BCDE" project_uuid="BCDE" module_uuid_path=".BCDE." kee="project-two" copy_component_uuid="[null]" name="Project Two" qualifier="TRK" scope="PRJ"/>
 
   <!-- Copy projects -->
-  <projects id="3" uuid="CDEF" project_uuid="EFGH" module_uuid_path=".EFGH." kee="copy-project-one" copy_resource_id="1" name="Copy Project One" qualifier="TRK" scope="FIL"/>
-  <projects id="4" uuid="DEFG" project_uuid="EFGH" module_uuid_path=".EFGH." kee="copy-project-two" copy_resource_id="2" name="Copy Project One" qualifier="TRK" scope="FIL"/>
+  <projects id="3" uuid="CDEF" root_uuid="EFGH" project_uuid="EFGH" module_uuid_path=".EFGH." kee="copy-project-one" copy_component_uuid="ABCD" name="Copy Project One" qualifier="TRK" scope="FIL"/>
+  <projects id="4" uuid="DEFG" root_uuid="EFGH" project_uuid="EFGH" module_uuid_path=".EFGH." kee="copy-project-two" copy_component_uuid="BCDE" name="Copy Project One" qualifier="TRK" scope="FIL"/>
 
   <!-- View containing all projects -->
-  <projects id="5" uuid="EFGH" project_uuid="EFGH" module_uuid_path=".EFGH." kee="all-projects" copy_resource_id="[null]" name="All projects" qualifier="VW" scope="PRJ"/>
+  <projects id="5" uuid="EFGH" root_uuid="EFGH" project_uuid="EFGH" module_uuid_path=".EFGH." kee="all-projects" copy_component_uuid="[null]" name="All projects" qualifier="VW" scope="PRJ"/>
 
   <resource_index id="1" kee="project one" component_uuid="ABCD" root_component_uuid="ABCD" position="0" name_size="11" qualifier="TRK"/>
   <resource_index id="2" kee="roject one" component_uuid="ABCD" root_component_uuid="ABCD" position="1" name_size="11" qualifier="TRK"/>
index d88fef9f1b4cbcf66cc260fe30e478ecb4605b4f..ff0f36d95e6b3af138d182c1d7d6f0531571c01d 100644 (file)
@@ -3,29 +3,29 @@
   <!-- project "struts" -> module "struts-core" -> package org.struts -> file "RequestContext" -->
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]"
+            root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <projects long_name="[null]" id="2" scope="PRJ" qualifier="BRC" kee="org.struts:struts-core" name="Struts Core"
             uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
-            root_id="1"
+            root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <!-- note that the root_id of package/file is wrong. It references the module but not the root project -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:org.struts"
             uuid="CDEF" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE"
-            name="org.struts" root_id="2"
+            name="org.struts" root_uuid="BCDE"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             uuid="DEFG" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE"
             kee="org.struts:struts-core:org.struts.RequestContext"
-            name="RequestContext" root_id="2"
+            name="RequestContext" root_uuid="BCDE"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD"/>
   <snapshots purge_status="[null]" id="2" islast="[true]" root_component_uuid="ABCD" component_uuid="BCDE"/>
index 1072f211a68ddea4e94c19aa521c17b121ab3a96..7e76208a0ee633d7888be99479ec57faf65b28ad 100644 (file)
@@ -3,24 +3,24 @@
   <!-- project -->
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]"
+            root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <!-- directory -->
   <projects long_name="org.struts" id="2" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts"
             uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
-            name="org.struts" root_id="1"
+            name="org.struts" root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="3" scope="FIL" qualifier="CLA"
             kee="org.struts:struts:org.struts.RequestContext"
             uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
-            name="RequestContext" root_id="1"
+            name="RequestContext" root_uuid="1"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
index 268953293f7e221ca4c5e3a0cfb4e3ed40f7a30b..1c7036cd095c55d8faad552004083ce5c341e984 100644 (file)
@@ -2,9 +2,9 @@
 
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="AS"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]"
+            root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java"/>
 
   <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
index 5b1c5fa7a1aef2a636cd4f869d7d6dbdfc898efc..c7faa7de4ce4fcbc9f8509d8864bd3c3b889b832 100644 (file)
@@ -2,9 +2,9 @@
 
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="AS"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]"
+            root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
index e00a76026070ab1a396822b1606b8a49f9f42353..6b1066004b3ed7f3b5957a76a58e5c6a87a94e94 100644 (file)
@@ -2,9 +2,9 @@
 
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Apache Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
-            root_id="[null]"
+            root_uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" />
 
   <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
index 400243b4d19619281902a34ac794e7ae025accdd..9e8d45b55c08de7dec8d1e5be4f98ecff6af3724 100644 (file)
@@ -1,71 +1,71 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
+  <projects id="1" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
             project_uuid="A" module_uuid="[null]" module_uuid_path="."
             description="[null]" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts"
             authorization_updated_at="[null]"/>
-
 
   <!-- **************** First sub project **************** -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
+  <projects id="2" root_uuid="A" kee="org.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
             module_uuid="[null]" module_uuid_path=".A."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"  
             created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:/src/org/struts"
-            name="org.struts" root_id="2" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="org.struts" root_uuid="B" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-core:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="org.struts:struts-core:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="2" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="RequestContext" root_uuid="B" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Second sub project **************** -->
-  <projects id="5" root_id="1" kee="org.struts:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]"
+  <projects id="5" root_uuid="A" kee="org.struts:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".E."
             scope="PRJ" qualifier="BRC" long_name="Struts UI"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"  
             created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.struts:struts-ui:/src/org/struts"
-            name="org.struts" root_id="5" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="org.struts" root_uuid="E" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-ui:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA"
             kee="org.struts:struts-ui:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="5" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="RequestContext" root_uuid="E" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-ui:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Another independent project **************** -->
-  <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
+  <projects id="8" root_uuid="A" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".H."
             scope="PRJ" qualifier="BRC" long_name="Foo Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"  
             created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"
             authorization_updated_at="[null]"/>
 
index 962995f42b65de7aff406145a64795dc4fbbf607..6227c606fc208e91065c78f950ed9d8929dedd8a 100644 (file)
@@ -1,72 +1,72 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.apache.struts:struts" name="Struts" uuid="A"
+  <projects id="1" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.apache.struts:struts" name="Struts" uuid="A"
             project_uuid="A" module_uuid="[null]" module_uuid_path="."
             description="[null]" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** First sub project **************** -->
-  <projects id="2" root_id="1" kee="org.apache.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
+  <projects id="2" root_uuid="A" kee="org.apache.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
             module_uuid="[null]" module_uuid_path=".A."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR"
             kee="org.apache.struts:struts-core:/src/org/struts"
-            name="org.struts" root_id="2" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="org.struts" root_uuid="B" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="org.apache.struts:struts-core:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="2" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="RequestContext" root_uuid="B" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Second sub project **************** -->
-  <projects id="5" root_id="1" kee="org.apache.struts:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]"
+  <projects id="5" root_uuid="A" kee="org.apache.struts:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".E."
             scope="PRJ" qualifier="BRC" long_name="Struts UI"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.apache.struts:struts-ui:/src/org/struts"
-            name="org.struts" root_id="5" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="org.struts" root_uuid="E" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts-ui:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA"
             kee="org.apache.struts:struts-ui:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="5" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="RequestContext" root_uuid="E" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts-ui:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Another independent project **************** -->
-  <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
+  <projects id="8" root_uuid="A" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".H."
             scope="PRJ" qualifier="BRC" long_name="Foo Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"
             authorization_updated_at="[null]"/>
 
index 81e4290832e919c9ccc2a3faf0cacfebfcd9aaa5..1f15cb2d042906b97fd127b9196fc11a2d384011 100644 (file)
@@ -1,71 +1,71 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
+  <projects id="1" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
             project_uuid="A" module_uuid="[null]" module_uuid_path="."
             description="[null]" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** First sub project **************** -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
+  <projects id="2" root_uuid="A" kee="org.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
             module_uuid="[null]" module_uuid_path=".A."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:/src/org/struts"
-            name="org.struts" root_id="2" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="org.struts" root_uuid="B" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-core:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="org.struts:struts-core:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="2" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="RequestContext" root_uuid="B" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Second sub project **************** -->
-  <projects id="5" root_id="1" kee="org.struts:struts-web" name="Struts UI" uuid="E" project_uuid="[null]"
+  <projects id="5" root_uuid="A" kee="org.struts:struts-web" name="Struts UI" uuid="E" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".E."
             scope="PRJ" qualifier="BRC" long_name="Struts UI"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.struts:struts-web:/src/org/struts"
-            name="org.struts" root_id="5" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="org.struts" root_uuid="E" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-web:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA"
             kee="org.struts:struts-web:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="5" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="RequestContext" root_uuid="E" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-web:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Another independent project **************** -->
-  <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
+  <projects id="8" root_uuid="A" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".H."
             scope="PRJ" qualifier="BRC" long_name="Foo Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"
             authorization_updated_at="[null]"/>
 
index 83686f2ba90ee248cb7abc23f6651a3c02f8dad0..85e1a75fe6c98e8a0bb587e1783bce584ce6500b 100644 (file)
@@ -1,63 +1,63 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.apache.struts:struts" name="Struts" uuid="A"
+  <projects id="1" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.apache.struts:struts" name="Struts" uuid="A"
             project_uuid="A" module_uuid="[null]" module_uuid_path="."
             description="[null]" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** First sub project **************** -->
-  <projects id="2" root_id="1" kee="org.apache.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
+  <projects id="2" root_uuid="A" kee="org.apache.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
             module_uuid="[null]" module_uuid_path=".A."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"
             created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC"
             kee="org.apache.struts:struts-core:/src/org/struts"
-            name="org.struts" root_id="2" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="org.struts" root_uuid="B" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="org.apache.struts:struts-core:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="2" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="RequestContext" root_uuid="B" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Second sub project THAT HAS A DIFFERENT GROUP ID => MUST NOT BE UPDATED **************** -->
-  <projects id="5" root_id="1" kee="foo:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]" module_uuid="[null]"
+  <projects id="5" root_uuid="A" kee="foo:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]" module_uuid="[null]"
             module_uuid_path=".E."
             scope="PRJ" qualifier="BRC" long_name="Struts UI"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"
             created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="foo:struts-ui:/src/org/struts"
-            name="org.struts" root_id="5" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="org.struts" root_uuid="E" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="foo:struts-ui:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA"
             kee="foo:struts-ui:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="5" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="RequestContext" root_uuid="E" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="foo:struts-ui:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
index 5021b0c56bcb4ed744cc131c5f412be3b170c22f..226d5faaa083d565dfa85be3afc0a78e7b1c55c8 100644 (file)
@@ -1,62 +1,62 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
+  <projects id="1" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
             project_uuid="A" module_uuid="[null]" module_uuid_path="."
             description="[null]" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** First sub project **************** -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
+  <projects id="2" root_uuid="A" kee="org.struts:struts-core" name="Struts Core" uuid="B" project_uuid="A"
             module_uuid="[null]" module_uuid_path=".A."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"  
             created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:/src/org/struts"
-            name="org.struts" root_id="2" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="org.struts" root_uuid="B" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-core:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="org.struts:struts-core:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="2" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="RequestContext" root_uuid="B" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Second sub project THAT HAS A DIFFERENT GROUP ID => MUST NOT BE UPDATED **************** -->
-  <projects id="5" root_id="1" kee="foo:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]" module_uuid="[null]"
+  <projects id="5" root_uuid="A" kee="foo:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]" module_uuid="[null]"
             module_uuid_path=".E."
             scope="PRJ" qualifier="BRC" long_name="Struts UI"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"  
             created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="foo:struts-ui:/src/org/struts"
-            name="org.struts" root_id="5" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="org.struts" root_uuid="E" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="foo:struts-ui:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA"
             kee="foo:struts-ui:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="5" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="RequestContext" root_uuid="E" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java"   created_at="[null]"
             path="[null]" deprecated_kee="foo:struts-ui:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
index a7a9d68d42adfd74cfb1d2f2bbc4f03a0a5ed989..b5e560f47e5579aa68acc1e104a1503e1b24470f 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
+  <projects id="1" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" uuid="A"
             project_uuid="A" module_uuid="[null]" module_uuid_path="."
             description="[null]" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts"
             authorization_updated_at="[null]"/>
 
   <!-- **************** First sub project **************** -->
   <!-- ONLY THIS PROJECT MUST HAVE BEEN UPDATED            -->
   <!--                                                     -->
-  <projects id="2" root_id="1" kee="struts:core" name="Struts Core" uuid="B" project_uuid="A" module_uuid="[null]"
+  <projects id="2" root_uuid="A" kee="struts:core" name="Struts Core" uuid="B" project_uuid="A" module_uuid="[null]"
             module_uuid_path=".A."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"
             created_at="[null]" path="[null]" deprecated_kee="struts:core"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="struts:core:/src/org/struts"
-            name="org.struts" root_id="2" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="org.struts" root_uuid="B" uuid="C" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="struts:core:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA"
             kee="struts:core:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="2" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
+            name="RequestContext" root_uuid="B" uuid="D" project_uuid="A" module_uuid="B" module_uuid_path=".A.B."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="struts:core:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Second sub project **************** -->
-  <projects id="5" root_id="1" kee="org.struts:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]"
+  <projects id="5" root_uuid="A" kee="org.struts:struts-ui" name="Struts UI" uuid="E" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".E."
             scope="PRJ" qualifier="BRC" long_name="Struts UI"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"
             created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.struts:struts-ui:/src/org/struts"
-            name="org.struts" root_id="5" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="org.struts" root_uuid="E" uuid="F" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-ui:org.struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA"
             kee="org.struts:struts-ui:/src/org/struts/RequestContext.java"
-            name="RequestContext" root_id="5" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
+            name="RequestContext" root_uuid="E" uuid="G" project_uuid="[null]" module_uuid="[null]" module_uuid_path=".E."
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]"
+            enabled="[true]" language="java" created_at="[null]"
             path="[null]" deprecated_kee="org.struts:struts-ui:org.struts.RequestContext"
             authorization_updated_at="[null]"/>
 
 
   <!-- **************** Another independent project **************** -->
-  <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
+  <projects id="8" root_uuid="A" kee="foo:struts-core" name="Foo Struts Core" uuid="H" project_uuid="[null]"
             module_uuid="[null]" module_uuid_path=".H."
             scope="PRJ" qualifier="BRC" long_name="Foo Struts Core"
-            description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="java"
             created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"
             authorization_updated_at="[null]"/>
 
index 3a4404377a3f9e5f1ad1a877db0656805228bb53..84aeaa2738723fe8dcf6912462841520579e0ec5 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <!-- Has last snapshot -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]" />
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]" authorization_updated_at="[null]" />
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              version="[null]" path=""/>
 
   <!-- No snapshot -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" />
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]" />
 
   <!-- No last snapshot -->
-  <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data"
+  <projects id="3" root_uuid="ABCD" kee="org.struts:struts-data" name="Struts Data"
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" />
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" authorization_updated_at="[null]" />
   <snapshots id="3" component_uuid="FGHI" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
index 2c4dad9044c7957a81765a14d469455313f73240..8a2c1fb2f95f7d6311b54522b2878b76aa8b3159 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            root_id="[null]" uuid="ABCD"
+            root_uuid="ABCD" uuid="ABCD"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"/>
 
   <!-- version 1.0 -->
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 8b4cba62605859358947d894890215777f5d1316..d0d026f6e4ae59b72664214a4991a0abc804a1ed 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <!-- PROJECT_ID = 1 -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              version="2.2-SNAPSHOT" path="1.2."/>
 
   <!-- PROJECT_ID = 2 -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="4" component_uuid="EFGH" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data"
+  <projects id="3" root_uuid="ABCD" kee="org.struts:struts-data" name="Struts Data"
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="6" component_uuid="FGHI" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- PROJECT_ID = 4 - no snapshot -->
-  <projects id="4" root_id="1" kee="org.struts:struts-deprecated" name="Struts Deprecated"
+  <projects id="4" root_uuid="ABCD" kee="org.struts:struts-deprecated" name="Struts Deprecated"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Deprecated"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
 
index 1a1682937653e478b7db205aee184f31e72ec3b3..02a6e33afa776e3fe7bf5b29857dad9f754790f3 100644 (file)
@@ -2,6 +2,6 @@
 
   <snapshots purge_status="[null]" id="1" status="U" islast="0" component_uuid="0" root_component_uuid="0"/>
   <snapshots purge_status="[null]" id="2" status="U" islast="0" component_uuid="uuid_1" root_component_uuid="uuid_1"/>
-  <projects id="1" uuid="uuid_1" kee="foo" enabled="1" scope="FIL" qualifier="CLA"/>
+  <projects id="1" uuid="uuid_1" root_uuid="uuid_root" kee="foo" enabled="1" scope="FIL" qualifier="CLA"/>
 
 </dataset>
index e03ca58794e1525f7cfeb898471df68e644340a2..d2eca3604881dc290d997ba3b040726eb5f14625 100644 (file)
@@ -2,26 +2,26 @@
 
   <snapshots id="1" component_uuid="uuid_1" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
   <snapshots id="2" component_uuid="uuid_1" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
-  <projects id="1" uuid="uuid_1" kee="bar-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <projects id="1" uuid="uuid_1" root_uuid="uuid_root" kee="bar-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
   <snapshots id="3" component_uuid="uuid_2" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
   <snapshots id="4" component_uuid="uuid_2" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
-  <projects id="2" uuid="uuid_2" kee="bar-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <projects id="2" uuid="uuid_2" root_uuid="uuid_root" kee="bar-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
   <snapshots id="5" component_uuid="uuid_3" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
   <snapshots id="6" component_uuid="uuid_3" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
-  <projects id="3" uuid="uuid_3" kee="foo-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <projects id="3" uuid="uuid_3" root_uuid="uuid_root" kee="foo-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
   <snapshots id="7" component_uuid="uuid_4" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
   <snapshots id="8" component_uuid="uuid_4" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
-  <projects id="4" uuid="uuid_4" kee="foo-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <projects id="4" uuid="uuid_4" root_uuid="uuid_root" kee="foo-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
   <snapshots id="9" component_uuid="uuid_5" status="U" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
   <snapshots id="10" component_uuid="uuid_5" status="U" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
-  <projects id="5" uuid="uuid_5" kee="foo" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <projects id="5" uuid="uuid_5" root_uuid="uuid_root" kee="foo" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
   <snapshots id="11" component_uuid="uuid_6" purge_status="[null]" status="P" islast="1" root_component_uuid="uuid_1"/>
-  <projects id="6" uuid="uuid_6" kee="baz" enabled="[true]" scope="FIL" qualifier="CLA" language="grvy"/>
+  <projects id="6" uuid="uuid_6" root_uuid="uuid_root" kee="baz" enabled="[true]" scope="FIL" qualifier="CLA" language="grvy"/>
 
   <!-- Old snapshot of another project -->
   <!-- bar-old -->
index f6825ce705627e26e80cfbd72fe5deefa7ea59b8..306aa5b1217cbc4bcb24673239612ccc2e3bc4dd 100644 (file)
@@ -2,14 +2,14 @@
 
   <group_roles id="1" group_id="[null]" resource_id="399" role="user"/>
 
-  <projects id="399" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." kee="struts"
-            root_id="[null]" qualifier="TRK" scope="PRJ"/>
-  <projects id="400" uuid="BCDE" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD." kee="struts-core"
-            root_id="399" qualifier="BRC" scope="PRJ"/>
-  <projects id="401" uuid="CDEF" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE." kee="Action.java"
-            root_id="400" qualifier="CLA" scope="PRJ"/>
-  <projects id="402" uuid="DEFG" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE." kee="Filter.java"
-            root_id="400" qualifier="CLA" scope="PRJ"/>
+  <projects id="399" uuid="ABCD" root_uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." kee="struts"
+            qualifier="TRK" scope="PRJ"/>
+  <projects id="400" uuid="BCDE" root_uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD." kee="struts-core"
+            qualifier="BRC" scope="PRJ"/>
+  <projects id="401" uuid="CDEF" root_uuid="BCDE" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE." kee="Action.java"
+            qualifier="CLA" scope="PRJ"/>
+  <projects id="402" uuid="DEFG" root_uuid="CDEF" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE." kee="Filter.java"
+            qualifier="CLA" scope="PRJ"/>
 
   <snapshots id="100" component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]" root_component_uuid="ABCD"
              path="" islast="[true]"/>
index db64cefe322a32d26619b316ca54a96dba718c89..ab4473adb1be4dc1db6f75bad32c32cd570e1200 100644 (file)
 
   <!-- project -->
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
+            root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             enabled="[true]"/>
 
   <!-- package -->
   <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="project:org.foo" name="org.foo"
-            root_id="1" uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
+            root_uuid="ABCD" uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
             enabled="[true]"/>
 
   <!-- file -->
   <projects long_name="org.foo.Bar" id="3" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar"
-            name="Bar" root_id="[null]" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
+            name="Bar" root_uuid="ABCD" uuid="CDEF" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD."
             enabled="[true]"/>
 
 
index cc554e9e486722317a44e39449b42f3673f5246e..55744741a7f19ec8eb137035eeb4fac4803645c3 100644 (file)
@@ -4,7 +4,7 @@
 
   <!-- project -->
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
+            root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             enabled="[true]"/>
 
   <!-- snapshots -->
index cf3af96ea09dcdb0377a892462b2a7bd43e8eaa3..67e0041837232364958b3d8f331a07c5574f4721 100644 (file)
@@ -4,7 +4,7 @@
   <metrics id="11" name="coverage_line_hits_data"/>
   <metrics id="12" name="ncloc"/>
 
-  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="FILE1"/>
+  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="FILE1" root_uuid="ABCD"/>
 
   <snapshots id="5" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]" />
 
index c9e5417e180fe54071b07a09d9ead4bde4f8030a..08a654e1d89321d7cf91849a45a065ba22636913 100644 (file)
@@ -4,7 +4,7 @@
   <metrics id="11" name="coverage_line_hits_data"/>
   <metrics id="12" name="ncloc"/>
 
-  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="ABCD"/>
+  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="ABCD" root_uuid="ABCD"/>
 
   <snapshots id="5" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]" />
 
index d1fe38a34eea206a1dd61b04efb782d4cca4aa97..d58ef14ab2ee8cb4387d3a24b40807e25fc09cff 100644 (file)
@@ -4,8 +4,8 @@
   <metrics id="11" name="coverage_line_hits_data"/>
   <metrics id="12" name="ncloc"/>
 
-  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="uuid_1"/>
-  <projects id="333" kee="dev:John-Doe" enabled="[true]" uuid="333"/>
+  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="uuid_1" root_uuid="uuid_1"/>
+  <projects id="333" kee="dev:John-Doe" enabled="[true]" uuid="333" root_uuid="333"/>
 
   <snapshots id="5" component_uuid="uuid_1" islast="[true]" root_component_uuid="uuid_1"/>
 
index f990d2158f9ba4a4e7996fe3d61fe4c7e25dc82f..0ed1f2d089b2dea4839fdc8182e2e5c6964eeff1 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
   <groups id="100" name="sonar-administrators"/>
index 793d16b3baec2f0f60a6c56741990afb07063f8d..242b2056066c974964ddc849cc34862b4e2dd7aa 100644 (file)
@@ -7,7 +7,7 @@
 
   <projects id="100" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index 8f079ec590c44a182de965c50a4d9f5ead6a1d19..62435ee6f1383729694db0a6a6b200016bb9facf 100644 (file)
@@ -4,9 +4,9 @@
 
   <user_roles id="1" user_id="200" resource_id="123" role="user"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index ef9212b8087535a3681bfe48abbe645d089d8c3e..bf79d01e3e272675fd3e630621d500f27f4fb032 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
   <groups id="100" name="sonar-administrators"/>
index e77f558dc361badcc4b76ecebce8399c0e35266c..4cb4facedaf4802e2799376b997e72e65f27e599 100644 (file)
@@ -4,9 +4,9 @@
 
   <group_roles id="1" group_id="100" resource_id="123" role="admin"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index 9c3bcfce197d5d545b1b2eec665fb17f4c5ab256..e577bd2633dfe388d7997b329aaf5a450b6c1c4e 100644 (file)
@@ -5,9 +5,9 @@
   <group_roles id="1" group_id="100" resource_id="123" role="admin"/>
   <group_roles id="2" group_id="100" resource_id="123" role="user"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+<projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index 8f079ec590c44a182de965c50a4d9f5ead6a1d19..62435ee6f1383729694db0a6a6b200016bb9facf 100644 (file)
@@ -4,9 +4,9 @@
 
   <user_roles id="1" user_id="200" resource_id="123" role="user"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index fe3e01186db005e8141e280c5b0690aa8e40d252..0150227ccee490db11b9a9d6f5f0a4fe90125044 100644 (file)
@@ -5,9 +5,9 @@
   <user_roles id="1" user_id="200" resource_id="123" role="user"/>
   <user_roles id="2" user_id="200" resource_id="123" role="admin"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index 276e8d7da3f4d92d3fb5f692faa5c50dcea63665..b94f939bf09de8a9d2875a9ddb545b13bf7e2599 100644 (file)
@@ -5,9 +5,9 @@
   <group_roles id="1" group_id="100" resource_id="123" role="admin"/>
   <group_roles id="2" group_id="[null]" resource_id="123" role="user"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 
index 4552a5339ee2eec0bbeb150892ba03434c2aa0c1..92fe2f87d9bc90e77a7a598dba9a728f52de3093 100644 (file)
@@ -4,9 +4,9 @@
 
   <group_roles id="1" group_id="100" resource_id="123" role="admin"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 
index 9c3bcfce197d5d545b1b2eec665fb17f4c5ab256..574e36a9a6de912bbfced472937afc661a294c1e 100644 (file)
@@ -5,9 +5,9 @@
   <group_roles id="1" group_id="100" resource_id="123" role="admin"/>
   <group_roles id="2" group_id="100" resource_id="123" role="user"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index e77f558dc361badcc4b76ecebce8399c0e35266c..4cb4facedaf4802e2799376b997e72e65f27e599 100644 (file)
@@ -4,9 +4,9 @@
 
   <group_roles id="1" group_id="100" resource_id="123" role="admin"/>
 
-  <projects id="123" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="123" uuid="A" root_uuid="A" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="123456789"/>
 
 </dataset>
index 99bd75917c1f53eb3276addde7740399f1644df7..f6e6099a95499a9c40e7f8dbe64936ccc11b8923 100644 (file)
@@ -16,7 +16,7 @@
 
   <properties id="7" prop_key="commonslang.one" text_value="one" resource_id="12" user_id="[null]"/>
 
-  <projects id="10" uuid="A" kee="org.struts:struts"/>
-  <projects id="11" uuid="B" kee="org.apache:commons-lang"/>
-  <projects id="12" uuid="C" kee="other"/>
+  <projects id="10" uuid="A" root_uuid="A" kee="org.struts:struts"/>
+  <projects id="11" uuid="B" root_uuid="B" kee="org.apache:commons-lang"/>
+  <projects id="12" uuid="C" root_uuid="C" kee="other"/>
 </dataset>
index 9bfd1dc3001925ed47ad4310a890a97b47bd5ab5..08568ad0eee0cee9c3f14ab1d2f10bb3474466c6 100644 (file)
@@ -10,7 +10,7 @@
     login="simon"
     />
 
-  <projects id="42" uuid="PROJECT_A" kee="org.apache:struts"/>
+  <projects id="42" uuid="PROJECT_A" root_uuid="PROJECT_A" kee="org.apache:struts"/>
 
   <!-- global subscription -->
   <properties
index 99bd75917c1f53eb3276addde7740399f1644df7..f6e6099a95499a9c40e7f8dbe64936ccc11b8923 100644 (file)
@@ -16,7 +16,7 @@
 
   <properties id="7" prop_key="commonslang.one" text_value="one" resource_id="12" user_id="[null]"/>
 
-  <projects id="10" uuid="A" kee="org.struts:struts"/>
-  <projects id="11" uuid="B" kee="org.apache:commons-lang"/>
-  <projects id="12" uuid="C" kee="other"/>
+  <projects id="10" uuid="A" root_uuid="A" kee="org.struts:struts"/>
+  <projects id="11" uuid="B" root_uuid="B" kee="org.apache:commons-lang"/>
+  <projects id="12" uuid="C" root_uuid="C" kee="other"/>
 </dataset>
index 938910a0e01fac37c5c3413aa0ae00636396eda0..5dd05ae8a5a5128387a23159fb04e8b87985de41 100644 (file)
 
 
   <!-- root project -->
-  <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+  <projects id="1" root_uuid="ABCD" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Apache Struts"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- module -->
-  <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
+  <projects id="2" root_uuid="ABCD" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- sub module -->
-  <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data"
+  <projects id="3" root_uuid="ABCD" kee="org.struts:struts-data" name="Struts Data"
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
-            description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- directory -->
   <projects long_name="org.struts" id="4" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
-            name="src/org/struts" root_id="3"
+            name="src/org/struts" root_uuid="FGHI"
             description="[null]"
-            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts"
+            enabled="[true]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]" path="src/org/struts"
             authorization_updated_at="[null]"/>
 
   <!-- file -->
   <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL"
             kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="HIJK" project_uuid="ABCD" module_uuid="GHIJ" module_uuid_path=".ABCD.EFGH.FGHI."
-            name="RequestContext.java" root_id="3"
+            name="RequestContext.java" root_uuid="FGHI"
             description="[null]"
-            enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+            enabled="[true]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
 
index 63c723d4f573643010392645fb682bce49f6d24a..b6926426ff1abad781798f4df33d78b4288bc288 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
-  <projects id="45" uuid="uuid_45" kee="45"/>
-  <projects id="56" uuid="uuid_56" kee="46"/>
+  <projects id="45" uuid="uuid_45" root_uuid="uuid_45" kee="45"/>
+  <projects id="56" uuid="uuid_56" root_uuid="uuid_56" kee="46"/>
 
   <properties
     id="1"
index 2230f63a43b94deac4b1e206e234a585fa58ae32..fa242513c85762064adcd29080d401dea75a4319 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
-  <projects id="1" uuid="uuid_1" enabled="[true]" root_id="[null]"
+  <projects id="1" uuid="uuid_1" enabled="[true]" root_uuid="uuid_1"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"/>
 
   <snapshots id="1" component_uuid="uuid_1" parent_snapshot_id="[null]" root_component_uuid="uuid_1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
index 00546fd11e75bfee58883bd7b6287138a8a9e8de..01da01c229ed7f4243feb7a8228ebeb01c0c9bdb 100644 (file)
@@ -1,30 +1,30 @@
 <dataset>
 
   <!-- the project -->
-  <projects id="1" enabled="[true]" root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
+  <projects id="1" enabled="[true]" root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
             module_uuid_path="." created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the directory -->
-  <projects id="2" enabled="[true]" root_id="1" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="2" enabled="[true]" root_uuid="ABCD" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path="." created_at="[null]"
             long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the files -->
-  <projects id="3" enabled="[true]" root_id="1" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="3" enabled="[true]" root_uuid="ABCD" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path=".ABCD." created_at="[null]"
             long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
-  <projects id="4" enabled="[true]" root_id="1" uuid="KLMN" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="4" enabled="[true]" root_uuid="ABCD" uuid="KLMN" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path=".ABCD." created_at="[null]"
             long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/DeletedFile.java"
             name="my/dir/DeletedFile.java"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index b357e0afd7b9f0102bee3ecabc0c4e0a8c633b22..14aab1abc4e38f8c81eee480f65503c685dce8f7 100644 (file)
@@ -4,7 +4,7 @@
     <projects id="1" enabled="[true]" root_id="[null]"
               uuid="A" project_uuid="A" module_uuid="[null]" module_uuid_path=".A."
               long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-              description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+              description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
               authorization_updated_at="[null]"/>
 
 
index e9a7fbb175cc6237dbc220a3913267d30e52c270..157ac6440f98ed743c3454ffc8c42361a32af3d9 100644 (file)
@@ -9,24 +9,24 @@ What has been changed :
 <dataset>
 
   <!-- the project -->
-  <projects id="1" enabled="[false]" root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
+  <projects id="1" enabled="[false]" root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
             module_uuid_path="." created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the directory -->
-  <projects id="2" enabled="[false]" root_id="1" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
+  <projects id="2" enabled="[false]" root_uuid="ABCD" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
             created_at="[null]"
             long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the file -->
-  <projects id="3" enabled="[false]" root_id="1" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="3" enabled="[false]" root_uuid="ABCD" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path=".ABCD." created_at="[null]"
             long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index c229efccb3b06db09ea56802e0ed77073b0e8df8..e252c3f9689c9a97f61ee9fbe534fb96b961741c 100644 (file)
@@ -1,24 +1,24 @@
 <dataset>
 
   <!-- the project -->
-  <projects id="1" enabled="[true]" root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
+  <projects id="1" enabled="[true]" root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
             module_uuid_path="." created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the directory -->
-  <projects id="2" enabled="[true]" root_id="1" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
+  <projects id="2" enabled="[true]" root_uuid="ABCD" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
             created_at="[null]"
             long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the file -->
-  <projects id="3" enabled="[true]" root_id="1" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="3" enabled="[true]" root_uuid="ABCD" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path=".ABCD." created_at="[null]"
             long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index 1165b2514bf5eb2178a245965ae1fff9884d0fcb..ade3fd7d21ecb584fda1bc907f097d593cdc6ec2 100644 (file)
@@ -9,7 +9,7 @@ Snapshot 2 has been deleted
   <projects id="1" enabled="[true]" root_id="[null]"
             uuid="projectUUID" project_uuid="projectUUID"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- past snapshot with status "processed" and already purged -->
index d80f257666d27e81d8c8b63b3c10ed7fc9bb9dae..9d795b7ea83c9dfec4c8643a1db4eb42f772eb01 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <!-- the project -->
-  <projects id="1" enabled="[true]" root_id="[null]"
+  <projects id="1" enabled="[true]" root_uuid="projectUUID"
             uuid="projectUUID" project_uuid="projectUUID"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- past snapshot with status "processed" and already purged -->
index 763a93149ce67f4cffc352cbba2b65a1c1ceb417..13c0421196292dd96b2f632378cd47600fd2dbd0 100644 (file)
@@ -7,24 +7,24 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6
 <dataset>
 
   <!-- the project -->
-  <projects id="1" enabled="[true]" root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
+  <projects id="1" enabled="[true]" root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
             module_uuid_path="." created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the directory -->
-  <projects id="2" enabled="[true]" root_id="1" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
+  <projects id="2" enabled="[true]" root_uuid="ABCD" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
             created_at="[null]"
             long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the file -->
-  <projects id="3" enabled="[true]" root_id="1" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="3" enabled="[true]" root_uuid="ABCD" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path=".ABCD." created_at="[null]"
             long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- do not purge last snapshots -->
index 1a20054a9cdb85187490ed7d0a6215fdb896408b..52ea5d63dee9faadbbe646c6e7abbcf9a6179b45 100644 (file)
@@ -1,24 +1,24 @@
 <dataset>
 
   <!-- the project -->
-  <projects id="1" enabled="[true]" root_id="[null]" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
+  <projects id="1" enabled="[true]" root_uuid="ABCD" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]"
             module_uuid_path="." created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the directory -->
-  <projects id="2" enabled="[true]" root_id="1" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
+  <projects id="2" enabled="[true]" root_uuid="ABCD" uuid="EFGH" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="."
             created_at="[null]"
             long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- the file -->
-  <projects id="3" enabled="[true]" root_id="1" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
+  <projects id="3" enabled="[true]" root_uuid="ABCD" uuid="GHIJ" project_uuid="ABCD" module_uuid="ABCD"
             module_uuid_path=".ABCD." created_at="[null]"
             long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]" path="[null]"
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <!-- do not purge last snapshots -->
index 492010d763af6413ea0ee3dcec1b65aa31283fa5..fb03c68f429a7a028d0f5c0f19d84afdb7e856eb 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <!-- root -->
-  <projects id="1" enabled="[true]" root_id="[null]"
+  <projects id="1" enabled="[true]" root_uuid="A"
             uuid="A" project_uuid="A" module_uuid="[null]" module_uuid_path=".A."
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="1" component_uuid="A" parent_snapshot_id="[null]" root_component_uuid="A" root_snapshot_id="[null]"
                  change_type="comment" change_data="abc"/>
 
   <!-- modules -->
-  <projects id="2" enabled="[true]" root_id="1"
+  <projects id="2" enabled="[true]" root_uuid="A"
             uuid="B" project_uuid="A" module_uuid="A" module_uuid_path=".A.B."
             long_name="[null]" scope="PRJ" qualifier="BRC" kee="module1" name="module1"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="2" component_uuid="B" parent_snapshot_id="1" root_component_uuid="A" root_snapshot_id="1"
              version="[null]" path="[null]"/>
 
 
-  <projects id="3" enabled="[false]" root_id="1"
+  <projects id="3" enabled="[false]" root_uuid="A"
             uuid="C" project_uuid="A" module_uuid="A" module_uuid_path=".A.C."
             long_name="[null]" scope="PRJ" qualifier="BRC" kee="module2" name="module2"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="3" component_uuid="C" parent_snapshot_id="1" root_component_uuid="A" root_snapshot_id="1"
              version="[null]" path="[null]"/>
 
   <!-- file of module 2-->
-  <projects id="4" enabled="[false]" root_id="3"
+  <projects id="4" enabled="[false]" root_uuid="C"
             uuid="D" project_uuid="A" module_uuid="C" module_uuid_path=".A.C."
             long_name="[null]" scope="FIL" qualifier="FIL" kee="module2:File.java" name="File"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="4" component_uuid="D" parent_snapshot_id="3" root_component_uuid="A" root_snapshot_id="1"
index 59212cb083181ac61f581d21d918b9c21c5661d4..3f85b38406c3a30083d548f1206ecc7d29c100a6 100644 (file)
@@ -4,7 +4,7 @@
   <projects id="1" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." enabled="[true]"
             created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            root_uuid="ABCD" description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             path="[null]" deprecated_kee="[null]"
             authorization_updated_at="[null]"/>
 
index c4b9ccba430b44b6323e6dc6defdce39999893fc..6d59eb0ff868987d0d21ae1683b42cb328db85b7 100644 (file)
@@ -4,7 +4,7 @@
   <projects id="1" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." enabled="[true]"
             created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            root_uuid="ABCD" description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             path="[null]" deprecated_kee="[null]"
             authorization_updated_at="[null]"/>
 
index ae336142fdfa0ee1f3aadba3b09095e8721be2eb..89d73329dca681068433664ba4b167bc59a728bc 100644 (file)
@@ -7,7 +7,7 @@
 
   <projects id="1" uuid="1" enabled="[true]" root_id="[null]" created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index 348c6520e654880b2a6add868cc1076b732e7be0..9e92f34618b19efc60c26370d306183d3c7fb34d 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
-  <projects id="1" uuid="1" enabled="[true]" root_id="[null]" created_at="[null]"
+  <projects id="1" uuid="1" enabled="[true]" root_uuid="1" created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index 4dad1831f6c7494168808891e58189b899abfad5..ab94caed6e51c28c6bea677fe7c29a6454de095e 100644 (file)
@@ -2,7 +2,7 @@
 
   <projects id="1" uuid="P1" enabled="[true]" root_id="[null]" created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index 17230f4310e2b9457b63828f329df3a25e072e4f..7735736555ad112a3b16556c3024d17568bf4d16 100644 (file)
@@ -1,8 +1,8 @@
 <dataset>
 
-  <projects id="1" uuid="P1" enabled="[true]" root_id="[null]" created_at="[null]"
+  <projects id="1" uuid="P1" enabled="[true]" root_uuid="P1" created_at="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
-            description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="java" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <snapshots id="1"
index f2e519eb559900ef30dc7575c2a7636b3d95a36c..db564d7da73fcbbad57041f31a428b1eee6304f9 100644 (file)
@@ -1,30 +1,30 @@
 <dataset>
 
   <!-- view -->
-  <projects id="1" enabled="[true]" root_id="[null]"
+  <projects id="1" enabled="[true]" root_uuid="A"
             uuid="A" project_uuid="A" module_uuid="[null]" module_uuid_path=".A."
             long_name="[null]" scope="PRJ" qualifier="VW" kee="view" name="view"
-            description="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- sub views -->
-  <projects id="2" enabled="[true]" root_id="1"
+  <projects id="2" enabled="[true]" root_uuid="A"
             uuid="B" project_uuid="A" module_uuid="A" module_uuid_path=".A.B."
             long_name="[null]" scope="PRJ" qualifier="SVW" kee="subview1" name="subview2"
-            description="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
-  <projects id="3" enabled="[false]" root_id="1"
+  <projects id="3" enabled="[false]" root_uuid="A"
             uuid="C" project_uuid="A" module_uuid="A" module_uuid_path=".A.C."
             long_name="[null]" scope="PRJ" qualifier="SVW" kee="subview2" name="subview2"
-            description="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
   <!-- technical project of module 2-->
-  <projects id="4" enabled="[false]" root_id="3"
+  <projects id="4" enabled="[false]" root_uuid="C"
             uuid="D" project_uuid="A" module_uuid="C" module_uuid_path=".A.C."
             long_name="[null]" scope="FIL" qualifier="TRK" kee="TechProject" name="TechProject"
-            description="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+            description="[null]" language="[null]" copy_component_uuid="[null]" developer_uuid="[null]"
             authorization_updated_at="[null]"/>
 
 </dataset>
index c58db5391e21464b0c4403e97599a267689255ab..8f719037338cf1e20d19d966a65d728eea1ace0f 100644 (file)
@@ -3,13 +3,13 @@
   <quality_gates id="42" name="Golden"/>
   <quality_gates id="43" name="Ninth"/>
 
-  <projects id="1" uuid="A" kee="project-one" name="Project One" qualifier="TRK" scope="PRJ"/>
-  <projects id="2" uuid="B" kee="project-two" name="Project Two" qualifier="TRK" scope="PRJ"/>
-  <projects id="3" uuid="C" kee="project-three" name="Project Three" qualifier="TRK" scope="PRJ"/>
-  <projects id="4" uuid="D" kee="project-four" name="Project Four" qualifier="TRK" scope="PRJ"/>
-  <projects id="5" uuid="E" kee="project-five" name="Project Five" qualifier="TRK" scope="PRJ"/>
-  <projects id="6" uuid="F" kee="view-six" name="View Six" qualifier="VW" scope="PRJ"/>
-  <projects id="7" uuid="G" kee="file-one" name="File One" qualifier="TRK" scope="FIL"/>
+  <projects id="1" uuid="A" root_uuid="A" kee="project-one" name="Project One" qualifier="TRK" scope="PRJ"/>
+  <projects id="2" uuid="B" root_uuid="B" kee="project-two" name="Project Two" qualifier="TRK" scope="PRJ"/>
+  <projects id="3" uuid="C" root_uuid="C" kee="project-three" name="Project Three" qualifier="TRK" scope="PRJ"/>
+  <projects id="4" uuid="D" root_uuid="D" kee="project-four" name="Project Four" qualifier="TRK" scope="PRJ"/>
+  <projects id="5" uuid="E" root_uuid="E" kee="project-five" name="Project Five" qualifier="TRK" scope="PRJ"/>
+  <projects id="6" uuid="F" root_uuid="F" kee="view-six" name="View Six" qualifier="VW" scope="PRJ"/>
+  <projects id="7" uuid="G" root_uuid="G" kee="file-one" name="File One" qualifier="TRK" scope="FIL"/>
 
   <resource_index id="1" kee="project one" component_uuid="A" root_component_uuid="A" position="0" name_size="11"
                   qualifier="TRK"/>
index 94df8ad98ee297c051cc9d3e8ae65abfc2cc819c..32f6c7c726251f62a4019e5d34569f5f0c83609e 100644 (file)
@@ -5,9 +5,9 @@
   <rules_profiles id="2" name="Sonar Way" language="js" parent_kee="[null]" kee="js_sonar_way" is_default="[true]"
                   rules_updated_at="[null]" created_at="[null]" updated_at="[null]"/>
 
-  <projects id="1" uuid="A" kee="org.codehaus.sonar:sonar" name="SonarQube" enabled="[true]"/>
-  <projects id="2" uuid="B" kee="org.codehaus.sonar-plugins.java:java" name="SonarQube Java" enabled="[true]"/>
-  <projects id="3" uuid="C" kee="disabled:project" name="Disabled Project" enabled="[false]"/>
+  <projects id="1" uuid="A" root_uuid="A" kee="org.codehaus.sonar:sonar" name="SonarQube" enabled="[true]"/>
+  <projects id="2" uuid="B" root_uuid="B" kee="org.codehaus.sonar-plugins.java:java" name="SonarQube Java" enabled="[true]"/>
+  <projects id="3" uuid="C" root_uuid="C" kee="disabled:project" name="Disabled Project" enabled="[false]"/>
 
   <project_qprofiles id="1" project_uuid="A" profile_key="java_sonar_way"/>
   <project_qprofiles id="2" project_uuid="B" profile_key="java_sonar_way"/>
index f5730087a21ca49d159f998769c82da68ad32b40..47b03de71a5421d5fa98633794fef7f3e944948f 100644 (file)
@@ -5,10 +5,10 @@
   <group_roles id="1" group_id="[null]" resource_id="300" role="user"/>
   <group_roles id="2" group_id="[null]" resource_id="400" role="user"/>
 
-  <projects id="301" kee="pj-w-snapshot:package" root_id="300" uuid="ABCD" module_uuid="EDFG"/>
-  <projects id="302" kee="pj-w-snapshot:file" root_id="300" uuid="BCDE" module_uuid="EDFG"/>
-  <projects id="303" kee="pj-w-snapshot:other" root_id="300" uuid="CDEF" module_uuid="EDFG"/>
-  <projects id="300" kee="pj-w-snapshot" uuid="EDFG" module_uuid="[null]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="FGHI" project_uuid="FGHI"/>
+  <projects id="301" kee="pj-w-snapshot:package" root_uuid="EDFG" uuid="ABCD" module_uuid="EDFG"/>
+  <projects id="302" kee="pj-w-snapshot:file" root_uuid="EDFG" uuid="BCDE" module_uuid="EDFG"/>
+  <projects id="303" kee="pj-w-snapshot:other" root_uuid="EDFG" uuid="CDEF" module_uuid="EDFG"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="EDFG" root_uuid="EDFG" module_uuid="[null]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="FGHI" root_uuid="FGHI" project_uuid="FGHI"/>
 
 </dataset>
index 7ffca0d6f5ef31c6dc2536b29dff4cdde829f10b..07ae52a0cc807b472b04129226cb5b79f2bc19bc 100644 (file)
@@ -7,10 +7,10 @@
   <group_roles id="1" group_id="200" resource_id="300" role="user"/>
   <group_roles id="2" group_id="200" resource_id="400" role="user"/>
 
-  <projects id="301" kee="pj-w-snapshot:package" root_id="300" uuid="ABCD" module_uuid="DEFG"/>
-  <projects id="302" kee="pj-w-snapshot:file" root_id="300" uuid="BCDE" module_uuid="DEFG"/>
-  <projects id="303" kee="pj-w-snapshot:other" root_id="300" uuid="CDEF" module_uuid="DEFG"/>
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]"/>
+  <projects id="301" kee="pj-w-snapshot:package" root_uuid="DEFG" uuid="ABCD" module_uuid="DEFG"/>
+  <projects id="302" kee="pj-w-snapshot:file" root_uuid="DEFG" uuid="BCDE" module_uuid="DEFG"/>
+  <projects id="303" kee="pj-w-snapshot:other" root_uuid="DEFG" uuid="CDEF" module_uuid="DEFG"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]"/>
 
 </dataset>
index 1c21104a7b6a7141e557ba13fd446811f7945dc2..e02308c9bc192b698dce2b62041a02805f19918e 100644 (file)
@@ -4,7 +4,7 @@
   <group_roles id="1" group_id="[null]" resource_id="300" role="user"/>
   <group_roles id="2" group_id="200" resource_id="400" role="codeviewer"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]" enabled="[true]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]" enabled="[true]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]" enabled="[true]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]" enabled="[true]"/>
 
 </dataset>
index 17e6323ccd6bc20822738bdee35bf7714dfcd490..593f2936ac66453d044327e24b64f6c6616c1fe5 100644 (file)
@@ -4,7 +4,7 @@
   <group_roles id="1" group_id="200" resource_id="300" role="user"/>
   <group_roles id="2" group_id="200" resource_id="400" role="codeviewer"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]" enabled="[true]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]" enabled="[true]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]" enabled="[true]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]" enabled="[true]"/>
 
 </dataset>
index 515adaa8f4846494974c02353db2abd7e5d40c91..e2994285531ce72cd00fb61972016aa2c1e12482 100644 (file)
@@ -4,7 +4,7 @@
   <user_roles id="1" user_id="100" resource_id="300" role="user"/>
   <user_roles id="2" user_id="100" resource_id="400" role="codeviewer"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]" enabled="[true]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]" enabled="[true]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]" enabled="[true]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]" enabled="[true]"/>
 
 </dataset>
index 4de4f328925ef88ebc83e54c1b4dccb1e92585b8..b7b48ed7ea9faab9ae70b28d08026d31cde5bd49 100644 (file)
@@ -12,7 +12,7 @@
   <group_roles id="1" group_id="[null]" resource_id="300" role="user"/>
   <group_roles id="2" group_id="201" resource_id="400" role="user"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]"/>
 
 </dataset>
index c813b02e6f8fbd716aad4415df04841c01dcf33b..a354439d560f98c225ab137b55f085190312c4f5 100644 (file)
@@ -12,7 +12,7 @@
   <group_roles id="1" group_id="200" resource_id="300" role="user"/>
   <group_roles id="2" group_id="201" resource_id="400" role="user"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]"/>
 
 </dataset>
index e6328ec96549eca92761c918ad7f3e658ffb02f4..0fa56c9ee596f40f6b8ddaa1df6000fa76dd438d 100644 (file)
@@ -9,7 +9,7 @@
   <groups_users user_id="100" group_id="200"/>
   <group_roles id="1" group_id="200" resource_id="400" role="user"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]"/>
 
 </dataset>
index a1aa1f05a76717f6942b18f49c42650f86ddb0c3..7db6a43c67668e78e991bbafe010969b71d70442 100644 (file)
@@ -4,13 +4,13 @@
   <groups_users user_id="100" group_id="200"/>
   <group_roles id="1" group_id="[null]" resource_id="300" role="user"/>
 
-  <projects id="300" uuid="ABCD" module_uuid="[null]" kee="pj-w-snapshot" scope="PRJ" qualifier="TRK" enabled="[true]"/>
-  <projects id="301" uuid="BCDE" module_uuid="[null]" kee="pj-w-snapshot1" scope="PRJ" qualifier="TRK"
+  <projects id="300" uuid="ABCD" root_uuid="ABCD" module_uuid="[null]" kee="pj-w-snapshot" scope="PRJ" qualifier="TRK" enabled="[true]"/>
+  <projects id="301" uuid="BCDE" root_uuid="BCDE" module_uuid="[null]" kee="pj-w-snapshot1" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
-  <projects id="302" uuid="CDEF" module_uuid="[null]" kee="pj-w-snapshot2" scope="PRJ" qualifier="TRK"
+  <projects id="302" uuid="CDEF" root_uuid="CDEF" module_uuid="[null]" kee="pj-w-snapshot2" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
 
-  <projects id="303" uuid="DEFG" module_uuid="[null]" kee="pj-w-snapshot3" scope="PRJ" qualifier="TRK"
+  <projects id="303" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]" kee="pj-w-snapshot3" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
 
 </dataset>
index 936821667010c993acafc667cb71e3d9aa5bf9cf..bf24717a9b9bffc32e6091f440b783b8c6b9382e 100644 (file)
@@ -6,13 +6,13 @@
   <groups_users user_id="100" group_id="200"/>
   <group_roles id="1" group_id="200" resource_id="300" role="user"/>
 
-  <projects id="300" uuid="ABCD" module_uuid="[null]" kee="pj-w-snapshot" scope="PRJ" qualifier="TRK" enabled="[true]"/>
-  <projects id="301" uuid="BCDE" module_uuid="[null]" kee="pj-w-snapshot1" scope="PRJ" qualifier="TRK"
+  <projects id="300" uuid="ABCD" root_uuid="ABCD" module_uuid="[null]" kee="pj-w-snapshot" scope="PRJ" qualifier="TRK" enabled="[true]"/>
+  <projects id="301" uuid="BCDE" root_uuid="BCDE" module_uuid="[null]" kee="pj-w-snapshot1" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
-  <projects id="302" uuid="CDEF" module_uuid="[null]" kee="pj-w-snapshot2" scope="PRJ" qualifier="TRK"
+  <projects id="302" uuid="CDEF" root_uuid="CDEF" module_uuid="[null]" kee="pj-w-snapshot2" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
 
-  <projects id="303" uuid="DEFG" module_uuid="[null]" kee="pj-w-snapshot3" scope="PRJ" qualifier="TRK"
+  <projects id="303" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]" kee="pj-w-snapshot3" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
 
 </dataset>
index 060223cdfbd319ff13d8ffdadf4430617634a7f2..6ddf4cd5cdaadcef19ba6cc83d49658f137baac0 100644 (file)
@@ -5,13 +5,13 @@
   <groups_users user_id="100" group_id="200"/>
   <group_roles id="1" group_id="200" resource_id="999" role="user"/>
 
-  <projects id="300" uuid="ABCD" module_uuid="[null]" kee="pj-w-snapshot" scope="PRJ" qualifier="TRK" enabled="[true]"/>
-  <projects id="301" uuid="BCDE" module_uuid="[null]" kee="pj-w-snapshot1" scope="PRJ" qualifier="TRK"
+  <projects id="300" uuid="ABCD" root_uuid="ABCD" module_uuid="[null]" kee="pj-w-snapshot" scope="PRJ" qualifier="TRK" enabled="[true]"/>
+  <projects id="301" uuid="BCDE" root_uuid="BCDE" module_uuid="[null]" kee="pj-w-snapshot1" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
-  <projects id="302" uuid="CDEF" module_uuid="[null]" kee="pj-w-snapshot2" scope="PRJ" qualifier="TRK"
+  <projects id="302" uuid="CDEF" root_uuid="CDEF" module_uuid="[null]" kee="pj-w-snapshot2" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
 
-  <projects id="303" uuid="DEFG" module_uuid="[null]" kee="pj-w-snapshot3" scope="PRJ" qualifier="TRK"
+  <projects id="303" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]" kee="pj-w-snapshot3" scope="PRJ" qualifier="TRK"
             enabled="[true]"/>
 
 </dataset>
index 3771e09738d8473580f2a41f943a93bd12b9dde2..5bed484123e09b18907e7ea53f8aabf624fe1071 100644 (file)
@@ -6,6 +6,6 @@
   <groups_users user_id="100" group_id="200"/>
   <group_roles id="1" group_id="200" resource_id="999" role="user"/>
 
-  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" module_uuid="[null]"/>
-  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" module_uuid="[null]"/>
+  <projects id="300" kee="pj-w-snapshot" uuid="DEFG" root_uuid="DEFG" module_uuid="[null]"/>
+  <projects id="400" kee="pj-wo-snapshot" uuid="EFGH" root_uuid="EFGH" module_uuid="[null]"/>
 </dataset>