danhaywood commented on a change in pull request #587:
URL: https://github.com/apache/isis/pull/587#discussion_r647537605



##########
File path: 
core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/hidden/HiddenTypeFacetDerivedFromAuthorization.java
##########
@@ -29,14 +29,16 @@
 
 import lombok.val;
 
-public class HiddenTypeFacetDerivedFromAuthorization extends FacetAbstract 
implements HiddenTypeFacet {
+public class HiddenTypeFacetDerivedFromAuthorization
+extends FacetAbstract
+implements HiddenTypeFacet {
 
     public static Class<? extends Facet> type() {
         return HiddenTypeFacet.class;
     }
 
     public HiddenTypeFacetDerivedFromAuthorization(final FacetHolder holder) {
-        super(type(), holder);
+        super(type(), holder, Precedence.DERIVED);

Review comment:
       Sure.  Some thoughts (probably obvious) on the other precedences:
   * FALLBACK is lowest priority if there are no other facets for that type, eg 
infer the NamedFacet from the method name if not specified explicitly using an 
annotation or layout
   * the notion of "alwaysReplace" I can't remember, but I suspect it is very 
similar to fallback.  
   * the notion of an underlying facet is where a higher precedence facet can 
replace another facet, but keep hold of the underlying facet.  In some cases 
the replacing facet might wrap but delegate to the underlying, eg to translate 
the name facet.  If the replacing facet doesn't delegate to the underlying, 
then there's no real need to retain that reference, but (I wouldn't be 
surprised) if FacetUtil.addFacet(...) always just chains them anyway regardless.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to