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/03/21 12:06:04 UTC

svn commit: r1579923 - in /isis/site/trunk/content/reference/recognized-annotations: Bookmarkable.md HomePage.md MinLength.md PostsPropertyChangedEvent.md about.md images/Bookmarkable-nested.png images/Bookmarkable.png

Author: danhaywood
Date: Fri Mar 21 11:06:03 2014
New Revision: 1579923

URL: http://svn.apache.org/r1579923
Log:
missing docs on annotations

Added:
    isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable-nested.png   (with props)
    isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable.png   (with props)
Modified:
    isis/site/trunk/content/reference/recognized-annotations/Bookmarkable.md
    isis/site/trunk/content/reference/recognized-annotations/HomePage.md
    isis/site/trunk/content/reference/recognized-annotations/MinLength.md
    isis/site/trunk/content/reference/recognized-annotations/PostsPropertyChangedEvent.md
    isis/site/trunk/content/reference/recognized-annotations/about.md

Modified: isis/site/trunk/content/reference/recognized-annotations/Bookmarkable.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/Bookmarkable.md?rev=1579923&r1=1579922&r2=1579923&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/Bookmarkable.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/Bookmarkable.md Fri Mar 21 11:06:03 2014
@@ -1,3 +1,51 @@
 Title: @Bookmarkable
 
