Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2015-03-19 17:38:35 -0400
committerAngel Avila2015-03-19 17:38:35 -0400
commit8d4e299834c364c4e74614a70cfae3720b176959 (patch)
tree59a146370d409b46e46f21c6270136877d8166c2
parentbfe1648e0da57ed3e7576fb20933f7103c7c6624 (diff)
downloadorg.eclipse.osee-8d4e299834c364c4e74614a70cfae3720b176959.tar.gz
org.eclipse.osee-8d4e299834c364c4e74614a70cfae3720b176959.tar.xz
org.eclipse.osee-8d4e299834c364c4e74614a70cfae3720b176959.zip
feature[ats_ATS146079]: Remove OseeCache Servlet
Change-Id: I5df2addcecc5932a5f395fc9531fe74036688d2b Signed-off-by: Angel Avila <angel.avila2@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/AllCoreMessageTestSuite.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/CacheUpdateRequestTest.java41
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/DataTestSuite.java24
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java60
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java10
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java13
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/CacheUpdateRequestTranslatorTest.java58
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/DataTranslationServiceFactoryTest.java15
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/TranslationTestSuite.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AbstractBranchCacheMessage.java70
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ArtifactTypeCacheUpdateResponse.java113
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AttributeTypeCacheUpdateResponse.java38
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java89
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/CacheUpdateRequest.java42
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/OseeEnumTypeCacheUpdateResponse.java36
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/RelationTypeCacheUpdateResponse.java137
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java43
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java19
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ArtifactTypeCacheUpdateResponseTranslator.java71
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/AttributeTypeCacheUpdateResponseTranslator.java118
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/CacheUpdateRequestTranslator.java63
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/OseeEnumTypeCacheUpdateResponseTranslator.java75
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/RelationTypeCacheUpdateResponseTranslator.java56
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreTranslatorId.java11
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java292
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java2
26 files changed, 2 insertions, 1498 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/AllCoreMessageTestSuite.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/AllCoreMessageTestSuite.java
index 14cccaf0ac..1854660fec 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/AllCoreMessageTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/AllCoreMessageTestSuite.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.message.test;
-import org.eclipse.osee.framework.core.message.test.data.DataTestSuite;
import org.eclipse.osee.framework.core.message.test.translation.TranslationTestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({DataTestSuite.class, TranslationTestSuite.class,})
+@Suite.SuiteClasses({TranslationTestSuite.class})
/**
* @author Roberto E. Escobar
*/
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/CacheUpdateRequestTest.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/CacheUpdateRequestTest.java
deleted file mode 100644
index 3f12f587c2..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/CacheUpdateRequestTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.test.data;
-
-import java.util.Arrays;
-import java.util.List;
-import org.junit.Assert;
-import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
-import org.eclipse.osee.framework.core.message.CacheUpdateRequest;
-import org.junit.Test;
-
-/**
- * Test Case for {@link CacheUpdateRequest}
- *
- * @author Roberto E. Escobar
- */
-public class CacheUpdateRequestTest {
-
- @Test
- public void testNoGuids() {
- CacheUpdateRequest request = new CacheUpdateRequest(OseeCacheEnum.ARTIFACT_TYPE_CACHE);
- Assert.assertEquals(OseeCacheEnum.ARTIFACT_TYPE_CACHE, request.getCacheId());
- Assert.assertTrue(request.getItemsIds().isEmpty());
- }
-
- @Test
- public void testWithGuids() {
- List<Integer> guids = Arrays.asList(45, 55);
- CacheUpdateRequest request = new CacheUpdateRequest(OseeCacheEnum.ATTRIBUTE_TYPE_CACHE, guids);
- Assert.assertEquals(OseeCacheEnum.ATTRIBUTE_TYPE_CACHE, request.getCacheId());
- Assert.assertEquals(guids, request.getItemsIds());
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/DataTestSuite.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/DataTestSuite.java
deleted file mode 100644
index c59cf11c89..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/DataTestSuite.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.osee.framework.core.message.test.data;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({CacheUpdateRequestTest.class, TransactionCacheUpdateResponseTest.class,})
-/**
- * @author Roberto E. Escobar
- */
-public class DataTestSuite {
- // Test Suite
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java
deleted file mode 100644
index 665287183a..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.test.data;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.framework.core.message.TransactionCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.test.mocks.DataAsserts;
-import org.eclipse.osee.framework.core.message.test.mocks.MockDataFactory;
-import org.eclipse.osee.framework.core.model.TransactionRecord;
-import org.eclipse.osee.framework.core.model.TransactionRecordFactory;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.Compare;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Test Case for {@link TransactionCacheUpdateResponse}
- *
- * @author Roberto E. Escobar
- */
-public class TransactionCacheUpdateResponseTest {
-
- @Test
- public void testGetRows() {
- List<TransactionRecord> expected = new ArrayList<TransactionRecord>();
- for (int j = 1; j <= 2; j++) {
- expected.add(MockDataFactory.createTransaction(j, j * 3));
- }
-
- TransactionCacheUpdateResponse response = new TransactionCacheUpdateResponse(expected);
- List<TransactionRecord> actual = response.getTxRows();
- Assert.assertFalse(Compare.isDifferent(expected, actual));
- }
-
- @Test
- public void testFromCache() throws OseeCoreException {
-
- List<TransactionRecord> data = new ArrayList<TransactionRecord>();
- for (int j = 1; j <= 2; j++) {
- data.add(MockDataFactory.createTransaction(j, j * 3));
- }
-
- TransactionRecordFactory factory = new TransactionRecordFactory();
- TransactionCacheUpdateResponse response = TransactionCacheUpdateResponse.fromCache(factory, data);
- List<TransactionRecord> actual = response.getTxRows();
- Assert.assertEquals(data.size(), actual.size());
- for (int index = 0; index < data.size(); index++) {
- DataAsserts.assertEquals(data.get(index), actual.get(index));
- }
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java
index 80328dfa09..63e0741e07 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.framework.core.message.test.mocks;
import java.util.List;
-import org.eclipse.osee.framework.core.message.CacheUpdateRequest;
import org.eclipse.osee.framework.core.message.DatastoreInitRequest;
import org.eclipse.osee.framework.core.model.AbstractOseeType;
import org.eclipse.osee.framework.core.model.Branch;
@@ -108,15 +107,6 @@ public final class DataAsserts {
}
}
- public static void assertEquals(CacheUpdateRequest expected, CacheUpdateRequest actual) {
- if (expected == null) {
- Assert.assertNull(actual);
- } else {
- Assert.assertEquals(expected.getCacheId(), actual.getCacheId());
- Assert.assertFalse(Compare.isDifferent(expected.getItemsIds(), actual.getItemsIds()));
- }
- }
-
public static void assertEquals(RelationType expected, RelationType actual) {
if (expected == null) {
Assert.assertNull(actual);
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java
index 45b5a18051..6fb418bc4d 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java
@@ -10,11 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.message.test.mocks;
-import java.util.ArrayList;
-import java.util.List;
import org.eclipse.osee.framework.core.enums.ModificationType;
-import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
-import org.eclipse.osee.framework.core.message.CacheUpdateRequest;
import org.eclipse.osee.framework.core.model.BranchFactory;
import org.eclipse.osee.framework.core.model.OseeModelFactoryService;
import org.eclipse.osee.framework.core.model.TransactionRecordFactory;
@@ -62,13 +58,4 @@ public final class MockRequestFactory {
changeVersion.setValue("change_version_value_" + index);
}
- public static CacheUpdateRequest createRequest(int index) {
- OseeCacheEnum cacheEnum = OseeCacheEnum.values()[Math.abs(index % OseeCacheEnum.values().length)];
- List<Integer> guids = new ArrayList<Integer>();
- for (int j = 1; j <= index * 3; j++) {
- guids.add(j * index);
- }
- return new CacheUpdateRequest(cacheEnum, guids);
- }
-
}
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/CacheUpdateRequestTranslatorTest.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/CacheUpdateRequestTranslatorTest.java
deleted file mode 100644
index 604fae17c1..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/CacheUpdateRequestTranslatorTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.test.translation;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.junit.Assert;
-import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
-import org.eclipse.osee.framework.core.message.CacheUpdateRequest;
-import org.eclipse.osee.framework.core.message.internal.translation.CacheUpdateRequestTranslator;
-import org.eclipse.osee.framework.core.message.test.mocks.DataAsserts;
-import org.eclipse.osee.framework.core.message.test.mocks.MockRequestFactory;
-import org.eclipse.osee.framework.core.translation.ITranslator;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-/**
- * Test Case for {@link CacheUpdateRequestTranslator}
- *
- * @author Roberto E. Escobar
- * @author Jeff C. Phillips
- */
-@RunWith(Parameterized.class)
-public class CacheUpdateRequestTranslatorTest extends BaseTranslatorTest<CacheUpdateRequest> {
-
- public CacheUpdateRequestTranslatorTest(CacheUpdateRequest data, ITranslator<CacheUpdateRequest> translator) {
- super(data, translator);
- }
-
- @Override
- protected void checkEquals(CacheUpdateRequest expected, CacheUpdateRequest actual) {
- Assert.assertNotSame(expected, actual);
- DataAsserts.assertEquals(expected, actual);
- }
-
- @Parameters
- public static Collection<Object[]> data() {
- CacheUpdateRequestTranslator translator = new CacheUpdateRequestTranslator();
-
- List<Object[]> data = new ArrayList<Object[]>();
- for (int index = 1; index <= 5; index++) {
- data.add(new Object[] {MockRequestFactory.createRequest(index), translator});
- }
- //
- data.add(new Object[] {new CacheUpdateRequest(OseeCacheEnum.ARTIFACT_TYPE_CACHE), translator});
- return data;
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/DataTranslationServiceFactoryTest.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/DataTranslationServiceFactoryTest.java
index 1c1d07d524..e31f9eda9e 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/DataTranslationServiceFactoryTest.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/DataTranslationServiceFactoryTest.java
@@ -13,14 +13,9 @@ package org.eclipse.osee.framework.core.message.test.translation;
import org.eclipse.osee.framework.core.enums.CoreTranslatorId;
import org.eclipse.osee.framework.core.message.internal.DataTranslationService;
import org.eclipse.osee.framework.core.message.internal.DataTranslationServiceFactory;
-import org.eclipse.osee.framework.core.message.internal.translation.ArtifactTypeCacheUpdateResponseTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.AttributeTypeCacheUpdateResponseTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.CacheUpdateRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.DatastoreInitRequestTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.OseeEnumTypeCacheUpdateResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelResponseTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.RelationTypeCacheUpdateResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.TableDataTranslator;
import org.eclipse.osee.framework.core.model.BranchFactory;
import org.eclipse.osee.framework.core.model.TransactionRecordFactory;
@@ -49,16 +44,6 @@ public class DataTranslationServiceFactoryTest {
srvc.setModelFactory(new MockModelFactoryService());
srvc.start();
- checkExists(srvc, CacheUpdateRequestTranslator.class, CoreTranslatorId.OSEE_CACHE_UPDATE_REQUEST);
- checkExists(srvc, ArtifactTypeCacheUpdateResponseTranslator.class,
- CoreTranslatorId.ARTIFACT_TYPE_CACHE_UPDATE_RESPONSE);
- checkExists(srvc, AttributeTypeCacheUpdateResponseTranslator.class,
- CoreTranslatorId.ATTRIBUTE_TYPE_CACHE_UPDATE_RESPONSE);
- checkExists(srvc, RelationTypeCacheUpdateResponseTranslator.class,
- CoreTranslatorId.RELATION_TYPE_CACHE_UPDATE_RESPONSE);
- checkExists(srvc, OseeEnumTypeCacheUpdateResponseTranslator.class,
- CoreTranslatorId.OSEE_ENUM_TYPE_CACHE_UPDATE_RESPONSE);
-
checkExists(srvc, OseeImportModelRequestTranslator.class, CoreTranslatorId.OSEE_IMPORT_MODEL_REQUEST);
checkExists(srvc, OseeImportModelResponseTranslator.class, CoreTranslatorId.OSEE_IMPORT_MODEL_RESPONSE);
checkExists(srvc, TableDataTranslator.class, CoreTranslatorId.TABLE_DATA);
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/TranslationTestSuite.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/TranslationTestSuite.java
index 1537cd8971..55d909917d 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/TranslationTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/translation/TranslationTestSuite.java
@@ -15,7 +15,6 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
- CacheUpdateRequestTranslatorTest.class,
DatastoreInitRequestTranslatorTest.class,
DataTranslationServiceFactoryTest.class,
DataTranslationServiceTest.class,
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AbstractBranchCacheMessage.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AbstractBranchCacheMessage.java
deleted file mode 100644
index 90b2dbe511..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AbstractBranchCacheMessage.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.osee.framework.jdk.core.type.Triplet;
-
-/**
- * @author Roberto E. Escobar
- */
-public abstract class AbstractBranchCacheMessage {
-
- private final List<BranchRow> rows;
- private final Map<Long, Long> childToParent;
- private final Map<Long, Integer> branchToBaseTx;
- private final Map<Long, Integer> branchToSourceTx;
- private final Map<Long, Integer> branchToAssocArt;
- private final Map<Long, String[]> branchToAliases;
- private final List<Triplet<Long, Long, Long>> srcDestMerge;
-
- protected AbstractBranchCacheMessage() {
- this.rows = new ArrayList<BranchRow>();
- this.childToParent = new HashMap<Long, Long>();
- this.branchToBaseTx = new HashMap<Long, Integer>();
- this.branchToSourceTx = new HashMap<Long, Integer>();
- this.branchToAssocArt = new HashMap<Long, Integer>();
- this.branchToAliases = new HashMap<Long, String[]>();
- this.srcDestMerge = new ArrayList<Triplet<Long, Long, Long>>();
- }
-
- public List<BranchRow> getBranchRows() {
- return rows;
- }
-
- public Map<Long, Long> getChildToParent() {
- return childToParent;
- }
-
- public Map<Long, Integer> getBranchToBaseTx() {
- return branchToBaseTx;
- }
-
- public Map<Long, Integer> getBranchToSourceTx() {
- return branchToSourceTx;
- }
-
- public Map<Long, Integer> getBranchToAssocArt() {
- return branchToAssocArt;
- }
-
- public Map<Long, String[]> getBranchAliases() {
- return branchToAliases;
- }
-
- public List<Triplet<Long, Long, Long>> getMergeBranches() {
- return srcDestMerge;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ArtifactTypeCacheUpdateResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ArtifactTypeCacheUpdateResponse.java
deleted file mode 100644
index 1d868d8fb3..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ArtifactTypeCacheUpdateResponse.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.List;
-import java.util.Map;
-import org.eclipse.osee.framework.core.enums.StorageState;
-import org.eclipse.osee.framework.jdk.core.type.Triplet;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ArtifactTypeCacheUpdateResponse {
-
- private final List<ArtifactTypeRow> rows;
- private final Map<Long, Long[]> baseToSuper;
- private final List<Triplet<Long, Long, Long>> artAttrs;
-
- public ArtifactTypeCacheUpdateResponse(List<ArtifactTypeRow> rows, Map<Long, Long[]> baseToSuper, List<Triplet<Long, Long, Long>> artAttrs) {
- this.rows = rows;
- this.baseToSuper = baseToSuper;
- this.artAttrs = artAttrs;
- }
-
- public List<ArtifactTypeRow> getArtTypeRows() {
- return rows;
- }
-
- public Map<Long, Long[]> getBaseToSuperTypes() {
- return baseToSuper;
- }
-
- public List<Triplet<Long, Long, Long>> getAttributeTypes() {
- return artAttrs;
- }
-
- public static final class ArtifactTypeRow {
- private final long id;
- private final String name;
- private final Long guid;
- private final boolean isAbstract;
- private StorageState storageState;
-
- public ArtifactTypeRow(long id, long guid, String name, boolean isAbstract, StorageState storageState) {
- this.id = id;
- this.guid = guid;
- this.name = name;
- this.isAbstract = isAbstract;
- this.storageState = storageState;
- }
-
- public long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public Long getGuid() {
- return guid;
- }
-
- public boolean isAbstract() {
- return isAbstract;
- }
-
- public StorageState getStorageState() {
- return storageState;
- }
-
- public void setStorageState(StorageState storageState) {
- this.storageState = storageState;
- }
-
- public String[] toArray() {
- return new String[] {
- String.valueOf(getId()),
- String.valueOf(getGuid()),
- getName(),
- String.valueOf(isAbstract()),
- getStorageState().name()};
- }
-
- public static ArtifactTypeRow fromArray(String[] data) {
- long id = Long.valueOf(data[0]);
- long remoteId = Long.parseLong(data[1]);
- String name = data[2];
- boolean isAbstract = Boolean.valueOf(data[3]);
- StorageState storageState = StorageState.valueOf(data[4]);
- return new ArtifactTypeRow(id, remoteId, name, isAbstract, storageState);
- }
-
- @Override
- public String toString() {
- return String.format("%s (%s)", name, guid);
- }
- }
-
- @Override
- public String toString() {
- return "ArtifactTypeCacheUpdateResponse [artAttrs=" + artAttrs + ", baseToSuper=" + baseToSuper + ", rows=" + rows + "]";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AttributeTypeCacheUpdateResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AttributeTypeCacheUpdateResponse.java
deleted file mode 100644
index ec608d0fc4..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/AttributeTypeCacheUpdateResponse.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.List;
-import java.util.Map;
-import org.eclipse.osee.framework.core.model.type.AttributeType;
-
-/**
- * @author Roberto E. Escobar
- */
-public class AttributeTypeCacheUpdateResponse {
-
- private final List<AttributeType> rows;
- private final Map<Long, Long> attrToEnum;
-
- public AttributeTypeCacheUpdateResponse(List<AttributeType> rows, Map<Long, Long> attrToEnum) {
- this.rows = rows;
- this.attrToEnum = attrToEnum;
- }
-
- public List<AttributeType> getAttrTypeRows() {
- return rows;
- }
-
- public Map<Long, Long> getAttrToEnums() {
- return attrToEnum;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java
deleted file mode 100644
index c3d58f07c2..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import org.eclipse.osee.framework.core.enums.BranchArchivedState;
-import org.eclipse.osee.framework.core.enums.BranchState;
-import org.eclipse.osee.framework.core.enums.BranchType;
-import org.eclipse.osee.framework.core.enums.StorageState;
-
-public final class BranchRow {
- private final long branchUuid;
-
- private final String branchName;
- private final BranchType branchType;
- private final BranchState branchState;
- private final BranchArchivedState branchArchived;
- private final StorageState storageState;
- private final boolean inheritAccessControl;
-
- public BranchRow(long branchUuid, String branchName, BranchType branchType, BranchState branchState, BranchArchivedState branchArchived, StorageState storageState, boolean inheritAccessControl) {
- this.branchUuid = branchUuid;
- this.branchName = branchName;
- this.branchType = branchType;
- this.branchState = branchState;
- this.branchArchived = branchArchived;
- this.storageState = storageState;
- this.inheritAccessControl = inheritAccessControl;
- }
-
- public long getBranchId() {
- return branchUuid;
- }
-
- public String getBranchName() {
- return branchName;
- }
-
- public BranchType getBranchType() {
- return branchType;
- }
-
- public BranchState getBranchState() {
- return branchState;
- }
-
- public BranchArchivedState getBranchArchived() {
- return branchArchived;
- }
-
- public StorageState getStorageState() {
- return storageState;
- }
-
- public boolean isInheritAccessControl() {
- return inheritAccessControl;
- }
-
- public String[] toArray() {
- return new String[] {
- getBranchArchived().name(),
- String.valueOf(getBranchId()),
- getBranchName(),
- getBranchState().name(),
- getBranchType().name(),
- getStorageState().name(),
- Boolean.toString(isInheritAccessControl())};
- }
-
- public static BranchRow fromArray(String[] data) {
- BranchArchivedState archived = BranchArchivedState.valueOf(data[0]);
- long branchUuid = Long.valueOf(data[1]);
- String branchName = data[2];
- BranchState branchState = BranchState.valueOf(data[3]);
- BranchType branchType = BranchType.valueOf(data[4]);
- StorageState storageState = StorageState.valueOf(data[5]);
- boolean inheritAccessControl = Boolean.parseBoolean(data[6]);
- return new BranchRow(branchUuid, branchName, branchType, branchState, archived, storageState,
- inheritAccessControl);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/CacheUpdateRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/CacheUpdateRequest.java
deleted file mode 100644
index fc0c0661e3..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/CacheUpdateRequest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.Collection;
-import java.util.Collections;
-import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
-
-/**
- * @author Roberto E. Escobar
- * @author Jeff C. Phillips
- */
-public class CacheUpdateRequest {
-
- private final OseeCacheEnum cacheId;
- private final Collection<Integer> itemsIds;
-
- public CacheUpdateRequest(OseeCacheEnum cacheId) {
- this(cacheId, Collections.<Integer> emptyList());
- }
-
- public CacheUpdateRequest(OseeCacheEnum cacheId, Collection<Integer> itemsIds) {
- this.cacheId = cacheId;
- this.itemsIds = itemsIds;
- }
-
- public OseeCacheEnum getCacheId() {
- return cacheId;
- }
-
- public Collection<Integer> getItemsIds() {
- return itemsIds;
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/OseeEnumTypeCacheUpdateResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/OseeEnumTypeCacheUpdateResponse.java
deleted file mode 100644
index b3285038c4..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/OseeEnumTypeCacheUpdateResponse.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.List;
-
-/**
- * @author Roberto E. Escobar
- * @author Ryan D. Brooks
- */
-public class OseeEnumTypeCacheUpdateResponse {
- private final List<String[]> enumTypeRows;
- private final List<String[]> enumEntryRows;
-
- public OseeEnumTypeCacheUpdateResponse(List<String[]> enumTypeRows, List<String[]> enumEntryRows) {
- this.enumTypeRows = enumTypeRows;
- this.enumEntryRows = enumEntryRows;
- }
-
- public List<String[]> getEnumTypeRows() {
- return enumTypeRows;
- }
-
- public List<String[]> getEnumEntryRows() {
- return enumEntryRows;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/RelationTypeCacheUpdateResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/RelationTypeCacheUpdateResponse.java
deleted file mode 100644
index 2f49b81a14..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/RelationTypeCacheUpdateResponse.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.List;
-import org.eclipse.osee.framework.core.enums.RelationTypeMultiplicity;
-import org.eclipse.osee.framework.core.enums.StorageState;
-
-/**
- * @author Roberto E. Escobar
- */
-public class RelationTypeCacheUpdateResponse {
-
- private final List<RelationTypeRow> rows;
-
- public RelationTypeCacheUpdateResponse(List<RelationTypeRow> rows) {
- this.rows = rows;
- }
-
- public List<RelationTypeRow> getRelationTypeRows() {
- return rows;
- }
-
- public static final class RelationTypeRow {
- private final long id;
- private final String name;
- private final long guid;
- private StorageState storageState;
-
- private final String sideAName;
- private final String sideBName;
- private final long artifactTypeSideA;
- private final long artifactTypeSideB;
- private final RelationTypeMultiplicity multiplicity;
- private final String defaultOrderTypeGuid;
-
- public RelationTypeRow(long id, String name, long guid, StorageState storageState, String sideAName, String sideBName, long artifactTypeSideA, long artifactTypeSideB, RelationTypeMultiplicity multiplicity, String defaultOrderTypeGuid) {
- super();
- this.id = id;
- this.name = name;
- this.guid = guid;
- this.storageState = storageState;
- this.sideAName = sideAName;
- this.sideBName = sideBName;
- this.artifactTypeSideA = artifactTypeSideA;
- this.artifactTypeSideB = artifactTypeSideB;
- this.multiplicity = multiplicity;
- this.defaultOrderTypeGuid = defaultOrderTypeGuid;
- }
-
- public long getArtifactTypeSideA() {
- return artifactTypeSideA;
- }
-
- public long getArtifactTypeSideB() {
- return artifactTypeSideB;
- }
-
- public long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public long getGuid() {
- return guid;
- }
-
- public StorageState getStorageState() {
- return storageState;
- }
-
- public void setStorageState(StorageState storageState) {
- this.storageState = storageState;
- }
-
- public String getSideBName() {
- return sideBName;
- }
-
- public String getSideAName() {
- return sideAName;
- }
-
- public String getDefaultOrderTypeGuid() {
- return defaultOrderTypeGuid;
- }
-
- public RelationTypeMultiplicity getMultiplicity() {
- return multiplicity;
- }
-
- public String[] toArray() {
- return new String[] {
- String.valueOf(getId()),
- String.valueOf(getGuid()),
- getName(),
- getStorageState().name(),
- getSideAName(),
- getSideBName(),
- String.valueOf(getArtifactTypeSideA()),
- String.valueOf(getArtifactTypeSideB()),
- getMultiplicity().name(),
- getDefaultOrderTypeGuid()};
- }
-
- public static RelationTypeRow fromArray(String[] data) {
- int index = 0;
-
- long id = Long.valueOf(data[index++]);
- long guid = Long.valueOf(data[index++]);
- String name = data[index++];
- StorageState storageState = StorageState.valueOf(data[index++]);
-
- String sideAName = data[index++];
- String sideBName = data[index++];
- long artifactTypeSideA = Long.valueOf(data[index++]);
- long artifactTypeSideB = Long.valueOf(data[index++]);
- RelationTypeMultiplicity multiplicity = RelationTypeMultiplicity.valueOf(data[index++]);
- String defaultOrderTypeGuid = data[index++];
-
- return new RelationTypeRow(id, name, guid, storageState, sideAName, sideBName, artifactTypeSideA,
- artifactTypeSideB, multiplicity, defaultOrderTypeGuid);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java
deleted file mode 100644
index 7b2bd95472..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.osee.framework.core.model.TransactionRecord;
-import org.eclipse.osee.framework.core.model.TransactionRecordFactory;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-
-/**
- * @author Roberto E. Escobar
- */
-public class TransactionCacheUpdateResponse {
-
- private final List<TransactionRecord> rows;
-
- public TransactionCacheUpdateResponse(List<TransactionRecord> rows) {
- this.rows = rows;
- }
-
- public List<TransactionRecord> getTxRows() {
- return rows;
- }
-
- public static TransactionCacheUpdateResponse fromCache(TransactionRecordFactory factory, Collection<TransactionRecord> types) throws OseeCoreException {
- List<TransactionRecord> rows = new ArrayList<TransactionRecord>();
- for (TransactionRecord tx : types) {
- rows.add(factory.create(tx.getId(), tx.getBranchId(), tx.getComment(), tx.getTimeStamp(), tx.getAuthor(),
- tx.getCommit(), tx.getTxType(), null));
- }
- return new TransactionCacheUpdateResponse(rows);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java
index d6e70b3381..576127312d 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java
@@ -11,14 +11,9 @@
package org.eclipse.osee.framework.core.message.internal;
import org.eclipse.osee.framework.core.enums.CoreTranslatorId;
-import org.eclipse.osee.framework.core.message.internal.translation.ArtifactTypeCacheUpdateResponseTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.AttributeTypeCacheUpdateResponseTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.CacheUpdateRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.DatastoreInitRequestTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.OseeEnumTypeCacheUpdateResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelResponseTranslator;
-import org.eclipse.osee.framework.core.message.internal.translation.RelationTypeCacheUpdateResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.TableDataTranslator;
import org.eclipse.osee.framework.core.model.type.AttributeTypeFactory;
import org.eclipse.osee.framework.core.translation.IDataTranslationService;
@@ -35,20 +30,6 @@ public class DataTranslationServiceFactory {
}
public void configureService(IDataTranslationService service, AttributeTypeFactory attributeTypeFactory) throws OseeCoreException {
- service.addTranslator(new CacheUpdateRequestTranslator(), CoreTranslatorId.OSEE_CACHE_UPDATE_REQUEST);
-
- service.addTranslator(new ArtifactTypeCacheUpdateResponseTranslator(),
- CoreTranslatorId.ARTIFACT_TYPE_CACHE_UPDATE_RESPONSE);
-
- service.addTranslator(new AttributeTypeCacheUpdateResponseTranslator(attributeTypeFactory),
- CoreTranslatorId.ATTRIBUTE_TYPE_CACHE_UPDATE_RESPONSE);
-
- service.addTranslator(new RelationTypeCacheUpdateResponseTranslator(),
- CoreTranslatorId.RELATION_TYPE_CACHE_UPDATE_RESPONSE);
-
- service.addTranslator(new OseeEnumTypeCacheUpdateResponseTranslator(),
- CoreTranslatorId.OSEE_ENUM_TYPE_CACHE_UPDATE_RESPONSE);
-
service.addTranslator(new OseeImportModelRequestTranslator(), CoreTranslatorId.OSEE_IMPORT_MODEL_REQUEST);
service.addTranslator(new OseeImportModelResponseTranslator(service), CoreTranslatorId.OSEE_IMPORT_MODEL_RESPONSE);
service.addTranslator(new TableDataTranslator(), CoreTranslatorId.TABLE_DATA);
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ArtifactTypeCacheUpdateResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ArtifactTypeCacheUpdateResponseTranslator.java
deleted file mode 100644
index fd67c6bd35..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ArtifactTypeCacheUpdateResponseTranslator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.internal.translation;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.osee.framework.core.message.ArtifactTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.ArtifactTypeCacheUpdateResponse.ArtifactTypeRow;
-import org.eclipse.osee.framework.core.message.TranslationUtil;
-import org.eclipse.osee.framework.core.translation.ITranslator;
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-import org.eclipse.osee.framework.jdk.core.type.Triplet;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ArtifactTypeCacheUpdateResponseTranslator implements ITranslator<ArtifactTypeCacheUpdateResponse> {
-
- private static enum Fields {
- ITEM_COUNT,
- ITEM_ROW,
- BASE_TO_SUPER_TYPES,
- BASE_BRANCH_ATTR;
- }
-
- @Override
- public ArtifactTypeCacheUpdateResponse convert(PropertyStore store) {
- List<ArtifactTypeRow> rows = new ArrayList<ArtifactTypeRow>();
- Map<Long, Long[]> baseToSuper = new HashMap<Long, Long[]>();
- List<Triplet<Long, Long, Long>> artAttrs = new ArrayList<Triplet<Long, Long, Long>>();
-
- int rowCount = store.getInt(Fields.ITEM_COUNT.name());
- for (int index = 0; index < rowCount; index++) {
- String[] rowData = store.getArray(createKey(Fields.ITEM_ROW, index));
- rows.add(ArtifactTypeRow.fromArray(rowData));
- }
-
- TranslationUtil.loadLongArrayMap(baseToSuper, store, Fields.BASE_TO_SUPER_TYPES);
- TranslationUtil.loadTripletLongList(artAttrs, store, Fields.BASE_BRANCH_ATTR);
- return new ArtifactTypeCacheUpdateResponse(rows, baseToSuper, artAttrs);
- }
-
- @Override
- public PropertyStore convert(ArtifactTypeCacheUpdateResponse object) {
- PropertyStore store = new PropertyStore();
- List<ArtifactTypeRow> rows = object.getArtTypeRows();
- for (int index = 0; index < rows.size(); index++) {
- ArtifactTypeRow row = rows.get(index);
- store.put(createKey(Fields.ITEM_ROW, index), row.toArray());
- }
- store.put(Fields.ITEM_COUNT.name(), rows.size());
-
- TranslationUtil.putLongArrayMap(store, Fields.BASE_TO_SUPER_TYPES, object.getBaseToSuperTypes());
- TranslationUtil.putTripletLongList(store, Fields.BASE_BRANCH_ATTR, object.getAttributeTypes());
- return store;
- }
-
- private String createKey(Fields key, int index) {
- return String.format("%s_%s", key.name(), index);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/AttributeTypeCacheUpdateResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/AttributeTypeCacheUpdateResponseTranslator.java
deleted file mode 100644
index 87ca0027e5..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/AttributeTypeCacheUpdateResponseTranslator.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.internal.translation;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.osee.framework.core.enums.StorageState;
-import org.eclipse.osee.framework.core.message.AttributeTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.TranslationUtil;
-import org.eclipse.osee.framework.core.model.type.AttributeType;
-import org.eclipse.osee.framework.core.model.type.AttributeTypeFactory;
-import org.eclipse.osee.framework.core.translation.ITranslator;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-
-/**
- * @author Roberto E. Escobar
- */
-public class AttributeTypeCacheUpdateResponseTranslator implements ITranslator<AttributeTypeCacheUpdateResponse> {
-
- private static enum Fields {
- ROW_COUNT,
- ROW,
- ATTR_TO_ENUM;
- }
-
- private final AttributeTypeFactory attributeTypeFactory;
-
- public AttributeTypeCacheUpdateResponseTranslator(AttributeTypeFactory attributeTypeFactory) {
- this.attributeTypeFactory = attributeTypeFactory;
- }
-
- private AttributeTypeFactory getFactory() {
- return attributeTypeFactory;
- }
-
- @Override
- public AttributeTypeCacheUpdateResponse convert(PropertyStore store) throws OseeCoreException {
- List<AttributeType> rows = new ArrayList<AttributeType>();
- int rowCount = store.getInt(Fields.ROW_COUNT.name());
- AttributeTypeFactory factory = getFactory();
- for (int index = 0; index < rowCount; index++) {
- String[] rowData = store.getArray(createKey(Fields.ROW, index));
- rows.add(createfromArray(factory, rowData));
- }
- Map<Long, Long> attrToEnum = new HashMap<Long, Long>();
- TranslationUtil.loadMapLong(attrToEnum, store, Fields.ATTR_TO_ENUM);
- return new AttributeTypeCacheUpdateResponse(rows, attrToEnum);
- }
-
- @Override
- public PropertyStore convert(AttributeTypeCacheUpdateResponse object) {
- PropertyStore store = new PropertyStore();
- List<AttributeType> rows = object.getAttrTypeRows();
- for (int index = 0; index < rows.size(); index++) {
- AttributeType row = rows.get(index);
- store.put(createKey(Fields.ROW, index), toArray(row));
- }
- store.put(Fields.ROW_COUNT.name(), rows.size());
-
- TranslationUtil.putMapLong(store, Fields.ATTR_TO_ENUM, object.getAttrToEnums());
- return store;
- }
-
- private String createKey(Fields key, int index) {
- return String.format("%s_%s", key.name(), index);
- }
-
- private String[] toArray(AttributeType type) {
- return new String[] {
- type.getAttributeProviderId(),
- type.getBaseAttributeTypeId(),
- type.getDefaultValue(),
- type.getDescription(),
- type.getFileTypeExtension(),
- String.valueOf(type.getGuid()),
- String.valueOf(type.getId()),
- String.valueOf(type.getMaxOccurrences()),
- String.valueOf(type.getMinOccurrences()),
- type.getStorageState().name(),
- type.getName(),
- type.getTaggerId(),
- type.getMediaType()};
- }
-
- private AttributeType createfromArray(AttributeTypeFactory factory, String[] data) throws OseeCoreException {
- String attributeProviderId = data[0];
- String baseAttributeTypeId = data[1];
- String defaultValue = data[2];
- String description = data[3];
- String fileTypeExtension = data[4];
- long remoteId = Long.valueOf(data[5]);
- long uniqueId = Long.valueOf(data[6]);
- int maxOccurrences = Integer.valueOf(data[7]);
- int minOccurrences = Integer.valueOf(data[8]);
- StorageState storageState = StorageState.valueOf(data[9]);
- String name = data[10];
- String taggerId = data[11];
- String mediaType = data[12];
-
- AttributeType type =
- factory.create(remoteId, name, baseAttributeTypeId, attributeProviderId, fileTypeExtension, defaultValue,
- minOccurrences, maxOccurrences, description, taggerId, mediaType);
- type.setId(uniqueId);
- type.setStorageState(storageState);
- return type;
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/CacheUpdateRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/CacheUpdateRequestTranslator.java
deleted file mode 100644
index 24177477df..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/CacheUpdateRequestTranslator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.internal.translation;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
-import org.eclipse.osee.framework.core.message.CacheUpdateRequest;
-import org.eclipse.osee.framework.core.translation.ITranslator;
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-
-/**
- * @author Roberto E. Escobar
- * @author Jeff C. Phillips
- */
-public class CacheUpdateRequestTranslator implements ITranslator<CacheUpdateRequest> {
-
- private static enum Entry {
- CACHE_ID,
- ITEM_IDS;
- }
-
- @Override
- public CacheUpdateRequest convert(PropertyStore propertyStore) {
- OseeCacheEnum cacheId = OseeCacheEnum.valueOf(propertyStore.get(Entry.CACHE_ID.name()));
- String[] itemId = propertyStore.getArray(Entry.ITEM_IDS.name());
- List<Integer> itemIds = new ArrayList<Integer>();
- if (itemId != null && itemId.length > 0) {
- for (String item : itemId) {
- if (item != null) {
- itemIds.add(Integer.valueOf(item));
- }
- }
- }
- return new CacheUpdateRequest(cacheId, itemIds);
- }
-
- @Override
- public PropertyStore convert(CacheUpdateRequest object) {
- PropertyStore store = new PropertyStore();
-
- store.put(Entry.CACHE_ID.name(), object.getCacheId().name());
- Collection<Integer> itemIds = object.getItemsIds();
- if (!itemIds.isEmpty()) {
- String[] itemStr = new String[itemIds.size()];
- int index = 0;
- for (Integer item : itemIds) {
- itemStr[index++] = String.valueOf(item);
- }
- store.put(Entry.ITEM_IDS.name(), itemStr);
- }
- return store;
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/OseeEnumTypeCacheUpdateResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/OseeEnumTypeCacheUpdateResponseTranslator.java
deleted file mode 100644
index cd96699e68..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/OseeEnumTypeCacheUpdateResponseTranslator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.internal.translation;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.framework.core.message.OseeEnumTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.translation.ITranslator;
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OseeEnumTypeCacheUpdateResponseTranslator implements ITranslator<OseeEnumTypeCacheUpdateResponse> {
-
- private static enum Fields {
- ENUM_TYPE_ROW,
- ENUM_TYPE_COUNT,
- ENUM_ENTRY_ROW,
- ENUM_ENTRY_COUNT;
- }
-
- @Override
- public OseeEnumTypeCacheUpdateResponse convert(PropertyStore store) {
-
- int enumTypeRowCount = store.getInt(Fields.ENUM_TYPE_COUNT.name());
- List<String[]> enumTypeRows = new ArrayList<String[]>(enumTypeRowCount);
-
- for (int index = 0; index < enumTypeRowCount; index++) {
- String[] rowData = store.getArray(createKey(Fields.ENUM_TYPE_ROW, index));
- enumTypeRows.add(rowData);
- }
-
- int enumEntryRowCount = store.getInt(Fields.ENUM_ENTRY_COUNT.name());
- List<String[]> enumEntryRows = new ArrayList<String[]>(enumEntryRowCount);
-
- for (int index = 0; index < enumEntryRowCount; index++) {
- String[] rowData = store.getArray(createKey(Fields.ENUM_ENTRY_ROW, index));
- enumEntryRows.add(rowData);
- }
-
- return new OseeEnumTypeCacheUpdateResponse(enumTypeRows, enumEntryRows);
- }
-
- @Override
- public PropertyStore convert(OseeEnumTypeCacheUpdateResponse response) {
- PropertyStore store = new PropertyStore();
-
- List<String[]> enumTypeRows = response.getEnumTypeRows();
- for (int index = 0; index < enumTypeRows.size(); index++) {
- store.put(createKey(Fields.ENUM_TYPE_ROW, index), enumTypeRows.get(index));
- }
- store.put(Fields.ENUM_TYPE_COUNT.name(), enumTypeRows.size());
-
- List<String[]> enumEntryRows = response.getEnumEntryRows();
- for (int index = 0; index < enumEntryRows.size(); index++) {
- store.put(createKey(Fields.ENUM_ENTRY_ROW, index), enumEntryRows.get(index));
- }
- store.put(Fields.ENUM_ENTRY_COUNT.name(), enumEntryRows.size());
-
- return store;
- }
-
- private String createKey(Fields key, int index) {
- return String.format("%s_%s", key.name(), index);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/RelationTypeCacheUpdateResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/RelationTypeCacheUpdateResponseTranslator.java
deleted file mode 100644
index 2caf117500..0000000000
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/RelationTypeCacheUpdateResponseTranslator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.message.internal.translation;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.framework.core.message.RelationTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.RelationTypeCacheUpdateResponse.RelationTypeRow;
-import org.eclipse.osee.framework.core.translation.ITranslator;
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-
-/**
- * @author Roberto E. Escobar
- */
-public class RelationTypeCacheUpdateResponseTranslator implements ITranslator<RelationTypeCacheUpdateResponse> {
-
- private static enum Fields {
- COUNT,
- ROW
- }
-
- @Override
- public RelationTypeCacheUpdateResponse convert(PropertyStore store) {
- List<RelationTypeRow> rows = new ArrayList<RelationTypeRow>();
- int rowCount = store.getInt(Fields.COUNT.name());
- for (int index = 0; index < rowCount; index++) {
- String[] rowData = store.getArray(createKey(Fields.ROW, index));
- rows.add(RelationTypeRow.fromArray(rowData));
- }
- return new RelationTypeCacheUpdateResponse(rows);
- }
-
- @Override
- public PropertyStore convert(RelationTypeCacheUpdateResponse object) {
- PropertyStore store = new PropertyStore();
- List<RelationTypeRow> rows = object.getRelationTypeRows();
- for (int index = 0; index < rows.size(); index++) {
- RelationTypeRow row = rows.get(index);
- store.put(createKey(Fields.ROW, index), row.toArray());
- }
- store.put(Fields.COUNT.name(), rows.size());
- return store;
- }
-
- private String createKey(Fields key, int index) {
- return String.format("%s_%s", key.name(), index);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreTranslatorId.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreTranslatorId.java
index 4b5e4df1a0..a56151f6d1 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreTranslatorId.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreTranslatorId.java
@@ -22,16 +22,7 @@ public enum CoreTranslatorId implements ITranslatorId {
OSEE_IMPORT_MODEL_REQUEST,
OSEE_IMPORT_MODEL_RESPONSE,
- OSEE_CACHE_UPDATE_REQUEST,
- ARTIFACT_TYPE_CACHE_UPDATE_RESPONSE,
- ATTRIBUTE_TYPE_CACHE_UPDATE_RESPONSE,
- RELATION_TYPE_CACHE_UPDATE_RESPONSE,
- OSEE_ENUM_TYPE_CACHE_UPDATE_RESPONSE,
-
- TRANSACTION_RECORD,
- TABLE_DATA,
-
- STATUS_RESPONSE;
+ TABLE_DATA;
@Override
public String getKey() {
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
deleted file mode 100644
index b60d488434..0000000000
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.manager.servlet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.data.IRelationType;
-import org.eclipse.osee.framework.core.enums.CacheOperation;
-import org.eclipse.osee.framework.core.enums.CoreTranslatorId;
-import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
-import org.eclipse.osee.framework.core.enums.RelationTypeMultiplicity;
-import org.eclipse.osee.framework.core.enums.StorageState;
-import org.eclipse.osee.framework.core.exception.OseeExceptions;
-import org.eclipse.osee.framework.core.message.ArtifactTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.ArtifactTypeCacheUpdateResponse.ArtifactTypeRow;
-import org.eclipse.osee.framework.core.message.AttributeTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.CacheUpdateRequest;
-import org.eclipse.osee.framework.core.message.OseeEnumTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.RelationTypeCacheUpdateResponse;
-import org.eclipse.osee.framework.core.message.RelationTypeCacheUpdateResponse.RelationTypeRow;
-import org.eclipse.osee.framework.core.model.type.AttributeType;
-import org.eclipse.osee.framework.core.server.UnsecuredOseeHttpServlet;
-import org.eclipse.osee.framework.core.translation.IDataTranslationService;
-import org.eclipse.osee.framework.core.translation.ITranslatorId;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.type.Pair;
-import org.eclipse.osee.framework.jdk.core.type.Triplet;
-import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.framework.manager.servlet.internal.ApplicationContextFactory;
-import org.eclipse.osee.logger.Log;
-import org.eclipse.osee.orcs.ApplicationContext;
-import org.eclipse.osee.orcs.OrcsApi;
-import org.eclipse.osee.orcs.OrcsTypes;
-import org.eclipse.osee.orcs.data.ArtifactTypes;
-import org.eclipse.osee.orcs.data.AttributeTypes;
-import org.eclipse.osee.orcs.data.EnumEntry;
-import org.eclipse.osee.orcs.data.EnumType;
-import org.eclipse.osee.orcs.data.EnumTypes;
-import org.eclipse.osee.orcs.data.RelationTypes;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
-
- private static final long serialVersionUID = 6693534844874109524L;
- private final IDataTranslationService translationService;
- private final OrcsApi orcsApi;
- private static final StorageState DEFAULT_STORAGE_STATE = StorageState.CREATED;
-
- public OseeCacheServlet(Log logger, IDataTranslationService translationService, OrcsApi orcsApi) {
- super(logger);
- this.translationService = translationService;
- this.orcsApi = orcsApi;
- }
-
- public IDataTranslationService getTranslationService() {
- return translationService;
- }
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
- OseeCacheEnum cacheId = OseeCacheEnum.valueOf(req.getParameter("cacheId"));
- try {
- IDataTranslationService service = getTranslationService();
- ApplicationContext context = createAppContext(req);
- OrcsTypes orcsTypes = orcsApi.getOrcsTypes(context);
- Pair<Object, ITranslatorId> pair = createResponse(new CacheUpdateRequest(cacheId), orcsTypes);
- resp.setStatus(HttpServletResponse.SC_ACCEPTED);
- resp.setContentType("text/xml");
- resp.setCharacterEncoding("UTF-8");
- InputStream inputStream = service.convertToStream(pair.getFirst(), pair.getSecond());
- OutputStream outputStream = resp.getOutputStream();
- Lib.inputStreamToOutputStream(inputStream, outputStream);
- } catch (Exception ex) {
- getLogger().error(ex, "Error acquiring cache [%s]", cacheId);
- }
- }
-
- @Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
- try {
- CacheOperation operation = CacheOperation.fromString(req.getParameter("function"));
- switch (operation) {
- case UPDATE:
- ApplicationContext context = createAppContext(req);
- OrcsTypes orcsTypes = orcsApi.getOrcsTypes(context);
- sendUpdates(req, resp, orcsTypes);
- break;
- default:
- throw new UnsupportedOperationException();
- }
- } catch (Exception ex) {
- handleError(resp, req.toString(), ex);
- }
- }
-
- private ApplicationContext createAppContext(HttpServletRequest req) {
- String sessionId = req.getParameter("sessionId");
- return ApplicationContextFactory.createContext(sessionId);
- }
-
- private void handleError(HttpServletResponse resp, String request, Throwable th) throws IOException {
- getLogger().error(th, "Osee Cache request error: [%s]", request);
- resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- resp.setContentType("text/plain");
- resp.getWriter().write(Lib.exceptionToString(th));
- resp.getWriter().flush();
- resp.getWriter().close();
- }
-
- private void sendUpdates(HttpServletRequest req, HttpServletResponse resp, OrcsTypes orcsTypes) throws OseeCoreException {
- IDataTranslationService service = getTranslationService();
-
- CacheUpdateRequest updateRequest = null;
- InputStream inputStream = null;
- try {
- inputStream = req.getInputStream();
- updateRequest = service.convert(inputStream, CoreTranslatorId.OSEE_CACHE_UPDATE_REQUEST);
- } catch (IOException ex) {
- OseeExceptions.wrapAndThrow(ex);
- } finally {
- Lib.close(inputStream);
- }
-
- OutputStream outputStream = null;
- try {
- Pair<Object, ITranslatorId> pair = createResponse(updateRequest, orcsTypes);
-
- resp.setStatus(HttpServletResponse.SC_ACCEPTED);
- resp.setContentType("text/xml");
- resp.setCharacterEncoding("UTF-8");
-
- inputStream = service.convertToStream(pair.getFirst(), pair.getSecond());
- outputStream = resp.getOutputStream();
- Lib.inputStreamToOutputStream(inputStream, outputStream);
- } catch (IOException ex) {
- OseeExceptions.wrapAndThrow(ex);
- }
- }
-
- private Pair<Object, ITranslatorId> createResponse(CacheUpdateRequest updateRequest, OrcsTypes orcsTypes) throws OseeCoreException {
- Object response = null;
- ITranslatorId transalatorId = null;
- switch (updateRequest.getCacheId()) {
- case ARTIFACT_TYPE_CACHE:
- response = createArtifactTypeCacheUpdateResponse(orcsTypes);
- transalatorId = CoreTranslatorId.ARTIFACT_TYPE_CACHE_UPDATE_RESPONSE;
- break;
- case ATTRIBUTE_TYPE_CACHE:
- response = createAttributeTypeCacheUpdateResponse(orcsTypes);
- transalatorId = CoreTranslatorId.ATTRIBUTE_TYPE_CACHE_UPDATE_RESPONSE;
- break;
- case OSEE_ENUM_TYPE_CACHE:
- response = createOseeEnumTypeCacheUpdateResponse(orcsTypes);
- transalatorId = CoreTranslatorId.OSEE_ENUM_TYPE_CACHE_UPDATE_RESPONSE;
- break;
- case RELATION_TYPE_CACHE:
- response = createRelationTypeCacheUpdateResponse(orcsTypes);
- transalatorId = CoreTranslatorId.RELATION_TYPE_CACHE_UPDATE_RESPONSE;
- break;
- default:
- throw new OseeArgumentException("Invalid cacheId [%s]", updateRequest.getCacheId());
- }
- return new Pair<Object, ITranslatorId>(response, transalatorId);
- }
-
- private ArtifactTypeCacheUpdateResponse createArtifactTypeCacheUpdateResponse(OrcsTypes orcsTypes) throws OseeCoreException {
- List<ArtifactTypeRow> rows = new ArrayList<ArtifactTypeRow>();
- Map<Long, Long[]> baseToSuper = new HashMap<Long, Long[]>();
- List<Triplet<Long, Long, Long>> artAttrs = new ArrayList<Triplet<Long, Long, Long>>();
- ArtifactTypes artTypes = orcsTypes.getArtifactTypes();
- for (IArtifactType artType : artTypes.getAll()) {
- long artTypeId = 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()) {
- Long[] intSuperTypes = new Long[superTypes.size()];
- int index = 0;
- for (IArtifactType superType : superTypes) {
- intSuperTypes[index++] = superType.getGuid();
- }
- baseToSuper.put(artTypeId, intSuperTypes);
- }
-
- Map<IOseeBranch, Collection<IAttributeType>> allTypes = artTypes.getAllAttributeTypes(artType);
- for (Entry<IOseeBranch, Collection<IAttributeType>> entry : allTypes.entrySet()) {
- IOseeBranch branch = entry.getKey();
- Collection<IAttributeType> attrTypes = entry.getValue();
- for (IAttributeType type : attrTypes) {
- artAttrs.add(new Triplet<Long, Long, Long>(artType.getGuid(), branch.getUuid(), type.getGuid()));
- }
-
- }
- }
- return new ArtifactTypeCacheUpdateResponse(rows, baseToSuper, artAttrs);
- }
-
- private AttributeTypeCacheUpdateResponse createAttributeTypeCacheUpdateResponse(OrcsTypes orcsTypes) throws OseeCoreException {
- List<AttributeType> rows = new ArrayList<AttributeType>();
- Map<Long, Long> attrToEnum = new HashMap<Long, Long>();
- AttributeTypes attrTypes = orcsTypes.getAttributeTypes();
- for (IAttributeType item : attrTypes.getAll()) {
- String baseAttributeTypeId = attrTypes.getBaseAttributeTypeId(item);
- String attributeProviderNameId = attrTypes.getAttributeProviderId(item);
- String fileTypeExtension = attrTypes.getFileTypeExtension(item);
- String defaultValue = attrTypes.getDefaultValue(item);
- int minOccurrances = attrTypes.getMinOccurrences(item);
- int maxOccurrences = attrTypes.getMaxOccurrences(item);
- String description = attrTypes.getDescription(item);
- String taggerId = attrTypes.getTaggerId(item);
- String mediaType = attrTypes.getMediaType(item);
- AttributeType type =
- new AttributeType(item.getGuid(), item.getName(), baseAttributeTypeId, attributeProviderNameId,
- fileTypeExtension, defaultValue, minOccurrances, maxOccurrences, description, taggerId, mediaType);
-
- long typeId = item.getGuid();
- type.setId(typeId);
- rows.add(type);
-
- if (attrTypes.isEnumerated(item)) {
- EnumType enumType = attrTypes.getEnumType(item);
- attrToEnum.put(typeId, enumType.getGuid());
- }
-
- }
- return new AttributeTypeCacheUpdateResponse(rows, attrToEnum);
- }
-
- private RelationTypeCacheUpdateResponse createRelationTypeCacheUpdateResponse(OrcsTypes orcsTypes) throws OseeCoreException {
- List<RelationTypeRow> rows = new ArrayList<RelationTypeRow>();
- RelationTypes relTypes = orcsTypes.getRelationTypes();
- for (IRelationType item : relTypes.getAll()) {
- IArtifactType sideAType = relTypes.getArtifactTypeSideA(item);
- IArtifactType sideBType = relTypes.getArtifactTypeSideB(item);
-
- String sideAName = relTypes.getSideAName(item);
- String sideBName = relTypes.getSideBName(item);
- RelationTypeMultiplicity multiplicity = relTypes.getMultiplicity(item);
- String defaultOrderTypeGuid = relTypes.getDefaultOrderTypeGuid(item);
-
- rows.add(new RelationTypeRow(item.getGuid(), item.getName(), item.getGuid(), DEFAULT_STORAGE_STATE, sideAName,
- sideBName, sideAType.getGuid(), sideBType.getGuid(), multiplicity, defaultOrderTypeGuid));
- }
- return new RelationTypeCacheUpdateResponse(rows);
- }
-
- private OseeEnumTypeCacheUpdateResponse createOseeEnumTypeCacheUpdateResponse(OrcsTypes orcsTypes) throws OseeCoreException {
- List<String[]> enumTypeRows = new ArrayList<String[]>();
- List<String[]> enumEntryRows = new ArrayList<String[]>();
- EnumTypes enumTypes = orcsTypes.getEnumTypes();
- for (EnumType type : enumTypes.getAll()) {
- enumTypeRows.add(new String[] {
- String.valueOf(type.getGuid()),
- DEFAULT_STORAGE_STATE.toString(),
- String.valueOf(type.getGuid()),
- type.getName()});
- for (EnumEntry entry : type.values()) {
- enumEntryRows.add(new String[] {
- String.valueOf(type.getGuid()),
- entry.getName(),
- String.valueOf(entry.ordinal()),
- entry.getDescription()});
- }
- }
- return new OseeEnumTypeCacheUpdateResponse(enumTypeRows, enumEntryRows);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java
index 523265b583..695f4378e4 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java
@@ -25,7 +25,6 @@ import org.eclipse.osee.framework.manager.servlet.AtsServlet;
import org.eclipse.osee.framework.manager.servlet.BranchExchangeServlet;
import org.eclipse.osee.framework.manager.servlet.ConfigurationServlet;
import org.eclipse.osee.framework.manager.servlet.DataServlet;
-import org.eclipse.osee.framework.manager.servlet.OseeCacheServlet;
import org.eclipse.osee.framework.manager.servlet.OseeModelServlet;
import org.eclipse.osee.framework.manager.servlet.ResourceManagerServlet;
import org.eclipse.osee.framework.manager.servlet.SearchEngineTaggerServlet;
@@ -123,7 +122,6 @@ public class ServletRegistrationHandler {
register(new SessionManagementServlet(logger, sessionManager, authenticationManager, activityLog),
OseeServerContext.SESSION_CONTEXT);
register(new SessionClientLoopbackServlet(logger, sessionManager), OseeServerContext.CLIENT_LOOPBACK_CONTEXT);
- register(new OseeCacheServlet(logger, translationService, orcsApi), OseeServerContext.CACHE_CONTEXT);
register(new OseeModelServlet(logger, sessionManager, translationService, orcsApi),
OseeServerContext.OSEE_MODEL_CONTEXT);

Back to the top