You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/12/10 08:27:15 UTC
svn commit: r1644342 - in /isis/site/trunk/content: more-advanced-topics/
more-advanced-topics/images/ reference/recognized-annotations/
Author: danhaywood
Date: Wed Dec 10 07:27:15 2014
New Revision: 1644342
URL: http://svn.apache.org/r1644342
Log:
updated XxxLayout (new DomainServiceLayout, renamed ClassLayout to DomainObjectLayout); also more material on fixture scripts
Added:
isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-choice.png (with props)
isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-results.png (with props)
isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-run.png (with props)
isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios.png (with props)
isis/site/trunk/content/reference/recognized-annotations/DomainObjectLayout.md
- copied, changed from r1643166, isis/site/trunk/content/reference/recognized-annotations/ClassLayout.md
Removed:
isis/site/trunk/content/reference/recognized-annotations/ClassLayout.md
Modified:
isis/site/trunk/content/more-advanced-topics/Fixture-Scripts.md
isis/site/trunk/content/reference/recognized-annotations/ActionLayout.md
isis/site/trunk/content/reference/recognized-annotations/CollectionLayout.md
isis/site/trunk/content/reference/recognized-annotations/CssClass-deprecated.md
isis/site/trunk/content/reference/recognized-annotations/CssClassFa-deprecated.md
isis/site/trunk/content/reference/recognized-annotations/DescribedAs-deprecated.md
isis/site/trunk/content/reference/recognized-annotations/Named-deprecated.md
isis/site/trunk/content/reference/recognized-annotations/ParameterLayout.md
isis/site/trunk/content/reference/recognized-annotations/Plural-deprecated.md
isis/site/trunk/content/reference/recognized-annotations/PropertyLayout.md
isis/site/trunk/content/reference/recognized-annotations/about.md
Modified: isis/site/trunk/content/more-advanced-topics/Fixture-Scripts.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/more-advanced-topics/Fixture-Scripts.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/more-advanced-topics/Fixture-Scripts.md (original)
+++ isis/site/trunk/content/more-advanced-topics/Fixture-Scripts.md Wed Dec 10 07:27:15 2014
@@ -1,13 +1,12 @@
Fixture Scripts
===============
-> not yet complete...
-
Fixture scripts are intended to support development and testing, by setting up the system into a known state. A fixture
-script are invoked using the FixtureScriptService, and typically either call business actions on domain objects, or
+script are invoked using a "fixture script" service, and typically either call business actions on domain objects, or
call other fixture scripts (that is, the composite pattern).
-Fixture scripts can assist all through the development lifecycle:
+One simple, but noteworthy point about fixture scripts is that they can be invoked through the UI. This makes them
+useful for more than "just" testing:
* If working with your domain experts/business analyst, fixture scripts allow you to set up the app in the appropriate
state to start exploring proposed new functionality
@@ -27,16 +26,50 @@ Fixture scripts can assist all through t
* if training new users, the fixture script can be used to setup the system into a known state so that the users
can practice using the features of the system.
-The apps generated by the [two](../intro/getting-started/simpleapp-archetype.html) [archetypes](../intro/getting-started/todoapp-archetype.html)
-both use fixture scripts, as surfaced in the "Prototyping menu":
+The "fixture script" service is an application-specific subclass of the abstract `FixtureScripts` service provided in
+Isis' applib. An example of this can be found in the [simple app](../intro/getting-started/simpleapp-archetype.html)
+archetype, which defines `SimpleObjectsFixtureService`. The [todo app](../intro/getting-started/todoapp-archetype.html)
+archetype also does something very similar, defining a `ToDoItemsFixtureService`.
+
+## Using Fixture Scripts in the UI ##
+
+The normal convention is to for the (application's) fixture script service to be surfaced on a "Prototyping" menu. Here's
+how the todoapp defines its fixture script service:
+
+ @DomainService
+ @DomainServiceLayout(
+ named = "Prototyping",
+ menuBar = DomainServiceLayout.MenuBar.SECONDARY,
+ menuOrder = "10"
+ )
+ public class ToDoItemsFixturesService extends FixtureScripts {
+ ...
+ }
+
+On the prototyping menu the fixture script service's "run fixture script" action can be called:
+
+<img src="images/fixture-scenarios-run.png" width="800"></img>
+
+This brings up an action prompt that lists the available fixture scripts:
+
+<img src="images/fixture-scenarios-choice.png" width="800"></img>
+Selecting and running one of these generates a list detailing the results of running the fixture:
-The remainder of this page describes the API and typical usage.
+<img src="images/fixture-scenarios-results.png" width="800"></img>
+This list acts as a useful transcript of the steps taken by the fixture script. It also allows the user to navigate
+to any of the objects created/updated by the fixture script.
-## API ##
-Fixture scripts are implemented by subclassing the `FixtureScript` class, implementing the `execute(ExecutionContext)` method:
+## Using Fixture Scripts in Integration Tests ##
+
+TODO
+
+
+## Writing Fxture Scripts ##
+
+Fixture scripts are implemented by subclassing the `FixtureScript` class, providing an implemention of the `execute(ExecutionContext)` method:
package org.apache.isis.applib.fixturescripts;
@@ -48,22 +81,215 @@ Fixture scripts are implemented by subcl
...
}
-For example, in the [Estatio app](http://github.com/estatio/estatio) the
+The `ExecutionContext` provides several capabilities to the fixture script:
+
+* add results to the
+
+* it allows the script to execute other child fixture scripts
+
+## Example Usage ##
+
+The todo app (generated by the [todo app archetype](../intro/getting-started/todoapp-archetype.html) uses fixture scripts to create a number of todo items, in different states (some complete, some not).
+
+There are various ways of using the fixture script API, but broadly speaking it's helpful to distinguish (what we call):
+
+* action fixture scripts - fine-grained, perform a single action (or create a single object)
+* scenario fixture scripts - coarse-grained, accomplish a single business goal (or set up a bunch of related data)
+
+Scenario scripts usually call action scripts, so we'll start by discussing action scripts first.
+
+### Action scripts
+
+The todo app's `ToDoItemForBuyStamps` fixture script creates a single, not yet complete todo item:
+
+ public class ToDoItemForBuyStamps extends ToDoItemAbstract {
+
+ public static final String DESCRIPTION = "Buy stamps";
+
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+ createToDoItem(
+ DESCRIPTION,
+ Category.Domestic, Subcategory.Shopping,
+ nowPlusDays(0),
+ BD("10.00"),
+ executionContext);
+ }
+ }
+
+where in turn `ToDoItemAbstract` inherits from `FixtureScript`:
+
+ public abstract class ToDoItemAbstract extends FixtureScript {
+
+ protected ToDoItem createToDoItem(
+ final String description,
+ final Category category, final Subcategory subcategory,
+ final LocalDate dueBy,
+ final BigDecimal cost,
+ final ExecutionContext executionContext) {
+
+ // validate parameters
+ final String ownedBy = executionContext.getParameter("ownedBy");
+ if(ownedBy == null) {
+ throw new IllegalArgumentException("'ownedBy' must be specified");
+ }
+
+ // execute
+ ToDoItem newToDo = toDoItems.newToDo(
+ description, category, subcategory, ownedBy, dueBy, cost);
+ return executionContext.addResult(this, newToDo);
+ }
+
+ protected LocalDate nowPlusDays(int days) {
+ return clockService.now().plusDays(days);
+ }
+
+ protected BigDecimal BD(String str) {
+ return new BigDecimal(str);
+ }
+
+ @javax.inject.Inject
+ private ToDoItems toDoItems;
+
+ @javax.inject.Inject
+ protected ClockService clockService;
+ }
+
+In this particular design the "know-how" (to create a todo item) is encapsulated in the `ToDoItemAbstract` superclass, while the "what" (actual arguments) are in the subclass.
+
+
+
+
+It's also possible for fixture scripts to call prerequisite fixture scripts. So, this fixture script will create the "buy stamps" todo item and then complete it:
+
+ public class ToDoItemCompleteForBuyStamps extends ToDoItemCompleteAbstract {
+
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+
+ // prereqs
+ executeChild(new ToDoItemForBuyStamps(), executionContext);
+
+ // this fixture
+ complete(ToDoItemForBuyStamps.DESCRIPTION, executionContext);
+ }
+ }
+
+where once more the superclass provides the "know-how":
+
+ public abstract class ToDoItemCompleteAbstract extends FixtureScript {
+
+ protected void complete(final String description, final ExecutionContext executionContext) {
+ String ownedBy = executionContext.getParameter("ownedBy");
+ final ToDoItem toDoItem = findToDoItem(description, ownedBy);
+ toDoItem.setComplete(true);
+ executionContext.add(this, toDoItem);
+ }
+
+ private ToDoItem findToDoItem(final String description, final String ownedBy) {
+ final Collection<ToDoItem> filtered = Collections2.filter(getContainer().allInstances(ToDoItem.class), new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(ToDoItem input) {
+ return Objects.equal(description, input.getDescription()) &&
+ Objects.equal(ownedBy, input.getOwnedBy());
+ }
+ });
+ return filtered.isEmpty()? null: filtered.iterator().next();
+ }
+ }
+
+
+### Scenario scripts
+
+Fixture scripts support the composite pattern, meaning that they can also be nested. This allows us to create scenario scripts, to set up a bunch of data.
+
+For example, the `ToDoItemsRecreate` fixture script sets up a whole set of todo items:
+
+ public class ToDoItemsRecreate extends FixtureScript {
+
+ public ToDoItemsRecreate() {
+ withDiscoverability(Discoverability.DISCOVERABLE);
+ }
+ ...
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+ ...
+
+ // prereqs
+ executeChild(new ToDoItemsDelete(), executionContext);
+
+ // create items
+ executeChild(new ToDoItemForBuyMilk(), executionContext);
+ executeChild(new ToDoItemForBuyBread(), executionContext);
+ executeChild(new ToDoItemForBuyStamps(), executionContext);
+ executeChild(new ToDoItemForPickUpLaundry(), executionContext);
+ executeChild(new ToDoItemForMowLawn(), executionContext);
+ executeChild(new ToDoItemForVacuumHouse(), executionContext);
+ executeChild(new ToDoItemForSharpenKnives(), executionContext);
+ executeChild(new ToDoItemForWriteToPenPal(), executionContext);
+ executeChild(new ToDoItemForWriteBlogPost(), executionContext);
+ executeChild(new ToDoItemForOrganizeBrownBag(), executionContext);
+ executeChild(new ToDoItemForSubmitConferenceSession(), executionContext);
+ executeChild(new ToDoItemForStageIsisRelease(), executionContext);
+ }
+ }
+
+There's a couple of things worth pointing out here. First, in the `execute(...)` method, note the call to the `ToDoItemsDelete` fixture script. This is responsible for tearing down all relevant data first:
+
+ public class ToDoItemsDelete extends FixtureScript {
+
+ protected void execute(ExecutionContext executionContext) {
+ final String ownedBy = executionContext.getParameter("ownedBy");
+ isisJdoSupport.executeUpdate("delete from \"ToDoItem\" where \"ownedBy\" = '" + ownedBy + "'");
+ }
+
+ @javax.inject.Inject
+ private IsisJdoSupport isisJdoSupport;
+ }
+
+Usually tear down fixture scripts will delete some logic partition of data that is under the exclusive control of the test; in the case the fact that every todo item has an owner is exploited.
+
+Second, the scenario script is made available in the UI through the call to `withDiscoverability(...)` in its constructor:
+
+ public class ToDoItemsRecreate extends FixtureScript {
+
+ public ToDoItemsRecreate() {
+ withDiscoverability(Discoverability.DISCOVERABLE);
+ }
+ ...
+ }
+
+This tells the fixture script framework that the fixture script should be listed as a choice in the UI:
+<img src="images/fixture-scenarios.png" width="800"></img>
- /**
- * Subclasses should <b>implement this</b> but SHOULD <i>NOT</i> CALL DIRECTLY.
- *
- * <p>
- * Instead call sub fixture scripts using {@link #executeChild(FixtureScript, org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext)} or
- * {@link #executeChild(String, org.apache.isis.applib.fixturescripts.FixtureScript, org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext)}.
- * </p>
- */
+### Skip if encountered more than once
-
-Registering
+ public class ToDoItemsRecreateAndCompleteSeveral extends FixtureScript {
+ ...
+
+ private String ownedBy;
+ public String getOwnedBy() { return ownedBy; }
+ public void setOwnedBy(String ownedBy) { this.ownedBy = ownedBy; }
+
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+
+ // defaults
+ executionContext.setParameterIfNotPresent(
+ "ownedBy",
+ Util.coalesce(getOwnedBy(), getContainer().getUser().getName()));
+
+ // prereqs
+ executeChild(new ToDoItemsRecreate(), executionContext);
+
+ // this fixture
+ executeChild(new ToDoItemCompleteForBuyStamps(), executionContext);
+ executeChild(new ToDoItemCompleteForWriteBlogPost(), executionContext);
+ }
+ }
@@ -72,14 +298,73 @@ lookup(...)
- /**
- * Looks up item from execution context, and completes.
- */
- protected void complete2(final String fixtureResultKey, final ExecutionContext executionContext) {
- final ToDoItem toDoItem = lookup(fixtureResultKey, ToDoItem.class);
- if(toDoItem == null) {
- executionContext.add(this, "Cannot find item with key '" + fixtureResultKey + "'");
+
+ public class ToDoItemsRecreate extends FixtureScript {
+
+
+
+### Parameters
+
+When a fixture script is called
+
+
+ private final static Pattern keyEqualsValuePattern = Pattern.compile("([^=]*)=(.*)");
+
+
+
+ public String getParameter(String parameterName) {
+
+ public String getParameters() {
+ return parameters;
+ }
+
+ public String getParameter(String parameterName) {
+ return parameterMap.get(parameterName);
+ }
+
+ public Map<String,String> getParameterMap() {
+ return Collections.unmodifiableMap(parameterMap);
+ }
+
+ public void setParameterIfNotPresent(String parameterName, String parameterValue) {
+ if(parameterName == null) {
+ throw new IllegalArgumentException("parameterName required");
+ }
+ if(parameterValue == null) {
+ // ignore
+ return;
+ }
+ if(parameterMap.containsKey(parameterName)) {
+ // ignore; the existing parameter take precedence
+ return;
+ }
+ parameterMap.put(parameterName, parameterValue);
+ }
+
+
+
+Overriding defaults
+
+
+ public class ToDoItemsRecreate extends FixtureScript {
+
+ public ToDoItemsRecreate() {
+ withDiscoverability(Discoverability.DISCOVERABLE);
+ }
+
+ private String ownedBy;
+ public String getOwnedBy() { return ownedBy; }
+ public void setOwnedBy(String ownedBy) { this.ownedBy = ownedBy; }
+
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+
+ // defaults
+ executionContext.setParameterIfNotPresent(
+ "ownedBy",
+ Util.coalesce(getOwnedBy(), getContainer().getUser().getName()));
+
+ ...
}
- toDoItem.setComplete(true);
- executionContext.add(this, toDoItem);
}
+
Added: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-choice.png
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-choice.png?rev=1644342&view=auto
==============================================================================
Binary file - no diff available.
Propchange: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-choice.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-results.png
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-results.png?rev=1644342&view=auto
==============================================================================
Binary file - no diff available.
Propchange: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-results.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-run.png
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-run.png?rev=1644342&view=auto
==============================================================================
Binary file - no diff available.
Propchange: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios-run.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios.png
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios.png?rev=1644342&view=auto
==============================================================================
Binary file - no diff available.
Propchange: isis/site/trunk/content/more-advanced-topics/images/fixture-scenarios.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: isis/site/trunk/content/reference/recognized-annotations/ActionLayout.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/ActionLayout.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/ActionLayout.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/ActionLayout.md Wed Dec 10 07:27:15 2014
@@ -8,7 +8,7 @@ annotation.
Similar layout annotations exist for other elements of the metamodel:
-* [@ClassLayout](./ClassLayout.html) for domain classes
+* [@DomainObjectLayout](./DomainObjectLayout.html) for domain classes
* [@CollectionLayout](./CollectionLayout.html) for collections
* [@PropertyLayout](./PropertyLayout.html) for properties
* [@ParameterLayout](./ParameterLayout.html) for action parameters
Modified: isis/site/trunk/content/reference/recognized-annotations/CollectionLayout.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/CollectionLayout.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/CollectionLayout.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/CollectionLayout.md Wed Dec 10 07:27:15 2014
@@ -31,7 +31,7 @@ For example:
Similar layout annotations exist for other elements of the metamodel:
* [@ActionLayout](./ActionLayout.html) for actions
-* [@ClassLayout](./ClassLayout.html) for domain classes
+* [@DomainObjectLayout](./DomainObjectLayout.html) for domain classes
* [@PropertyLayout](./PropertyLayout.html) for properties
* [@ParameterLayout](./ParameterLayout.html) for action parameters
Modified: isis/site/trunk/content/reference/recognized-annotations/CssClass-deprecated.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/CssClass-deprecated.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/CssClass-deprecated.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/CssClass-deprecated.md Wed Dec 10 07:27:15 2014
@@ -1,6 +1,6 @@
Title: @CssClass
-> Deprecated in 1.8.0-SNAPSHOT, see instead [@ClassLayout](./ClassLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
+> Deprecated in 1.8.0-SNAPSHOT, see instead [@DomainObjectLayout](./DomainObjectLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
The `CssClass` annotation applies to object and also to any object member
(property, collection or action). It is used by the Wicket viewer as a UI hint
Modified: isis/site/trunk/content/reference/recognized-annotations/CssClassFa-deprecated.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/CssClassFa-deprecated.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/CssClassFa-deprecated.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/CssClassFa-deprecated.md Wed Dec 10 07:27:15 2014
@@ -1,6 +1,6 @@
Title: @CssClassFa (1.8.0-SNAPSHOT)
-> Deprecated in 1.8.0-SNAPSHOT, see instead [@ClassLayout](./ClassLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
+> Deprecated in 1.8.0-SNAPSHOT, see instead [@DomainObjectLayout](./DomainObjectLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
The `CssClassFa` annotation applies to objects and also to object actions,
and is used by the Wicket viewer as a UI hint.
Modified: isis/site/trunk/content/reference/recognized-annotations/DescribedAs-deprecated.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/DescribedAs-deprecated.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/DescribedAs-deprecated.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/DescribedAs-deprecated.md Wed Dec 10 07:27:15 2014
@@ -1,6 +1,6 @@
Title: @DescribedAs
-> Deprecated in 1.8.0-SNAPSHOT, see instead [@ClassLayout](./ClassLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
+> Deprecated in 1.8.0-SNAPSHOT, see instead [@DomainObjectLayout](./DomainObjectLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
The `@DescribedAs` annotation is used to provide a short description of
something that features on the user interface. How this description is
Copied: isis/site/trunk/content/reference/recognized-annotations/DomainObjectLayout.md (from r1643166, isis/site/trunk/content/reference/recognized-annotations/ClassLayout.md)
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/DomainObjectLayout.md?p2=isis/site/trunk/content/reference/recognized-annotations/DomainObjectLayout.md&p1=isis/site/trunk/content/reference/recognized-annotations/ClassLayout.md&r1=1643166&r2=1644342&rev=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/ClassLayout.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/DomainObjectLayout.md Wed Dec 10 07:27:15 2014
@@ -1,6 +1,6 @@
-Title: @ClassLayout
+Title: @DomainObjectLayout
-The `@ClassLayout` annotation applies to domain classes, collecting together all UI hints within a single
+The `@DomainObjectLayout` annotation applies to domain classes, collecting together all UI hints within a single
annotation.
* `cssClass` - the css class that a domain class (type) should have, to allow more targetted styling in `application.css`
@@ -12,7 +12,7 @@ annotation.
For example:
- @ClassLayout(
+ @DomainObjectLayout(
cssClass="x-key",
describedAs="Capture a task that you need to do",
paged=30)
Modified: isis/site/trunk/content/reference/recognized-annotations/Named-deprecated.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/Named-deprecated.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/Named-deprecated.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/Named-deprecated.md Wed Dec 10 07:27:15 2014
@@ -1,6 +1,6 @@
Title: @Named
-> Deprecated in 1.8.0-SNAPSHOT, see instead [@ClassLayout](./ClassLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
+> Deprecated in 1.8.0-SNAPSHOT, see instead [@DomainServiceLayout](./DomainServiceLayout.html), [@DomainObjectLayout](./DomainObjectLayout.html), [@PropertyLayout](./PropertyLayout.html), [@CollectionLayout](./CollectionLayout.html), [@ActionLayout](./ActionLayout.html) and [@ParameterLayout](./ParameterLayout.html).
The `@Named` annotation is used when you want to specify the way
something is named on the user interface i.e. when you do not want to
Modified: isis/site/trunk/content/reference/recognized-annotations/ParameterLayout.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/ParameterLayout.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/ParameterLayout.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/ParameterLayout.md Wed Dec 10 07:27:15 2014
@@ -68,7 +68,7 @@ If these are not present then Isis will
Similar layout annotations exist for other elements of the metamodel:
* [@ActionLayout](./ActionLayout.html) for actions
-* [@ClassLayout](./ClassLayout.html) for domain classes
+* [@DomainObjectLayout](./DomainObjectLayout.html) for domain classes
* [@CollectionLayout](./CollectionLayout.html) for collections
* [@PropertyLayout](./PropertyLayout.html) for properties
Modified: isis/site/trunk/content/reference/recognized-annotations/Plural-deprecated.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/Plural-deprecated.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/Plural-deprecated.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/Plural-deprecated.md Wed Dec 10 07:27:15 2014
@@ -1,6 +1,6 @@
Title: @Plural
-> Deprecated in 1.8.0-SNAPSHOT, see instead [@ClassLayout](./ClassLayout.html).
+> Deprecated in 1.8.0-SNAPSHOT, see instead [@DomainObjectLayout](./DomainObjectLayout.html).
When the framework displays a collection of several objects it may use
the plural form of the object type in the title. By default the plural
Modified: isis/site/trunk/content/reference/recognized-annotations/PropertyLayout.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/PropertyLayout.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/PropertyLayout.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/PropertyLayout.md Wed Dec 10 07:27:15 2014
@@ -88,6 +88,6 @@ If these are not present then Isis will
Similar layout annotations exist for other elements of the metamodel:
* [@ActionLayout](./ActionLayout.html) for actions
-* [@ClassLayout](./ClassLayout.html) for domain classes
+* [@DomainObjectLayout](./DomainObjectLayout.html) for domain classes
* [@CollectionLayout](./CollectionLayout.html) for collections
* [@ParameterLayout](./ParameterLayout.html) for action parameters
Modified: isis/site/trunk/content/reference/recognized-annotations/about.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/about.md?rev=1644342&r1=1644341&r2=1644342&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/about.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/about.md Wed Dec 10 07:27:15 2014
@@ -67,12 +67,6 @@ go back to: [documentation](../../docume
<td></td>
</tr>
<tr>
- <td><a href="./ClassLayout.html">@ClassLayout</a></td>
- <td>UI</td>
- <td>User interface hints for domain classes</td>
- <td>Yes</td>
- </tr>
- <tr>
<td><a href="./CollectionInteraction.html">@CollectionInteraction</a></td>
<td>Domain</td>
<td>Enable subscribers to either veto, validate or take further steps before/after a collection has been added to or
@@ -112,12 +106,24 @@ go back to: [documentation](../../docume
<td>Yes</td>
</tr>
<tr>
+ <td><a href="./DomainObjectLayout.html">@DomainObjectLayout</a></td>
+ <td>UI</td>
+ <td>User interface hints for domain object (entities and view models)</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
<td><a href="./DomainService.html">@DomainService</a></td>
<td>Domain</td>
<td>Class is a domain service (rather than an entity or view model)</td>
<td></td>
</tr>
<tr>
+ <td><a href="./DomainServiceLayout.html">@DomainServiceLayout</a></td>
+ <td>UI</td>
+ <td>User interface hints for domain services</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
<td><a href="./Encodable.html">@Encodable</a></td>
<td>Persistence</td>
<td>Indicates that a (value) class can be serialized/encoded.
@@ -339,7 +345,7 @@ go back to: [documentation](../../docume
<td><a href="./CssClass-deprecated.html">@CssClass</a></td>
<td>UI</td>
<td>Allow visual representation of individual objects or object members layout to be customized by application-specific CSS.
- <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@ClassLayout</code>, <code>@PropertyLayout</code>, <code>@CollectionLayout</code>, <code>@ActionLayout</code> and <code>@ParameterLayout</code>
+ <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@DomainObjectLayout</code>, <code>@PropertyLayout</code>, <code>@CollectionLayout</code>, <code>@ActionLayout</code> and <code>@ParameterLayout</code>
</td>
<td>Yes</td>
</tr>
@@ -362,7 +368,7 @@ go back to: [documentation](../../docume
<td><a href="./DescribedAs-deprecated.html">@DescribedAs</a></td>
<td>UI</td>
<td>Provide a longer description/tool-tip of an object or object member.
- <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@ClassLayout</code>, <code>@PropertyLayout</code>, <code>@CollectionLayout</code>, <code>@ActionLayout</code> and <code>@ParameterLayout</code>
+ <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@DomainObjectLayout</code>, <code>@PropertyLayout</code>, <code>@CollectionLayout</code>, <code>@ActionLayout</code> and <code>@ParameterLayout</code>
</td>
<td>Yes</td>
</tr>
@@ -428,7 +434,7 @@ go back to: [documentation](../../docume
<td><a href="./Named-deprecated.html">@Named</a></td>
<td>UI</td>
<td>Override name inferred from class. Required for parameter names (prior to Java8).
- <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@ClassLayout</code>, <code>@PropertyLayout</code>, <code>@CollectionLayout</code>, <code>@ActionLayout</code> and <code>@ParameterLayout</code>
+ <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@DomainServiceLayout</code>, <code>@DomainObjectLayout</code>, <code>@PropertyLayout</code>, <code>@CollectionLayout</code>, <code>@ActionLayout</code> and <code>@ParameterLayout</code>
</td>
<td>Yes</td>
</tr>
@@ -443,7 +449,7 @@ go back to: [documentation](../../docume
<td><a href="./Plural-deprecated.html">@Plural</a></td>
<td>UI</td>
<td>For the irregular plural form of an entity type.
- <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@ClassLayout</code>
+ <br/>Deprecated in 1.8.0-SNAPSHOT, see <code>@DomainObjectLayout</code>
</td>
<td></td>
</tr>