-> stub
\ No newline at end of file
+> Support
+>
+> Supported by the Wicket viewer.
+
+The `@Bookmarkable` annotation indicates that an entity or an action (with safe [action semantics](./ActinSemantics.html)) is automatically bookmarked.
+
+(In the Wicket viewer), a link to a bookmarked object is shown in the bookmarks panel that slides out from the left:
+
+<img src="images/Bookmarkable.png" width="640px"/>
+ 
+For example:
+
+    @Bookmarkable
+    public class ToDoItem ... {
+        ...
+    }
+
+indicates that the `ToDoItem` class is bookmarkable, while:
+
+    @Named("ToDos")
+    public class ToDoItems {
+
+        @Bookmarkable
+        @ActionSemantics(Of.SAFE)
+        @MemberOrder(sequence = "1")
+        public List<ToDoItem> notYetComplete() {
+            ...
+        }
+        
+    }
+
+indicates that the "not yet complete" action is bookmarkable.
+
+It is also possible to nest bookmarkable entities.  For example, this screenshot is taken from [Estatio](http://github.com/estatio/estatio):
+
+<img src="images/Bookmarkable-nested.png" width="640px"/>
+
+For example, the `Property` entity "[OXF] Oxford Super Mall" is a root bookmark (the default), but the `Unit` child entity "[OXF-001] Unit 1" only appears as a bookmark if its parent `Property` has already been visited.  This is accomplished with the following annotations:
+
+    @Bookmarkable
+    public class Property { ... }
+    
+and
+
+    @Bookmarkable(BookmarkPolicy.AS_CHILD)
+    public abstract class Unit { ... }
+
+The nesting can be done to any level; the Estatio screenshot also shows a bookmark nesting 3 deep: `Lease` -> `LeaseItem` -> `LeaseTerm`.
+

Modified: isis/site/trunk/content/reference/recognized-annotations/HomePage.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/HomePage.md?rev=1579923&r1=1579922&r2=1579923&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/HomePage.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/HomePage.md Fri Mar 21 11:06:03 2014
@@ -1,3 +1,9 @@
 Title: @HomePage
 
-> stub
\ No newline at end of file
+> Support
+>
+> Currently only by the Wicket viewer
+
+The `@HomePage` annotation should be applied to a single (no-arg) action on a domain service, and the results used as the contents for the home page.
+
+Typically this action would return a [View Model](../../more-advanced-topics/ViewModel.html) representing a dashboard from which the user can navigate to commonly used objects and invoked actions.  But it could also simply invoke an action that returns an entity (eg representing the currently logged-on user) or a list of objects.

Modified: isis/site/trunk/content/reference/recognized-annotations/MinLength.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/MinLength.md?rev=1579923&r1=1579922&r2=1579923&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/MinLength.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/MinLength.md Fri Mar 21 11:06:03 2014
@@ -1,3 +1,20 @@
 Title: @MinLength
 
-> stub
\ No newline at end of file
+The `@MinLength` annotation is used to specify the minimum number of characters in a search of an [auto-complete](../../how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.html).
+
+For example:
+
+    public ToDoItem add(
+            @TypicalLength(20)
+            final ToDoItem toDoItem) {
+        getDependencies().add(toDoItem);
+        return this;
+    }
+    public List<ToDoItem> autoComplete0Add(
+            final @MinLength(2) 
+            String search) {
+        final List<ToDoItem> list = toDoItems.autoComplete(search);
+        list.removeAll(getDependencies());
+        list.remove(this);
+        return list;
+    }

Modified: isis/site/trunk/content/reference/recognized-annotations/PostsPropertyChangedEvent.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/PostsPropertyChangedEvent.md?rev=1579923&r1=1579922&r2=1579923&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/PostsPropertyChangedEvent.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/PostsPropertyChangedEvent.md Fri Mar 21 11:06:03 2014
@@ -1,5 +1,26 @@
 Title: @PostsPropertyChangedEvent
 
-> stub
-> 
+> Support
+>
+> Supported by all viewers (implementation is part of core metamodel)
+
+The `@PostsPropertyChangedEvent` annotation applies to domain entity properties, and will automatically posts instances of the `PropertyChangedEvent` class (in `org.apache.isis.applib.services.eventbus`) to the [Event Bus Service](../services/event-bus-service.html) whenever they are, erm, changed.
+
+For example: 
+
+    public class ToDoItem {
+        ...     
+        @PostsPropertyChangedEvent
+        public LocalDate getDueBy() { ... }
+    }
+
+This saves having to manually post an event using `EventBusService#post(...)`.
+
+If the Event Bus Service is not configured, then this is a no-op.
+
+#### Note
+
+Do note however:
+* The `@PropertyChangedEvent` is only raised for interactions through the UI, or through interactions through a wrapper created by the [Wrapper Factory](../services/wrapper-factory.html) service.  It is *not* raised through a normal programmatic invocation of the getter method.
+* This is work-in-progress.  In the future other interactions (such as action invocations, or collection add to/remove) may also be raised automatically.
 

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=1579923&r1=1579922&r2=1579923&view=diff
==============================================================================
--- isis/site/trunk/content/reference/recognized-annotations/about.md (original)
+++ isis/site/trunk/content/reference/recognized-annotations/about.md Fri Mar 21 11:06:03 2014
@@ -7,7 +7,7 @@ go back to: [documentation](../../docume
 * [@Aggregated](./Aggregated.html)
 * [@Audited](./Audited.html)
 * [@AutoComplete](./AutoComplete.html)
-* [@Bookmarkable](./Bookmarkable.html) (stub)
+* [@Bookmarkable](./Bookmarkable.html)
 * [@Bounded](./Bounded.html)
 * [@Bulk](./Bulk.html)
 * [@Command](./Command.html)
@@ -22,7 +22,7 @@ go back to: [documentation](../../docume
 * [@Facets](./Facets.html)
 * [@FieldOrder](./FieldOrder.html) (deprecated)
 * [@Hidden](./Hidden.html)
-* [@HomePage](./Hidden.html) (stub)
+* [@HomePage](./HomePage.html)
 * [@Idempotent](./Idempotent-deprecated.html) (deprecated)
 * [@Ignore-deprecated](./Ignore-deprecated.html) (deprecated)
 * [@Immutable-deprecated](./Immutable.html)
@@ -32,7 +32,7 @@ go back to: [documentation](../../docume
 * [@MemberGroupLayout](./MemberGroupLayout.html)
 * [@MemberGroups](./MemberGroups.html)
 * [@MemberOrder](./MemberOrder.html)
-* [@MinLength](./MinLength.html) (stub)
+* [@MinLength](./MinLength.html)
 * [@MultiLine](./MultiLine.html)
 * [@MustSatisfy](./MustSatisfy.html)
 * [@Named](./Named.html)
@@ -45,7 +45,7 @@ go back to: [documentation](../../docume
 * [@Paged](./Paged.html)
 * [@Parseable](./Parseable.html)
 * [@Plural](./Plural.html)
-* [@PostsPropertyChangeEvent](./PostsPropertyChangeEvent.html) (stub)
+* [@PostsPropertyChangeEvent](./PostsPropertyChangeEvent.html)
 * [@Programmatic](./Programmatic.html)
 * [@Prototype](./Prototype.html)
 * [@PublishedAction](./Prototype.html)

Added: isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable-nested.png
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable-nested.png?rev=1579923&view=auto
==============================================================================
Binary file - no diff available.

Propchange: isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable-nested.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable.png
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable.png?rev=1579923&view=auto
==============================================================================
Binary file - no diff available.

Propchange: isis/site/trunk/content/reference/recognized-annotations/images/Bookmarkable.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream