[ANN] Apache Isis version 1.16.2 Released

2018-03-05 Thread Dan Haywood
The Apache Isis team is pleased to announce the release of Apache Isis
v1.16.2

This is primarily a maintenance fix release fixing one severe error in
1.16.1 relating to parented checkboxes.  It does however introduce one new
feature for the REST API (RO viewer) to support generic RO clients.  There
is also one notable performance improvement through the caching of
``JAXBContext``s.

Full release notes are available on the Apache Isis website at [1].

You can access this release directly from the Maven central repo [2].
Alternatively, download the release and build it from source [3].

Enjoy!

--The Apache Isis team

[1]
http://isis.apache.org/release-notes/release-notes.html#_release-notes_1.16.2
[2] http://search.maven.org
[3] http://isis.apache.org/downloads.html


[jira] [Created] (ISIS-1901) Swagger-UI: Replace index.html with a Servlet that is aware of restful config

2018-03-05 Thread Andi Huber (JIRA)
Andi Huber created ISIS-1901:


 Summary: Swagger-UI: Replace index.html with a Servlet that is 
aware of restful config
 Key: ISIS-1901
 URL: https://issues.apache.org/jira/browse/ISIS-1901
 Project: Isis
  Issue Type: Improvement
  Components: Core
Reporter: Andi Huber
 Fix For: 2.0.0-M2






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ISIS-1900) Fix the release process to also generate .sha512 files

2018-03-05 Thread Dan Haywood (JIRA)
Dan Haywood created ISIS-1900:
-

 Summary: Fix the release process to also generate .sha512 files
 Key: ISIS-1900
 URL: https://issues.apache.org/jira/browse/ISIS-1900
 Project: Isis
  Issue Type: Task
Affects Versions: 1.16.2
Reporter: Dan Haywood
 Fix For: 1.16.3


as per updated ASF guidelines.

the .md5 are no longer required.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Breadcrumbs programming model

2018-03-05 Thread Jeroen van der Wal
They're all good but I like this one the most:

@PropertyLayout(navigable=Navigable.PARENT|IGNORE|NOT_SPECIFIED)
> LeaseItem leaseItem
>


[jira] [Closed] (ISIS-1875) Release tasks for 1.16.2

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1875.
-
Resolution: Fixed

> Release tasks for 1.16.2
> 
>
> Key: ISIS-1875
> URL: https://issues.apache.org/jira/browse/ISIS-1875
> Project: Isis
>  Issue Type: Task
>Affects Versions: 1.16.1
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Major
> Fix For: 1.16.2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ISIS-1899) Release tasks for 1.16.3

2018-03-05 Thread Dan Haywood (JIRA)
Dan Haywood created ISIS-1899:
-

 Summary: Release tasks for 1.16.3
 Key: ISIS-1899
 URL: https://issues.apache.org/jira/browse/ISIS-1899
 Project: Isis
  Issue Type: Task
Affects Versions: 1.16.2
Reporter: Dan Haywood
 Fix For: 1.16.3






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (ISIS-1884) Restrict where choices and autoComplete are implicitly provided on parameters

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1884.
-

> Restrict where choices and autoComplete are implicitly provided on parameters 
> --
>
> Key: ISIS-1884
> URL: https://issues.apache.org/jira/browse/ISIS-1884
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.1
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Major
> Fix For: 1.16.2
>
>
> to avoid accidental breakage of existing code, only infer choices and 
> defaults if @Action(associatedWith=) has been used to bind an action to a 
> collection.
> Do NOT infer if @MemberOrder or .layout.xml are used



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (ISIS-1867) Avoid queuing/contention issues - cache JAXBContext in MemberExecutionDtoUtils.

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1867.
-

> Avoid queuing/contention issues - cache JAXBContext in 
> MemberExecutionDtoUtils.
> ---
>
> Key: ISIS-1867
> URL: https://issues.apache.org/jira/browse/ISIS-1867
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Major
> Fix For: 1.16.2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (ISIS-1879) Date header returned by RO resuts should be the Clock time, not the system time.

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1879.
-

> Date header returned by RO resuts should be the Clock time, not the system 
> time.
> 
>
> Key: ISIS-1879
> URL: https://issues.apache.org/jira/browse/ISIS-1879
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.1
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Major
> Fix For: 1.16.2
>
>
> RO does already return a "Date" header, but this is the system time.  Should 
> instead by the ClockService's time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ISIS-1899) Release tasks for 1.16.3

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood reassigned ISIS-1899:
-

