Hi Dan,
I remember discussing something like this with you at the Knockree
retreat - I've implemented the various classes to support a
String disabled(){..};
method on an object, to runtime prevent a user from editting any of the
properties.
The problem is, it doesn't work! :)
Following the examples of the Immutable facet and the "validate"
method facet, I have:
public class DisabledObjectFacetViaDisabledMethod extends
DisabledObjectFacetAbstract implements ImperativeFacet
where
public abstract class DisabledObjectFacetAbstract extends FacetAbstract
implements DisabledObjectFacet
and
public interface DisabledObjectFacet extends Facet, DisablingInteractionAdvisor
The factory is registered in ProgrammingModelFacetsJava5:
addFactory(DisabledObjectViaDisabledMethodFacetFactory.class);
But when I load an object with the "disabled()" method, I can still edit it.
The "disabled" method is not visible, so it's being picked up...
This tells me that the "DisablingInteractionAdvisor " is not doing what I
expect..
What am I missing?
Since the unit test passes, I'll check in the code, associated with
ISIS-142
Regards,
Kevin