-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #956 from AmpersandTarski/development
Release 3.17.0
- Loading branch information
Showing
41 changed files
with
726 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CONTEXT PrototypeFramework IN ENGLISH | ||
|
||
CONCEPT PF_Interface "" | ||
REPRESENT PF_Interface TYPE OBJECT | ||
|
||
RELATION label[PF_Interface*PF_Label] [UNI,TOT] | ||
REPRESENT PF_Label TYPE ALPHANUMERIC | ||
|
||
RELATION pf_ifcRoles[PF_Interface*Role] | ||
MEANING "This relation contains the roles for which an interface is available" | ||
|
||
RELATION isPublic[PF_Interface*PF_Interface] [PROP] | ||
MEANING "This property states that an interface is accessible for all roles (i.e. public)" | ||
|
||
-- Cannot enfore this rule yet, because ExecEngine is still required to add missing roles | ||
-- RULE "Public interface integrity" : isPublic;V[PF_Interface*Role] |- pf_ifcRoles | ||
|
||
-- EQUIVALENCE pf_ifcRoles[PF_Interface*Role] == isPublic;V[PF_Interface*Role] | ||
ROLE ExecEngine MAINTAINS "Equivalence - InsPair pf_ifcRoles" | ||
RULE "Equivalence - InsPair pf_ifcRoles": isPublic;V[PF_Interface*Role] |- pf_ifcRoles | ||
VIOLATION (TXT "{EX} InsPair;pf_ifcRoles;PF_Interface;", SRC I, TXT ";Role;", TGT I) | ||
|
||
ROLE ExecEngine MAINTAINS "Equivalence - DelPair pf_ifcRoles" | ||
RULE "Equivalence - DelPair pf_ifcRoles": isPublic;pf_ifcRoles |- isPublic;V[PF_Interface*Role] | ||
VIOLATION (TXT "{EX} DelPair;pf_ifcRoles;PF_Interface;", SRC I, TXT ";Role;", TGT I) | ||
|
||
RELATION isAPI[PF_Interface*PF_Interface] [PROP] | ||
MEANING "This property states that an interface is meant as API (machine-2-machine)" | ||
|
||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CONTEXT PrototypeFramework IN ENGLISH | ||
|
||
INTERFACE "List all interfaces" FOR Administrator: "_SESSION";V[SESSION*PF_Interface] cRud BOX <SCOLS> | ||
[ "Interface" : I cRud | ||
, "Label" : label cRud | ||
, "Is public" : isPublic cRud | ||
, "Is API" : isAPI cRud | ||
, "Nav items" : ifc~ cRud | ||
] | ||
|
||
INTERFACE "Edit interface" FOR Administrator : I[PF_Interface] BOX | ||
[ "Interface" : I | ||
, "Is public" : isPublic cRud -- do not allow editing, access control of interfaces is not dynamic (yet) | ||
, "Is API" : isAPI cRud -- do not allow editing this property, because non-APIs require a design time generated UI | ||
, "For roles" : pf_ifcRoles cRud -- do not allow editing, access control of interfaces is not dynamic (yet) | ||
] | ||
|
||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
CONTEXT PrototypeFramework IN ENGLISH | ||
|
||
--[NAV MENU ITEMS]----------------------------------------------------------------------------- | ||
CONCEPT PF_NavMenuItem "" | ||
REPRESENT PF_NavMenuItem TYPE OBJECT | ||
|
||
RELATION label[PF_NavMenuItem*PF_Label] [UNI,TOT] | ||
MEANING "The human readable text that represents the navbar item and is shown to the user" | ||
CONCEPT PF_Label "" | ||
REPRESENT PF_Label TYPE ALPHANUMERIC | ||
|
||
RELATION isVisible[PF_NavMenuItem*PF_NavMenuItem] [PROP] | ||
MEANING "A navbar item can be visible or not" | ||
|
||
RELATION ifc[PF_NavMenuItem*PF_Interface] [UNI] | ||
MEANING "A navbar item can direct to an interface" | ||
CONCEPT PF_Interface "Representation of an Ampersand interface" | ||
|
||
RULE "Do not allow references to API interfaces" : ifc;isAPI |- -V | ||
MESSAGE "A navbar item can not reference an API interface" | ||
|
||
RELATION url[PF_NavMenuItem*PF_URL] [UNI] | ||
MEANING "A navbar item can direct to an (external) url. This can also be used for extensions like the excelimporter" | ||
CONCEPT PF_URL "a uniform resource locator as defined by RFC3986" | ||
REPRESENT PF_URL TYPE BIGALPHANUMERIC | ||
|
||
RELATION seqNr[PF_NavMenuItem*PF_SeqNr] [UNI] | ||
MEANING "A navbar item has a seq nr (default 0) which determines the position of the item" | ||
CONCEPT PF_SeqNr "" | ||
REPRESENT PF_SeqNr TYPE INTEGER | ||
|
||
RELATION isSubItemOf[PF_NavMenuItem*PF_NavMenuItem] [UNI,IRF,ASY] | ||
MEANING "A navbar item can be a sub item of another item" | ||
|
||
RELATION pf_navItemRoles[PF_NavMenuItem*Role] | ||
MEANING "A navbar item is accessible for a role" | ||
|
||
-- Add/remove menu items based on interface roles | ||
ROLE ExecEngine MAINTAINS "Add navItemRoles for interfaces" | ||
RULE "Add navItemRoles for interfaces" : ifc;pf_ifcRoles |- pf_navItemRoles | ||
VIOLATION (TXT "{EX}InsPair;pf_navItemRoles;PF_NavMenuItem;", SRC I, TXT ";Role;", TGT I) | ||
|
||
ROLE ExecEngine MAINTAINS "Remove navItemRoles for interfaces" | ||
RULE "Remove navItemRoles for interfaces" : (I /\ ifc;ifc~);pf_navItemRoles |- ifc;pf_ifcRoles | ||
VIOLATION (TXT "{EX}DelPair;pf_navItemRoles;PF_NavMenuItem;", SRC I, TXT ";Role;", TGT I) | ||
|
||
-- Add/remove parent menu items if needed | ||
ROLE ExecEngine MAINTAINS "Add navItemRoles for parent items" | ||
RULE "Add navItemRoles for parent items": isSubItemOf~;pf_navItemRoles |- pf_navItemRoles | ||
VIOLATION (TXT "{EX}InsPair;pf_navItemRoles;PF_NavMenuItem;", SRC I, TXT ";Role;", TGT I) | ||
|
||
ROLE ExecEngine MAINTAINS "Remove navItemRoles for parent items" | ||
RULE "Remove navItemRoles for parent items": (I /\ isSubItemOf~;isSubItemOf);pf_navItemRoles |- isSubItemOf~;pf_navItemRoles | ||
VIOLATION (TXT "{EX}DelPair;pf_navItemRoles;PF_NavMenuItem;", SRC I, TXT ";Role;", TGT I) | ||
|
||
--[NAV MENUS]---------------------------------------------------------------------------------- | ||
CONCEPT PF_NavMenu "" | ||
CLASSIFY PF_NavMenu ISA PF_NavMenuItem | ||
REPRESENT PF_NavMenu TYPE OBJECT | ||
|
||
RELATION isPartOf[PF_NavMenuItem*PF_NavMenu] [UNI,TOT] | ||
MEANING "A navbar item is part of a certain navmenu" | ||
|
||
ROLE ExecEngine MAINTAINS "Fix TOT for isPartOf[PF_NavMenuItem*PF_NavMenu]" | ||
RULE "Fix TOT for isPartOf[PF_NavMenuItem*PF_NavMenu]": I[PF_NavMenuItem];isSubItemOf;isPartOf |- isPartOf | ||
VIOLATION (TXT "{EX}InsPair;isPartOf;PF_NavMenuItem;", SRC I, TXT ";PF_NavMenu;", TGT I) | ||
|
||
ROLE ExecEngine MAINTAINS "Automatically designate root of PF_NavMenItem tree as PF_NavMenu" | ||
RULE "Automatically designate root of PF_NavMenItem tree as PF_NavMenu": I[PF_NavMenuItem] - isSubItemOf;isSubItemOf~ |- I[PF_NavMenu] | ||
VIOLATION (TXT "{EX} SetConcept;PF_NavMenuItem;PF_NavMenu;", SRC I[PF_NavMenuItem]) | ||
|
||
ROLE ExecEngine MAINTAINS "De-assign non-root PF_NavMenItems as PF_NavMenu" | ||
RULE "De-assign non-root PF_NavMenItems as PF_NavMenu": I[PF_NavMenu] |- I[PF_NavMenuItem] - isSubItemOf;isSubItemOf~ | ||
VIOLATION (TXT "{EX} ClearConcept;PF_NavMenu;", SRC I[PF_NavMenu]) | ||
|
||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
CONTEXT PrototypeFramework IN ENGLISH | ||
|
||
VIEW "PF_NavMenuItem" : PF_NavMenuItem DEFAULT { label : label } ENDVIEW | ||
|
||
--[ADMIN INTERFACES to adapt the menus]-------------------------------------------------------- | ||
INTERFACE "Edit navigation menu" FOR Administrator: "_SESSION";V[SESSION*PF_NavMenu] INTERFACE "Edit menu item" | ||
|
||
INTERFACE "Edit menu item" FOR Administrator: I[PF_NavMenuItem] cRud BOX | ||
[ "Label" : label | ||
, "Parent" : isSubItemOf cRUd | ||
, "Items" : isSubItemOf~ CRuD BOX <SCOLS> | ||
[ "Item" : I LINKTO INTERFACE "Edit menu item" | ||
, "# " : seqNr cRUd | ||
, "Visible" : isVisible cRUd | ||
, "Label" : label cRUd | ||
, "Roles" : pf_navItemRoles cRud | ||
] | ||
, "Interface ref": ifc cRUd | ||
, "Url" : url cRUd | ||
, "Roles" : pf_navItemRoles cRUd | ||
] | ||
|
||
--[SYSTEM INTERFACES to query menu items]------------------------------------------------------ | ||
API "PF_MenuItems" FOR SYSTEM: sessionActiveRoles[SESSION*Role];pf_navItemRoles~;isVisible BOX | ||
[ "id" : I | ||
, "label" : label | ||
, "seqNr" : seqNr | ||
, "ifc" : ifc | ||
, "url" : url | ||
, "parent" : isSubItemOf | ||
] | ||
|
||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CONTEXT PrototypeFramework IN ENGLISH | ||
|
||
CONCEPT Role "" | ||
REPRESENT Role TYPE OBJECT | ||
POPULATION Role CONTAINS ["Anonymous"] -- at least one role is needed, because nav items are filtered using 'sessionActiveRoles'. Anonymous is part of SIAMv3 | ||
|
||
RELATION label[Role*PF_Label] [UNI,TOT] | ||
REPRESENT PF_Label TYPE ALPHANUMERIC | ||
POPULATION label[Role*PF_Label] CONTAINS [ ("Anonymous", "Anonymous") ] | ||
|
||
API "PF_AllRoles" FOR SYSTEM : V[ONE*Role] BOX | ||
[ "id" : I | ||
, "label" : label | ||
-- , "maintains" : | ||
-- , "interfaces" : | ||
] | ||
|
||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.