Assignee: Dan Haywood

> Release tasks for 1.16.3
> 
>
> Key: ISIS-1899
> URL: https://issues.apache.org/jira/browse/ISIS-1899
> Project: Isis
>  Issue Type: Task
>Affects Versions: 1.16.2
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Major
> Fix For: 1.16.3
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (ISIS-1874) Parented checkboxes fails - NPEs and incorrect facets.

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1874.
-

> Parented checkboxes fails - NPEs and incorrect facets.
> --
>
> Key: ISIS-1874
> URL: https://issues.apache.org/jira/browse/ISIS-1874
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.1
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Blocker
> Fix For: 1.16.2
>
> Attachments: 1-a.png, 1-b.png, 2-a.png, 2-b.png
>
>
> Two separate issues:
>  # NPE for a parented collection with no toggle box column (the 
> AssociatedWithProvider is always created, but may return a null toggle box 
> column; this isn't guarded for.
>  # When a choices facet is installed for a parameter, doesn't check the type 
> of the parameter against the collection, meaning cannot invoke action.
> Workaround: disable the "associateWith" or memberOrder
> Example of (1) - fails with NPE (though action is executed)
> {code:java}
> @Getter @Setter
> private SortedSet occupancies = new TreeSet<>();
> // associated via .layout.xml
> public Occupancy newOccupancy(
> final @Parameter(optionality = Optionality.OPTIONAL) LocalDate 
> startDate,
> final Unit unit) {
> Occupancy occupancy = occupancyRepository.newOccupancy(this, unit, 
> startDate);
> occupancies.add(occupancy);
> return occupancy;
> }
> public LocalDate default0NewOccupancy() {
> return getTenancyStartDate();
> }
> public List choices1NewOccupancy() {
> return getProperty()!=null ? unitRepository.findByProperty(getProperty()) 
> : unitRepository.allUnits();
> }
> {code}
>  
> Example of (2) - fails with AgreementRole incompatible with Party.  
> Workaround is to ensure there's an explicit autoComplete or choices
> {code:java}
> @javax.jdo.annotations.Persistent(mappedBy = "agreement", defaultFetchGroup = 
> "true")
> @Collection(editing = Editing.DISABLED)
> @CollectionLayout(render = RenderType.EAGERLY)
> @Getter @Setter
> private SortedSet roles = new TreeSet<>();
> @MemberOrder(name = "roles", sequence = "1")
> public Agreement newRole(
> final AgreementRoleType type,
> final Party party,
> final @Parameter(optionality = Optionality.OPTIONAL) LocalDate 
> startDate,
> final @Parameter(optionality = Optionality.OPTIONAL) LocalDate 
> endDate) {
> createRole(type, party, startDate, endDate);
> return this;
> }
> public List choices0NewRole() {
> return agreementRoleTypeRepository.findApplicableTo(getType());
> }
> public LocalDate default2NewRole() {
> return getEffectiveInterval().startDate();
> }
> public LocalDate default3NewRole() {
> return getEffectiveInterval().endDate();
> }
> {code}
> ^^^ the problem triggers on Party, not on AgreementRoleType, because the 
> latter has an explicit choices method.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (ISIS-1876) Convert IsisApplibModule (and archetype app modules) to use ModuleAbstract

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1876.
-

> Convert IsisApplibModule (and archetype app modules) to use ModuleAbstract
> --
>
> Key: ISIS-1876
> URL: https://issues.apache.org/jira/browse/ISIS-1876
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.1
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Major
> Fix For: 1.16.2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (ISIS-1882) Extend RO viewer to (optionally) automatically wrap action-results in a view model.

2018-03-05 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood closed ISIS-1882.
-

> Extend RO viewer to (optionally) automatically wrap action-results in a view 
> model.
> ---
>
> Key: ISIS-1882
> URL: https://issues.apache.org/jira/browse/ISIS-1882
> Project: Isis
>  Issue Type: New Feature
>Affects Versions: 1.16.1
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[RESULT] [VOTE] Apache Isis Core release 1.16.2

2018-03-05 Thread Dan Haywood
The vote has completed with the following result :

  +4 (binding): ... Andi Huber, Dan Haywood, Oscar Bou, Kevin Meyer

The vote is SUCCESSFUL.

I'll now go ahead and complete the post-release activities.


Re: [VOTE] Apache Isis Core release 1.16.2 RC1

