You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2019/12/13 11:58:01 UTC
[isis] branch master updated: ISIS-2158: demo-app: remove obsolete
markdown files (using adoc now)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new e207342 ISIS-2158: demo-app: remove obsolete markdown files (using adoc now)
e207342 is described below
commit e2073425ec82b52cf48636f03d3be473a47a63f9
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Dec 13 12:57:49 2019 +0100
ISIS-2158: demo-app: remove obsolete markdown files (using adoc now)
---
.../dom/actions/assoc/AssociatedActionDemo.md | 42 -------------
.../demoapp/dom/actions/async/AsyncActionDemo.md | 11 ----
.../dom/actions/depargs/DependentArgsActionDemo.md | 11 ----
.../src/main/java/demoapp/dom/error/ErrorDemo.md | 36 -----------
.../demo/src/main/java/demoapp/dom/jee/JeeDemo.md | 70 ----------------------
.../demo/src/main/java/demoapp/dom/tabs/TabDemo.md | 6 --
.../main/java/demoapp/dom/tooltip/TooltipDemo.md | 42 -------------
.../src/main/java/demoapp/dom/tree/TreeDemo.md | 30 ----------
.../main/java/demoapp/dom/types/text/TextDemo.md | 22 -------
.../java/demoapp/dom/types/time/TemporalDemo.md | 70 ----------------------
10 files changed, 340 deletions(-)
diff --git a/examples/demo/src/main/java/demoapp/dom/actions/assoc/AssociatedActionDemo.md b/examples/demo/src/main/java/demoapp/dom/actions/assoc/AssociatedActionDemo.md
deleted file mode 100644
index c66c0ce..0000000
--- a/examples/demo/src/main/java/demoapp/dom/actions/assoc/AssociatedActionDemo.md
+++ /dev/null
@@ -1,42 +0,0 @@
-<span class="version-reference">(since 1.16)</span>
-
-The framework allows an action to be associated with other properties or collections of the same domain object. For complete reference see the [Apache Isis Reference Guide](https://isis.apache.org/guides/rgant/rgant.html#_rgant-Action_associateWith)
-
-We setup a simple `DemoItem` class to demonstrate this.
-
-```java
-@DomainObject
-public class DemoItem {
-
- public String title() {
- return String.format("DemoItem '%s'", getName());
- }
-
- @Property
- @Getter @Setter private String name;
-
-}
-```
-
-Now following demo view model holds `items` a collection of element type `DemoItem`. The action method `doSomethingWithItems(...)` can be thought of as associated with the `items` collection, because it expresses this association using the annotation `@Action(associateWith="items")`.
-
-```java
-@DomainObject(nature=Nature.VIEW_MODEL)
-public class AssociatedActionDemo extends DemoStub {
-
- @Inject MessageService messageService;
-
- @Getter private final Set<DemoItem> items;
-
- @Action(associateWith="items")
- public AssociatedActionDemo doSomethingWithItems(Set<DemoItem> items) {
- if(items!=null) {
- items.forEach(item->messageService.informUser(item.getName()));
- }
- return this;
- }
-
-}
-```
-
-See the associated action demo [sources](${SOURCES_DEMO}/demoapp/dom/actions/assoc).
diff --git a/examples/demo/src/main/java/demoapp/dom/actions/async/AsyncActionDemo.md b/examples/demo/src/main/java/demoapp/dom/actions/async/AsyncActionDemo.md
deleted file mode 100644
index 363b412..0000000
--- a/examples/demo/src/main/java/demoapp/dom/actions/async/AsyncActionDemo.md
+++ /dev/null
@@ -1,11 +0,0 @@
-<span class="version-reference">(since 2.0.0-M3)</span>
-
-TODO
-
-```java
-
-//TODO
-
-```
-
-See the associated action demo [sources](${SOURCES_DEMO}/demoapp/dom/actions/async).
diff --git a/examples/demo/src/main/java/demoapp/dom/actions/depargs/DependentArgsActionDemo.md b/examples/demo/src/main/java/demoapp/dom/actions/depargs/DependentArgsActionDemo.md
deleted file mode 100644
index 7c2b083..0000000
--- a/examples/demo/src/main/java/demoapp/dom/actions/depargs/DependentArgsActionDemo.md
+++ /dev/null
@@ -1,11 +0,0 @@
-<span class="version-reference">(since 1.18.0 and 2.0.0-M3)</span>
-
-TODO
-
-```java
-
-//TODO
-
-```
-
-See the associated action demo [sources](${SOURCES_DEMO}/demoapp/dom/actions/depargs).
diff --git a/examples/demo/src/main/java/demoapp/dom/error/ErrorDemo.md b/examples/demo/src/main/java/demoapp/dom/error/ErrorDemo.md
deleted file mode 100644
index 83ee134..0000000
--- a/examples/demo/src/main/java/demoapp/dom/error/ErrorDemo.md
+++ /dev/null
@@ -1,36 +0,0 @@
-<span class="version-reference">(since 2.0.0-M1)</span>
-
-Hit the 'Trigger An Error' button an see what happens!
-
-The framework does provide a default error handling implementation. However, by implementing a custom `ErrorReportingService` you may provide a more user-friendly experience:
-
-```java
-@DomainService(nature = NatureOfService.DOMAIN)
-public class DemoErrorReportingService implements ErrorReportingService {
-
- @Override
- public Ticket reportError(ErrorDetails errorDetails) {
-
- String reference = "#0";
- String userMessage = errorDetails.getMainMessage();
- String details = "Apologies!";
-
- val mailTo = MailTo.builder()
- .receiver("support@hello.world")
- .subject("[Simple-Module] Unexpected Error ("+reference+")")
- .body(MailTo.mailBodyOf(errorDetails))
- .build();
-
- StackTracePolicy policy = StackTracePolicy.SHOW;
- val ticket = new EmailTicket(mailTo, reference, userMessage, details,
- policy,
- "http://www.randomkittengenerator.com/cats/rotator.php");
-
- return ticket;
- }
-
-
-}
-```
-
-See the ErrorReportingService implemented for this demo here: [sources](${SOURCES_DEMO}/demoapp/dom/error/service).
diff --git a/examples/demo/src/main/java/demoapp/dom/jee/JeeDemo.md b/examples/demo/src/main/java/demoapp/dom/jee/JeeDemo.md
deleted file mode 100644
index 6975faa..0000000
--- a/examples/demo/src/main/java/demoapp/dom/jee/JeeDemo.md
+++ /dev/null
@@ -1,70 +0,0 @@
-<span class="version-reference">(since 2.0.0-M2)</span>
-
-When running this demo using one of the JEE enabled images (eg. `payara`), this simple singleton bean is managed by the EJB container via `CDI`:
-
-```java
-import javax.ejb.Singleton;
-
-@Singleton
-public class JeeDemoService {
-
- public String getMessage() {
- return "Hello World from JEE";
- }
-
-}
-```
-
-Now we can verify that domain object service injection also works with CDI managed beans:
-
-```java
-@DomainObject
-public class JeeDemo {
-
- @Inject private JeeDemoService jeeDemoService;
-
- @Action
- public String getJeeMessage(){
- return jeeDemoService.getMessage();
- }
-
- ...
-
-}
-```
-
-See the sources for this demo here: [sources](${SOURCES_DEMO}/demoapp/dom/jee).
-
-## Container Managed Connection Pool (advanced JEE usage):
-
-You need to setup your JEE container's built-in connection pool inside the container first. This is vendor specific.
-You than can use this connection pool via `JNDI` lookup.
-
-### Setup JDO
-
-```
-isis.persistor.datanucleus.impl.datanucleus.ConnectionFactoryName=jdbc/demo-domain
-isis.persistor.datanucleus.impl.datanucleus.ConnectionFactory2Name=jdbc/demo-domain-nontx
-isis.persistor.datanucleus.impl.javax.jdo.option.TransactionType=JTA
-```
-
-### Setup JNDI resource provider
-
-Add a singleton bean to your application, that provides the lookup resources.
-
-```java
-import javax.ejb.*;
-
-@Singleton
-@Startup
-public class ConnectionResources {
-
- @Resource(lookup="jdbc/demo-domain")
- private javax.sql.DataSource domainDS;
-
- @Resource(lookup="jdbc/demo-domain-nontx")
- private javax.sql.DataSource domainDS_nontx;
-
-}
-```
-
diff --git a/examples/demo/src/main/java/demoapp/dom/tabs/TabDemo.md b/examples/demo/src/main/java/demoapp/dom/tabs/TabDemo.md
deleted file mode 100644
index fdac779..0000000
--- a/examples/demo/src/main/java/demoapp/dom/tabs/TabDemo.md
+++ /dev/null
@@ -1,6 +0,0 @@
-<span class="version-reference">(since 1.x)</span>
-
-//TODO
-
-See the sources for this demo here: [sources](${SOURCES_DEMO}/demoapp/dom/tabs)
-
diff --git a/examples/demo/src/main/java/demoapp/dom/tooltip/TooltipDemo.md b/examples/demo/src/main/java/demoapp/dom/tooltip/TooltipDemo.md
deleted file mode 100644
index b79dbd9..0000000
--- a/examples/demo/src/main/java/demoapp/dom/tooltip/TooltipDemo.md
+++ /dev/null
@@ -1,42 +0,0 @@
-<span class="version-reference">(since 2.0.0-M2)</span>
-
-The framework supports for different targets to be associated with tooltip effects, that trigger on `mouse-over`. These effects utilize `java-script` and are rendered without delay. Targets are
-
- * Action Buttons
- * Action Parameters
- * Menu Actions _(mouse-over the `Tooltip Demo` menu entry)_
- * Entity Properties and Collections
- * Table Column Headers
-
-**Described As** (Targets: Action, Parameter, Property, Collection)
-
-
-```java
-@ActionLayout(describedAs="tooltip text goes here")
-@ParameterLayout(describedAs="tooltip text goes here")
-@PropertyLayout(describedAs="tooltip text goes here")
-```
-
-**Disabled Reason** (Targets: Action)
-
-
-```java
-@Action
-public void anAction(){
- // do something
-}
-
-public String disableAnAction() {
- return "tooltip text goes here";
-}
-```
-
-**Editing Disabled Reason** (Targets: Property)
-
-```java
-@Property(
- editingDisabledReason="tooltip text goes here")
-```
-
-See the sources for this demo here: [sources](${SOURCES_DEMO}/demoapp/dom/tooltip)
-
diff --git a/examples/demo/src/main/java/demoapp/dom/tree/TreeDemo.md b/examples/demo/src/main/java/demoapp/dom/tree/TreeDemo.md
deleted file mode 100644
index 66cd3ed..0000000
--- a/examples/demo/src/main/java/demoapp/dom/tree/TreeDemo.md
+++ /dev/null
@@ -1,30 +0,0 @@
-<span class="version-reference">(since 2.0.0-M1)</span>
-
-This is a lazy tree. Tree nodes are either domain-objects or domain-views, which are generated on the fly by a specified [TreeAdapter](${SOURCES_ISIS}/org/apache/isis/applib/tree/TreeAdapter.java).
-
-```java
-public interface TreeAdapter<T> {
-
- public Optional<T> parentOf(T value);
-
- public int childCountOf(T value);
-
- public Stream<T> childrenOf(T value);
-
-}
-```
-
-We create a tree by starting with it's root node and providing a `FileSystemTreeAdapter` that implements `TreeAdapter`.
-
-```java
-public TreeNode<FileNode> createTree() {
- val root = FileNodeFactory.defaultRoot();
- val tree = TreeNode.lazy(root, FileSystemTreeAdapter.class);
- tree.expand(TreePath.of(0)); // expand the root node
- return tree;
-}
-```
-
-See the tree demo [sources](${SOURCES_DEMO}/demoapp/dom/tree).
-
-Also see [open issues](${ISSUES_DEMO}?utf8=✓&q=is%3Aissue+is%3Aopen+tree) with trees.
\ No newline at end of file
diff --git a/examples/demo/src/main/java/demoapp/dom/types/text/TextDemo.md b/examples/demo/src/main/java/demoapp/dom/types/text/TextDemo.md
deleted file mode 100644
index 41a0399..0000000
--- a/examples/demo/src/main/java/demoapp/dom/types/text/TextDemo.md
+++ /dev/null
@@ -1,22 +0,0 @@
-<span class="version-reference">(since 1.)</span>
-
-The framework supports text values as:
-- Single-line
-- Multi-line
-
-For multi-line rendering use `@PropertyLayout(multiLine=...)`:
-
-```java
-public class TextDemo {
-
- @Property
- @Getter @Setter private String string; // rendered as single line field
-
- @Property
- @PropertyLayout(multiLine=3)
- @Getter @Setter private String stringMultiline; // rendered as multi-line field (3 lines)
-
-}
-```
-
-See the text demo [sources](${SOURCES_DEMO}/demoapp/dom/scalars).
diff --git a/examples/demo/src/main/java/demoapp/dom/types/time/TemporalDemo.md b/examples/demo/src/main/java/demoapp/dom/types/time/TemporalDemo.md
deleted file mode 100644
index 0edb1a6..0000000
--- a/examples/demo/src/main/java/demoapp/dom/types/time/TemporalDemo.md
+++ /dev/null
@@ -1,70 +0,0 @@
-<span class="version-reference">(since 1.16)</span>
-
-The framework supports following temporal values from the Java Time API (and joda.org):
-
-1) Date only
-- java.sql.**Date**
-- java.time.**LocalDate**; <span class="version-reference">(since 2.0.0-M1)</span>
-- org.joda.time.**LocalDate**
-
-2) Date and Time
-- java.util.**Date**
-- java.sql.**Timestamp**
-- java.time.**LocalDateTime** <span class="version-reference">(since 2.0.0-M1)</span>
-- java.time.**OffsetDateTime** <span class="version-reference">(since 2.0.0-M1)</span>
-- org.joda.time.**DateTime**
-- org.joda.time.**LocalDateTime**
-
-If used with JAXB View Models, you need to specify specific XmlAdapters as provided by `org.apache.isis.applib.util.JaxbAdapters.*`:
-
-```java
-@XmlRootElement(name = "Demo")
-@XmlType
-@XmlAccessorType(XmlAccessType.FIELD)
-@DomainObject(nature=Nature.VIEW_MODEL)
-public class TemporalDemo extends DemoStub {
-
- // -- DATE ONLY (LOCAL TIME)
-
- @XmlElement @XmlJavaTypeAdapter(SqlDateAdapter.class)
- @Getter @Setter private java.sql.Date javaSqlDate;
-
- @XmlElement @XmlJavaTypeAdapter(LocalDateAdapter.class)
- @Getter @Setter private LocalDate javaLocalDate;
-
- // -- DATE AND TIME (LOCAL TIME)
-
- @XmlElement @XmlJavaTypeAdapter(DateAdapter.class)
- @Getter @Setter private Date javaUtilDate;
-
- @XmlElement @XmlJavaTypeAdapter(SqlTimestampAdapter.class)
- @Getter @Setter private java.sql.Timestamp javaSqlTimestamp;
-
- @XmlElement @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
- @Getter @Setter private LocalDateTime javaLocalDateTime;
-
- // -- DATE AND TIME (WITH TIMEZONE OFFSET)
-
- @XmlElement @XmlJavaTypeAdapter(OffsetDateTimeAdapter.class)
- @Getter @Setter private OffsetDateTime javaOffsetDateTime;
-
- // --
-
- @Override
- public void initDefaults() {
-
- log.info("TemporalDemo::initDefaults");
-
- javaUtilDate = new Date();
- javaSqlDate = new java.sql.Date(System.currentTimeMillis());
- javaSqlTimestamp = new java.sql.Timestamp(System.currentTimeMillis());
-
- javaLocalDate = LocalDate.now();
- javaLocalDateTime = LocalDateTime.now();
- javaOffsetDateTime = OffsetDateTime.now();
- }
-
-}
-```
-
-See the temporal demo [sources](${SOURCES_DEMO}/demoapp/dom/scalars).