diff --git a/README.md b/README.md index 74871051..16d1e71c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ __IMPORTANT NOTICE:__ The contents of this repository currectly reflect a __DRAF 1. [Event Structure](./eiffel-syntax-and-usage/event-structure.md) 1. [The Meta Object](./eiffel-syntax-and-usage/the-meta-object.md) 1. [The Links Object](./eiffel-syntax-and-usage/the-links-object.md) + 1. [Compositions and Validity Checking](./eiffel-syntax-and-usage/compositions-and-validity-checking.md) 1. The Eiffel Vocabulary 1. [EiffelActivityTriggeredEvent](./eiffel-vocabulary/EiffelActivityTriggeredEvent.md) 1. [EiffelActivityCanceledEvent](./eiffel-vocabulary/EiffelActivityCanceledEvent.md) diff --git a/eiffel-syntax-and-usage/composition-backend-implementation-example.gliffy b/eiffel-syntax-and-usage/composition-backend-implementation-example.gliffy new file mode 100644 index 00000000..aa273029 --- /dev/null +++ b/eiffel-syntax-and-usage/composition-backend-implementation-example.gliffy @@ -0,0 +1 @@ +{"contentType":"application/gliffy+json","version":"1.1","metadata":{"title":"untitled","revision":0,"exportBorder":false},"embeddedResources":{"index":0,"resources":[]},"stage":{"objects":[{"x":786.5,"y":592.5,"rotation":0,"id":662,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":12,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-701.5,-338],[-701.5,-568],[-589.5,-568],[-589.5,-528]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":281,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":710,"px":0.5,"py":0}}},"linkMap":[]},{"x":280,"y":436.5,"rotation":0,"id":699,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":80,"lockAspectRatio":false,"lockShape":false,"order":19,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"
ArtifactCreated\n
com.example:i:2.0.0\n
\n
requiresImplementation\n
AT_LEAST_ONE
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":349,"y":384.5,"rotation":0,"id":697,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":17,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":698,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
I2
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":88,"y":436.5,"rotation":0,"id":629,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":80,"lockAspectRatio":false,"lockShape":false,"order":16,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtifactCreated\n
com.example:i:1.0.0\n
\n
requiresImplementation\n
AT_LEAST_ONE
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":633,"y":555.5,"rotation":0,"id":664,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":13,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-131,-251],[-131,-211],[-451,-211],[-451,-171]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":627,"px":0.5,"py":0}}},"linkMap":[]},{"x":157,"y":384.5,"rotation":0,"id":627,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":10,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":628,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
I1
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":700,"y":155.5,"rotation":0,"id":413,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":9,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#d9d9d9","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-223,124],[-345.33333333333337,124],[-467.6666666666667,124],[-590,124]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":281,"px":1,"py":0.5}}},"linkMap":[]},{"x":409,"y":306.5,"rotation":0,"id":411,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":16,"lockAspectRatio":false,"lockShape":false,"order":8,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CompositionDefined
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":477,"y":254.5,"rotation":0,"id":409,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":6,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":410,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CDef\n
C2
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":613,"y":535.5,"rotation":0,"id":400,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":5,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-528,-231],[-528,-191],[-431,-191],[-431,-151]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":281,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":627,"px":0.5,"py":0}}},"linkMap":[]},{"x":-10,"y":304.5,"rotation":0,"id":283,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":16,"lockAspectRatio":false,"lockShape":false,"order":4,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CompositionDefined
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":60,"y":254.5,"rotation":0,"id":281,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":2,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":282,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CDef\n
C1
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":796.5,"y":587.5,"rotation":0,"id":716,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":23,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-711.5,-333],[-711.5,-498],[-624.5,-498]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":281,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":710,"px":0,"py":0.5}}},"linkMap":[]},{"x":623,"y":545.5,"rotation":0,"id":718,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":24,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-538,-241],[-538,-201],[-249,-201],[-249,-161]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":281,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":697,"px":0.5,"py":0}}},"linkMap":[]},{"x":347,"y":104.5,"rotation":0,"id":721,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":25,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":722,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
B
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":287,"y":154.5,"rotation":0,"id":723,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":80,"lockAspectRatio":false,"lockShape":false,"order":27,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtifactCreated\n
com.example:b:1.0.0\n
\n
implements\n
com.example:i:[1.0.0,3.0.0)
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":643,"y":565.5,"rotation":0,"id":725,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":28,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-141,-311],[-141,-436],[-246,-436]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":721,"px":1,"py":0.5}}},"linkMap":[]},{"x":653,"y":575.5,"rotation":0,"id":726,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":29,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-151,-321],[-151,-486],[-431,-486]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":710,"px":1,"py":0.5}}},"linkMap":[]},{"x":663,"y":585.5,"rotation":0,"id":728,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":30,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-161,-331],[-161,-561],[-466,-561],[-466,-521]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":710,"px":0.5,"py":0}}},"linkMap":[]},{"x":172,"y":64.5,"rotation":0,"id":710,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":20,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":711,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
A
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":112,"y":114.5,"rotation":0,"id":712,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":80,"lockAspectRatio":false,"lockShape":false,"order":22,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtifactCreated\n
com.example:a:1.0.0\n
\n
implements\n
com.example:i:[1.0.0,2.0.0)
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":714.5,"y":247.5,"rotation":0,"id":666,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":14,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#d9d9d9","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-122,-104],[-87,-104],[-87,-57],[-52,-57]],"lockSegments":{}}},"children":[{"x":0,"y":0,"rotation":0,"id":667,"uid":null,"width":141,"height":16,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"both","vposition":"none","hposition":"none","html":"PREVIOUS_VERSION
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":712,"y":173,"rotation":0,"id":165,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":0,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-122,-104],[-87,-104],[-87,-57],[-52,-57]],"lockSegments":{}}},"children":[{"x":0,"y":0,"rotation":0,"id":166,"uid":null,"width":66,"height":16,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"both","vposition":"none","hposition":"none","html":"ELEMENT
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]}],"background":"#FFFFFF","width":700,"height":518.5,"maxWidth":5000,"maxHeight":5000,"nodeIndex":732,"autoFit":true,"exportBorder":false,"gridOn":true,"snapToGrid":true,"drawingGuidesOn":true,"pageBreaksOn":false,"printGridOn":false,"printPaper":"LETTER","printShrinkToFit":false,"printPortrait":true,"shapeStyles":{"com.gliffy.shape.basic.basic_v1.default":{"fill":"#d5a6bd","stroke":"#333333","strokeWidth":2}},"lineStyles":{"global":{"stroke":"#cc0000","dashStyle":"1.0,1.0","endArrow":17}},"textStyles":{},"themeData":null}} \ No newline at end of file diff --git a/eiffel-syntax-and-usage/composition-backend-implementation-example.png b/eiffel-syntax-and-usage/composition-backend-implementation-example.png new file mode 100644 index 00000000..320c2473 Binary files /dev/null and b/eiffel-syntax-and-usage/composition-backend-implementation-example.png differ diff --git a/eiffel-syntax-and-usage/composition-dependency-check-example.gliffy b/eiffel-syntax-and-usage/composition-dependency-check-example.gliffy new file mode 100644 index 00000000..630d8008 --- /dev/null +++ b/eiffel-syntax-and-usage/composition-dependency-check-example.gliffy @@ -0,0 +1 @@ +{"contentType":"application/gliffy+json","version":"1.1","metadata":{"title":"untitled","revision":0,"exportBorder":false},"embeddedResources":{"index":0,"resources":[]},"stage":{"objects":[{"x":791,"y":733,"rotation":0,"id":415,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":10,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-270,-673],[-270,-589.6660000026666],[-270,-506.33200000533327],[-270,-422.99800000799996]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":649,"px":0.5,"py":0}}},"linkMap":[]},{"x":868,"y":343,"rotation":0,"id":413,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":9,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#d9d9d9","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-372,-308],[-494.33333333333337,-308],[-616.6666666666667,-308],[-739,-308]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":281,"px":1,"py":0.5}}},"linkMap":[]},{"x":781,"y":723,"rotation":0,"id":400,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":5,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-677,-663],[-677,-623],[-468,-623],[-468,-583]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":281,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":627,"px":0.5,"py":0}}},"linkMap":[]},{"x":878,"y":353,"rotation":0,"id":660,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":21,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#d9d9d9","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-383,-18],[-504.66666666666663,-18],[-626.3333333333333,-18],[-748,-18]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":649,"px":0,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":641,"px":1,"py":0.5}}},"linkMap":[]},{"x":801,"y":743,"rotation":0,"id":662,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":23,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-697,-683],[-697,-599.6660000026666],[-697,-516.3320000053333],[-697,-432.99800000799996]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":281,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":641,"px":0.5,"py":0}}},"linkMap":[]},{"x":801,"y":743,"rotation":0,"id":664,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":24,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-280,-683],[-280,-643],[-488,-643],[-488,-603]],"lockSegments":{}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":409,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":627,"px":0.5,"py":0}}},"linkMap":[]},{"x":766,"y":202,"rotation":0,"id":666,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":26,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#d9d9d9","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-122,-104],[-87,-104],[-87,-57],[-52,-57]],"lockSegments":{}}},"children":[{"x":0,"y":0,"rotation":0,"id":667,"uid":null,"width":141,"height":16,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"both","vposition":"none","hposition":"none","html":"PREVIOUS_VERSION
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":763.5,"y":127.5,"rotation":0,"id":165,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":0,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#8e7cc3","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-122,-104],[-87,-104],[-87,-57],[-52,-57]],"lockSegments":{}}},"children":[{"x":0,"y":0,"rotation":0,"id":166,"uid":null,"width":66,"height":16,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"both","vposition":"none","hposition":"none","html":"ELEMENT
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":767,"y":274,"rotation":0,"id":679,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":28,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#00ff00","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-122,-104],[-87,-104],[-87,-57],[-52,-57]],"lockSegments":{}}},"children":[{"x":0,"y":0,"rotation":0,"id":680,"uid":null,"width":136,"height":16,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"both","vposition":"none","hposition":"none","html":"Satisfied dependency
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":769,"y":346,"rotation":0,"id":681,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":30,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#cc0000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-122,-104],[-87,-104],[-87,-57],[-52,-57]],"lockSegments":{}}},"children":[{"x":0,"y":0,"rotation":0,"id":682,"uid":null,"width":152,"height":16,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"both","vposition":"none","hposition":"none","html":"Unsatisfied dependency
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":423,"y":539,"rotation":0,"id":683,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":35,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#cc0000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-135,-374],[-265,-374],[-265,-204],[-293,-204]],"lockSegments":{"1":true}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":627,"px":0,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":641,"px":1,"py":0.5}}},"linkMap":[]},{"x":777,"y":284,"rotation":0,"id":685,"uid":"com.gliffy.shape.basic.basic_v1.default.line","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":32,"graphic":{"type":"Line","Line":{"strokeWidth":2,"strokeColor":"#00ff00","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":17,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":10,"controlPath":[[-439,-119],[-302.5,-119],[-302.5,51],[-282,51]],"lockSegments":{"1":true}}},"children":[],"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":627,"px":1,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":649,"px":0,"py":0.5}}},"linkMap":[]},{"x":288,"y":140,"rotation":0,"id":627,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":11,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":628,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
B1
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":219,"y":192,"rotation":0,"id":629,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":80,"lockAspectRatio":false,"lockShape":false,"order":36,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtifactCreated\n
com.example:b:1.0.0\n
\n
dependsOn\n
com.example:a:[1.1.0,)
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":496,"y":10,"rotation":0,"id":409,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":6,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":410,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CDef\n
C2
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":428,"y":62,"rotation":0,"id":411,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":16,"lockAspectRatio":false,"lockShape":false,"order":8,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CompositionDefined
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":495,"y":310,"rotation":0,"id":649,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":18,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":650,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
A2
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":428,"y":362,"rotation":0,"id":651,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":32,"lockAspectRatio":false,"lockShape":false,"order":20,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtifactCreated\n
com.example:a:1.1.0
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":79,"y":10,"rotation":0,"id":281,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":2,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":282,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CDef\n
C1
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":9,"y":62,"rotation":0,"id":283,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":16,"lockAspectRatio":false,"lockShape":false,"order":4,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"CompositionDefined
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":80,"y":310,"rotation":0,"id":641,"uid":"com.gliffy.shape.basic.basic_v1.default.circle","width":50,"height":50,"lockAspectRatio":true,"lockShape":false,"order":15,"graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.ellipse.basic_v1","strokeWidth":2,"strokeColor":"#333333","fillColor":"#b4a7d6","gradient":true,"dropShadow":false,"state":0,"shadowX":0,"shadowY":0,"opacity":1}},"children":[{"x":2,"y":0,"rotation":0,"id":642,"uid":null,"width":46,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtC\n
A1
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"linkMap":[]},{"x":10,"y":362,"rotation":0,"id":643,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":190,"height":32,"lockAspectRatio":false,"lockShape":false,"order":17,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"ArtifactCreated\n
com.example:a:1.0.0
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]}],"background":"#FFFFFF","width":758,"height":396,"maxWidth":5000,"maxHeight":5000,"nodeIndex":694,"autoFit":true,"exportBorder":false,"gridOn":true,"snapToGrid":true,"drawingGuidesOn":true,"pageBreaksOn":false,"printGridOn":false,"printPaper":"LETTER","printShrinkToFit":false,"printPortrait":true,"shapeStyles":{"com.gliffy.shape.basic.basic_v1.default":{"fill":"#d5a6bd","stroke":"#333333","strokeWidth":2}},"lineStyles":{"global":{"stroke":"#cc0000","dashStyle":"1.0,1.0","endArrow":17}},"textStyles":{},"themeData":null}} \ No newline at end of file diff --git a/eiffel-syntax-and-usage/composition-dependency-check-example.png b/eiffel-syntax-and-usage/composition-dependency-check-example.png new file mode 100644 index 00000000..67736c79 Binary files /dev/null and b/eiffel-syntax-and-usage/composition-dependency-check-example.png differ diff --git a/eiffel-syntax-and-usage/compositions-and-validity-checking.md b/eiffel-syntax-and-usage/compositions-and-validity-checking.md new file mode 100644 index 00000000..5edd0bb8 --- /dev/null +++ b/eiffel-syntax-and-usage/compositions-and-validity-checking.md @@ -0,0 +1,37 @@ +# Compositions and validity checking +A central concept in Eiffel is that of _compositions_. A composition represents a set of source, artifact and documentation items defined by [EiffelCompositionDefinedEvent](../eiffel-vocabulary/EiffelCompositionDefinedEvent.md) for some purpose, e.g. forming an execution environment, defining the contents of a delivery or instructing the integration of a system. Compositions may be very simple, consisting of a single item, or very large, containing any number of items in nested composition structures. + +## Composition Validity +Using the __data.dependsOn__, __data.implements__ and __data.requiresImplementation__ members of [EiffelArtifactCreatedEvent](../eiffel-vocabulary/EiffelArtifactCreatedEvent.md) the validity of any given composition can be checked. + +### Checking Dependencies +In this straight forward example, the integration of a system requires the presence of an interface and a third party library. Consider the following composition: + + + +Here composition C2 is legal, but C1 is not. The reason is that B1 requires version "[1.1.0,)" of com.example:a (that is, version 1.1.0 or later). In composition C1 there is no such artifact, but in composition C2 there is. + +### Checking Backend Implementation Validity +In this example we imagine a microservice setup. The service interface I has no implementation itself - instead it requires one or more implementations to which it can forward requests. There are multiple versions of the interface included, affording clients backwards compatibility. + + + +Composition C1 is not valid: it contains two instances of A, one of I1 and one of I2. A implements I from version 1.0.0 up to, but not including, 2.0.0. Hence, I2 is lacking implementation is this composition. + +Composition C2, on the other hand, is valid. It also contains two instances of A, but also one instance of B, which implements I from version 1.0.0 up to 3.0.0. Consequently, in this composition I1 has three artifacts implementing it, while I2 has one. + +### GAV vs event links +Wherever feasible, the Eiffel framework promotes the usage of event references to link to other artifacts. It may seem like a reasonable option to use event links to declare dependencies, as well. + +The pragmatic reason for using GAVs in this particular case is version ranges: with event links there is no practical way of declaring ranges. + +There is also a conceptual reason why event links are not suitable, however. Event links are consistently used to reference historical engineering artifacts - things that have been created and exist. Dependency declarations - particularly dependencies on version ranges - are much more intangible in nature. They do not simply provide a description of something that ought to be present. For this reason they can not be used as trace links, and are unsuitable for event reference representation. + +### Additional Notes +_Isn't this a reinvention of the wheel?_ you may ask. After all, there are plenty of tools that excel in handling dependency graphs. This is true, and the Eiffel dependency definition syntax is heavily influenced not least by [Maven](http://maven.apache.org). Eiffel operates at a highly technology and context agnostic level of abstraction, however, covering e.g. projects with highly diversified technology stacks and/or projects near or crossing over into hardware. This has both limitations and benefits. An Eiffel composition check can never guarantee that a given composition will work; what it can tell you is whether it is obviously broken. + +It should also be noted that Eiffel's dependency syntax is opinionated. An interface requiring supporting implementation does not dictate that it requires any particular implementation (actually it can - simply use __data.dependsOn__). Rather, it is up to that implementation to declare that it supports the interface. This is in order to encourage separation of concerns and decoupling. + +Furthermore, Eiffel's dependency syntax makes no distinction between e.g. build time and runtime dependencies. This is for two reasons. First, it is not intended for low level dependency management: most programming languages have dedicated and specialized tools that will handle this type of dependency management. Instead, where Eiffel's comes into play is in tracking and validating large, sprawling systems of heterogeneous artifacts. Second, even if one attempts to develop specific syntax each type of dependency there will always be corner use cases which are not covered: better then to err on the side of abstraction, rather than implicitly ruling out use cases by being overly specific. That being said, it is also generally the case that an artifact has a fair idea of its intended use - it is rare that one and the same artifact is both a deployable service and a source code library, with the need to declare a unique set of dependencies for each case. Hence, the EiffelArtifactCreatedEvent dependency declarations shall be read in context. + + diff --git a/eiffel-vocabulary/EiffelArtifactCreatedEvent.md b/eiffel-vocabulary/EiffelArtifactCreatedEvent.md index 045734a0..7a527a09 100644 --- a/eiffel-vocabulary/EiffelArtifactCreatedEvent.md +++ b/eiffel-vocabulary/EiffelArtifactCreatedEvent.md @@ -42,5 +42,58 @@ __Type:__ String __Required:__ No __Description:__ The command used to build the artifact within the identified environment. Used for reproducability purposes. +### data.requiresImplementation +__Type:__ String +__Required:__ No +__Legal values:__ NONE, ANY, EXACTLY_ONE, AT_LEAST_ONE +__Description:__ Defines whether this artifact requires an implementing artifact. This is typically used for interfaces requiring some backend implementation, although the interface does not presume to define _which_ implementation. Implicitly interpreted as "ANY" if undefined. +NONE signifies that there SHALL no implementations of this artifact. In other words, a composition containing another artifact identifying it in __data.implements__ would be illegal. +ANY signifies that there may or may not be implementations of this artifact. +EXACTLY_ONE signifies that a legal composition must contain one and only one implementation of this artifact. +AT_LEAST_ONE signifies that a legal composition must contain one or more implementations of this artifact. + +### data.implements +__Type:__ Object[] +__Required:__ No +__Description:__ An array of [GAVs](https://maven.apache.org/guides/mini/guide-naming-conventions.html) this artifact implements. The typical use case of this is to identify interfaces implemented by this artifact. + +#### data.implements.groupId +__Type:__ String +__Required:__ Yes +__Description:__ The groupId of the implemented artifact. + +#### data.implements.artifactId +__Type:__ String +__Required:__ Yes +__Description:__ The artifactId of the implemented artifact. + +#### data.implements.version +__Type:__ String +__Required:__ Yes +__Description:__ The version of the implemented artifact. Note that [version range notation](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402) is supported. + +### data.dependsOn +__Type:__ Object[] +__Required:__ No +__Description:__ An array of [GAVs](https://maven.apache.org/guides/mini/guide-naming-conventions.html) this artifact depends on. + +#### data.dependsOn.groupId +__Type:__ String +__Required:__ Yes +__Description:__ The groupId of the dependency. + +#### data.dependsOn.artifactId +__Type:__ String +__Required:__ Yes +__Description:__ The artifactId of the dependency. + +#### data.dependsOn.version +__Type:__ String +__Required:__ Yes +__Description:__ The version of the dependency. Note that [version range notation](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402) is supported. + ## Examples -* [Simple example](../examples/events/EiffelArtifactCreatedEvent/simple.json) \ No newline at end of file +* [Simple example](../examples/events/EiffelArtifactCreatedEvent/simple.json) +* [Interface example](../examples/events/EiffelArtifactCreatedEvent/interface.json) +* [Backend example](../examples/events/EiffelArtifactCreatedEvent/backend.json) +* [Dependent example](../examples/events/EiffelArtifactCreatedEvent/dependent.json) \ No newline at end of file diff --git a/examples/events/EiffelArtifactCreatedEvent/backend.json b/examples/events/EiffelArtifactCreatedEvent/backend.json new file mode 100644 index 00000000..954c3e21 --- /dev/null +++ b/examples/events/EiffelArtifactCreatedEvent/backend.json @@ -0,0 +1,50 @@ +{ + "meta": { + "type": "EiffelArtifactCreatedEvent", + "version": "1.0", + "time": 1234567890, + "source": { + "domainId": "example.domain" + }, + "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0" + }, + "data": { + "gav": { + "groupId": "com.mycompany.myproduct", + "artifactId": "my-backend", + "version": "1.0.4" + }, + "fileInformation": [ + { + "classifier": "", + "extension": "jar" + } + ], + "buildCommand": "/my/build/command with arguments", + "implements": [ + { + "groupId": "com.mycompany.myproduct", + "artifactId": "my-interface", + "version": "[1.0,2.0)" + } + ] + }, + "links": [ + { + "type": "CAUSE", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1" + }, + { + "type": "PREVIOUS_VERSION", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2" + }, + { + "type": "COMPOSITION", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1" + }, + { + "type": "ENVIRONMENT", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee3" + } + ] +} diff --git a/examples/events/EiffelArtifactCreatedEvent/dependent.json b/examples/events/EiffelArtifactCreatedEvent/dependent.json new file mode 100644 index 00000000..db22cda2 --- /dev/null +++ b/examples/events/EiffelArtifactCreatedEvent/dependent.json @@ -0,0 +1,50 @@ +{ + "meta": { + "type": "EiffelArtifactCreatedEvent", + "version": "1.0", + "time": 1234567890, + "source": { + "domainId": "example.domain" + }, + "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0" + }, + "data": { + "gav": { + "groupId": "com.mycompany.myproduct", + "artifactId": "my-dependent", + "version": "1.0.4" + }, + "fileInformation": [ + { + "classifier": "", + "extension": "jar" + } + ], + "buildCommand": "/my/build/command with arguments", + "dependsOn": [ + { + "groupId": "com.mycompany.myproduct", + "artifactId": "my-interface", + "version": "[1.0,2.0)" + } + ] + }, + "links": [ + { + "type": "CAUSE", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1" + }, + { + "type": "PREVIOUS_VERSION", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2" + }, + { + "type": "COMPOSITION", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1" + }, + { + "type": "ENVIRONMENT", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee3" + } + ] +} diff --git a/examples/events/EiffelArtifactCreatedEvent/interface.json b/examples/events/EiffelArtifactCreatedEvent/interface.json new file mode 100644 index 00000000..4ca39e9c --- /dev/null +++ b/examples/events/EiffelArtifactCreatedEvent/interface.json @@ -0,0 +1,44 @@ +{ + "meta": { + "type": "EiffelArtifactCreatedEvent", + "version": "1.0", + "time": 1234567890, + "source": { + "domainId": "example.domain" + }, + "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0" + }, + "data": { + "gav": { + "groupId": "com.mycompany.myproduct", + "artifactId": "my-interface", + "version": "1.0.4" + }, + "fileInformation": [ + { + "classifier": "", + "extension": "jar" + } + ], + "buildCommand": "/my/build/command with arguments", + "requiresImplementation": "AT_LEAST_ONE" + }, + "links": [ + { + "type": "CAUSE", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1" + }, + { + "type": "PREVIOUS_VERSION", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2" + }, + { + "type": "COMPOSITION", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1" + }, + { + "type": "ENVIRONMENT", + "target": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee3" + } + ] +} diff --git a/schemas/EiffelArtifactCreatedEvent.json b/schemas/EiffelArtifactCreatedEvent.json index d92d357d..c1925776 100644 --- a/schemas/EiffelArtifactCreatedEvent.json +++ b/schemas/EiffelArtifactCreatedEvent.json @@ -119,6 +119,61 @@ "buildCommand": { "type": "string" }, + "requiresImplementation": { + "type": "string", + "enum": [ + "NONE", + "ANY", + "EXACTLY_ONE", + "AT_LEAST_ONE" + ] + }, + "dependsOn": { + "type": "array", + "items": { + "type": "object", + "properties": { + "groupId": { + "type": "string" + }, + "artifactId": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "groupId", + "artifactId", + "version" + ], + "additionalProperties": false + } + }, + "implements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "groupId": { + "type": "string" + }, + "artifactId": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "groupId", + "artifactId", + "version" + ], + "additionalProperties": false + } + }, "customData": { "type": "array", "items": {