Skip to content

Commit 547d798

Browse files
Merge pull request iluwatar#1 from iluwatar/master
merging changes into fork from origin
2 parents db6ec3c + 3001fa4 commit 547d798

File tree

1,283 files changed

+67513
-9846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,283 files changed

+67513
-9846
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ target
1111
.idea
1212
*.iml
1313
*.swp
14+
datanucleus.log
15+
/bin/
16+
/bin/
17+
/bin/
1418

19+
data-mapper/src/main/resources/log4j.xml

.travis.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
language: java
2-
32
jdk:
4-
- oraclejdk8
3+
- oraclejdk8
54

6-
# whitelist
7-
branches:
8-
only:
9-
- master
5+
env:
6+
global:
7+
- GH_REF: github.com/iluwatar/java-design-patterns.git
8+
- secure: LxTDuNS/rBWIvKkaEqr79ImZAe48mCdoYCF41coxNXgNoippo4GIBArknqtv+XvdkiuRZ1yGyj6pn8GU33c/yn+krddTUkVCwTbVatbalW5jhQjDbHYym/JcxaK9ZS/3JTeGcWrBgiPqHEEDhCf26vPZsXoMSeVCEORVKTp1BSg=
9+
10+
before_install:
11+
- export DISPLAY=:99.0
12+
- sh -e /etc/init.d/xvfb start
1013

1114
after_success:
12-
- mvn clean test jacoco:report coveralls:report
15+
- mvn clean test jacoco:report coveralls:report
16+
- bash update-ghpages.sh
17+
18+
sudo: false # route the build to the container-based infrastructure for a faster build

CODE_COVERAGE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Code Coverage Report generation
2+
3+
To generate the code coverage report, execute the following command:
4+
> mvn clean verify
5+
6+
This will generate code coverage report in each of the modules. In order to view the same, open the following file in your browser.
7+
> target/site/jacoco/index.html
8+
9+
Please note that the above folder is created under each of the modules. For example:
10+
* adapter/target/site/jacoco/index.html
11+
* busniess-delegate/target/site/jacoco/index.html
12+
13+

CONTRIBUTING.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This is great you have something to contribute!
2+
3+
Before going any further please read the [wiki](https://github.com/iluwatar/java-design-patterns/wiki)
4+
with conventions and rules we used for this project.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Ilkka Seppälä
3+
Copyright (c) 2014-2016 Ilkka Seppälä
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 29 additions & 721 deletions
Large diffs are not rendered by default.

abstract-document/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: pattern
3+
title: Abstract Document
4+
folder: abstract-document
5+
permalink: /patterns/abstract-document/
6+
categories: Structural
7+
tags:
8+
- Java
9+
- Difficulty-Intermediate
10+
---
11+
12+
## Intent
13+
Achieve flexibility of untyped languages and keep the type-safety
14+
15+
![alt text](./etc/abstract-document-base.png "Abstract Document Base")
16+
17+
![alt text](./etc/abstract-document.png "Abstract Document Traits and Domain")
18+
19+
20+
## Applicability
21+
Use the Abstract Document Pattern when
22+
23+
* there is a need to add new properties on the fly
24+
* you want a flexible way to organize domain in tree like structure
25+
* you want more loosely coupled system
26+
27+
28+
## Credits
29+
30+
* [Wikipedia: Abstract Document Pattern](https://en.wikipedia.org/wiki/Abstract_Document_Pattern)
31+
* [Martin Fowler: Dealing with properties](http://martinfowler.com/apsupp/properties.pdf)
14.6 KB
Loading
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<class-diagram version="1.1.9" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
3+
realizations="true" associations="true" dependencies="false" nesting-relationships="true" router="FAN">
4+
<interface id="1" language="java" name="com.iluwatar.abstractdocument.Document" project="design-patterns"
5+
file="/design-patterns/src/com/iluwatar/abstractdocument/Document.java" binary="false" corner="BOTTOM_RIGHT">
6+
<position height="-1" width="-1" x="249" y="405"/>
7+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
8+
sort-features="false" accessors="true" visibility="true">
9+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
10+
<operations public="true" package="true" protected="true" private="true" static="true"/>
11+
</display>
12+
</interface>
13+
<class id="2" language="java" name="com.iluwatar.abstractdocument.AbstractDocument" project="design-patterns"
14+
file="/design-patterns/src/com/iluwatar/abstractdocument/AbstractDocument.java" binary="false" corner="BOTTOM_RIGHT">
15+
<position height="-1" width="-1" x="250" y="237"/>
16+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
17+
sort-features="false" accessors="true" visibility="true">
18+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
19+
<operations public="true" package="true" protected="true" private="true" static="true"/>
20+
</display>
21+
</class>
22+
<class id="3" language="java" name="com.iluwatar.abstractdocument.domain.Car" project="design-patterns"
23+
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/Car.java" binary="false" corner="BOTTOM_RIGHT">
24+
<position height="-1" width="-1" x="108" y="75"/>
25+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
26+
sort-features="false" accessors="true" visibility="true">
27+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
28+
<operations public="true" package="true" protected="true" private="true" static="true"/>
29+
</display>
30+
</class>
31+
<class id="4" language="java" name="com.iluwatar.abstractdocument.domain.Part" project="design-patterns"
32+
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/Part.java" binary="false" corner="BOTTOM_RIGHT">
33+
<position height="-1" width="-1" x="400" y="76"/>
34+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
35+
sort-features="false" accessors="true" visibility="true">
36+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
37+
<operations public="true" package="true" protected="true" private="true" static="true"/>
38+
</display>
39+
</class>
40+
<generalization id="5">
41+
<end type="SOURCE" refId="4"/>
42+
<end type="TARGET" refId="2"/>
43+
</generalization>
44+
<realization id="6">
45+
<end type="SOURCE" refId="2"/>
46+
<end type="TARGET" refId="1"/>
47+
</realization>
48+
<generalization id="7">
49+
<end type="SOURCE" refId="3"/>
50+
<end type="TARGET" refId="2"/>
51+
</generalization>
52+
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
53+
sort-features="false" accessors="true" visibility="true">
54+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
55+
<operations public="true" package="true" protected="true" private="true" static="true"/>
56+
</classifier-display>
57+
<association-display labels="true" multiplicity="true"/>
58+
</class-diagram>
16.3 KB
Loading

0 commit comments

Comments
 (0)