This repository was archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Initial Sonargraph model for OASP4j (fixes #125) #127
Open
tlueecke
wants to merge
1
commit into
oasp:master
Choose a base branch
from
tlueecke:sonargraph-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ngs/src/main/settings/sonargraph/OASP4J-Sample.sonargraph/Analyzers/ArchitectureCheck.xml
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,4 @@ | ||
<?xml version="1.0" ?> | ||
<analyzerConfiguration version="9.4.2.446" analyzer="ArchitectureCheck"> | ||
<stringEntry value="" name="./components.arc"></stringEntry> | ||
</analyzerConfiguration> |
20 changes: 20 additions & 0 deletions
20
...settings/sonargraph/OASP4J-Sample.sonargraph/Architecture/component-connection-scheme.arc
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,20 @@ | ||
|
||
// Connection scheme defining how components of a business architecture may depend on each other regarding the technical architecture | ||
connection-scheme C2C { | ||
|
||
// services from one component may access other services, use cases and of course common artifacts | ||
connect service to target.service, target.logic, target.common, target.common.base | ||
|
||
// service configuration may instantiate other service implementations | ||
connect service.configuration to target.service.impl | ||
|
||
// use cases may access other use cases, logic extension points and of course common artifacts | ||
connect logic to target.logic, target.logic.base, target.common, target.common.base | ||
|
||
// data access may access other dataaccess entities (but not DAOs!), dataaccess extenspoint points and of course common artifacts | ||
connect dataaccess to target.dataaccess, target.dataaccess.base, target.common, target.common.base | ||
|
||
// common artifacts may access other common artifacts and their extension points | ||
connect common to target.common, target.common.base | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
...ettings/src/main/settings/sonargraph/OASP4J-Sample.sonargraph/Architecture/components.arc
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 @@ | ||
// Business Architecture definition, which is specific to an application | ||
|
||
// defining how components may interact: | ||
apply "component-connection-scheme" | ||
|
||
// new artifact sitting at the top | ||
artifact Application { | ||
|
||
include "**/io/oasp/gastronomy/restaurant/application/**" | ||
|
||
artifact Bootstrap { | ||
include "**/io/oasp/gastronomy/restaurant/application/*" | ||
} | ||
|
||
apply "layering" | ||
|
||
connect to SalesManagement, TableManagement, StaffManagement, OfferManagement, General using C2C | ||
|
||
} | ||
|
||
artifact SalesManagement { | ||
|
||
include "**/io/oasp/gastronomy/restaurant/salesmanagement/**" | ||
|
||
apply "layering" | ||
|
||
connect to General, OfferManagement, TableManagement using C2C | ||
|
||
} | ||
|
||
artifact TableManagement { | ||
|
||
include "**/io/oasp/gastronomy/restaurant/tablemanagement/**" | ||
|
||
apply "layering" | ||
|
||
connect to General, StaffManagement using C2C | ||
|
||
} | ||
|
||
artifact StaffManagement { | ||
|
||
include "**/io/oasp/gastronomy/restaurant/staffmanagement/**" | ||
|
||
apply "layering" | ||
|
||
connect to General using C2C | ||
|
||
} | ||
|
||
artifact OfferManagement { | ||
|
||
include "**/io/oasp/gastronomy/restaurant/offermanagement/**" | ||
|
||
apply "layering" | ||
|
||
connect to General using C2C | ||
|
||
} | ||
|
||
artifact General { | ||
|
||
include "**/io/oasp/gastronomy/restaurant/general/**" | ||
|
||
apply "layering" | ||
|
||
} | ||
|
||
deprecated unrestricted artifact UnassignedToComponent { | ||
|
||
include "ayp.*/**" | ||
|
||
apply "layering" | ||
|
||
} | ||
|
151 changes: 151 additions & 0 deletions
151
...-settings/src/main/settings/sonargraph/OASP4J-Sample.sonargraph/Architecture/layering.arc
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,151 @@ | ||
// Technical Architecture of an OASP application | ||
// - defines an artifact per layer with interfaces for the sub packages | ||
// - all artifacts and interfaces optional, depends on the component what is used, nothing mandatory | ||
|
||
// service layer | ||
exposed optional artifact service | ||
{ | ||
|
||
include "**/service/**" | ||
|
||
// default interface: api package | ||
optional interface default { | ||
|
||
include "**/api/**" | ||
|
||
} | ||
|
||
// service configuration: can instantiate common implementation artifacts | ||
optional artifact configuration { | ||
|
||
include "**/impl/config/**" | ||
|
||
connect to common.impl | ||
|
||
} | ||
|
||
// service implementation (can be instantiated via configurations) | ||
optional interface impl { | ||
|
||
include "**/impl/**" | ||
|
||
} | ||
|
||
// only depend on logic and allow common extensions | ||
connect to logic, common.base | ||
} | ||
|
||
// batch layer | ||
optional artifact batch { | ||
|
||
include "**/batch/**" | ||
|
||
// only depend on logic, allow common extensions and direct DAO access | ||
connect to logic, dataaccess, common.base | ||
|
||
} | ||
|
||
// logic layer | ||
exposed optional artifact logic | ||
{ | ||
include "**/logic/**" | ||
// s. comment in common artifact | ||
exclude "**/to/**" | ||
|
||
// default interface: api package | ||
optional interface default { | ||
|
||
include "**/api/**" | ||
|
||
} | ||
|
||
// base package providing extension points for implementation in upper layers or components | ||
optional interface base { | ||
|
||
include "**/base/**" | ||
|
||
include dependency-types IMPLEMENTS, EXTENDS, USES | ||
|
||
} | ||
|
||
// logic configuration: can instantiate common implementation artifacts | ||
optional artifact configuration { | ||
|
||
include "**/impl/config/**" | ||
|
||
connect to common.impl | ||
|
||
} | ||
|
||
// only depend on dataaccess (including DAOs!) and common extension points | ||
connect to dataaccess, dataaccess.dao, common.base | ||
|
||
|
||
} | ||
|
||
// dataaccess layer | ||
exposed optional artifact dataaccess | ||
{ | ||
include "**/dataaccess/**" | ||
|
||
// default interface: api package | ||
optional interface default { | ||
|
||
include "**/api/*" | ||
|
||
} | ||
|
||
// explicitly defining DAO interface only to be used by own components logic layer | ||
optional interface dao { | ||
|
||
include "**/dao/**" | ||
|
||
} | ||
|
||
// base package providing extension points for implementation in upper layers or components | ||
optional interface base { | ||
|
||
include "**/base/**" | ||
|
||
include dependency-types IMPLEMENTS, EXTENDS, USES | ||
|
||
} | ||
|
||
// only allow common extension points | ||
connect to common.base | ||
|
||
} | ||
|
||
// common layer | ||
exposed public optional artifact common { | ||
|
||
include "**/common/**" | ||
// transport objects can be used throughout the layers | ||
include "**/to/**" | ||
|
||
// default interface: api package + transport objects | ||
optional interface default { | ||
include "**/api/**" | ||
include "**/to/**" | ||
include "**/enums/**" | ||
} | ||
|
||
// base package providing extension points for implementation in upper layers or components | ||
optional interface base { | ||
include "**/base/**" | ||
include dependency-types IMPLEMENTS, EXTENDS, USES | ||
} | ||
|
||
// implementation which can be used in configuration of upper layers | ||
optional interface impl { | ||
include "**/impl/**" | ||
include dependency-types NEW, CALL, USES | ||
} | ||
} | ||
|
||
|
||
deprecated unrestricted artifact UnassignedToLayer { | ||
|
||
include "**" | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
...j-ide-settings/src/main/settings/sonargraph/OASP4J-Sample.sonargraph/Models/Modifiable.vm
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,53 @@ | ||
<?xml version="1.0" ?> | ||
<virtualModel version="9.4.4.454"> | ||
<resolutions> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.general.dataaccess.base.dao" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T07:15:00.211Z" description="Accessed from other components for implementation. Should therefore be part of the base package reserved for such purpose."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="06732586ba93ce5ca185033b34a7df0a"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:dataaccess:api:dao:ApplicationDao.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.general.dataaccess.base.dao" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T07:15:22.143Z" description="Accessed from other components for implementation. Should therefore be part of the base package reserved for such purpose."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="41f1e9e654f7748848003e053de83118"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:dataaccess:api:dao:ApplicationRevisionedDao.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.general.dataaccess.base" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T07:16:33.061Z" description="Accessed from other components as base class for entities. Should therefore be part of the base package reserved for such purpose."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="097433820ac70bcbda63b6364fd72842"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:dataaccess:api:ApplicationPersistenceEntity.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.general.service.impl.config" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T07:28:16.644Z" description="Configuriguration of service layer, not logic layer. At least its referenced from service configuration..."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="dee6655da772cb55e541595fbb797e47"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:logic:impl:config:DefaultRolesPrefixPostProcessor.java</elementPattern> | ||
</move> | ||
<fix assignedTo="" priority="Medium" date="2017-05-18T07:29:43.755Z" description="Introduce dependency inversion e.g. by a veto listener. Otherwise we end up with a cyclic component dependency"> | ||
<type class="Architecture" name="ArchitectureViolation" descriptor="./components.arc"></type> | ||
<dependencyPattern type="Wildcard" from="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:tablemanagement:logic:impl:TablemanagementImpl.java:TablemanagementImpl:salesmanagement" to="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:salesmanagement:logic:api:Salesmanagement.java:Salesmanagement"></dependencyPattern> | ||
<dependencyPattern type="Wildcard" from="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:tablemanagement:logic:impl:TablemanagementImpl.java:TablemanagementImpl:isTableReleasable(io.oasp.gastronomy.restaurant.tablemanagement.logic.api.to.TableEto)" to="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:salesmanagement:logic:api:Salesmanagement.java:Salesmanagement:findOpenOrderForTable(long)"></dependencyPattern> | ||
<dependencyPattern type="Wildcard" from="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:tablemanagement:logic:impl:TablemanagementImpl.java:TablemanagementImpl:isTableReleasable(io.oasp.gastronomy.restaurant.tablemanagement.logic.api.to.TableEto)" to="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:salesmanagement:logic:api:to:OrderEto.java:OrderEto"></dependencyPattern> | ||
<dependencyPattern type="Wildcard" from="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:tablemanagement:logic:impl:TablemanagementImpl.java:TablemanagementImpl:setSalesmanagement(io.oasp.gastronomy.restaurant.salesmanagement.logic.api.Salesmanagement)" to="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:salesmanagement:logic:api:Salesmanagement.java:Salesmanagement"></dependencyPattern> | ||
</fix> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.application.service.impl.config" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T09:11:49.331Z" description="Configuration on application level, should sit therefore in new application component"> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="43eed83294914ebe32f14e62c03d91d4"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:service:impl:rest:ApplicationObjectMapperFactory.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.application.service.impl.config" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T09:13:11.809Z" description="Configuration on application level, should sit therefore in new application component"> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="3d0521c4d49cc33a735b34f3c631aab3"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:service:impl:config:ServiceConfig.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.general.logic.api" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T09:22:37.867Z" description="This is a UC and should be part of API. Also used as such."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="21172c638ff7ce6b2aee6f1353aafc5b"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:logic:base:UcManageBinaryObject.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.application" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T09:36:31.122Z" description="Moving to new application component, because this is were it belongs."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="9299270d23e6612adb00249537cb6a29"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:SpringBootApp.java</elementPattern> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:SpringBootBatchApp.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.application" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-05-18T09:47:13.115Z" description="Moving to new application component, because this is were it belongs."> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="9c9e55252336e0a76078afb6a40a2644"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:service:impl:config:ServletInitializer.java</elementPattern> | ||
</move> | ||
<move targetRootDirectory="Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java" moveToParentName="io.oasp.gastronomy.restaurant.general.service.impl.rest" language="Java" elementType="Component" assignedTo="" priority="Medium" date="2017-09-01T13:05:49.127Z" description=""> | ||
<type class="com.hello2morrow.sonargraph.core.model.element.CoreIssueId" name="MoveRefactoring" descriptor="23f3560428d66cc2ce0aef0b92e75bd8"></type> | ||
<elementPattern type="FullyQualifiedName">Workspace:oasp4j-sample-core:../../../../../../samples/core/src/main/java:io:oasp:gastronomy:restaurant:general:gui:api:LoginController.java</elementPattern> | ||
</move> | ||
</resolutions> | ||
</virtualModel> |
9 changes: 9 additions & 0 deletions
9
oasp4j-ide-settings/src/main/settings/sonargraph/OASP4J-Sample.sonargraph/system.sonargraph
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,9 @@ | ||
<?xml version="1.0" ?> | ||
<ns2:softwareSystem xmlns:ns2="http://www.hello2morrow.com/sonargraph/core" id="c610dff0e26ea61387ec1244e55a1b33" version="9.4.4.454"> | ||
<description></description> | ||
<module xmlns:ns4="http://www.hello2morrow.com/sonargraph/languageprovider/java" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:xsdJavaModule" name="oasp4j-sample-core" id="d451c185f4a658d82d5fc402de140b37" language="Java"> | ||
<description>Core of the server for the restaurant application - a simple example using the Open Application Standard Platform for Java (OASP4J).</description> | ||
<rootPath xsi:type="ns4:xsdSourceRootPath" name="../../../../../../samples/core/src/main/java"></rootPath> | ||
<rootPath name="../../../../../../samples/core/eclipse-target/classes"></rootPath> | ||
</module> | ||
</ns2:softwareSystem> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peanuts but OASP indentation is 2 spaces not 4.