[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16994410#comment-16994410 ] Andi Huber commented on ISIS-2161: -- does activate method name prefix validation only if @Action annotation is not configured mandatory > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16968428#comment-16968428 ] Andi Huber commented on ISIS-2161: -- Should be supported, yes. I'll add a testcase for this to make sure it works. > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16968397#comment-16968397 ] Daniel Keir Haywood commented on ISIS-2161: --- what if I wanted to disable the "disableUser" action? Would that be "disableDisableUser()" ? I don't have a problem with this idea, it's quite elegant... just want to make sure that it does actually allow this scenario. > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937607#comment-16937607 ] Andi Huber commented on ISIS-2161: -- It turns out that we can solve this issue, without having to introduce any new concepts (or extending the programming model): Simply allow explicitly annotated members to be named with currently reserved prefixes. {code:java} // should be a valid action name, even though 'disable' is reserved @Action public void disableUser(User user) { ... } {code} > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! > It is inconvenient, when misspelling support-methods eg. using 'verify' > instead of 'validate', that one has to troubleshoot the application later, > only to find out that one made a sloppy mistake. > * We can improve on this by introducing a new annotation eg. 'Model' to > enforce a meta-model check on the correct naming of supporting-methods. > {code:java} > @Action > void placeOrder(X x, Y y, Z z) {...} > @Model // <-- enforces a meta-model check on this supporting-method > boolean hidePlaceOrder() {...} > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16935809#comment-16935809 ] ASF subversion and git services commented on ISIS-2161: --- Commit 89b49816894a1a92f12259215c3fb97e974b180c in isis's branch refs/heads/v2 from Andi Huber [ https://gitbox.apache.org/repos/asf?p=isis.git;h=89b4981 ] ISIS-2161: adds a new annotation: Model - new validation: SupportingMethodValidatorRefinerFactory - replaces validation via MethodPrefixBasedFacetFactoryAbstract > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! > It is inconvenient, when misspelling support-methods eg. using 'verify' > instead of 'validate', that one has to troubleshoot the application later, > only to find out that one made a sloppy mistake. > * We can improve on this by introducing a new annotation eg. 'Model' to > enforce a meta-model check on the correct naming of supporting-methods. > {code:java} > @Action > void placeOrder(X x, Y y, Z z) {...} > @Model // <-- enforces a meta-model check on this supporting-method > boolean hidePlaceOrder() {...} > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16935805#comment-16935805 ] Andi Huber commented on ISIS-2161: -- Proposed new behavior: {code:java} public class Object1 { @Property @Getter @Setter private String myProperty; // proper supporting-method naming, will get picked up by the framework and added // to the metamodel (no annotation required) public boolean hideMyProperty() { return false; } } public class Object2 { @Property @Getter @Setter private String myProperty; // allowed, nothing wrong with that, might either be picked up as an action // or gets ignored, depending on the framework's configuration, // whether the @Action annotation is mandatory or not; // however, this is no supporting-method! public boolean hideWhatever() { return false; } } public class Object3 { @Property @Getter @Setter private String myProperty; // will fail, because this method is clearly orphaned @Model public boolean hideWhatever() { return false; } } {code} > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! > It is inconvenient, when misspelling support-methods eg. using 'verify' > instead of 'validate', that one has to troubleshoot the application later, > only to find out that one made a sloppy mistake. > * We can improve on this by introducing a new annotation eg. 'Model' to > enforce a meta-model check on the correct naming of supporting-methods. > {code:java} > @Action > void placeOrder(X x, Y y, Z z) {...} > @Model // <-- enforces a meta-model check on this supporting-method > boolean hidePlaceOrder() {...} > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ISIS-2161) Remove domain-object member naming restrictions (reserved prefixes)
[ https://issues.apache.org/jira/browse/ISIS-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16935110#comment-16935110 ] ASF subversion and git services commented on ISIS-2161: --- Commit 4c2c895e334bb9fdb044841a39ddffdc9e680b2b in isis's branch refs/heads/v2 from Andi Huber [ https://gitbox.apache.org/repos/asf?p=isis.git;h=4c2c895 ] ISIS-2161: Remove domain-object member naming restrictions - we no longer check for previously reserved prefixes on actions (hide, disable, ...) > Remove domain-object member naming restrictions (reserved prefixes) > --- > > Key: ISIS-2161 > URL: https://issues.apache.org/jira/browse/ISIS-2161 > Project: Isis > Issue Type: Improvement > Components: Core >Reporter: Andi Huber >Assignee: Andi Huber >Priority: Major > Fix For: 2.0.0 > > > Currently the prefixes 'hide', 'validate', 'disable', etc are reserved for > supporting-methods and may not be used for Actions and Properties. > We can lift this restriction: > * If a member is annotated Action/Property/Collection, then we allow any > names for this member, even if these collide with the 'reserved' prefixes! > It is inconvenient, when misspelling support-methods eg. using 'verify' > instead of 'validate', that one has to troubleshoot the application later, > only to find out that one made a sloppy mistake. > * We can improve on this by introducing a new annotation eg. 'Support' to > enforce a meta-model check on the correct naming of supporting-methods. > {code:java} > @Action > void placeOrder(X x, Y y, Z z) {...} > @Support // <-- enforces a meta-model check on this supporting-method > boolean hidePlaceOrder() {...} > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)