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 /plugins/org.eclipse.osee.framework.core.message/src/org
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>
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org')
-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
14 files changed, 0 insertions, 970 deletions
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);
- }
-}

Back to the top