Skip to content

Commit 2502ac2

Browse files
committed
2 parents add65b3 + 3dc6b81 commit 2502ac2

File tree

9 files changed

+132
-155
lines changed

9 files changed

+132
-155
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Structural patterns are concerned with how classes and objects are composed to f
4747

4848
### Behavioral Patterns
4949

50-
Behavioral patterns are concerned with algorithms and the assignment of responsibilites between objects.
50+
Behavioral patterns are concerned with algorithms and the assignment of responsibilities between objects.
5151

5252
* [Chain of responsibility](#chain-of-responsibility)
5353
* [Command](#command)
@@ -228,7 +228,7 @@ A programming idiom is a means of expressing a recurring construct in one or mor
228228
**Applicability:** Use Decorator
229229
* to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects
230230
* for responsibilities that can be withdrawn
231-
* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of sublasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing
231+
* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of subclasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing
232232

233233
## <a name="facade">Facade</a> [&#8593;](#list-of-design-patterns)
234234
**Intent:** Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
@@ -283,7 +283,7 @@ A programming idiom is a means of expressing a recurring construct in one or mor
283283

284284
![alt text](./service-locator/etc/service-locator.png "Proxy")
285285

286-
**Applicability:** The service locator pattern is applicable whenever we want to locate/fetch various services using JNDI which, typically, is a redundant and expensive lookup. The service Locator pattern addresses this expensive lookup by making use of caching techniques ie. for the very first time a particular service is requested, the service Locator looks up in JNDI, fetched the relavant service and then finally caches this service object. Now, further lookups of the same service via Service Locator is done in its cache which improves the performance of application to great extent.
286+
**Applicability:** The service locator pattern is applicable whenever we want to locate/fetch various services using JNDI which, typically, is a redundant and expensive lookup. The service Locator pattern addresses this expensive lookup by making use of caching techniques ie. for the very first time a particular service is requested, the service Locator looks up in JNDI, fetched the relevant service and then finally caches this service object. Now, further lookups of the same service via Service Locator is done in its cache which improves the performance of application to great extent.
287287

288288
**Typical Use Case:**
289289

@@ -686,7 +686,7 @@ validation and for building to order
686686
**Applicability:** Use the Front Controller pattern when
687687
* you want to encapsulate common request handling functionality in single place
688688
* you want to implements dynamic request handling i.e. change routing without modifying code
689-
* make web server configution portable, you only need to register the handler web server specific way
689+
* make web server configuration portable, you only need to register the handler web server specific way
690690

691691
**Real world examples:**
692692
* [Apache Struts](https://struts.apache.org/)
@@ -711,7 +711,7 @@ validation and for building to order
711711
![alt text](./business-delegate/etc/business-delegate.png "Business Delegate")
712712

713713
**Applicability:** Use the Business Delegate pattern when
714-
* you want loose couping between presentation and business tiers
714+
* you want loose coupling between presentation and business tiers
715715
* you want to orchestrate calls to multiple business services
716716
* you want to encapsulate service lookups and service calls
717717

naked-objects/dom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<activeByDefault>true</activeByDefault>
7373
</activation>
7474
<properties>
75-
<datanucleus-maven-plugin.version>4.0.0-release</datanucleus-maven-plugin.version>
75+
<datanucleus-maven-plugin.version>4.0.1</datanucleus-maven-plugin.version>
7676
</properties>
7777
<build>
7878
<pluginManagement>

naked-objects/dom/src/main/java/domainapp/dom/modules/simple/SimpleObjects.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public List<SimpleObject> findByName(
7070
final String name
7171
) {
7272
return container.allMatches(
73-
new QueryDefault<SimpleObject>(
73+
new QueryDefault<>(
7474
SimpleObject.class,
7575
"findByName",
7676
"name", name));
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package domainapp.fixture;
20+
21+
import org.apache.isis.applib.annotation.DomainService;
22+
import org.apache.isis.applib.annotation.NatureOfService;
23+
import org.apache.isis.applib.fixturescripts.FixtureScripts;
24+
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecification;
25+
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecificationProvider;
26+
27+
import domainapp.fixture.scenarios.RecreateSimpleObjects;
28+
29+
/**
30+
* Specifies where to find fixtures, and other settings.
31+
*/
32+
@DomainService(nature = NatureOfService.DOMAIN)
33+
public class DomainAppFixturesProvider implements FixtureScriptsSpecificationProvider {
34+
@Override
35+
public FixtureScriptsSpecification getSpecification() {
36+
return FixtureScriptsSpecification
37+
.builder(DomainAppFixturesProvider.class)
38+
.with(FixtureScripts.MultipleExecutionStrategy.EXECUTE)
39+
.withRunScriptDefault(RecreateSimpleObjects.class)
40+
.withRunScriptDropDown(FixtureScriptsSpecification.DropDownPolicy.CHOICES)
41+
.withRecreate(RecreateSimpleObjects.class)
42+
.build();
43+
}
44+
}

naked-objects/fixture/src/main/java/domainapp/fixture/DomainAppFixturesService.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectsTearDown.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class SimpleObjectsTearDown extends FixtureScript {
2626

2727
@Override
2828
protected void execute(ExecutionContext executionContext) {
29-
isisJdoSupport.executeUpdate("delete from simple.\"SimpleObject\"");
29+
isisJdoSupport.executeUpdate("delete from \"simple\".\"SimpleObject\"");
3030
}
3131

3232

naked-objects/integtests/pom.xml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,38 @@
8484
<artifactId>hsqldb</artifactId>
8585
</dependency>
8686

87-
<!-- uncomment to enable enhanced cucumber-jvm reporting http://www.masterthought.net/section/cucumber-reporting
88-
<dependency> <groupId>com.googlecode.totallylazy</groupId> <artifactId>totallylazy</artifactId>
89-
<version>991</version> </dependency> <dependency> <groupId>net.masterthought</groupId>
90-
<artifactId>cucumber-reporting</artifactId> <version>0.0.21</version> </dependency>
91-
<dependency> <groupId>net.masterthought</groupId> <artifactId>maven-cucumber-reporting</artifactId>
92-
<version>0.0.4</version> </dependency> -->
93-
</dependencies>
87+
<!--
88+
uncomment to enable enhanced cucumber-jvm reporting
89+
http://www.masterthought.net/section/cucumber-reporting
90+
<dependency>
91+
<groupId>com.googlecode.totallylazy</groupId>
92+
<artifactId>totallylazy</artifactId>
93+
<version>991</version>
94+
</dependency>
9495
95-
<!-- uncomment for enhanced cucumber-jvm reporting http://www.masterthought.net/section/cucumber-reporting
96-
<repositories> <repository> <id>repo.bodar.com</id> <url>http://repo.bodar.com</url>
97-
</repository> </repositories> -->
96+
<dependency>
97+
<groupId>net.masterthought</groupId>
98+
<artifactId>cucumber-reporting</artifactId>
99+
<version>0.0.21</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>net.masterthought</groupId>
103+
<artifactId>maven-cucumber-reporting</artifactId>
104+
<version>0.0.4</version>
105+
</dependency>
106+
-->
107+
</dependencies>
108+
109+
<!--
110+
uncomment for enhanced cucumber-jvm reporting
111+
http://www.masterthought.net/section/cucumber-reporting
112+
<repositories>
113+
<repository>
114+
<id>repo.bodar.com</id>
115+
<url>http://repo.bodar.com</url>
116+
</repository>
117+
</repositories>
118+
-->
98119

99120

100121
</project>

naked-objects/pom.xml

Lines changed: 46 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -240,61 +240,52 @@
240240
<exclude>**/translations*.po</exclude>
241241
</excludes>
242242
<licenses>
243-
<license
244-
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
245-
<licenseFamilyCategory>AL2</licenseFamilyCategory>
246-
<licenseFamilyName>Apache License 2.0</licenseFamilyName>
247-
<notes />
248-
<patterns>
249-
<pattern>Licensed to the Apache Software Foundation (ASF) under
250-
one</pattern>
251-
</patterns>
252-
</license>
253-
<license
254-
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
255-
<licenseFamilyCategory>JQRY</licenseFamilyCategory>
256-
<licenseFamilyName>MIT</licenseFamilyName>
257-
<notes />
258-
<patterns>
259-
<pattern>Dual licensed under the MIT or GPL Version 2 licenses.</pattern>
260-
</patterns>
261-
</license>
262-
<license
263-
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
264-
<licenseFamilyCategory>JMOCK</licenseFamilyCategory>
265-
<licenseFamilyName>JMock</licenseFamilyName>
266-
<notes />
267-
<patterns>
268-
<pattern>Copyright (c) 2000-2007, jMock.org</pattern>
269-
</patterns>
270-
</license>
271-
<license
272-
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
273-
<licenseFamilyCategory>DOCBK</licenseFamilyCategory>
274-
<licenseFamilyName>DocBook 4.5</licenseFamilyName>
275-
<notes />
276-
<patterns>
277-
<pattern>Permission to copy in any form is granted for use</pattern>
278-
<pattern>Permission to use, copy, modify and distribute the
279-
DocBook DTD</pattern>
280-
<pattern>is hereby granted in perpetuity, provided that the
281-
above copyright</pattern>
282-
<pattern>This is the catalog data file for DocBook XML V4.5. It
283-
is provided as</pattern>
284-
<pattern>XML Catalog data for DocBook XML V4.5</pattern>
285-
<pattern>DocBook additional general entities V4.5</pattern>
286-
<pattern>XML EXCHANGE TABLE MODEL DECLARATION MODULE</pattern>
287-
</patterns>
288-
</license>
289-
<license
290-
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
291-
<licenseFamilyCategory>W3C</licenseFamilyCategory>
292-
<licenseFamilyName>XHTML</licenseFamilyName>
293-
<notes />
294-
<patterns>
295-
<pattern>Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),</pattern>
296-
</patterns>
297-
</license>
243+
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
244+
<licenseFamilyCategory>AL2</licenseFamilyCategory>
245+
<licenseFamilyName>Apache License 2.0</licenseFamilyName>
246+
<notes/>
247+
<patterns>
248+
<pattern>Licensed to the Apache Software Foundation (ASF) under one</pattern>
249+
</patterns>
250+
</license>
251+
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
252+
<licenseFamilyCategory>JQRY</licenseFamilyCategory>
253+
<licenseFamilyName>MIT</licenseFamilyName>
254+
<notes/>
255+
<patterns>
256+
<pattern>Dual licensed under the MIT or GPL Version 2 licenses.</pattern>
257+
</patterns>
258+
</license>
259+
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
260+
<licenseFamilyCategory>JMOCK</licenseFamilyCategory>
261+
<licenseFamilyName>JMock</licenseFamilyName>
262+
<notes/>
263+
<patterns>
264+
<pattern>Copyright (c) 2000-2007, jMock.org</pattern>
265+
</patterns>
266+
</license>
267+
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
268+
<licenseFamilyCategory>DOCBK</licenseFamilyCategory>
269+
<licenseFamilyName>DocBook 4.5</licenseFamilyName>
270+
<notes/>
271+
<patterns>
272+
<pattern>Permission to copy in any form is granted for use</pattern>
273+
<pattern>Permission to use, copy, modify and distribute the DocBook DTD</pattern>
274+
<pattern>is hereby granted in perpetuity, provided that the above copyright</pattern>
275+
<pattern>This is the catalog data file for DocBook XML V4.5. It is provided as</pattern>
276+
<pattern>XML Catalog data for DocBook XML V4.5</pattern>
277+
<pattern>DocBook additional general entities V4.5</pattern>
278+
<pattern>XML EXCHANGE TABLE MODEL DECLARATION MODULE</pattern>
279+
</patterns>
280+
</license>
281+
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
282+
<licenseFamilyCategory>W3C</licenseFamilyCategory>
283+
<licenseFamilyName>XHTML</licenseFamilyName>
284+
<notes/>
285+
<patterns>
286+
<pattern>Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),</pattern>
287+
</patterns>
288+
</license>
298289
</licenses>
299290
<licenseFamilies>
300291
<licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">

naked-objects/webapp/pom.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@
236236
<tasks>
237237
<exec executable="java" failonerror="true">
238238
<arg value="-jar" />
239-
<arg
240-
value="${project.build.directory}/${project.build.finalName}-jetty-console.jar" />
239+
<arg value="${project.build.directory}/${project.build.finalName}-jetty-console.jar" />
241240
</exec>
242241
</tasks>
243242
</configuration>
@@ -303,10 +302,8 @@
303302
<arg value="-Dtarget.dir=${target.dir}" />
304303

305304
<arg value="-Drebel.plugins=${isis_jrebel_plugin.jar}" />
306-
<arg
307-
value="-Disis-jrebel-plugin.packagePrefix=${isis-jrebel-plugin.packagePrefix}" />
308-
<arg
309-
value="-Disis-jrebel-plugin.loggingLevel=${isis-jrebel-plugin.loggingLevel}" />
305+
<arg value="-Disis-jrebel-plugin.packagePrefix=${isis-jrebel-plugin.packagePrefix}" />
306+
<arg value="-Disis-jrebel-plugin.loggingLevel=${isis-jrebel-plugin.loggingLevel}" />
310307
<arg value="-XX:MaxPermSize=128m" />
311308
<arg value="-classpath" />
312309
<arg value="${runtime_classpath}" />

0 commit comments

Comments
 (0)