Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-09-10 04:40:59 +0000
committerRyan D. Brooks2017-09-12 18:24:12 +0000
commitfa5b684415321e793990878bbd96961a335af97c (patch)
tree0188a9859935496aaddc1139e15a55e617650b8d
parent397dfd0ab0aa53b33f787a32727c1f10fa82fce7 (diff)
downloadorg.eclipse.osee-fa5b684415321e793990878bbd96961a335af97c.tar.gz
org.eclipse.osee-fa5b684415321e793990878bbd96961a335af97c.tar.xz
org.eclipse.osee-fa5b684415321e793990878bbd96961a335af97c.zip
refactor: Reduce redundancy in client attribute hierarchy
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BooleanAttribute.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BranchReferenceAttribute.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CharacterBackedAttribute.java19
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CompressedContentAttribute.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/DateAttribute.java21
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/EnumeratedAttribute.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/FloatingPointAttribute.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IdentityReferenceAttribute.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IntegerAttribute.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/JavaObjectAttribute.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/LongAttribute.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OutlineNumberAttribute.java20
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/StringAttribute.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/WordAttribute.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/ICharacterAttributeDataProvider.java5
18 files changed, 49 insertions, 126 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java
index 5ea9d262a42..2ef85cb9763 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
+import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.event.res.AttributeEventModificationType;
@@ -113,6 +114,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, Attribut
}
public boolean setValue(T value) {
+ Conditions.checkNotNull(value, "Attribute value", "attribute id [%s]", getId());
checkIsRenameable(value);
boolean response = subClassSetValue(value);
if (response) {
@@ -122,10 +124,12 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, Attribut
}
protected boolean setFromStringNoDirty(String value) {
+ Conditions.checkNotNull(value, "Attribute value", "attribute id [%s]", getId());
return subClassSetValue(convertStringToValue(value));
}
public boolean setFromString(String value) throws OseeCoreException {
+ Conditions.checkNotNull(value, "Attribute value", "attribute id [%s]", getId());
return setValue(convertStringToValue(value));
}
@@ -141,6 +145,9 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, Attribut
}
}
+ /**
+ * @param value will be non-null
+ */
public abstract T convertStringToValue(String value);
public final void resetToDefaultValue() throws OseeCoreException {
@@ -168,7 +175,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, Attribut
/**
* Subclasses must provide an implementation of this method and in general should not override the other set value
- * methods
+ * methods. The value parameter will be non-null
*/
protected abstract boolean subClassSetValue(T value) throws OseeCoreException;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java
index 5f0fac240fd..f66abb112ce 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java
@@ -10,23 +10,10 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* @author Roberto E. Escobar
*/
public class ArtifactReferenceAttribute extends IdentityReferenceAttribute<Artifact> {
-
- Long rawValue;
-
- @Override
- protected boolean subClassSetValue(Artifact artifact) throws OseeCoreException {
- rawValue = artifact == null ? null : artifact.getUuid();
- return getAttributeDataProvider().setValue(artifact == null ? "" : artifact.getIdString());
- }
-
- public Long getRawValue() {
- return rawValue;
- }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BooleanAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BooleanAttribute.java
index a463d932cf5..7263f5bd2cd 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BooleanAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BooleanAttribute.java
@@ -24,13 +24,7 @@ public class BooleanAttribute extends CharacterBackedAttribute<Boolean> {
}
@Override
- public boolean subClassSetValue(Boolean value) throws OseeCoreException {
- return getAttributeDataProvider().setValue(value);
- }
-
- @Override
public Boolean convertStringToValue(String value) {
return Boolean.valueOf(value);
}
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BranchReferenceAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BranchReferenceAttribute.java
index 5f4a558ae2b..41e64d97fc3 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BranchReferenceAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/BranchReferenceAttribute.java
@@ -11,13 +11,6 @@
package org.eclipse.osee.framework.skynet.core.attribute;
import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
public class BranchReferenceAttribute extends IdentityReferenceAttribute<IOseeBranch> {
-
- @Override
- protected boolean subClassSetValue(IOseeBranch value) throws OseeCoreException {
- return getAttributeDataProvider().setValue(value == null ? "" : value.getIdString());
- }
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CharacterBackedAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CharacterBackedAttribute.java
index cb15abbb1be..4f067f49acc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CharacterBackedAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CharacterBackedAttribute.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
import org.eclipse.osee.framework.skynet.core.attribute.providers.ICharacterAttributeDataProvider;
@@ -23,4 +25,21 @@ public abstract class CharacterBackedAttribute<T> extends Attribute<T> {
// the super class is of type ICharacterAttributeDataProvider
return (ICharacterAttributeDataProvider) super.getAttributeDataProvider();
}
+
+ @Override
+ protected boolean subClassSetValue(T value) {
+ Class<?> clazz = getClass();
+ String superclassName = clazz.getSuperclass().getSimpleName();
+ while (!superclassName.equals("CharacterBackedAttribute") && !superclassName.equals("BinaryBackedAttribute")) {
+ clazz = clazz.getSuperclass();
+ superclassName = clazz.getSuperclass().getSimpleName();
+ }
+ Type persistentClass = ((ParameterizedType) clazz.getGenericSuperclass()).getActualTypeArguments()[0];
+ if (!persistentClass.getTypeName().equals(value.getClass().getName())) {
+ throw new ClassCastException(
+ persistentClass + " attribute subClassSetValue called with type " + value.getClass());
+ }
+
+ return getAttributeDataProvider().setValue(value);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CompressedContentAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CompressedContentAttribute.java
index 72add22cd62..c3d207cba1d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CompressedContentAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/CompressedContentAttribute.java
@@ -24,7 +24,7 @@ public final class CompressedContentAttribute extends BinaryAttribute<InputStrea
}
@Override
- public boolean subClassSetValue(InputStream value) throws OseeCoreException {
+ protected boolean subClassSetValue(InputStream value) {
return setValueFromInputStream(value);
}
@@ -32,12 +32,8 @@ public final class CompressedContentAttribute extends BinaryAttribute<InputStrea
public boolean setValueFromInputStream(InputStream value) throws OseeCoreException {
boolean response = false;
try {
- if (value == null) {
- response = getAttributeDataProvider().setValue(null);
- } else {
- byte[] data = Lib.inputStreamToBytes(value);
- response = getAttributeDataProvider().setValue(ByteBuffer.wrap(data));
- }
+ byte[] data = Lib.inputStreamToBytes(value);
+ response = getAttributeDataProvider().setValue(ByteBuffer.wrap(data));
} catch (IOException ex) {
OseeCoreException.wrapAndThrow(ex);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/DateAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/DateAttribute.java
index c15feda1af5..d96f14c2356 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/DateAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/DateAttribute.java
@@ -13,10 +13,7 @@ package org.eclipse.osee.framework.skynet.core.attribute;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.logging.Level;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLog;
/**
* @author Robert A. Fisher
@@ -38,21 +35,15 @@ public class DateAttribute extends CharacterBackedAttribute<Date> {
@Override
protected void setToDefaultValue() throws OseeCoreException {
String defaultValue = getAttributeType().getDefaultValue();
- if (Strings.isValid(defaultValue)) {
- setFromStringNoDirty(defaultValue);
- } else {
+ if (defaultValue == null) {
subClassSetValue(new Date());
+ } else {
+ setFromStringNoDirty(defaultValue);
}
}
@Override
- public boolean subClassSetValue(Date value) throws OseeCoreException {
- if (value == null) {
- OseeLog.log(this.getClass(), Level.SEVERE,
- String.format("AttributeType [%s] GammId [%s] - DateAttribute.subClassSetValue had a null value",
- getAttributeType(), getGammaId()));
- return false;
- }
+ protected boolean subClassSetValue(Date value) {
return getAttributeDataProvider().setValue(value.getTime());
}
@@ -63,9 +54,6 @@ public class DateAttribute extends CharacterBackedAttribute<Date> {
@Override
public Date convertStringToValue(String value) {
- if (!Strings.isValid(value)) {
- return null;
- }
return new Date(Long.parseLong(value));
}
@@ -78,5 +66,4 @@ public class DateAttribute extends CharacterBackedAttribute<Date> {
public String getAsFormattedString(DateFormat dateFormat) throws OseeCoreException {
return dateFormat.format(getValue());
}
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/EnumeratedAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/EnumeratedAttribute.java
index 8f63c816da0..abc91016530 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/EnumeratedAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/EnumeratedAttribute.java
@@ -23,9 +23,4 @@ public class EnumeratedAttribute extends StringAttribute {
String toDisplay = getAttributeDataProvider().getDisplayableString();
return Strings.isValid(toDisplay) ? toDisplay : "<Select>";
}
-
- @Override
- public boolean subClassSetValue(String value) throws OseeCoreException {
- return super.subClassSetValue(value);
- }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/FloatingPointAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/FloatingPointAttribute.java
index 286d74a6684..bcbeab3f6d2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/FloatingPointAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/FloatingPointAttribute.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
-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.util.Strings;
@@ -27,14 +26,6 @@ public class FloatingPointAttribute extends CharacterBackedAttribute<Double> {
}
@Override
- public boolean subClassSetValue(Double value) throws OseeCoreException {
- if (value == null) {
- throw new OseeArgumentException("Attribute value was null");
- }
- return getAttributeDataProvider().setValue(value);
- }
-
- @Override
public Double convertStringToValue(String value) {
Double toReturn = null;
if (isValidDouble(value)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IdentityReferenceAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IdentityReferenceAttribute.java
index da19e88cd12..ff3a466e4be 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IdentityReferenceAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IdentityReferenceAttribute.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.skynet.core.attribute;
import org.eclipse.osee.framework.jdk.core.type.BaseId;
import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.attribute.service.AttributeAdapterService;
import org.eclipse.osee.framework.skynet.core.internal.ServiceUtil;
public abstract class IdentityReferenceAttribute<T extends Id> extends CharacterBackedAttribute<T> {
@@ -25,13 +24,11 @@ public abstract class IdentityReferenceAttribute<T extends Id> extends Character
@Override
public T convertStringToValue(String value) {
- AttributeAdapterService service = getAttributeAdapter();
- T identity = service.adapt(this, new BaseId(Long.valueOf(value)));
- return identity;
+ return ServiceUtil.getAttributeAdapterService().adapt(this, new BaseId(Long.valueOf(value)));
}
- private AttributeAdapterService getAttributeAdapter() throws OseeCoreException {
- return ServiceUtil.getAttributeAdapterService();
+ @Override
+ protected boolean subClassSetValue(Id value) {
+ return getAttributeDataProvider().setValue(value.getIdString());
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IntegerAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IntegerAttribute.java
index e03b0d1d278..ff0e2b8e2cf 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IntegerAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/IntegerAttribute.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
-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.util.Strings;
@@ -27,14 +26,6 @@ public class IntegerAttribute extends CharacterBackedAttribute<Integer> {
}
@Override
- public boolean subClassSetValue(Integer value) throws OseeCoreException {
- if (value == null) {
- throw new OseeArgumentException("Attribute value was null");
- }
- return getAttributeDataProvider().setValue(value);
- }
-
- @Override
public Integer convertStringToValue(String value) {
Integer toReturn = null;
if (isValidInteger(value)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/JavaObjectAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/JavaObjectAttribute.java
index b64c08fabc5..4d478cbc2b2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/JavaObjectAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/JavaObjectAttribute.java
@@ -60,7 +60,7 @@ public final class JavaObjectAttribute extends BinaryAttribute<Object> {
}
@Override
- public boolean subClassSetValue(Object value) {
+ protected boolean subClassSetValue(Object value) {
try {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
@@ -68,7 +68,7 @@ public final class JavaObjectAttribute extends BinaryAttribute<Object> {
objectStream.flush();
objectStream.close();
getAttributeDataProvider().setValue(ByteBuffer.wrap(byteStream.toByteArray()));
- getAttributeDataProvider().setDisplayableString(value != null ? value.getClass().getName() : "null");
+ getAttributeDataProvider().setDisplayableString(value.getClass().getName());
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
}
@@ -77,9 +77,6 @@ public final class JavaObjectAttribute extends BinaryAttribute<Object> {
@Override
public Object convertStringToValue(String value) {
- if (value == null) {
- return null;
- }
return getObjectFromBytes(ByteBuffer.wrap(value.getBytes()));
}
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/LongAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/LongAttribute.java
index 6986375f9a7..860797711d1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/LongAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/LongAttribute.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
-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.util.Strings;
@@ -27,14 +26,6 @@ public class LongAttribute extends CharacterBackedAttribute<Long> {
}
@Override
- public boolean subClassSetValue(Long value) throws OseeCoreException {
- if (value == null) {
- throw new OseeArgumentException("Attribute value was null");
- }
- return getAttributeDataProvider().setValue(value);
- }
-
- @Override
public Long convertStringToValue(String value) {
Long toReturn = null;
if (isValidLong(value)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OutlineNumberAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OutlineNumberAttribute.java
index 4cc476411f4..d44de08a4fd 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OutlineNumberAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OutlineNumberAttribute.java
@@ -10,21 +10,5 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-
-public class OutlineNumberAttribute extends CharacterBackedAttribute<String> {
- @Override
- public String getValue() throws OseeCoreException {
- return getAttributeDataProvider().getValueAsString();
- }
-
- @Override
- public boolean subClassSetValue(String value) throws OseeCoreException {
- return getAttributeDataProvider().setValue(value);
- }
-
- @Override
- public String convertStringToValue(String value) {
- return value;
- }
-}
+public class OutlineNumberAttribute extends StringAttribute {
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/StringAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/StringAttribute.java
index a976935514c..dd87af7934f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/StringAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/StringAttribute.java
@@ -22,11 +22,6 @@ public class StringAttribute extends CharacterBackedAttribute<String> {
}
@Override
- public boolean subClassSetValue(String value) throws OseeCoreException {
- return getAttributeDataProvider().setValue(value);
- }
-
- @Override
public String convertStringToValue(String value) {
return value;
}
@@ -35,4 +30,4 @@ public class StringAttribute extends CharacterBackedAttribute<String> {
public String getDisplayableString() throws OseeCoreException {
return getValue();
}
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/WordAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/WordAttribute.java
index 2a44ff196fb..71b3cdb02f1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/WordAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/WordAttribute.java
@@ -37,7 +37,7 @@ public class WordAttribute extends StringAttribute {
private static final IStatus promptStatus = new Status(IStatus.WARNING, Activator.PLUGIN_ID, 256, "", null);
@Override
- public boolean subClassSetValue(String value) throws OseeCoreException {
+ protected boolean subClassSetValue(String value) {
value = checkForTrackedChanges(value);
value = WordUtil.removeWordMarkupSmartTags(value);
return super.subClassSetValue(value);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java
index 5e38ab60845..41bffd2f09b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java
@@ -24,6 +24,8 @@ public interface IAttributeDataProvider {
public void loadData(Object... objects) throws OseeCoreException;
+ public Object getValue();
+
public Object[] getData() throws OseeDataStoreException;
public void persist(int storageId) throws OseeCoreException;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/ICharacterAttributeDataProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/ICharacterAttributeDataProvider.java
index 6660485c305..42c6d6d87b7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/ICharacterAttributeDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/ICharacterAttributeDataProvider.java
@@ -19,8 +19,5 @@ public interface ICharacterAttributeDataProvider extends IAttributeDataProvider
public String getValueAsString() throws OseeCoreException;
- public Object getValue();
-
public boolean setValue(Object value) throws OseeCoreException;
-
-}
+} \ No newline at end of file

Back to the top