2018-03-05 Thread Dan Haywood
OK, thanks to all who voted, we now have enough votes and over 72 hours
have elapsed, so I'm closing this vote.

Will announce the results on a separate thread.

On Sun, 4 Mar 2018 at 18:18 Kevin Meyer  wrote:

> By the way, I also encourage users (non committers) to vote, too.
>
> While your votes may be non-binding, they do achieve two things: it shows
> that you have tested the release and it is an opportunity for you to
> demonstrate your support.
>
> It is also an opportunity to test the release candidate on your systems.
> If you find any issues, you can  prevent a buggy release from making it
> into the the public repositories!
>
> Cheers,
> Kevin
>
> On 1 March 2018 00:11:05 CET, Dan Haywood 
> wrote:
> >Apologies, there's a typo in the above for one of those repositories.
> >It
> >should instead be:
> >
> >*
> >
> http://repository.apache.org/content/repositories/orgapacheisis-1072/org/apache/isis/core/isis/1.16.2/isis-1.16.2-source-release.zip
> >*
> >
> http://repository.apache.org/content/repositories/orgapacheisis-1073/org/apache/isis/archetype/simpleapp-archetype/1.16.2/simpleapp-archetype-1.16.2-source-release.zip
> >*
> >
> http://repository.apache.org/content/repositories/orgapacheisis-1074/org/apache/isis/archetype/helloworld-archetype/1.16.2/helloworld-archetype-1.16.2-source-release.zip
> ><
> http://repository.apache.org/content/repositories/orgapacheisis-1073/org/apache/isis/archetype/helloworld-archetype/1.16.2/helloworld-archetype-1.16.2-source-release.zip
> >
> >
> >Thx
> >
> >
> >On Wed, 28 Feb 2018 at 22:48 Dan Haywood 
> >wrote:
> >
> >> I've cut a release for Apache Isis Core and the two archetypes:
> >>
> >> * Core 1.16.2
> >> * HelloWorld Archetype 1.16.2
> >> * SimpleApp Archetype 1.16.2
> >>
> >> The source code artifacts have been uploaded to staging repositories
> >on
> >> repository.apache.org:
> >>
> >> *
> >>
> >
> http://repository.apache.org/content/repositories/orgapacheisis-1072/org/apache/isis/core/isis/1.16.2/isis-1.16.2-source-release.zip
> >> *
> >>
> >
> http://repository.apache.org/content/repositories/orgapacheisis-1073/org/apache/isis/archetype/helloworld-archetype/1.16.2/helloworld-archetype-1.16.2-source-release.zip
> >> *
> >>
> >
> http://repository.apache.org/content/repositories/orgapacheisis-1073/org/apache/isis/archetype/simpleapp-archetype/1.16.2/simpleapp-archetype-1.16.2-source-release.zip
> >>
> >> For each zip there is a corresponding signature file (append .asc to
> >the
> >> zip's url).
> >>
> >> In the source code repo the code has been tagged as isis-1.16.2-RC1,
> >> helloworld-archetype-1.16.2-RC1 and simpleapp-archetype-1.16.2-RC1;
> >see
> >> https://github.com/apache/isis/tags
> >>
> >> For instructions on how to verify the release (build from binaries
> >and/or
> >> use in Maven directly), see
> >>
> >https://isis.apache.org/guides/cgcom/cgcom.html#_cgcom_verifying-releases
> >>
> >> Please verify the release and cast your vote.  The vote will be open
> >for a
> >> minimum of 72 hours.
> >>
> >> [ ] +1
> >> [ ]  0
> >> [ ] -1
> >>
> >>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.


[jira] [Commented] (ISIS-1360) Declarative Invariants

2018-03-05 Thread JIRA

[ 
https://issues.apache.org/jira/browse/ISIS-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16386299#comment-16386299
 ] 

Jörg Rade commented on ISIS-1360:
-

IMO declaring business rules matches the spirit of the framework.
The code now lives at https://sourceforge.net/p/autobuslogic/wiki/Home/

> Declarative Invariants
> --
>
> Key: ISIS-1360
> URL: https://issues.apache.org/jira/browse/ISIS-1360
> Project: Isis
>  Issue Type: Proposal
>  Components: Core, Core: Objectstore: JDO
>Affects Versions: 1.12.0
>Reporter: Cesar Lugo
>Priority: Minor
> Fix For: 3.0.0
>
>
> I think that one aspect of the amplification concept Apache ISIS provides 
> might be to allow some degree of declarative business rules / invariants. 
> There is an interesting open source project (1) that allows a Java 
> application to define declarative business rules / invariant you might want 
> to fork.
>  
> The difference between some other business rules engines (say RETE compliant) 
> is that most business rules engines focus on conditional business rules or 
> decision business rules only, and work outside the application scope, as an 
> external API returning results that you must incorporate into your code with 
> even more code. This one´s focus (ABL) is transactional business rules, which 
> work through the persistence manager (Hibernate´s JPA in this case), so you 
> don´t need to call any rules to be triggered, rules are automatically 
> triggered when you persist data. Thus, it lets you use the previous values 
> before saving and after saving to trigger rules (update inventory with new 
> value of received quantity - old value of received quantity + old value of 
> inventory).
>  
> In summary, it provides:
> •Declarative rules, like: 
> o   InvoiceItem.amount = InvoiceItem.quantity * InvoiceItem.unitPrice * (1 + 
> VAT / 100)
> o   Invoice.amount = sum(InvoiceItem.amount) if InvoiceItem.status != 
> “deleted”
> o   account balance = sum(invoice.amount) if status = “due
> •Automatic sequencing of the rules. This is really great, because 
> instead of sequenced lines of code, you create independent rules, which you 
> can maintain and change completely separate from all other rules. You can 
> even have a rules manager and document each rule.
> •Automatic execution of the rules every time you do an insert, update 
> or delete to any of those entity objects. Any change executes the rules 
> properly. If a new rule implies altering the sequence of the execution of 
> rules, this happens automatically and seamlessly. 
> •Extensibility (create your own rules). Create a new weightedAverage 
> () rule. 
> •Documentation. You can document your rules, associate rules to topic 
> or groups, like use cases where they come from.
>  
>  
> (1)http://www.automatedbusinesslogic.com/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread Andi Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andi Huber resolved ISIS-1897.
--
Resolution: Resolved

Functionality implemented. Legacy JUnit Tests do pass.

However I did not implement any new tests.

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, I've provided functional backward compatibility.
> However the old methods are now marked for deprecation!
>  
>  
> 
> Isis until 1.16. uses reflection on every of these 4 calls ...
> {code:java}
> public class ApplicationPermission implements 
> Comparable {
>   ...
> private final static String propertyNames = "role, featureType, 
> featureFqn, mode";
> @Override
> public int compareTo(final ApplicationPermission other) {
> return ObjectContracts.compare(this, other, propertyNames);
> }
> @Override
> public boolean equals(final Object obj) {
> return ObjectContracts.equals(this, obj, propertyNames);
> }
> @Override
> public int hashCode() {
> return ObjectContracts.hashCode(this, propertyNames);
> }
> @Override
> public String toString() {
> return ObjectContracts.toString(this, propertyNames);
> }
>   
>   ...
>   
> }
> {code}
> 
> Isis since 2.0.0 provides an optimized variant now: reflection is used only 
> once at class initialization ...
> {code:java}
> public class ApplicationPermission implements 
> Comparable {
>   ...
> private final static String propertyNames = "role, featureType, 
> featureFqn, mode";
> 
> private final static ObjectContract contract 
>   = ObjectContracts.parse(ApplicationPermission.class, propertyNames);
> @Override
> public int compareTo(final ApplicationPermission other) {
> return contract.compare(this, other);
> }
> @Override
> public boolean equals(final Object other) {
> return contract.equals(this, other);
> }
> @Override
> public int hashCode() {
>   return contract.hashCode(this);
> }
> @Override
> public String toString() {
> return contract.toString(this);
> }
>   
>   ...
>   
> }
> {code}
> 
> However the *recommended* way to use 'object contracts' now is to no longer 
> resort to reflection.
> Parsing as shown above can be replaced by static method handles to enforce 
> that properties actually exist (at compile-time)
> {code:java}
> private final static ObjectContract contract   = 
>   ObjectContracts.contract(ApplicationPermission.class)
>   .thenUse("role", ApplicationPermission::getRole)
>   .thenUse("featureType", ApplicationPermission::getFeatureType)
>   .thenUse("featureFqn", ApplicationPermission::getFeatureFqn)
>   .thenUse("mode", ApplicationPermission::getMode);
> {code}
> If different then natural order comparators are needed then resort to Java's 
> Comparator composition ...
> {code:java}
> private final static ObjectContract contract   = 
>   ObjectContracts.contract(ApplicationPermission.class)
>   .thenUse("role", ApplicationPermission::getRole, 
> Comparator.naturalOrder())
>   .thenUse("featureType", ApplicationPermission::getFeatureType, 
> Comparator.reverseOrder())
>   .thenUse("featureFqn", ApplicationPermission::getFeatureFqn, 
> Comparator.nullsFirst(Comparator.naturalOrder()))
>   .thenUse("mode", ApplicationPermission::getMode, 
> Comparator.nullsLast(Comparator.naturalOrder()));  
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread Andi Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andi Huber updated ISIS-1897:
-
Description: 
ObjectContracts seems to be heavily used with the incode platform.

To ease migration, I've provided functional backward compatibility.

However the old methods are now marked for deprecation!

 

 

Isis until 1.16. uses reflection on every of these 4 calls ...
{code:java}
public class ApplicationPermission implements Comparable 
{

...

private final static String propertyNames = "role, featureType, featureFqn, 
mode";

@Override
public int compareTo(final ApplicationPermission other) {
return ObjectContracts.compare(this, other, propertyNames);
}

@Override
public boolean equals(final Object obj) {
return ObjectContracts.equals(this, obj, propertyNames);
}

@Override
public int hashCode() {
return ObjectContracts.hashCode(this, propertyNames);
}

@Override
public String toString() {
return ObjectContracts.toString(this, propertyNames);
}

...

}
{code}

Isis since 2.0.0 provides an optimized variant now: reflection is used only 
once at class initialization ...
{code:java}
public class ApplicationPermission implements Comparable 
{

...

private final static String propertyNames = "role, featureType, featureFqn, 
mode";

private final static ObjectContract contract 
= ObjectContracts.parse(ApplicationPermission.class, propertyNames);

@Override
public int compareTo(final ApplicationPermission other) {
return contract.compare(this, other);
}

@Override
public boolean equals(final Object other) {
return contract.equals(this, other);
}

@Override
public int hashCode() {
return contract.hashCode(this);
}

@Override
public String toString() {
return contract.toString(this);
}

...

}
{code}

However the *recommended* way to use 'object contracts' now is to no longer 
resort to reflection.

Parsing as shown above can be replaced by static method handles to enforce that 
properties actually exist (at compile-time)
{code:java}
private final static ObjectContract contract = 
ObjectContracts.contract(ApplicationPermission.class)
.thenUse("role", ApplicationPermission::getRole)
.thenUse("featureType", ApplicationPermission::getFeatureType)
.thenUse("featureFqn", ApplicationPermission::getFeatureFqn)
.thenUse("mode", ApplicationPermission::getMode);
{code}
If different then natural order comparators are needed then resort to Java's 
Comparator composition ...
{code:java}
private final static ObjectContract contract = 
ObjectContracts.contract(ApplicationPermission.class)
.thenUse("role", ApplicationPermission::getRole, 
Comparator.naturalOrder())
.thenUse("featureType", ApplicationPermission::getFeatureType, 
Comparator.reverseOrder())
.thenUse("featureFqn", ApplicationPermission::getFeatureFqn, 
Comparator.nullsFirst(Comparator.naturalOrder()))
.thenUse("mode", ApplicationPermission::getMode, 
Comparator.nullsLast(Comparator.naturalOrder()));  
{code}

  was:
ObjectContracts seems to be heavily used with the incode platform.

To ease migration, we'll try to provide functional backward compatibility.




> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, I've provided functional backward compatibility.
> However the old methods are now marked for deprecation!
>  
>  
> 
> Isis until 1.16. uses reflection on every of these 4 calls ...
> {code:java}
> public class ApplicationPermission implements 
> Comparable {
>   ...
> private final static String propertyNames = "role, featureType, 
> featureFqn, mode";
> @Override
> public int compareTo(final ApplicationPermission other) {
> return ObjectContracts.compare(this, other, propertyNames);
> }
> @Override
> public boolean equals(final Object obj) {
> return ObjectContracts.equals(this, obj, propertyNames);
> }
> @Override
> public int hashCode() {
> return ObjectContracts.hashCode(this, propertyNames);
> }
> @Override
> public String toString() {
> return ObjectContracts.toString(this, propertyNames);
> }
>   
>   ...
>   
> }
> 

[jira] [Commented] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16386121#comment-16386121
 ] 

