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 2021/02/14 18:06:23 UTC

[isis] branch master updated: ISIS-2444: docs for TableColumnOrderService

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new f665ec0  ISIS-2444: docs for TableColumnOrderService
f665ec0 is described below

commit f665ec0baecd86e783364c2f5a282109fa2170d7
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Feb 14 18:06:00 2021 +0000

    ISIS-2444: docs for TableColumnOrderService
    
    ... and fix for swagger integ test
---
 .../applib-svc/pages/TableColumnOrderService.adoc  | 44 ----------------------
 .../hooks/implementation.adoc                      |  2 +
 .../services/tablecol/TableColumnOrderService.java | 44 ++++++++++++++++++++++
 3 files changed, 46 insertions(+), 44 deletions(-)

diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService.adoc
index 17f1d10..6b40a01 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService.adoc
@@ -4,8 +4,6 @@
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
 
 
-WARNING: TODO: this content has not yet been reviewed/updated for v2.0
-
 include::system:generated:page$index/applib/services/tablecol/TableColumnOrderService.adoc[TableColumnOrderService]
 
 include::TableColumnOrderService/hooks/implementation.adoc[]
@@ -14,46 +12,4 @@ include::TableColumnOrderService/hooks/examples_and_usage.adoc[]
 
 
 
-The `TableColumnOrderService` provides the ability to reorder (or suppress) columns in both parented- and standalone tables.
-
-
-== API
-
-include::system:generated:page$index/applib/services/tablecol/TableColumnOrderService.adoc[leveloffset=+2]
-
-TODO example migration
-
-.Deprecated Docs
-[WARNING]
-================================
-
-== SPI
-
-The SPI defined by this service is:
-
-[source,java]
-----
-include::refguide:applib-svc:example$services/tablecol/TableColumnOrderService.java[tags="refguide"]
-----
-<.> for the parent collection owned by the specified parent and collection Id, return the set of property ids in the same or other order.
-<.> for the standalone collection of the specified type, return the set of property ids in the same or other order, else return `null` if provides no reordering.
-
-There can be multiple implementations of `TableColumnOrderService` registered, ordered as per the Spring link:https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/annotation/Order.html[`@Order`] annotation (or equivalent).
-The ordering provided by the first such service that returns a non-`null` value will be used.
-If all provided implementations return `null`, then the framework will fallback to a default implementation.
-
-
-
-
-================================
-
-== Implementation
-
-The framework provides a fallback implementation of this service, namely `TableColumnOrderService.Default`.
-
-There can be multiple implementations of `TableColumnOrderService registered.
-These are checked in turn (chain of responsibility pattern), ordered according to the Spring link:https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/annotation/Order.html[`Order`] annotation, or equivalent (as explained in the xref:refguide:applib-svc:about.adoc#overriding-the-services[introduction] to this guide).
-The order from the first service that returns a non null value will be used.
-
-
 
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService/hooks/implementation.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService/hooks/implementation.adoc
index 697f559..6510346 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService/hooks/implementation.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/TableColumnOrderService/hooks/implementation.adoc
@@ -4,3 +4,5 @@
 
 
 == Implementation
+
+The framework provides a fallback implementation of this service, namely `o.a.i.core.metamodel.services.tablecol.TableColumnOrderServiceDefault`.
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/tablecol/TableColumnOrderService.java b/api/applib/src/main/java/org/apache/isis/applib/services/tablecol/TableColumnOrderService.java
index a79af3c..037a569 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/tablecol/TableColumnOrderService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/tablecol/TableColumnOrderService.java
@@ -21,16 +21,60 @@ package org.apache.isis.applib.services.tablecol;
 import java.util.List;
 
 /**
+ * Provides the ability to reorder (or suppress) columns in both parented- and
+ * standalone tables.
+ *
+ * <p>
+ *     There can be multiple implementations of this service registered,
+ *     ordered as per the Spring
+ *     {@link org.springframework.core.annotation.Order} annotation (or equivalent).
+ *     The result of the first service implementation to return a
+ *     non-<code>null</code> value will be used.
+ * </p>
+ *
+ * <p>
+ *      If all provided implementations return <code>null</code>, then the
+ *      framework will fallback to a default implementation.
+ * </p>
+ *
  * @since 1.x {@index}
  */
 public interface TableColumnOrderService {
 
+    /**
+     * For the parent collection owned by the specified parent and collection
+     * Id, return the set of property ids in the same or other order.
+     *
+     * <p>
+     *     Return <code>null</code> if has no opinion/provides no reordering
+     *     for this parent and collection.
+     * </p>
+     *
+     * @param parent
+     * @param collectionId
+     * @param collectionType
+     * @param propertyIds
+     * @return
+     */
     List<String> orderParented(
             final Object parent,
             final String collectionId,
             final Class<?> collectionType,
             final List<String> propertyIds);
 
+    /**
+     * For the standalone collection of the specified type, return the set of
+     * property ids in the same or other order.
+     *
+     * <p>
+     *     Return <code>null</code> if has no opinion/provides no reordering
+     *     for this type.
+     * </p>
+     *
+     * @param collectionType
+     * @param propertyIds
+     * @return
+     */
     List<String> orderStandalone(
             final Class<?> collectionType,
             final List<String> propertyIds);