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/05 15:58:21 UTC
svn commit: r1643313 -
/isis/site/trunk/content/more-advanced-topics/How-to-suppress-contributions.md
Author: danhaywood
Date: Fri Dec 5 14:58:21 2014
New Revision: 1643313
URL: http://svn.apache.org/r1643313
Log:
new page on suppressing contributions
Modified:
isis/site/trunk/content/more-advanced-topics/How-to-suppress-contributions.md
Modified: isis/site/trunk/content/more-advanced-topics/How-to-suppress-contributions.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/more-advanced-topics/How-to-suppress-contributions.md?rev=1643313&r1=1643312&r2=1643313&view=diff
==============================================================================
--- isis/site/trunk/content/more-advanced-topics/How-to-suppress-contributions.md (original)
+++ isis/site/trunk/content/more-advanced-topics/How-to-suppress-contributions.md Fri Dec 5 14:58:21 2014
@@ -22,32 +22,40 @@ The [PreferenceContributions](https://gi
* `likes(...)` - a contributed collection to `Person`:
+<pre>
@NotContributed(NotContributed.As.ACTION) // ie contributed as collection
@NotInServiceMenu
@ActionSemantics(ActionSemantics.Of.SAFE)
public List<FoodStuff> likes(final Person person) { ... }
+</pre>
* `firstLove(...)` - contributed property, also to `Person`
+<pre>
@NotContributed(NotContributed.As.ACTION) // ie contributed as property
@NotInServiceMenu
@ActionSemantics(ActionSemantics.Of.SAFE)
public FoodStuff firstLove(final Person person) { ... }
+</pre>
* `addPreference(...)` - a contributed action to both `Person` and `FoodStuff`
+<pre>
@NotInServiceMenu
public Preference addPreference(
final Person person,
final @Named("Type") Preference.PreferenceType preferenceType,
final FoodStuff foodStuff) { ... }
+</pre>
* `removePreference(...)` - a contributed action to both `Person` and `FoodStuff`
+<pre>
@NotInServiceMenu
public Person removePreference(final Person person, final FoodStuff foodStuff) {
final List<Preference> preferences1 = preferences.listAllPreferences();
for (Preference preference : preferences1) { ... }
+</pre>
However, although `addPreference(...)` and `removePreference(...)` *are* contributed to both `Person` and `FoodStuff`, this can be hidden using the `.layout.json` file. Thus, in [FoodStuff,layout.json](https://github.com/isisaddons/isis-app-kitchensink/tree/d4fd4e8b799af42c343b7e451bbf6f5d218869a1/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributee/FoodStuff.layout.json#L57-57) we have: