diff --git a/server/AyaNova/Controllers/EnumPickListController.cs b/server/AyaNova/Controllers/EnumPickListController.cs
index 1403941a..355ddf09 100644
--- a/server/AyaNova/Controllers/EnumPickListController.cs
+++ b/server/AyaNova/Controllers/EnumPickListController.cs
@@ -81,7 +81,7 @@ namespace AyaNova.Api.Controllers
foreach (AyaType t in values)
{
string name = t.ToString();
- if (t.HasAttribute(typeof(AttachableAttribute)))
+ if (t.HasAttribute(typeof(CoreBizObjectAttribute)))
{
name += " [Attachable]";
}
diff --git a/server/AyaNova/PickList/PickListFactory.cs b/server/AyaNova/PickList/PickListFactory.cs
index 7592bfc2..dbe08a8e 100644
--- a/server/AyaNova/PickList/PickListFactory.cs
+++ b/server/AyaNova/PickList/PickListFactory.cs
@@ -11,10 +11,12 @@ namespace AyaNova.PickList
//Instantiate list object specified from type
internal static IAyaPickList GetAyaPickList(AyaType ayaType)
{
- switch(ayaType){
- case AyaType.Widget:
- return new WidgetPickList() as IAyaDataList;
- }
+ switch (ayaType)
+ {
+ case AyaType.Widget:
+ return new WidgetPickList() as IAyaPickList;
+ }
+ return null;
}
//List all the datalist types available
diff --git a/server/AyaNova/biz/AttachableAttribute.cs b/server/AyaNova/biz/AttachableAttribute.cs
deleted file mode 100644
index e96ed33f..00000000
--- a/server/AyaNova/biz/AttachableAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace AyaNova.Biz
-{
- ///
- /// Marker attribute indicating that an object supports attachments
- /// Used in
- ///
- [AttributeUsage(AttributeTargets.All)]
- public class AttachableAttribute : Attribute
- {
- //No code required, it's just a marker
- //https://docs.microsoft.com/en-us/dotnet/standard/attributes/writing-custom-attributes
- }
-}//eons
diff --git a/server/AyaNova/biz/AyaType.cs b/server/AyaNova/biz/AyaType.cs
index 2fb1d716..f2cd9e38 100644
--- a/server/AyaNova/biz/AyaType.cs
+++ b/server/AyaNova/biz/AyaType.cs
@@ -1,27 +1,26 @@
namespace AyaNova.Biz
{
-
-
-
///
/// All AyaNova types and their attributes indicating what features that type will support (tagging, attachments etc)
///
public enum AyaType : int
{
+ //COREBIZOBJECT attribute must be set on objects that are:
//Attachable objects can have attachments,
//wikiable objects can have a wiki
//reviewable objects can have a review which is basically the same as a Reminder but with an object attached (was follow up schedmarker in v7)
+ //PIckList-able (has picklist template)
//Pretty much everything that represents some kind of real world object is wikiable or attachable as long as it has an ID and a type
//exceptions would be utility type objects like datalistview, formcustom etc that are not
NoType = 0,
Global = 1,
- [Attachable]
+ [CoreBizObject]
Widget = 2,//attachable, wikiable, reviewable
- [Attachable]
+ [CoreBizObject]
User = 3,//attachable, wikiable, reviewable
ServerState = 4,
diff --git a/server/AyaNova/biz/AyaTypeId.cs b/server/AyaNova/biz/AyaTypeId.cs
index 31149928..aba46575 100644
--- a/server/AyaNova/biz/AyaTypeId.cs
+++ b/server/AyaNova/biz/AyaTypeId.cs
@@ -95,7 +95,7 @@ namespace AyaNova.Biz
{
get
{
- return this.ObjectType.HasAttribute(typeof(AttachableAttribute));
+ return this.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute));
}
}
diff --git a/server/AyaNova/biz/CoreBizObjectAttribute.cs b/server/AyaNova/biz/CoreBizObjectAttribute.cs
new file mode 100644
index 00000000..6eebb999
--- /dev/null
+++ b/server/AyaNova/biz/CoreBizObjectAttribute.cs
@@ -0,0 +1,22 @@
+using System;
+
+namespace AyaNova.Biz
+{
+ ///
+ /// Marker attribute indicating that an object is a core business object
+ /// In other words a real world business relevant object and not a utility or internal type of object
+ /// something that would be worked with by users in the UI for business purposes
+ /// This is used to indicate that an object supports these features:
+ /// PickList selectable (has picklist)
+ /// Attachable (can attach to it)
+ /// Reviewable (can set a review on it)
+ /// ETC
+ /// Used in
+ ///
+ [AttributeUsage(AttributeTargets.All)]
+ public class CoreBizObjectAttribute : Attribute
+ {
+ //No code required, it's just a marker
+ //https://docs.microsoft.com/en-us/dotnet/standard/attributes/writing-custom-attributes
+ }
+}//eons