ASF subversion and git services commented on ISIS-1897:
---

Commit ad4a1d4a01e19237549310675f72ff7c6f01dab8 in isis's branch 
refs/heads/master from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=ad4a1d4 ]

ISIS-1897 new ObjectContracts backward compatibility implemented

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, we'll try to provide functional backward compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1898) Use Joda Interval for LocalDate collection parameter

2018-03-05 Thread Sander Ginn (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sander Ginn updated ISIS-1898:
--
Description: 
{code:java}
// code placeholder
{code}
To accommodate to the requirement of a {{choicesXxx}}/{{autoCompleteXxx}} 
method for a collection parameter on an action, it would be useful to be able 
to return a Joda Interval instead of a collection of LocalDates.

Furthermore, it is desirable that the available options are offered through the 
date picker that is currently used for single LocalDate parameters.

  was:
To accommodate to the requirement of a `choicesXxx`/`autoCompleteXxx` method 
for a collection parameter on an action, it would be useful to be able to 
return a Joda Interval instead of a collection of LocalDates.

Furthermore, it is desirable that the available options are offered through the 
date picker that is currently used for single LocalDate parameters.


> Use Joda Interval for LocalDate collection parameter
> 
>
> Key: ISIS-1898
> URL: https://issues.apache.org/jira/browse/ISIS-1898
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.1
>Reporter: Sander Ginn
>Priority: Major
> Fix For: 1.16.3
>
>
> {code:java}
> // code placeholder
> {code}
> To accommodate to the requirement of a {{choicesXxx}}/{{autoCompleteXxx}} 
> method for a collection parameter on an action, it would be useful to be able 
> to return a Joda Interval instead of a collection of LocalDates.
> Furthermore, it is desirable that the available options are offered through 
> the date picker that is currently used for single LocalDate parameters.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ISIS-1898) Use Joda Interval for LocalDate collection parameter

