Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2013-10-25 15:28:30 +0000
committerjmisinco2013-11-04 17:05:54 +0000
commit1dd2453be862c689cd7506aa9ae195850c04ee6e (patch)
tree519c87c8202e17aa8d6d75cab7197437505103c1 /plugins/org.eclipse.osee.framework.manager.servlet
parent63693d264eddca2a6c1ac2b08bd91fec05ab3e2d (diff)
downloadorg.eclipse.osee-1dd2453be862c689cd7506aa9ae195850c04ee6e.tar.gz
org.eclipse.osee-1dd2453be862c689cd7506aa9ae195850c04ee6e.tar.xz
org.eclipse.osee-1dd2453be862c689cd7506aa9ae195850c04ee6e.zip
feature[ats_ZQZZF]: Change identity service to return longs for local ids
Diffstat (limited to 'plugins/org.eclipse.osee.framework.manager.servlet')
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java20
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/SearchEngineServlet.java4
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
index ed13ce0cf47..e3a0c158367 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
@@ -277,18 +277,18 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
private ArtifactTypeCacheUpdateResponse createArtifactTypeCacheUpdateResponse(OrcsTypes orcsTypes) throws OseeCoreException {
List<ArtifactTypeRow> rows = new ArrayList<ArtifactTypeRow>();
- Map<Integer, Integer[]> baseToSuper = new HashMap<Integer, Integer[]>();
+ Map<Long, Long[]> baseToSuper = new HashMap<Long, Long[]>();
List<Triplet<Long, String, Long>> artAttrs = new ArrayList<Triplet<Long, String, Long>>();
ArtifactTypes artTypes = orcsTypes.getArtifactTypes();
for (IArtifactType artType : artTypes.getAll()) {
- int artTypeId = identityService.getLocalId(artType.getGuid());
+ long artTypeId = identityService.getLocalId(artType.getGuid());
boolean isAbstract = artTypes.isAbstract(artType);
rows.add(new ArtifactTypeRow(artTypeId, artType.getGuid(), artType.getName(), isAbstract,
DEFAULT_STORAGE_STATE));
Collection<? extends IArtifactType> superTypes = artTypes.getSuperArtifactTypes(artType);
if (!superTypes.isEmpty()) {
- Integer[] intSuperTypes = new Integer[superTypes.size()];
+ Long[] intSuperTypes = new Long[superTypes.size()];
int index = 0;
for (IArtifactType superType : superTypes) {
intSuperTypes[index++] = identityService.getLocalId(superType.getGuid());
@@ -311,7 +311,7 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
private AttributeTypeCacheUpdateResponse createAttributeTypeCacheUpdateResponse(OrcsTypes orcsTypes) throws OseeCoreException {
List<AttributeType> rows = new ArrayList<AttributeType>();
- Map<Integer, Integer> attrToEnum = new HashMap<Integer, Integer>();
+ Map<Long, Long> attrToEnum = new HashMap<Long, Long>();
AttributeTypes attrTypes = orcsTypes.getAttributeTypes();
for (IAttributeType item : attrTypes.getAll()) {
String baseAttributeTypeId = attrTypes.getBaseAttributeTypeId(item);
@@ -327,13 +327,13 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
new AttributeType(item.getGuid(), item.getName(), baseAttributeTypeId, attributeProviderNameId,
fileTypeExtension, defaultValue, minOccurrances, maxOccurrences, description, taggerId, mediaType);
- int localId = identityService.getLocalId(item);
+ long localId = identityService.getLocalId(item);
type.setId(localId);
rows.add(type);
if (attrTypes.isEnumerated(item)) {
EnumType enumType = attrTypes.getEnumType(item);
- int enumId = identityService.getLocalId(enumType);
+ long enumId = identityService.getLocalId(enumType);
attrToEnum.put(localId, enumId);
}
@@ -347,10 +347,10 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
for (IRelationType item : relTypes.getAll()) {
IArtifactType sideAType = relTypes.getArtifactTypeSideA(item);
IArtifactType sideBType = relTypes.getArtifactTypeSideB(item);
- int artifactTypeSideA = identityService.getLocalId(sideAType);
- int artifactTypeSideB = identityService.getLocalId(sideBType);
+ long artifactTypeSideA = identityService.getLocalId(sideAType);
+ long artifactTypeSideB = identityService.getLocalId(sideBType);
- int localId = identityService.getLocalId(item);
+ long localId = identityService.getLocalId(item);
String sideAName = relTypes.getSideAName(item);
String sideBName = relTypes.getSideBName(item);
@@ -368,7 +368,7 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
List<String[]> enumEntryRows = new ArrayList<String[]>();
EnumTypes enumTypes = orcsTypes.getEnumTypes();
for (EnumType type : enumTypes.getAll()) {
- int localId = identityService.getLocalId(type);
+ long localId = identityService.getLocalId(type);
enumTypeRows.add(new String[] {
String.valueOf(localId),
DEFAULT_STORAGE_STATE.toString(),
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/SearchEngineServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/SearchEngineServlet.java
index 9dc21d8ac9a..b9428a7f844 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/SearchEngineServlet.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/SearchEngineServlet.java
@@ -87,7 +87,7 @@ public class SearchEngineServlet extends SecureOseeHttpServlet {
ResultSet<Match<ArtifactReadable, AttributeReadable<?>>> results = builder.getMatches();
for (Match<ArtifactReadable, AttributeReadable<?>> match : results) {
ArtifactReadable artifact = match.getItem();
- int branchId = branchCache.getLocalId(artifact.getBranch());
+ long branchId = branchCache.getLocalId(artifact.getBranch());
for (AttributeReadable<?> attribute : match.getElements()) {
searchResponse.add(branchId, artifact.getLocalId(), attribute.getGammaId(),
match.getLocation(attribute));
@@ -96,7 +96,7 @@ public class SearchEngineServlet extends SecureOseeHttpServlet {
} else {
ResultSet<ArtifactReadable> results = builder.getResults();
for (ArtifactReadable artifact : results) {
- int branchId = branchCache.getLocalId(artifact.getBranch());
+ long branchId = branchCache.getLocalId(artifact.getBranch());
searchResponse.add(branchId, artifact.getLocalId(), -1);
}
}

Back to the top