2018-03-05 Thread Sander Ginn (JIRA)
Sander Ginn created ISIS-1898:
-

 Summary: Use Joda Interval for LocalDate collection parameter
 Key: ISIS-1898
 URL: https://issues.apache.org/jira/browse/ISIS-1898
 Project: Isis
  Issue Type: Improvement
Affects Versions: 1.16.1
Reporter: Sander Ginn
 Fix For: 1.16.3


To accommodate to the requirement of a `choicesXxx`/`autoCompleteXxx` method 
for a collection parameter on an action, it would be useful to be able to 
return a Joda Interval instead of a collection of LocalDates.

Furthermore, it is desirable that the available options are offered through the 
date picker that is currently used for single LocalDate parameters.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16385843#comment-16385843
 ] 

ASF subversion and git services commented on ISIS-1897:
---

Commit 5d736584e24c14006cc9882112317e818c887cd9 in isis's branch 
refs/heads/master from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=5d73658 ]

ISIS-1897 implement ObjectContracts

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, we'll try to provide functional backward compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16385842#comment-16385842
 ] 

ASF subversion and git services commented on ISIS-1897:
---

Commit 0eb38f4f8e0964196e05103ff211c7f5cd9c8bf3 in isis's branch 
refs/heads/master from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=0eb38f4 ]

ISIS-1897 _Exceptions: add 'not implemented' idiom

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, we'll try to provide functional backward compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16385785#comment-16385785
 ] 

ASF subversion and git services commented on ISIS-1897:
---

Commit ab44c5c36b52c9924fd3e4e07057213d97572086 in isis's branch 
refs/heads/master from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=ab44c5c ]

ISIS-1897 suppress deprecation warnings on JUnit test cases

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, we'll try to provide functional backward compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16385780#comment-16385780
 ] 

ASF subversion and git services commented on ISIS-1897:
---

Commit d1eb77e91124219ab7b38eed55f5ecb69822c551 in isis's branch 
refs/heads/master from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=d1eb77e ]

ISIS-1897 applib: reinstate ObjectContracts tests from -legacy

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, we'll try to provide functional backward compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1897) applib: the new ObjectContracts needs backward compatibility

2018-03-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16385779#comment-16385779
 ] 

ASF subversion and git services commented on ISIS-1897:
---

Commit 44a0e7d5722e1f9d0c146dc881dd4c92fb4a3a21 in isis's branch 
refs/heads/master from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=44a0e7d ]

ISIS-1897 applib: bring in ToStringEvaluator from -legacy

> applib: the new ObjectContracts needs backward compatibility
> 
>
> Key: ISIS-1897
> URL: https://issues.apache.org/jira/browse/ISIS-1897
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andi Huber
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> ObjectContracts seems to be heavily used with the incode platform.
> To ease migration, we'll try to provide functional backward compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)