You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/02/23 09:59:06 UTC
(causeway) 20/23: CAUSEWAY-3676: adds missing copyright messages
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 57843b088193ca481922225abe86e8454bb708d5
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Feb 23 09:28:33 2024 +0000
CAUSEWAY-3676: adds missing copyright messages
---
.../graphql/model/src/main/java/module-info.java | 3 +-
.../viewer/graphql/model/domain/Environment.java | 18 +++
.../graphql/model/domain/GqlvScenarioName.java | 18 +++
.../graphql/model/domain/GqlvScenarioStep.java | 18 +++
.../viewer/graphql/model/domain/SchemaType.java | 18 +++
.../model/domain/common/SchemaStrategy.java | 28 +++-
.../common/interactors/ActionInteractor.java | 44 ++++++
.../interactors/ActionParamInteractor.java} | 24 ++--
.../interactors/GqlvMetaHolder.java} | 16 +--
.../interactors/MemberInteractor.java} | 17 +--
.../interactors/ObjectInteractor.java} | 16 +--
.../common/interactors/PropertyInteractor.java | 43 ++++++
.../domain/common/query/GqlvDomainObject.java | 5 +-
.../domain/common/query/GqlvDomainService.java | 3 +-
.../domain/common/query/GqlvMemberHolder.java | 10 --
.../model/domain/common/query/GqlvMeta.java | 1 +
.../model/domain/common/query/GqlvMetaFetcher.java | 18 +++
.../model/domain/common/query/GqlvMetaHolder.java | 10 --
.../query/GqlvTopLevelQueryAbstractSchema.java | 18 +++
.../model/domain/common/query/GvqlActionUtils.java | 18 +++
.../model/domain/rich/SchemaStrategyRich.java | 26 +++-
.../mutation/GqlvTopLevelMutationRichSchema.java | 18 +++
.../model/domain/rich/query/GqlvAction.java | 11 +-
.../model/domain/rich/query/GqlvActionInvoke.java | 12 +-
.../domain/rich/query/GqlvActionInvokeArgs.java | 15 +-
.../domain/rich/query/GqlvActionInvokeArgsArg.java | 5 +-
.../domain/rich/query/GqlvActionInvokeResult.java | 5 +-
.../model/domain/rich/query/GqlvActionParams.java | 14 +-
.../domain/rich/query/GqlvActionParamsParam.java | 9 +-
.../query/GqlvActionParamsParamAutoComplete.java | 5 +-
.../rich/query/GqlvActionParamsParamChoices.java | 5 +-
.../rich/query/GqlvActionParamsParamDatatype.java | 5 +-
.../rich/query/GqlvActionParamsParamDefault.java | 5 +-
.../rich/query/GqlvActionParamsParamDisabled.java | 5 +-
.../rich/query/GqlvActionParamsParamHidden.java | 5 +-
.../rich/query/GqlvActionParamsParamValidate.java | 5 +-
.../domain/rich/query/GqlvActionValidity.java | 5 +-
.../domain/rich/query/GqlvAssociationDatatype.java | 6 +-
.../domain/rich/query/GqlvAssociationGet.java | 7 +-
.../model/domain/rich/query/GqlvCollection.java | 13 +-
.../domain/rich/query/GqlvCollectionDatatype.java | 3 +-
.../model/domain/rich/query/GqlvCollectionGet.java | 5 +-
.../domain/rich/query/GqlvMemberDisabled.java | 5 +-
.../model/domain/rich/query/GqlvMemberHidden.java | 5 +-
.../model/domain/rich/query/GqlvProperty.java | 11 +-
.../rich/query/GqlvPropertyAutoComplete.java | 5 +-
.../domain/rich/query/GqlvPropertyChoices.java | 5 +-
.../domain/rich/query/GqlvPropertyDatatype.java | 3 +-
.../model/domain/rich/query/GqlvPropertyGet.java | 5 +-
.../domain/rich/query/GqlvPropertyGetBlob.java | 7 +-
.../rich/query/GqlvPropertyGetBlobAbstract.java | 5 +-
.../rich/query/GqlvPropertyGetBlobBytes.java | 3 +-
.../rich/query/GqlvPropertyGetBlobMimeType.java | 3 +-
.../domain/rich/query/GqlvPropertyGetBlobName.java | 3 +-
.../domain/rich/query/GqlvPropertyGetClob.java | 8 +-
.../rich/query/GqlvPropertyGetClobAbstract.java | 5 +-
.../rich/query/GqlvPropertyGetClobChars.java | 3 +-
.../rich/query/GqlvPropertyGetClobMimeType.java | 3 +-
.../domain/rich/query/GqlvPropertyGetClobName.java | 3 +-
.../model/domain/rich/query/GqlvPropertySet.java | 5 +-
.../domain/rich/query/GqlvPropertyValidate.java | 5 +-
.../rich/query/GqlvTopLevelQueryRichSchema.java | 18 +++
.../domain/rich/query/HolderActionDetails.java | 31 -----
.../rich/query/HolderActionParamDetails.java | 20 ---
.../domain/rich/query/HolderMemberDetails.java | 12 --
.../domain/rich/query/HolderPropertyDetails.java | 28 ----
.../model/domain/simple/SchemaStrategySimple.java | 26 +++-
.../mutation/GqlvTopLevelMutationSimpleSchema.java | 18 +++
.../model/domain/simple/query/GqlvAction.java | 154 +++++++++++++++++++--
.../domain/simple/query/GqlvActionInvoke.java | 73 +---------
.../domain/simple/query/GqlvActionInvokeArgs.java | 49 +------
.../simple/query/GqlvActionInvokeArgsArg.java | 21 +--
.../simple/query/GqlvActionInvokeResult.java | 30 +---
.../domain/simple/query/GqlvActionParams.java | 67 +--------
.../domain/simple/query/GqlvActionParamsParam.java | 37 ++---
.../query/GqlvActionParamsParamAutoComplete.java | 31 +----
.../simple/query/GqlvActionParamsParamChoices.java | 31 +----
.../query/GqlvActionParamsParamDatatype.java | 12 +-
.../simple/query/GqlvActionParamsParamDefault.java | 32 +----
.../query/GqlvActionParamsParamDisabled.java | 27 +---
.../simple/query/GqlvActionParamsParamHidden.java | 31 +----
.../query/GqlvActionParamsParamValidate.java | 26 +---
.../domain/simple/query/GqlvActionValidity.java | 20 +--
.../model/domain/simple/query/GqlvAssociation.java | 5 +-
.../simple/query/GqlvAssociationDatatype.java | 12 +-
.../domain/simple/query/GqlvAssociationGet.java | 16 +--
.../model/domain/simple/query/GqlvCollection.java | 12 +-
.../simple/query/GqlvCollectionDatatype.java | 3 +-
.../domain/simple/query/GqlvCollectionGet.java | 6 +-
.../model/domain/simple/query/GqlvMember.java | 5 +-
.../domain/simple/query/GqlvMemberDisabled.java | 13 +-
.../domain/simple/query/GqlvMemberHidden.java | 13 +-
.../model/domain/simple/query/GqlvProperty.java | 25 ++--
.../simple/query/GqlvPropertyAutoComplete.java | 14 +-
.../domain/simple/query/GqlvPropertyChoices.java | 17 +--
.../domain/simple/query/GqlvPropertyDatatype.java | 5 +-
.../model/domain/simple/query/GqlvPropertyGet.java | 11 +-
.../domain/simple/query/GqlvPropertyGetBlob.java | 41 +-----
.../simple/query/GqlvPropertyGetBlobAbstract.java | 12 +-
.../simple/query/GqlvPropertyGetBlobBytes.java | 4 +-
.../simple/query/GqlvPropertyGetBlobMimeType.java | 4 +-
.../simple/query/GqlvPropertyGetBlobName.java | 4 +-
.../domain/simple/query/GqlvPropertyGetClob.java | 41 +-----
.../simple/query/GqlvPropertyGetClobAbstract.java | 12 +-
.../simple/query/GqlvPropertyGetClobChars.java | 4 +-
.../simple/query/GqlvPropertyGetClobMimeType.java | 4 +-
.../simple/query/GqlvPropertyGetClobName.java | 4 +-
.../model/domain/simple/query/GqlvPropertySet.java | 17 +--
.../domain/simple/query/GqlvPropertyValidate.java | 17 +--
.../query/GqlvTopLevelQuerySimpleSchema.java | 18 +++
.../toplevel/GqlvTopLevelQueryBothSchemas.java | 18 +++
111 files changed, 830 insertions(+), 948 deletions(-)
diff --git a/viewers/graphql/model/src/main/java/module-info.java b/viewers/graphql/model/src/main/java/module-info.java
index aa534b05e3..6931ce647b 100644
--- a/viewers/graphql/model/src/main/java/module-info.java
+++ b/viewers/graphql/model/src/main/java/module-info.java
@@ -3,6 +3,7 @@ module org.apache.causeway.incubator.viewer.graphql.model {
exports org.apache.causeway.viewer.graphql.model.context;
exports org.apache.causeway.viewer.graphql.model.domain;
exports org.apache.causeway.viewer.graphql.model.domain.common;
+ exports org.apache.causeway.viewer.graphql.model.domain.common.interactors;
exports org.apache.causeway.viewer.graphql.model.domain.common.query;
exports org.apache.causeway.viewer.graphql.model.domain.rich;
exports org.apache.causeway.viewer.graphql.model.domain.rich.query;
@@ -18,8 +19,8 @@ module org.apache.causeway.incubator.viewer.graphql.model {
exports org.apache.causeway.viewer.graphql.model.types;
requires org.apache.causeway.core.config;
- requires org.apache.causeway.incubator.viewer.graphql.applib;
requires org.apache.causeway.core.metamodel;
+ requires org.apache.causeway.incubator.viewer.graphql.applib;
requires spring.boot.autoconfigure;
requires spring.context;
requires com.graphqljava;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/Environment.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/Environment.java
index 485fb2d03b..08814ae49f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/Environment.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/Environment.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain;
import graphql.GraphQLContext;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java
index 182ca46f01..ec485fe22a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain;
import graphql.Scalars;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
index 8cd09bdc59..d58f2b6f83 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain;
import java.util.ArrayList;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/SchemaType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/SchemaType.java
index 48c03271ad..93e7281eb1 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/SchemaType.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/SchemaType.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain;
public enum SchemaType {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/SchemaStrategy.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/SchemaStrategy.java
index f792ccd9b9..21deeab239 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/SchemaStrategy.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/SchemaStrategy.java
@@ -1,9 +1,25 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.common;
import lombok.val;
-import java.util.Map;
-
import org.apache.causeway.core.config.CausewayConfiguration;
import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
@@ -12,9 +28,9 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvDomainObject;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvDomainService;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
import org.apache.causeway.viewer.graphql.model.domain.rich.SchemaStrategyRich;
import org.apache.causeway.viewer.graphql.model.domain.simple.SchemaStrategySimple;
@@ -48,17 +64,17 @@ public interface SchemaStrategy {
String topLevelFieldNameFrom(CausewayConfiguration.Viewer.Graphql graphqlConfiguration);
GqlvAbstractCustom newGqlvProperty(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToOneAssociation otoa,
final Context context
);
GqlvAbstractCustom newGqlvCollection(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToManyAssociation otma,
final Context context
);
GqlvAbstractCustom newGqlvAction(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final ObjectAction objectAction,
final Context context
);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ActionInteractor.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ActionInteractor.java
new file mode 100644
index 0000000000..5cca69cfc1
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ActionInteractor.java
@@ -0,0 +1,44 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain.common.interactors;
+
+import graphql.schema.GraphQLFieldDefinition;
+
+import org.apache.causeway.applib.services.bookmark.BookmarkService;
+import org.apache.causeway.commons.collections.Can;
+import org.apache.causeway.core.metamodel.object.ManagedObject;
+import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
+import org.apache.causeway.viewer.graphql.model.domain.Environment;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
+
+public interface ActionInteractor
+ extends MemberInteractor<ObjectAction> {
+
+ void addGqlArguments(
+ final ObjectAction objectAction,
+ final GraphQLFieldDefinition.Builder fieldBuilder,
+ final TypeMapper.InputContext inputContext,
+ final int parameterCount);
+
+ Can<ManagedObject> argumentManagedObjectsFor(
+ Environment dataFetchingEnvironment,
+ ObjectAction objectAction,
+ BookmarkService bookmarkService);
+
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ActionParamInteractor.java
similarity index 54%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ActionParamInteractor.java
index d13cb0fb0f..cb3239674c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ActionParamInteractor.java
@@ -16,17 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.causeway.viewer.graphql.model.domain.rich.query;
+package org.apache.causeway.viewer.graphql.model.domain.common.interactors;
-import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
-import org.apache.causeway.viewer.graphql.model.context.Context;
+import graphql.schema.GraphQLFieldDefinition;
-public class GqlvCollectionDatatype extends GqlvAssociationDatatype<OneToManyAssociation> {
+import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
- public GqlvCollectionDatatype(
- final HolderMemberDetails<OneToManyAssociation> holder,
- final Context context) {
- super(holder, context);
- }
+public interface ActionParamInteractor
+ extends ActionInteractor,
+ ObjectActionParameterProvider{
+ ActionInteractor getHolder();
+
+ void addGqlArgument(
+ ObjectAction objectAction,
+ GraphQLFieldDefinition.Builder fieldBuilder,
+ TypeMapper.InputContext inputContext,
+ int paramNum);
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/GqlvMetaHolder.java
similarity index 64%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/GqlvMetaHolder.java
index ee566b6fc5..47c2eac319 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/GqlvMetaHolder.java
@@ -16,17 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.causeway.viewer.graphql.model.domain.simple.query;
+package org.apache.causeway.viewer.graphql.model.domain.common.interactors;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-public class GqlvPropertyDatatype extends GqlvAssociationDatatype<OneToOneAssociation> {
-
- public GqlvPropertyDatatype(
- final Holder<OneToOneAssociation> holder,
- final Context context) {
- super(holder, context);
- }
+public interface GqlvMetaHolder
+ extends ObjectSpecificationProvider,
+ SchemaTypeProvider {
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/MemberInteractor.java
similarity index 64%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/MemberInteractor.java
index ee566b6fc5..1281aece96 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/MemberInteractor.java
@@ -16,17 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.causeway.viewer.graphql.model.domain.simple.query;
+package org.apache.causeway.viewer.graphql.model.domain.common.interactors;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.causeway.viewer.graphql.model.context.Context;
-
-public class GqlvPropertyDatatype extends GqlvAssociationDatatype<OneToOneAssociation> {
-
- public GqlvPropertyDatatype(
- final Holder<OneToOneAssociation> holder,
- final Context context) {
- super(holder, context);
- }
+import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
+public interface MemberInteractor<T extends ObjectMember>
+ extends ObjectInteractor,
+ ObjectMemberProvider<T> {
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ObjectInteractor.java
similarity index 64%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ObjectInteractor.java
index ee566b6fc5..71dd035d18 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/ObjectInteractor.java
@@ -16,17 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.causeway.viewer.graphql.model.domain.simple.query;
+package org.apache.causeway.viewer.graphql.model.domain.common.interactors;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-public class GqlvPropertyDatatype extends GqlvAssociationDatatype<OneToOneAssociation> {
-
- public GqlvPropertyDatatype(
- final Holder<OneToOneAssociation> holder,
- final Context context) {
- super(holder, context);
- }
+public interface ObjectInteractor
+ extends SchemaTypeProvider,
+ ObjectSpecificationProvider {
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/PropertyInteractor.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/PropertyInteractor.java
new file mode 100644
index 0000000000..6d386ce980
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/interactors/PropertyInteractor.java
@@ -0,0 +1,43 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain.common.interactors;
+
+import graphql.schema.GraphQLFieldDefinition;
+
+import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
+import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
+
+public interface PropertyInteractor
+ extends MemberInteractor<OneToOneAssociation> {
+
+ void addGqlArgument(
+ OneToOneAssociation otoa,
+ GraphQLFieldDefinition.Builder fieldBuilder,
+ TypeMapper.InputContext inputContext);
+
+ default MemberInteractor<OneToOneAssociation> asHolderMemberDetails() {
+ return new MemberInteractor<>() {
+ @Override public OneToOneAssociation getObjectMember() {return PropertyInteractor.this.getObjectMember();}
+ @Override public ObjectSpecification getObjectSpecification() {return PropertyInteractor.this.getObjectSpecification();}
+ @Override public SchemaType getSchemaType() {return PropertyInteractor.this.getSchemaType();}
+ };
+ }
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainObject.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainObject.java
index ec7022750d..f8d4cc02d9 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainObject.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainObject.java
@@ -37,10 +37,11 @@ import org.apache.causeway.core.metamodel.spec.feature.MixedIn;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.Parent;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
import org.apache.causeway.viewer.graphql.model.domain.common.SchemaStrategy;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.GqlvMetaHolder;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
@@ -52,7 +53,7 @@ import lombok.val;
*/
public class GqlvDomainObject
extends GqlvAbstractCustom
- implements GqlvMetaHolder, GqlvMemberHolder, ObjectSpecificationProvider, SchemaTypeProvider {
+ implements GqlvMetaHolder, ObjectInteractor, ObjectSpecificationProvider, SchemaTypeProvider {
private final SchemaStrategy schemaStrategy;
@Getter private final ObjectSpecification objectSpecification;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainService.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainService.java
index 81817ba0d6..6fc69949d1 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainService.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvDomainService.java
@@ -31,6 +31,7 @@ import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
import org.apache.causeway.viewer.graphql.model.domain.common.SchemaStrategy;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import lombok.Getter;
import lombok.val;
@@ -40,7 +41,7 @@ import lombok.val;
*/
public class GqlvDomainService
extends GqlvAbstractCustom
- implements GqlvMemberHolder {
+ implements ObjectInteractor {
@Getter private final SchemaStrategy schemaStrategy;
@Getter private final ObjectSpecification objectSpecification;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMemberHolder.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMemberHolder.java
deleted file mode 100644
index 242e7a62fe..0000000000
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMemberHolder.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.apache.causeway.viewer.graphql.model.domain.common.query;
-
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-
-public interface GqlvMemberHolder
- extends ObjectSpecificationProvider,
- SchemaTypeProvider {
-
-}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMeta.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMeta.java
index a200872c06..96c04a7155 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMeta.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMeta.java
@@ -25,6 +25,7 @@ import org.apache.causeway.core.config.CausewayConfiguration;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.GqlvMetaHolder;
import lombok.val;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaFetcher.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaFetcher.java
index 86b91e624a..7ed3fd3766 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaFetcher.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaFetcher.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.common.query;
import lombok.val;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaHolder.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaHolder.java
deleted file mode 100644
index be2354ed88..0000000000
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvMetaHolder.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.apache.causeway.viewer.graphql.model.domain.common.query;
-
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-
-public interface GqlvMetaHolder
- extends ObjectSpecificationProvider,
- SchemaTypeProvider {
-
-}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvTopLevelQueryAbstractSchema.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvTopLevelQueryAbstractSchema.java
index a56d4464b6..9c8e9ac31b 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvTopLevelQueryAbstractSchema.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GqlvTopLevelQueryAbstractSchema.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.common.query;
import java.util.ArrayList;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GvqlActionUtils.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GvqlActionUtils.java
index 14d4cf0e0a..eb98798b2e 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GvqlActionUtils.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/common/query/GvqlActionUtils.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.common.query;
import java.util.List;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/SchemaStrategyRich.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/SchemaStrategyRich.java
index e7c8745352..bafac5d863 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/SchemaStrategyRich.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/SchemaStrategyRich.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.rich;
import org.apache.causeway.core.config.CausewayConfiguration;
@@ -9,7 +27,7 @@ import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.common.SchemaStrategy;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvDomainObject;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import org.apache.causeway.viewer.graphql.model.domain.rich.query.GqlvAction;
import org.apache.causeway.viewer.graphql.model.domain.rich.query.GqlvCollection;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMeta;
@@ -28,21 +46,21 @@ public class SchemaStrategyRich implements SchemaStrategy {
}
public GqlvAbstractCustom newGqlvProperty(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToOneAssociation otoa,
final Context context
) {
return new GqlvProperty(holder, otoa, context);
};
public GqlvAbstractCustom newGqlvCollection(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToManyAssociation otma,
final Context context
) {
return new GqlvCollection(holder, otma, context);
}
public GqlvAbstractCustom newGqlvAction(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final ObjectAction objectAction,
final Context context
) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/mutation/GqlvTopLevelMutationRichSchema.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/mutation/GqlvTopLevelMutationRichSchema.java
index c7782a8dc1..4280c5e932 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/mutation/GqlvTopLevelMutationRichSchema.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/mutation/GqlvTopLevelMutationRichSchema.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.rich.mutation;
import java.util.ArrayList;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAction.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAction.java
index 3bfbf39c40..2960ba2bf1 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAction.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAction.java
@@ -40,6 +40,8 @@ import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.Parent;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GvqlActionUtils;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -49,10 +51,9 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvAction
- extends GqlvMember<ObjectAction, org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder>
- implements HolderMemberDetails<ObjectAction>,
- HolderActionDetails,
- Parent, org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider, org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider<ObjectAction>, org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider {
+ extends GqlvMember<ObjectAction, ObjectInteractor>
+ implements ActionInteractor,
+ Parent {
private final GqlvMemberHidden<ObjectAction> hidden;
private final GqlvMemberDisabled<ObjectAction> disabled;
@@ -67,7 +68,7 @@ public class GqlvAction
private final GqlvActionParams params;
public GqlvAction(
- final org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final ObjectAction objectAction,
final Context context) {
super(holder, objectAction, TypeNames.actionTypeNameFor(holder.getObjectSpecification(), objectAction, holder.getSchemaType()), context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvoke.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvoke.java
index 86844eef21..e6f4fb92f5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvoke.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvoke.java
@@ -19,20 +19,14 @@
package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -43,12 +37,12 @@ import lombok.extern.log4j.Log4j2;
public class GqlvActionInvoke
extends GqlvAbstractCustom {
- private final HolderActionDetails holder;
+ private final ActionInteractor holder;
private final GqlvActionInvokeResult result;
private final GqlvActionInvokeArgs args;
public GqlvActionInvoke(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final Context context) {
super(TypeNames.actionInvokeTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgs.java
index 86ce5044ff..8c7f4e8663 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgs.java
@@ -24,20 +24,11 @@ import java.util.concurrent.atomic.AtomicInteger;
import graphql.schema.DataFetchingEnvironment;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
-
-import graphql.schema.GraphQLFieldDefinition;
import lombok.Getter;
import lombok.val;
@@ -47,12 +38,12 @@ import lombok.extern.log4j.Log4j2;
public class GqlvActionInvokeArgs
extends GqlvAbstractCustom {
- @Getter private final HolderActionDetails holder;
+ @Getter private final ActionInteractor holder;
private final List<GqlvActionInvokeArgsArg> args = new ArrayList<>();
public GqlvActionInvokeArgs(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final Context context) {
super(TypeNames.actionArgsTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgsArg.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgsArg.java
index 4bb15e12a0..59a498b594 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgsArg.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeArgsArg.java
@@ -28,6 +28,7 @@ import org.apache.causeway.core.metamodel.spec.feature.ObjectActionParameter;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import lombok.Getter;
import lombok.val;
@@ -37,12 +38,12 @@ import lombok.extern.log4j.Log4j2;
public class GqlvActionInvokeArgsArg
extends GqlvAbstract {
- @Getter private final HolderActionDetails holder;
+ @Getter private final ActionInteractor holder;
@Getter private final ObjectActionParameter objectActionParameter;
@Getter private final int paramNum;
public GqlvActionInvokeArgsArg(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final ObjectActionParameter objectActionParameter,
final Context context,
final int paramNum) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeResult.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeResult.java
index 9c0e408ce1..0cc35a638e 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeResult.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionInvokeResult.java
@@ -28,6 +28,7 @@ import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.springframework.lang.Nullable;
import org.apache.causeway.applib.annotation.Where;
@@ -46,10 +47,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionInvokeResult extends GqlvAbstract {
- private final HolderActionDetails holder;
+ private final ActionInteractor holder;
public GqlvActionInvokeResult(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final Context context) {
super(context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParams.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParams.java
index 99e48723fc..056afc7922 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParams.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParams.java
@@ -23,20 +23,12 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.Getter;
import lombok.val;
@@ -46,12 +38,12 @@ import lombok.extern.log4j.Log4j2;
public class GqlvActionParams
extends GqlvAbstractCustom {
- @Getter private final HolderActionDetails holder;
+ @Getter private final ActionInteractor holder;
private final List<GqlvActionParamsParam> params = new ArrayList<>();
public GqlvActionParams(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final Context context) {
super(TypeNames.actionParamsTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParam.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParam.java
index 2c75a247f6..5953268b61 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParam.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParam.java
@@ -32,9 +32,10 @@ import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.Getter;
@@ -43,10 +44,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParam
extends GqlvAbstractCustom
- implements HolderActionParamDetails,
+ implements ActionParamInteractor,
ObjectActionParameterProvider {
- @Getter private final HolderActionDetails holder;
+ @Getter private final ActionInteractor holder;
@Getter private final ObjectActionParameter objectActionParameter;
@Getter private final int paramNum;
@@ -68,7 +69,7 @@ public class GqlvActionParamsParam
private final GqlvActionParamsParamDatatype datatype;
public GqlvActionParamsParam(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final ObjectActionParameter oap,
final Context context,
final int paramNum) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamAutoComplete.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamAutoComplete.java
index e259739f6c..9816f6fe4c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamAutoComplete.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamAutoComplete.java
@@ -37,6 +37,7 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+ import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -48,10 +49,10 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
private static final String SEARCH_PARAM_NAME = "search";
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamAutoComplete(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamChoices.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamChoices.java
index 7e693a6605..8b60533ee5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamChoices.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamChoices.java
@@ -35,6 +35,7 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+ import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -44,10 +45,10 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
@Log4j2
public class GqlvActionParamsParamChoices extends GqlvAbstract {
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamChoices(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDatatype.java
index 329aca8ed7..b2fcdd3ef5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDatatype.java
@@ -26,15 +26,16 @@ import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import lombok.val;
public class GqlvActionParamsParamDatatype extends GqlvAbstract {
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamDatatype(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDefault.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDefault.java
index 661135406a..e28d004b28 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDefault.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDefault.java
@@ -31,6 +31,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -39,10 +40,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParamDefault extends GqlvAbstract {
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamDefault(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDisabled.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDisabled.java
index 818ffcf94d..41fb15772d 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDisabled.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamDisabled.java
@@ -28,6 +28,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -38,10 +39,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParamDisabled extends GqlvAbstract {
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamDisabled(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamHidden.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamHidden.java
index c436c328f1..19f09d4438 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamHidden.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamHidden.java
@@ -28,6 +28,7 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+ import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -37,10 +38,10 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
@Log4j2
public class GqlvActionParamsParamHidden extends GqlvAbstract {
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamHidden(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamValidate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamValidate.java
index a018c444f7..ef0076fa8a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamValidate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionParamsParamValidate.java
@@ -28,6 +28,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -37,10 +38,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParamValidate extends GqlvAbstract {
- private final HolderActionParamDetails holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamValidate(
- final HolderActionParamDetails holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionValidity.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionValidity.java
index 8cc2520174..88b95f744f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionValidity.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvActionValidity.java
@@ -33,6 +33,7 @@ import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.core.metamodel.spec.feature.ObjectActionParameter;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -42,10 +43,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionValidity extends GqlvAbstract {
- private final HolderActionDetails holder;
+ private final ActionInteractor holder;
public GqlvActionValidity(
- final HolderActionDetails holder,
+ final ActionInteractor holder,
final Context context
) {
super(context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationDatatype.java
index 7cc3d701b9..b1e05e167c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationDatatype.java
@@ -24,19 +24,19 @@ import graphql.schema.DataFetchingEnvironment;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import lombok.val;
public abstract class GqlvAssociationDatatype<T extends ObjectAssociation> extends GqlvAbstract {
- private final HolderMemberDetails<T> holder;
+ private final MemberInteractor<T> holder;
public GqlvAssociationDatatype(
- final HolderMemberDetails<T> holder,
+ final MemberInteractor<T> holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java
index 4d3389438a..5011eed03d 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java
@@ -27,16 +27,17 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends GqlvAbstract {
- final HolderMemberDetails<T> holder;
+ final MemberInteractor<T> holder;
public GqlvAssociationGet(
- final HolderMemberDetails<T> holder,
+ final MemberInteractor<T> holder,
final Context context) {
super(context);
this.holder = holder;
@@ -52,7 +53,7 @@ public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends Gq
}
}
- abstract GraphQLOutputType outputTypeFor(HolderMemberDetails<T> holder);
+ abstract GraphQLOutputType outputTypeFor(MemberInteractor<T> holder);
@Override
protected Object fetchData(final DataFetchingEnvironment environment) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java
index f07381d5e5..86d7c598bb 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java
@@ -23,15 +23,12 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
public class GqlvCollection
- extends GqlvAssociation<OneToManyAssociation, GqlvMemberHolder>
- implements HolderMemberDetails<OneToManyAssociation>,
- ObjectSpecificationProvider, ObjectMemberProvider<OneToManyAssociation>, SchemaTypeProvider {
+ extends GqlvAssociation<OneToManyAssociation, ObjectInteractor>
+ implements MemberInteractor<OneToManyAssociation> {
private final GqlvMemberHidden<OneToManyAssociation> hidden;
private final GqlvMemberDisabled<OneToManyAssociation> disabled;
@@ -39,7 +36,7 @@ public class GqlvCollection
private final GqlvCollectionDatatype datatype;
public GqlvCollection(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToManyAssociation otma,
final Context context
) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java
index d13cb0fb0f..c963fc76df 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionDatatype.java
@@ -20,11 +20,12 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvCollectionDatatype extends GqlvAssociationDatatype<OneToManyAssociation> {
public GqlvCollectionDatatype(
- final HolderMemberDetails<OneToManyAssociation> holder,
+ final MemberInteractor<OneToManyAssociation> holder,
final Context context) {
super(holder, context);
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java
index 2e98a6826d..25cb89f02f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java
@@ -22,19 +22,20 @@ import graphql.schema.GraphQLOutputType;
import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import lombok.val;
public class GqlvCollectionGet extends GqlvAssociationGet<OneToManyAssociation> {
public GqlvCollectionGet(
- final HolderMemberDetails<OneToManyAssociation> holder,
+ final MemberInteractor<OneToManyAssociation> holder,
final Context context) {
super(holder, context);
}
@Override
- GraphQLOutputType outputTypeFor(HolderMemberDetails<OneToManyAssociation> holder) {
+ GraphQLOutputType outputTypeFor(MemberInteractor<OneToManyAssociation> holder) {
val oneToManyAssociation = holder.getObjectMember();
return context.typeMapper.listTypeForElementTypeOf(oneToManyAssociation, holder.getSchemaType());
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberDisabled.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberDisabled.java
index 621c3f9033..27b6376ecb 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberDisabled.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberDisabled.java
@@ -29,6 +29,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -37,10 +38,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvMemberDisabled<T extends ObjectMember> extends GqlvAbstract {
- private final HolderMemberDetails<T> holder;
+ private final MemberInteractor<T> holder;
public GqlvMemberDisabled(
- final HolderMemberDetails<T> holder,
+ final MemberInteractor<T> holder,
final Context context
) {
super(context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberHidden.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberHidden.java
index 014936486d..c8dc796216 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberHidden.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvMemberHidden.java
@@ -29,6 +29,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -37,10 +38,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvMemberHidden<T extends ObjectMember> extends GqlvAbstract {
- private final HolderMemberDetails<T> holder;
+ private final MemberInteractor<T> holder;
public GqlvMemberHidden(
- final HolderMemberDetails<T> holder,
+ final MemberInteractor<T> holder,
final Context context
) {
super(context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java
index 314bbb2a5e..7c38398184 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java
@@ -29,6 +29,9 @@ import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
@@ -37,10 +40,10 @@ import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
public class GqlvProperty
- extends GqlvAssociation<OneToOneAssociation, org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder>
+ extends GqlvAssociation<OneToOneAssociation, ObjectInteractor>
implements
- HolderMemberDetails<OneToOneAssociation>,
- HolderPropertyDetails,
+ MemberInteractor<OneToOneAssociation>,
+ PropertyInteractor,
ObjectSpecificationProvider, ObjectMemberProvider<OneToOneAssociation>, SchemaTypeProvider {
private final GqlvMemberHidden<OneToOneAssociation> hidden;
@@ -63,7 +66,7 @@ public class GqlvProperty
private final GqlvPropertyDatatype datatype;
public GqlvProperty(
- final org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToOneAssociation otoa,
final Context context) {
super(holder, otoa, TypeNames.propertyTypeNameFor(holder.getObjectSpecification(), otoa, holder.getSchemaType()), context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyAutoComplete.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyAutoComplete.java
index 92ede4d848..a53d3f63bf 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyAutoComplete.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyAutoComplete.java
@@ -33,6 +33,7 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -41,10 +42,10 @@ public class GqlvPropertyAutoComplete extends GqlvAbstract {
private static final String SEARCH_PARAM_NAME = "search";
- private final HolderMemberDetails<OneToOneAssociation> holder;
+ private final MemberInteractor<OneToOneAssociation> holder;
public GqlvPropertyAutoComplete(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyChoices.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyChoices.java
index 7cf5ecb6fc..3852004577 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyChoices.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyChoices.java
@@ -30,6 +30,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -37,10 +38,10 @@ import lombok.val;
public class GqlvPropertyChoices extends GqlvAbstract {
- final HolderPropertyDetails holder;
+ final PropertyInteractor holder;
public GqlvPropertyChoices(
- final HolderPropertyDetails holder,
+ final PropertyInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyDatatype.java
index 5b381107a1..a72736c83e 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyDatatype.java
@@ -20,11 +20,12 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
public class GqlvPropertyDatatype extends GqlvAssociationDatatype<OneToOneAssociation> {
public GqlvPropertyDatatype(
- final HolderPropertyDetails holder,
+ final PropertyInteractor holder,
final Context context) {
super(holder.asHolderMemberDetails(), context);
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java
index b8232aab27..1d64cd140f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java
@@ -22,19 +22,20 @@ import graphql.schema.GraphQLOutputType;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import lombok.val;
public class GqlvPropertyGet extends GqlvAssociationGet<OneToOneAssociation> {
public GqlvPropertyGet(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context);
}
@Override
- GraphQLOutputType outputTypeFor(HolderMemberDetails<OneToOneAssociation> holder) {
+ GraphQLOutputType outputTypeFor(MemberInteractor<OneToOneAssociation> holder) {
val oneToOneAssociation = holder.getObjectMember();
return context.typeMapper.outputTypeFor(oneToOneAssociation, holder.getSchemaType());
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java
index 9a75217067..28879acef7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java
@@ -23,18 +23,17 @@ import graphql.schema.DataFetchingEnvironment;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.config.CausewayConfiguration;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
public class GqlvPropertyGetBlob
extends GqlvAbstractCustom {
- final HolderMemberDetails<OneToOneAssociation> holder;
+ final MemberInteractor<OneToOneAssociation> holder;
final GqlvPropertyGetBlobBytes blobName;
final GqlvPropertyGetBlobMimeType blobMimeType;
final GqlvPropertyGetBlobName blobBytes;
@@ -42,7 +41,7 @@ public class GqlvPropertyGetBlob
private final CausewayConfiguration.Viewer.Graphql graphqlConfiguration;
public GqlvPropertyGetBlob(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java
index 3c68acfc4c..44a9826ca0 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java
@@ -30,16 +30,17 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
public abstract class GqlvPropertyGetBlobAbstract extends GqlvAbstract {
- final HolderMemberDetails<OneToOneAssociation> holder;
+ final MemberInteractor<OneToOneAssociation> holder;
public GqlvPropertyGetBlobAbstract(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context, String name) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java
index 429d73ed93..84ea9d1365 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java
@@ -22,6 +22,7 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -31,7 +32,7 @@ public class GqlvPropertyGetBlobBytes extends GqlvPropertyGetBlobAbstract {
private final String graphqlPath;
public GqlvPropertyGetBlobBytes(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "bytes");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java
index 4dd6cd12b1..353efe7f83 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java
@@ -22,11 +22,12 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetBlobMimeType extends GqlvPropertyGetBlobAbstract {
public GqlvPropertyGetBlobMimeType(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "mimeType");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java
index c397f7dcef..6dfd96fd29 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java
@@ -23,11 +23,12 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.applib.value.Blob;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetBlobName extends GqlvPropertyGetBlobAbstract {
public GqlvPropertyGetBlobName(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "name");
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java
index 7eb228003b..96aa32a6e6 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java
@@ -23,19 +23,17 @@ import graphql.schema.DataFetchingEnvironment;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.config.CausewayConfiguration;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
public class GqlvPropertyGetClob
extends GqlvAbstractCustom {
- final HolderMemberDetails<OneToOneAssociation> holder;
+ final MemberInteractor<OneToOneAssociation> holder;
final GqlvPropertyGetClobName clobName;
final GqlvPropertyGetClobMimeType clobMimeType;
final GqlvPropertyGetClobChars clobChars;
@@ -43,7 +41,7 @@ public class GqlvPropertyGetClob
private final CausewayConfiguration.Viewer.Graphql graphqlConfiguration;
public GqlvPropertyGetClob(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java
index e74c6098d5..df6d014673 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java
@@ -30,16 +30,17 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
public abstract class GqlvPropertyGetClobAbstract extends GqlvAbstract {
- final HolderMemberDetails<OneToOneAssociation> holder;
+ final MemberInteractor<OneToOneAssociation> holder;
public GqlvPropertyGetClobAbstract(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context, String name) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java
index bb2a46621c..c27a4a4fb2 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java
@@ -22,6 +22,7 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -31,7 +32,7 @@ public class GqlvPropertyGetClobChars extends GqlvPropertyGetClobAbstract {
private final String graphqlPath;
public GqlvPropertyGetClobChars(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "chars");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java
index ca72ef750e..8564a372df 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java
@@ -22,11 +22,12 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetClobMimeType extends GqlvPropertyGetClobAbstract {
public GqlvPropertyGetClobMimeType(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "mimeType");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java
index bace82a023..2a6309cd87 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java
@@ -23,11 +23,12 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.applib.value.Blob;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetClobName extends GqlvPropertyGetClobAbstract {
public GqlvPropertyGetClobName(
- final HolderMemberDetails<OneToOneAssociation> holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "name");
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertySet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertySet.java
index 1c623bad5c..53d4c963c2 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertySet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertySet.java
@@ -30,6 +30,7 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.exceptions.DisabledException;
import org.apache.causeway.viewer.graphql.model.exceptions.HiddenException;
import org.apache.causeway.viewer.graphql.model.exceptions.InvalidException;
@@ -40,10 +41,10 @@ import lombok.val;
public class GqlvPropertySet extends GqlvAbstract {
- final HolderPropertyDetails holder;
+ final PropertyInteractor holder;
public GqlvPropertySet(
- final HolderPropertyDetails holder,
+ final PropertyInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyValidate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyValidate.java
index f5a1ac76f1..839059cc19 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyValidate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyValidate.java
@@ -27,6 +27,7 @@ import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -34,10 +35,10 @@ import lombok.val;
public class GqlvPropertyValidate extends GqlvAbstract {
- final HolderPropertyDetails holder;
+ final PropertyInteractor holder;
public GqlvPropertyValidate(
- final HolderPropertyDetails holder,
+ final PropertyInteractor holder,
final Context context) {
super(context);
this.holder = holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvTopLevelQueryRichSchema.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvTopLevelQueryRichSchema.java
index f70a8ee0b7..d61397c6dc 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvTopLevelQueryRichSchema.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvTopLevelQueryRichSchema.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.rich.query;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderActionDetails.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderActionDetails.java
deleted file mode 100644
index 9c9e76ad6f..0000000000
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderActionDetails.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.apache.causeway.viewer.graphql.model.domain.rich.query;
-
-import graphql.schema.GraphQLFieldDefinition;
-
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
-
-public interface HolderActionDetails
- extends HolderSchemaTypeProvider,
- ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction> {
-
- void addGqlArguments(
- final ObjectAction objectAction,
- final GraphQLFieldDefinition.Builder fieldBuilder,
- final TypeMapper.InputContext inputContext,
- final int parameterCount);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
-
-}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderActionParamDetails.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderActionParamDetails.java
deleted file mode 100644
index e73db92565..0000000000
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderActionParamDetails.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.apache.causeway.viewer.graphql.model.domain.rich.query;
-
-import graphql.schema.GraphQLFieldDefinition;
-
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
-
-public interface HolderActionParamDetails
- extends HolderActionDetails,
- ObjectActionParameterProvider{
-
- HolderActionDetails getHolder();
-
- void addGqlArgument(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderMemberDetails.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderMemberDetails.java
deleted file mode 100644
index ae9638b37e..0000000000
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderMemberDetails.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.causeway.viewer.graphql.model.domain.rich.query;
-
-import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-
-public interface HolderMemberDetails<T extends ObjectMember>
- extends SchemaTypeProvider,
- ObjectSpecificationProvider,
- ObjectMemberProvider<T> {
-}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderPropertyDetails.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderPropertyDetails.java
deleted file mode 100644
index 1f9b13a4b1..0000000000
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/HolderPropertyDetails.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.apache.causeway.viewer.graphql.model.domain.rich.query;
-
-import graphql.schema.GraphQLFieldDefinition;
-
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
-
-public interface HolderPropertyDetails
- extends SchemaTypeProvider, ObjectSpecificationProvider, ObjectMemberProvider<OneToOneAssociation> {
-
- void addGqlArgument(
- OneToOneAssociation otoa,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext);
-
- default HolderMemberDetails<OneToOneAssociation> asHolderMemberDetails() {
- return new HolderMemberDetails<>() {
- @Override public OneToOneAssociation getObjectMember() {return HolderPropertyDetails.this.getObjectMember();}
- @Override public ObjectSpecification getObjectSpecification() {return HolderPropertyDetails.this.getObjectSpecification();}
- @Override public SchemaType getSchemaType() {return HolderPropertyDetails.this.getSchemaType();}
- };
- }
-}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/SchemaStrategySimple.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/SchemaStrategySimple.java
index 204ad82ad2..e91a017e67 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/SchemaStrategySimple.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/SchemaStrategySimple.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.simple;
import org.apache.causeway.core.config.CausewayConfiguration;
@@ -10,9 +28,9 @@ import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.common.SchemaStrategy;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvDomainObject;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMeta;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import org.apache.causeway.viewer.graphql.model.domain.simple.query.GqlvAction;
import org.apache.causeway.viewer.graphql.model.domain.simple.query.GqlvCollection;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
import org.apache.causeway.viewer.graphql.model.domain.simple.query.GqlvProperty;
public class SchemaStrategySimple implements SchemaStrategy {
@@ -28,21 +46,21 @@ public class SchemaStrategySimple implements SchemaStrategy {
}
public GqlvAbstractCustom newGqlvProperty(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToOneAssociation otoa,
final Context context
) {
return new GqlvProperty(holder, otoa, context);
};
public GqlvAbstractCustom newGqlvCollection(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToManyAssociation otma,
final Context context
) {
return new GqlvCollection(holder, otma, context);
}
public GqlvAbstractCustom newGqlvAction(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final ObjectAction objectAction,
final Context context
) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/mutation/GqlvTopLevelMutationSimpleSchema.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/mutation/GqlvTopLevelMutationSimpleSchema.java
index 35507cbd69..17601553af 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/mutation/GqlvTopLevelMutationSimpleSchema.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/mutation/GqlvTopLevelMutationSimpleSchema.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.simple.mutation;
import java.util.ArrayList;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAction.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAction.java
index 5543b6fe0e..9e2d43068f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAction.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAction.java
@@ -18,11 +18,15 @@
*/
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import java.util.stream.Collectors;
import graphql.schema.GraphQLArgument;
import graphql.schema.GraphQLFieldDefinition;
+import org.apache.causeway.applib.services.bookmark.Bookmark;
import org.apache.causeway.applib.services.bookmark.BookmarkService;
import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.object.ManagedObject;
@@ -36,8 +40,10 @@ import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.Parent;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
import org.apache.causeway.viewer.graphql.model.domain.common.query.GvqlActionUtils;
+import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -45,12 +51,8 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvAction
- extends GqlvMember<ObjectAction, GqlvMemberHolder>
- implements GqlvMemberHidden.Holder<ObjectAction>,
- GqlvMemberDisabled.Holder<ObjectAction>,
- GqlvActionInvoke.Holder,
- GqlvActionValidity.Holder,
- GqlvActionParams.Holder,
+ extends GqlvMember<ObjectAction, ObjectInteractor>
+ implements ActionInteractor,
Parent {
private final GqlvMemberHidden<ObjectAction> hidden;
@@ -66,7 +68,7 @@ public class GqlvAction
private final GqlvActionParams params;
public GqlvAction(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final ObjectAction objectAction,
final Context context) {
super(holder, objectAction, TypeNames.actionTypeNameFor(holder.getObjectSpecification(), objectAction, holder.getSchemaType()), context);
@@ -111,7 +113,141 @@ public class GqlvAction
final ObjectAction objectAction,
final BookmarkService bookmarkService) {
- return GvqlActionUtils.argumentManagedObjectsFor(dataFetchingEnvironment, objectAction, context);
+ return argumentManagedObjectsFor(dataFetchingEnvironment, objectAction, context);
+ }
+
+ /**
+ *
+ * @param environment
+ * @param objectAction
+ * @param context
+ * @return
+ */
+ public static Can<ManagedObject> argumentManagedObjectsFor(
+ final Environment environment,
+ final ObjectAction objectAction,
+ final Context context) {
+ Map<String, Object> argumentPojos = environment.getArguments();
+ Can<ObjectActionParameter> parameters = objectAction.getParameters();
+ return parameters
+ .map(oap -> {
+ final ObjectSpecification elementType = oap.getElementType();
+ Object argumentValue = argumentPojos.get(oap.getId());
+ Object pojoOrPojoList;
+
+ switch (elementType.getBeanSort()) {
+
+ case VALUE:
+ return adaptValue(oap, argumentValue, context);
+
+ case ENTITY:
+ case VIEW_MODEL:
+ if (argumentValue == null) {
+ return ManagedObject.empty(elementType);
+ }
+ // fall through
+
+ case ABSTRACT:
+ // if the parameter is abstract, we still attempt to figure out the arguments.
+ // the arguments will need to either use 'ref' or else both 'id' AND 'logicalTypeName'
+ if (argumentValue instanceof List) {
+ val argumentValueList = (List<Object>) argumentValue;
+ pojoOrPojoList = argumentValueList.stream()
+ .map(value -> asPojo(oap.getElementType(), value, environment, context))
+ .filter(Optional::isPresent)
+ .map(Optional::get)
+ .collect(Collectors.toList());
+ } else {
+ pojoOrPojoList = asPojo(oap.getElementType(), argumentValue, environment, context).orElse(null);
+ }
+ return ManagedObject.adaptParameter(oap, pojoOrPojoList);
+
+ case COLLECTION:
+ case MANAGED_BEAN_CONTRIBUTING:
+ case VETOED:
+ case MANAGED_BEAN_NOT_CONTRIBUTING:
+ case MIXIN:
+ case UNKNOWN:
+ default:
+ throw new IllegalArgumentException(String.format(
+ "Cannot handle an input type for %s; beanSort is %s", elementType.getFullIdentifier(), elementType.getBeanSort()));
+ }
+ });
+ }
+
+ private static ManagedObject adaptValue(
+ final ObjectActionParameter oap,
+ final Object argumentValue,
+ final Context context) {
+
+ val elementType = oap.getElementType();
+ if (argumentValue == null) {
+ return ManagedObject.empty(elementType);
+ }
+
+ val argPojo = context.typeMapper.unmarshal(argumentValue, elementType);
+ return ManagedObject.adaptParameter(oap, argPojo);
+ }
+
+
+ public static Optional<Object> asPojo(
+ final ObjectSpecification elementType,
+ final Object argumentValueObj,
+ final Environment environment,
+ final Context context
+ ) {
+ val argumentValue = (Map<String, String>) argumentValueObj;
+
+ val refValue = argumentValue.get("ref");
+ if (refValue != null) {
+ String key = GvqlActionUtils.keyFor(refValue);
+ BookmarkedPojo bookmarkedPojo = environment.getGraphQlContext().get(key);
+ if (bookmarkedPojo == null) {
+ throw new IllegalArgumentException(String.format(
+ "Could not find object referenced '%s' in the execution context; was it saved previously using \"saveAs\" ?", refValue));
+ }
+ val targetPojoClass = bookmarkedPojo.getTargetPojo().getClass();
+ val targetPojoSpec = context.specificationLoader.loadSpecification(targetPojoClass);
+ if (targetPojoSpec == null) {
+ throw new IllegalArgumentException(String.format(
+ "The object referenced '%s' is not part of the metamodel (has class '%s')",
+ refValue, targetPojoClass.getCanonicalName()));
+ }
+ if (!elementType.isPojoCompatible(bookmarkedPojo.getTargetPojo())) {
+ throw new IllegalArgumentException(String.format(
+ "The object referenced '%s' has a type '%s' that is not assignable to the required type '%s'",
+ refValue, targetPojoSpec.getLogicalTypeName(), elementType.getLogicalTypeName()));
+ }
+ return Optional.of(bookmarkedPojo).map(BookmarkedPojo::getTargetPojo);
+ }
+
+ val idValue = argumentValue.get("id");
+ if (idValue != null) {
+ Class<?> paramClass = elementType.getCorrespondingClass();
+ Optional<Bookmark> bookmarkIfAny;
+ if(elementType.isAbstract()) {
+ val logicalTypeName = argumentValue.get("logicalTypeName");
+ if (logicalTypeName == null) {
+ throw new IllegalArgumentException(String.format(
+ "The 'logicalTypeName' is required along with the 'id', because the input type '%s' is abstract",
+ elementType.getLogicalTypeName()));
+ }
+ if(context.specificationLoader.specForLogicalTypeName(logicalTypeName).isEmpty()) {
+ throw new IllegalArgumentException(String.format(
+ "The 'logicalTypeName' of '%s' is unknown in the metamodel",
+ logicalTypeName));
+ }
+
+ bookmarkIfAny = Optional.of(Bookmark.forLogicalTypeNameAndIdentifier(logicalTypeName, idValue));
+ } else {
+ bookmarkIfAny = context.bookmarkService.bookmarkFor(paramClass, idValue);
+ }
+ return bookmarkIfAny
+ .map(context.bookmarkService::lookup)
+ .filter(Optional::isPresent)
+ .map(Optional::get);
+ }
+ throw new IllegalArgumentException("Either 'id' or 'ref' must be specified for a DomainObject input type");
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvoke.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvoke.java
index 10e043f04c..052d7c91e5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvoke.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvoke.java
@@ -19,24 +19,15 @@
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -44,16 +35,14 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionInvoke
- extends GqlvAbstractCustom
- implements GqlvActionInvokeResult.Holder,
- GqlvActionInvokeArgs.Holder {
+ extends GqlvAbstractCustom {
- private final Holder holder;
+ private final ActionInteractor holder;
private final GqlvActionInvokeResult result;
private final GqlvActionInvokeArgs args;
public GqlvActionInvoke(
- final Holder holder,
+ final ActionInteractor holder,
final Context context) {
super(TypeNames.actionInvokeTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
@@ -65,8 +54,8 @@ public class GqlvActionInvoke
return;
}
- addChildFieldFor(this.result = new GqlvActionInvokeResult(this, context));
- addChildFieldFor(this.args = new GqlvActionInvokeArgs(this, context));
+ addChildFieldFor(this.result = new GqlvActionInvokeResult(holder, context));
+ addChildFieldFor(this.args = new GqlvActionInvokeArgs(holder, context));
val gqlObjectType = buildObjectType();
val objectAction = holder.getObjectMember();
@@ -109,54 +98,4 @@ public class GqlvActionInvoke
args.addDataFetcher(this);
}
- @Override
- public void addGqlArguments(
- final ObjectAction objectAction,
- final GraphQLFieldDefinition.Builder fieldBuilder,
- final TypeMapper.InputContext inputContext,
- final int parameterCount) {
- holder.addGqlArguments(objectAction, fieldBuilder, inputContext, parameterCount);
- }
-
- @Override
- public Can<ManagedObject> argumentManagedObjectsFor(
- final Environment environment,
- final ObjectAction objectAction,
- final BookmarkService bookmarkService) {
- return holder.argumentManagedObjectsFor(environment, objectAction, bookmarkService);
- }
-
- @Override
- public ObjectAction getObjectMember() {
- return holder.getObjectMember();
- }
-
- @Override
- public ObjectSpecification getObjectSpecification() {
- return holder.getObjectSpecification();
- }
-
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- void addGqlArguments(
- final ObjectAction objectAction,
- final GraphQLFieldDefinition.Builder fieldBuilder,
- final TypeMapper.InputContext inputContext,
- final int parameterCount);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
-
- }
-
- @Override
- public SchemaType getSchemaType() {
- return holder.getSchemaType();
- }
-
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgs.java
index cbc585f5cd..1db163e3e5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgs.java
@@ -24,20 +24,11 @@ import java.util.concurrent.atomic.AtomicInteger;
import graphql.schema.DataFetchingEnvironment;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.Getter;
import lombok.val;
@@ -45,15 +36,14 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionInvokeArgs
- extends GqlvAbstractCustom
- implements GqlvActionInvokeArgsArg.Holder {
+ extends GqlvAbstractCustom {
- @Getter private final Holder holder;
+ @Getter private final ActionInteractor holder;
private final List<GqlvActionInvokeArgsArg> args = new ArrayList<>();
public GqlvActionInvokeArgs(
- final Holder holder,
+ final ActionInteractor holder,
final Context context) {
super(TypeNames.actionArgsTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
@@ -65,7 +55,7 @@ public class GqlvActionInvokeArgs
val idx = new AtomicInteger(0);
holder.getObjectMember().getParameters().forEach(objectActionParameter -> {
- args.add(addChildFieldFor(new GqlvActionInvokeArgsArg(this, objectActionParameter, this.context, idx.getAndIncrement())));
+ args.add(addChildFieldFor(new GqlvActionInvokeArgsArg(holder, objectActionParameter, this.context, idx.getAndIncrement())));
});
if (args.isEmpty()) {
@@ -75,15 +65,6 @@ public class GqlvActionInvokeArgs
buildObjectTypeAndField("args", "Arguments used to invoke this action");
}
- @Override
- public ObjectSpecification getObjectSpecification() {
- return holder.getObjectSpecification();
- }
-
- @Override
- public ObjectAction getObjectMember() {
- return holder.getObjectMember();
- }
@Override
protected void addDataFetchersForChildren() {
@@ -95,24 +76,4 @@ public class GqlvActionInvokeArgs
return BookmarkedPojo.sourceFrom(dataFetchingEnvironment, context);
}
- @Override
- public Can<ManagedObject> argumentManagedObjectsFor(Environment dataFetchingEnvironment, ObjectAction objectAction, BookmarkService bookmarkService) {
- return holder.argumentManagedObjectsFor(dataFetchingEnvironment, objectAction, bookmarkService);
- }
-
- @Override
- public SchemaType getSchemaType() {
- return holder.getSchemaType();
- }
-
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgsArg.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgsArg.java
index 7b795d89ab..b223b5e7c7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgsArg.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeArgsArg.java
@@ -23,17 +23,12 @@ import graphql.schema.GraphQLList;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.core.metamodel.spec.feature.ObjectActionParameter;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import lombok.Getter;
import lombok.val;
@@ -43,12 +38,12 @@ import lombok.extern.log4j.Log4j2;
public class GqlvActionInvokeArgsArg
extends GqlvAbstract {
- @Getter private final Holder holder;
+ @Getter private final ActionInteractor holder;
@Getter private final ObjectActionParameter objectActionParameter;
@Getter private final int paramNum;
public GqlvActionInvokeArgsArg(
- final Holder holder,
+ final ActionInteractor holder,
final ObjectActionParameter objectActionParameter,
final Context context,
final int paramNum) {
@@ -84,14 +79,4 @@ public class GqlvActionInvokeArgsArg
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeResult.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeResult.java
index 73749f7e93..be3c2a3e2c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeResult.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionInvokeResult.java
@@ -19,20 +19,15 @@
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLList;
import graphql.schema.GraphQLOutputType;
import graphql.schema.GraphQLType;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-
import org.springframework.lang.Nullable;
import org.apache.causeway.applib.annotation.Where;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
import org.apache.causeway.core.metamodel.object.ManagedObject;
@@ -40,12 +35,10 @@ import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.exceptions.DisabledException;
import org.apache.causeway.viewer.graphql.model.exceptions.HiddenException;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
import lombok.extern.log4j.Log4j2;
@@ -53,10 +46,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionInvokeResult extends GqlvAbstract {
- private final Holder holder;
+ private final ActionInteractor holder;
public GqlvActionInvokeResult(
- final Holder holder,
+ final ActionInteractor holder,
final Context context) {
super(context);
@@ -144,21 +137,4 @@ public class GqlvActionInvokeResult extends GqlvAbstract {
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- void addGqlArguments(
- final ObjectAction objectAction,
- final GraphQLFieldDefinition.Builder fieldBuilder,
- final TypeMapper.InputContext inputContext,
- final int parameterCount);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
-
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParams.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParams.java
index 5746c0caa8..333dff113f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParams.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParams.java
@@ -23,23 +23,12 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.Getter;
import lombok.val;
@@ -47,15 +36,14 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParams
- extends GqlvAbstractCustom
- implements GqlvActionParamsParam.Holder {
+ extends GqlvAbstractCustom {
- @Getter private final Holder holder;
+ @Getter private final ActionInteractor holder;
private final List<GqlvActionParamsParam> params = new ArrayList<>();
public GqlvActionParams(
- final Holder holder,
+ final ActionInteractor holder,
final Context context) {
super(TypeNames.actionParamsTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
@@ -67,7 +55,7 @@ public class GqlvActionParams
val idx = new AtomicInteger(0);
holder.getObjectMember().getParameters()
- .forEach(oap -> params.add(addChildFieldFor(new GqlvActionParamsParam(this, oap, this.context, idx.getAndIncrement()))));
+ .forEach(oap -> params.add(addChildFieldFor(new GqlvActionParamsParam(holder, oap, this.context, idx.getAndIncrement()))));
if (params.isEmpty()) {
return;
@@ -76,16 +64,6 @@ public class GqlvActionParams
buildObjectTypeAndField("params", "Parameters of this action");
}
- @Override
- public ObjectSpecification getObjectSpecification() {
- return holder.getObjectSpecification();
- }
-
- @Override
- public ObjectAction getObjectMember() {
- return holder.getObjectMember();
- }
-
@Override
protected void addDataFetchersForChildren() {
params.forEach(param -> param.addDataFetcher(this));
@@ -96,39 +74,4 @@ public class GqlvActionParams
return BookmarkedPojo.sourceFrom(dataFetchingEnvironment, context);
}
- @Override
- public void addGqlArguments(
- ObjectAction objectAction, GraphQLFieldDefinition.Builder fieldBuilder, TypeMapper.InputContext inputContext, int paramNum) {
- holder.addGqlArguments(objectAction, fieldBuilder, inputContext, paramNum);
- }
-
- @Override
- public Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService) {
- return holder.argumentManagedObjectsFor(dataFetchingEnvironment, objectAction, bookmarkService);
- }
-
- @Override
- public SchemaType getSchemaType() {
- return holder.getSchemaType();
- }
-
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParam.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParam.java
index 7fa2c138cd..d45f1ab539 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParam.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParam.java
@@ -32,10 +32,10 @@ import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.Getter;
@@ -44,15 +44,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParam
extends GqlvAbstractCustom
- implements GqlvActionParamsParamHidden.Holder,
- GqlvActionParamsParamDisabled.Holder,
- GqlvActionParamsParamChoices.Holder,
- GqlvActionParamsParamAutoComplete.Holder,
- GqlvActionParamsParamDefault.Holder,
- GqlvActionParamsParamValidate.Holder,
- GqlvActionParamsParamDatatype.Holder {
-
- @Getter private final Holder holder;
+ implements ActionParamInteractor,
+ ObjectActionParameterProvider {
+
+ @Getter private final ActionInteractor holder;
@Getter private final ObjectActionParameter objectActionParameter;
@Getter private final int paramNum;
@@ -74,7 +69,7 @@ public class GqlvActionParamsParam
private final GqlvActionParamsParamDatatype datatype;
public GqlvActionParamsParam(
- final Holder holder,
+ final ActionInteractor holder,
final ObjectActionParameter oap,
final Context context,
final int paramNum) {
@@ -177,20 +172,4 @@ public class GqlvActionParamsParam
return holder.getSchemaType();
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment dataFetchingEnvironment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamAutoComplete.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamAutoComplete.java
index e4b0d78be0..9d588370f9 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamAutoComplete.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamAutoComplete.java
@@ -24,28 +24,21 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
import graphql.schema.GraphQLArgument;
- import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLList;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import static graphql.schema.GraphQLNonNull.nonNull;
import org.apache.causeway.applib.annotation.Where;
- import org.apache.causeway.applib.services.bookmark.BookmarkService;
- import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.interactions.managed.ManagedAction;
import org.apache.causeway.core.metamodel.interactions.managed.ParameterNegotiationModel;
import org.apache.causeway.core.metamodel.object.ManagedObject;
- import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+ import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -56,10 +49,10 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
private static final String SEARCH_PARAM_NAME = "search";
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamAutoComplete(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -106,22 +99,4 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
.collect(Collectors.toList());
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- ObjectActionParameterProvider,
- SchemaTypeProvider {
- GqlvActionParamsParam.Holder getHolder();
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment environment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamChoices.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamChoices.java
index 3b3ec52c07..26d05a305d 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamChoices.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamChoices.java
@@ -23,27 +23,20 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import java.util.stream.Collectors;
import graphql.schema.DataFetchingEnvironment;
- import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLList;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.applib.annotation.Where;
- import org.apache.causeway.applib.services.bookmark.BookmarkService;
- import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.interactions.managed.ManagedAction;
import org.apache.causeway.core.metamodel.interactions.managed.ParameterNegotiationModel;
import org.apache.causeway.core.metamodel.object.ManagedObject;
- import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+ import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -52,10 +45,10 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
@Log4j2
public class GqlvActionParamsParamChoices extends GqlvAbstract {
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamChoices(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -97,22 +90,4 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
.collect(Collectors.toList());
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- ObjectActionParameterProvider,
- SchemaTypeProvider {
- GqlvActionParamsParam.Holder getHolder();
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment environment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDatatype.java
index e318e1bb26..25db509556 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDatatype.java
@@ -26,17 +26,16 @@ import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import lombok.val;
public class GqlvActionParamsParamDatatype extends GqlvAbstract {
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamDatatype(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -53,9 +52,4 @@ public class GqlvActionParamsParamDatatype extends GqlvAbstract {
return TypeNames.objectTypeNameFor(returnType, holder.getSchemaType());
}
- public interface Holder
- extends ObjectActionParameterProvider,
- SchemaTypeProvider {
- }
-
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDefault.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDefault.java
index 88846988e1..18d5909911 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDefault.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDefault.java
@@ -21,25 +21,18 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import java.util.Collections;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.applib.annotation.Where;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.interactions.managed.ManagedAction;
import org.apache.causeway.core.metamodel.interactions.managed.ParameterNegotiationModel;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -47,10 +40,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParamDefault extends GqlvAbstract {
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamDefault(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -84,23 +77,4 @@ public class GqlvActionParamsParamDefault extends GqlvAbstract {
return defaultManagedObject.getPojo();
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- ObjectActionParameterProvider,
- SchemaTypeProvider {
-
- GqlvActionParamsParam.Holder getHolder();
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment environment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDisabled.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDisabled.java
index 620be228e9..8db900b724 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDisabled.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamDisabled.java
@@ -19,23 +19,17 @@
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLOutputType;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -45,10 +39,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParamDisabled extends GqlvAbstract {
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamDisabled(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -80,19 +74,4 @@ public class GqlvActionParamsParamDisabled extends GqlvAbstract {
return usable.isVetoed() ? usable.getReasonAsString().orElse("Disabled") : null;
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- ObjectActionParameterProvider {
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int i);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment environment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamHidden.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamHidden.java
index 98d7c1ccfb..92dc02b224 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamHidden.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamHidden.java
@@ -1,4 +1,4 @@
- /*
+/*
* 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
@@ -23,19 +23,13 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
- import org.apache.causeway.applib.services.bookmark.BookmarkService;
- import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
- import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+ import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
- import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -44,10 +38,10 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
@Log4j2
public class GqlvActionParamsParamHidden extends GqlvAbstract {
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamHidden(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -83,21 +77,4 @@ public class GqlvActionParamsParamHidden extends GqlvAbstract {
return visible.isVetoed();
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- ObjectActionParameterProvider,
- SchemaTypeProvider {
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment environment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamValidate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamValidate.java
index 8354ce3280..66dacabb9c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamValidate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionParamsParamValidate.java
@@ -19,24 +19,17 @@
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLOutputType;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.collections.Can;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.Environment;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionParamInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -45,10 +38,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionParamsParamValidate extends GqlvAbstract {
- private final Holder holder;
+ private final ActionParamInteractor holder;
public GqlvActionParamsParamValidate(
- final Holder holder,
+ final ActionParamInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -83,17 +76,4 @@ public class GqlvActionParamsParamValidate extends GqlvAbstract {
return usable.isVetoed() ? usable.getReasonAsString().orElse("Invalid") : null;
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- ObjectActionParameterProvider,
- SchemaTypeProvider {
-
- void addGqlArgument(ObjectAction objectAction, GraphQLFieldDefinition.Builder fieldBuilder, TypeMapper.InputContext inputContext, int paramNum);
-
- Can<ManagedObject> argumentManagedObjectsFor(
- Environment environment,
- ObjectAction objectAction,
- BookmarkService bookmarkService);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionValidity.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionValidity.java
index 19a7005650..33ca703329 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionValidity.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvActionValidity.java
@@ -21,7 +21,6 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import java.util.Map;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLOutputType;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
@@ -34,10 +33,8 @@ import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
import org.apache.causeway.core.metamodel.spec.feature.ObjectActionParameter;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ActionInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
@@ -46,10 +43,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvActionValidity extends GqlvAbstract {
- private final Holder holder;
+ private final ActionInteractor holder;
public GqlvActionValidity(
- final Holder holder,
+ final ActionInteractor holder,
final Context context
) {
super(context);
@@ -96,15 +93,4 @@ public class GqlvActionValidity extends GqlvAbstract {
return consent.isVetoed() ? consent.getReasonAsString().orElse("Invalid") : null;
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<ObjectAction>,
- SchemaTypeProvider {
-
- void addGqlArguments(
- ObjectAction objectAction,
- GraphQLFieldDefinition.Builder fieldBuilder,
- TypeMapper.InputContext inputContext,
- int parameterCount);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociation.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociation.java
index 0584827bb4..8f0b705f11 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociation.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociation.java
@@ -20,9 +20,10 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
-public abstract class GqlvAssociation<T extends ObjectAssociation, H extends GqlvMemberHolder>
+public abstract class GqlvAssociation<T extends ObjectAssociation, H extends ObjectSpecificationProvider & SchemaTypeProvider>
extends GqlvMember<T, H> {
public GqlvAssociation(
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationDatatype.java
index 6231bf665b..ff0b66e402 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationDatatype.java
@@ -27,17 +27,16 @@ import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import lombok.val;
public abstract class GqlvAssociationDatatype<T extends ObjectAssociation> extends GqlvAbstract {
- private final Holder<T> holder;
+ private final MemberInteractor<T> holder;
public GqlvAssociationDatatype(
- final Holder<T> holder,
+ final MemberInteractor<T> holder,
final Context context) {
super(context);
this.holder = holder;
@@ -54,9 +53,4 @@ public abstract class GqlvAssociationDatatype<T extends ObjectAssociation> exten
return TypeNames.objectTypeNameFor(returnType, holder.getSchemaType());
}
- public interface Holder<T extends ObjectAssociation>
- extends ObjectMemberProvider<T>,
- SchemaTypeProvider {
- }
-
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationGet.java
index e0f45e1987..8bdc652b0a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvAssociationGet.java
@@ -27,19 +27,17 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.val;
public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends GqlvAbstract {
- final Holder<T> holder;
+ final MemberInteractor<T> holder;
public GqlvAssociationGet(
- final Holder<T> holder,
+ final MemberInteractor<T> holder,
final Context context) {
super(context);
this.holder = holder;
@@ -55,7 +53,7 @@ public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends Gq
}
}
- abstract GraphQLOutputType outputTypeFor(Holder<T> holder);
+ abstract GraphQLOutputType outputTypeFor(MemberInteractor<T> holder);
@Override
protected Object fetchData(final DataFetchingEnvironment environment) {
@@ -79,10 +77,4 @@ public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends Gq
: null;
}
- public interface Holder<T extends ObjectAssociation>
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<T>,
- SchemaTypeProvider {
-
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollection.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollection.java
index 76e80249fc..1c27101396 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollection.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollection.java
@@ -23,14 +23,12 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
public class GqlvCollection
- extends GqlvAssociation<OneToManyAssociation, GqlvMemberHolder>
- implements GqlvAssociationGet.Holder<OneToManyAssociation>,
- GqlvMemberHidden.Holder<OneToManyAssociation>,
- GqlvMemberDisabled.Holder<OneToManyAssociation>,
- GqlvAssociationDatatype.Holder<OneToManyAssociation> {
+ extends GqlvAssociation<OneToManyAssociation, ObjectInteractor>
+ implements MemberInteractor<OneToManyAssociation> {
private final GqlvMemberHidden<OneToManyAssociation> hidden;
private final GqlvMemberDisabled<OneToManyAssociation> disabled;
@@ -38,7 +36,7 @@ public class GqlvCollection
private final GqlvCollectionDatatype datatype;
public GqlvCollection(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToManyAssociation otma,
final Context context
) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionDatatype.java
index 83efc0e19b..09380938bd 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionDatatype.java
@@ -20,11 +20,12 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvCollectionDatatype extends GqlvAssociationDatatype<OneToManyAssociation> {
public GqlvCollectionDatatype(
- final Holder<OneToManyAssociation> holder,
+ final MemberInteractor<OneToManyAssociation> holder,
final Context context) {
super(holder, context);
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionGet.java
index dcf87fdc08..24ff886803 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvCollectionGet.java
@@ -22,20 +22,20 @@ import graphql.schema.GraphQLOutputType;
import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import lombok.val;
public class GqlvCollectionGet extends GqlvAssociationGet<OneToManyAssociation> {
public GqlvCollectionGet(
- final Holder holder,
+ final MemberInteractor<OneToManyAssociation> holder,
final Context context) {
super(holder, context);
}
@Override
- GraphQLOutputType outputTypeFor(Holder<OneToManyAssociation> holder) {
+ GraphQLOutputType outputTypeFor(MemberInteractor<OneToManyAssociation> holder) {
val oneToManyAssociation = holder.getObjectMember();
return context.typeMapper.listTypeForElementTypeOf(oneToManyAssociation, holder.getSchemaType());
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMember.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMember.java
index b585fd1921..d60e684975 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMember.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMember.java
@@ -23,12 +23,13 @@ import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.Getter;
-public abstract class GqlvMember<T extends ObjectMember, H extends GqlvMemberHolder>
+public abstract class GqlvMember<T extends ObjectMember, H extends ObjectSpecificationProvider & SchemaTypeProvider>
extends GqlvAbstractCustom {
@Getter final H holder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberDisabled.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberDisabled.java
index c56f1d9910..b081c5cee3 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberDisabled.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberDisabled.java
@@ -29,10 +29,8 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.val;
import lombok.extern.log4j.Log4j2;
@@ -40,10 +38,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvMemberDisabled<T extends ObjectMember> extends GqlvAbstract {
- private final Holder<T> holder;
+ private final MemberInteractor<T> holder;
public GqlvMemberDisabled(
- final Holder<T> holder,
+ final MemberInteractor<T> holder,
final Context context
) {
super(context);
@@ -73,9 +71,4 @@ public class GqlvMemberDisabled<T extends ObjectMember> extends GqlvAbstract {
return usable.getReasonAsString().orElse(null);
}
- public interface Holder<T extends ObjectMember>
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<T>,
- SchemaTypeProvider {
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberHidden.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberHidden.java
index 2a8aaacaf4..40e5b1eeca 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberHidden.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvMemberHidden.java
@@ -29,10 +29,8 @@ import org.apache.causeway.core.metamodel.object.ManagedObject;
import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.val;
import lombok.extern.log4j.Log4j2;
@@ -40,10 +38,10 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class GqlvMemberHidden<T extends ObjectMember> extends GqlvAbstract {
- private final Holder<T> holder;
+ private final MemberInteractor<T> holder;
public GqlvMemberHidden(
- final Holder<T> holder,
+ final MemberInteractor<T> holder,
final Context context
) {
super(context);
@@ -74,9 +72,4 @@ public class GqlvMemberHidden<T extends ObjectMember> extends GqlvAbstract {
return visibleConsent.isVetoed();
}
- public interface Holder<T extends ObjectMember>
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<T>,
- SchemaTypeProvider {
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvProperty.java
index abca3ebf3b..8b6aeea948 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvProperty.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvProperty.java
@@ -29,23 +29,22 @@ import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
-import org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.ObjectInteractor;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
public class GqlvProperty
- extends GqlvAssociation<OneToOneAssociation, GqlvMemberHolder>
- implements GqlvMemberHidden.Holder<OneToOneAssociation>,
- GqlvMemberDisabled.Holder<OneToOneAssociation>,
- GqlvPropertyGet.Holder,
- GqlvPropertyChoices.Holder,
- GqlvPropertyAutoComplete.Holder,
- GqlvPropertyValidate.Holder,
- GqlvPropertySet.Holder,
- GqlvAssociationDatatype.Holder<OneToOneAssociation>,
- GqlvPropertyGetBlob.Holder,
- GqlvPropertyGetClob.Holder {
+ extends GqlvAssociation<OneToOneAssociation, ObjectInteractor>
+ implements
+ MemberInteractor<OneToOneAssociation>,
+ PropertyInteractor,
+ ObjectSpecificationProvider, ObjectMemberProvider<OneToOneAssociation>, SchemaTypeProvider {
private final GqlvMemberHidden<OneToOneAssociation> hidden;
private final GqlvMemberDisabled<OneToOneAssociation> disabled;
@@ -67,7 +66,7 @@ public class GqlvProperty
private final GqlvPropertyDatatype datatype;
public GqlvProperty(
- final GqlvMemberHolder holder,
+ final ObjectInteractor holder,
final OneToOneAssociation otoa,
final Context context) {
super(holder, otoa, TypeNames.propertyTypeNameFor(holder.getObjectSpecification(), otoa, holder.getSchemaType()), context);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyAutoComplete.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyAutoComplete.java
index 4788c72e2a..cb8ef8ccc3 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyAutoComplete.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyAutoComplete.java
@@ -33,10 +33,8 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.val;
@@ -44,10 +42,10 @@ public class GqlvPropertyAutoComplete extends GqlvAbstract {
private static final String SEARCH_PARAM_NAME = "search";
- private final Holder holder;
+ private final MemberInteractor<OneToOneAssociation> holder;
public GqlvPropertyAutoComplete(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(context);
this.holder = holder;
@@ -89,10 +87,4 @@ public class GqlvPropertyAutoComplete extends GqlvAbstract {
.collect(Collectors.toList());
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<OneToOneAssociation>,
- SchemaTypeProvider {
-
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyChoices.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyChoices.java
index 0e5ea9c8c3..7bfee6f925 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyChoices.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyChoices.java
@@ -21,31 +21,27 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import java.util.stream.Collectors;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLList;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
public class GqlvPropertyChoices extends GqlvAbstract {
- final Holder holder;
+ final PropertyInteractor holder;
public GqlvPropertyChoices(
- final Holder holder,
+ final PropertyInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -82,11 +78,4 @@ public class GqlvPropertyChoices extends GqlvAbstract {
.collect(Collectors.toList());
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<OneToOneAssociation>,
- SchemaTypeProvider {
-
- void addGqlArgument(OneToOneAssociation otoa, GraphQLFieldDefinition.Builder fieldBuilder, TypeMapper.InputContext inputContext);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
index ee566b6fc5..41da1fa3ad 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyDatatype.java
@@ -20,13 +20,14 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
public class GqlvPropertyDatatype extends GqlvAssociationDatatype<OneToOneAssociation> {
public GqlvPropertyDatatype(
- final Holder<OneToOneAssociation> holder,
+ final PropertyInteractor holder,
final Context context) {
- super(holder, context);
+ super(holder.asHolderMemberDetails(), context);
}
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGet.java
index e26cfaf8f5..a2d45e7853 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGet.java
@@ -22,27 +22,22 @@ import graphql.schema.GraphQLOutputType;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import lombok.val;
public class GqlvPropertyGet extends GqlvAssociationGet<OneToOneAssociation> {
public GqlvPropertyGet(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context);
}
@Override
- GraphQLOutputType outputTypeFor(GqlvAssociationGet.Holder<OneToOneAssociation> holder) {
+ GraphQLOutputType outputTypeFor(MemberInteractor<OneToOneAssociation> holder) {
val oneToOneAssociation = holder.getObjectMember();
return context.typeMapper.outputTypeFor(oneToOneAssociation, holder.getSchemaType());
}
- public interface Holder
- extends GqlvAssociationGet.Holder<OneToOneAssociation>,
- SchemaTypeProvider {
-
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlob.java
index ef6cc48972..fe1b234ec1 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlob.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlob.java
@@ -23,23 +23,17 @@ import graphql.schema.DataFetchingEnvironment;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.config.CausewayConfiguration;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
public class GqlvPropertyGetBlob
- extends GqlvAbstractCustom
- implements GqlvPropertyGetBlobBytes.Holder
-{
+ extends GqlvAbstractCustom {
- final Holder holder;
+ final MemberInteractor<OneToOneAssociation> holder;
final GqlvPropertyGetBlobBytes blobName;
final GqlvPropertyGetBlobMimeType blobMimeType;
final GqlvPropertyGetBlobName blobBytes;
@@ -47,7 +41,7 @@ public class GqlvPropertyGetBlob
private final CausewayConfiguration.Viewer.Graphql graphqlConfiguration;
public GqlvPropertyGetBlob(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
@@ -62,9 +56,9 @@ public class GqlvPropertyGetBlob
return;
}
- addChildFieldFor(blobName = new GqlvPropertyGetBlobBytes(this, context));
- addChildFieldFor(blobMimeType = new GqlvPropertyGetBlobMimeType(this, context));
- addChildFieldFor(blobBytes = isResourceNotForbidden() ? new GqlvPropertyGetBlobName(this, context) : null);
+ addChildFieldFor(blobName = new GqlvPropertyGetBlobBytes(holder, context));
+ addChildFieldFor(blobMimeType = new GqlvPropertyGetBlobMimeType(holder, context));
+ addChildFieldFor(blobBytes = isResourceNotForbidden() ? new GqlvPropertyGetBlobName(holder, context) : null);
setField(newFieldDefinition()
.name("get")
@@ -93,25 +87,4 @@ public class GqlvPropertyGetBlob
}
}
- @Override
- public OneToOneAssociation getObjectMember() {
- return holder.getObjectMember();
- }
-
- @Override
- public ObjectSpecification getObjectSpecification() {
- return holder.getObjectSpecification();
- }
-
- @Override
- public SchemaType getSchemaType() {
- return holder.getSchemaType();
- }
-
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<OneToOneAssociation>,
- SchemaTypeProvider {
-
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobAbstract.java
index b39c131bbc..1c439d0863 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobAbstract.java
@@ -27,19 +27,20 @@ import graphql.schema.GraphQLFieldDefinition;
import org.apache.causeway.applib.value.Blob;
import org.apache.causeway.core.metamodel.object.ManagedObject;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.val;
public abstract class GqlvPropertyGetBlobAbstract extends GqlvAbstract {
- final Holder holder;
+ final MemberInteractor<OneToOneAssociation> holder;
public GqlvPropertyGetBlobAbstract(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context, String name) {
super(context);
this.holder = holder;
@@ -72,9 +73,4 @@ public abstract class GqlvPropertyGetBlobAbstract extends GqlvAbstract {
.orElse(null);
}
- public interface Holder
- extends GqlvPropertyGet.Holder,
- SchemaTypeProvider {
- }
-
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobBytes.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobBytes.java
index d4c976bc44..290b99b232 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobBytes.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobBytes.java
@@ -20,7 +20,9 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -30,7 +32,7 @@ public class GqlvPropertyGetBlobBytes extends GqlvPropertyGetBlobAbstract {
private final String graphqlPath;
public GqlvPropertyGetBlobBytes(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "bytes");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobMimeType.java
index 6265db8c8d..e466630c5c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobMimeType.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobMimeType.java
@@ -20,12 +20,14 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetBlobMimeType extends GqlvPropertyGetBlobAbstract {
public GqlvPropertyGetBlobMimeType(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "mimeType");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobName.java
index 983f45d6d5..51da3a60c8 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetBlobName.java
@@ -21,12 +21,14 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetBlobName extends GqlvPropertyGetBlobAbstract {
public GqlvPropertyGetBlobName(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "name");
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClob.java
index 8f882eccd7..4346307e18 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClob.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClob.java
@@ -23,23 +23,17 @@ import graphql.schema.DataFetchingEnvironment;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.config.CausewayConfiguration;
-import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
-import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
public class GqlvPropertyGetClob
- extends GqlvAbstractCustom
- implements GqlvPropertyGetClobChars.Holder
-{
+ extends GqlvAbstractCustom {
- final Holder holder;
+ final MemberInteractor<OneToOneAssociation> holder;
final GqlvPropertyGetClobName clobName;
final GqlvPropertyGetClobMimeType clobMimeType;
final GqlvPropertyGetClobChars clobChars;
@@ -47,7 +41,7 @@ public class GqlvPropertyGetClob
private final CausewayConfiguration.Viewer.Graphql graphqlConfiguration;
public GqlvPropertyGetClob(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember(), holder.getSchemaType()), context);
this.holder = holder;
@@ -62,9 +56,9 @@ public class GqlvPropertyGetClob
return;
}
- addChildFieldFor(clobName = new GqlvPropertyGetClobName(this, context));
- addChildFieldFor(clobMimeType = new GqlvPropertyGetClobMimeType(this, context));
- addChildFieldFor(clobChars = isResourceNotForbidden() ? new GqlvPropertyGetClobChars(this, context) : null);
+ addChildFieldFor(clobName = new GqlvPropertyGetClobName(holder, context));
+ addChildFieldFor(clobMimeType = new GqlvPropertyGetClobMimeType(holder, context));
+ addChildFieldFor(clobChars = isResourceNotForbidden() ? new GqlvPropertyGetClobChars(holder, context) : null);
setField(newFieldDefinition()
.name("get")
@@ -93,25 +87,4 @@ public class GqlvPropertyGetClob
}
}
- @Override
- public OneToOneAssociation getObjectMember() {
- return holder.getObjectMember();
- }
-
- @Override
- public ObjectSpecification getObjectSpecification() {
- return holder.getObjectSpecification();
- }
-
- @Override
- public SchemaType getSchemaType() {
- return holder.getSchemaType();
- }
-
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<OneToOneAssociation>,
- SchemaTypeProvider {
-
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobAbstract.java
index e156befd5f..bfecf39d6c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobAbstract.java
@@ -27,19 +27,20 @@ import graphql.schema.GraphQLFieldDefinition;
import org.apache.causeway.applib.value.Blob;
import org.apache.causeway.core.metamodel.object.ManagedObject;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import lombok.val;
public abstract class GqlvPropertyGetClobAbstract extends GqlvAbstract {
- final Holder holder;
+ final MemberInteractor<OneToOneAssociation> holder;
public GqlvPropertyGetClobAbstract(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context, String name) {
super(context);
this.holder = holder;
@@ -72,9 +73,4 @@ public abstract class GqlvPropertyGetClobAbstract extends GqlvAbstract {
.orElse(null);
}
- public interface Holder
- extends GqlvPropertyGet.Holder,
- SchemaTypeProvider {
- }
-
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobChars.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobChars.java
index 1e9ce215a1..be75d6d9aa 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobChars.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobChars.java
@@ -20,7 +20,9 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
import lombok.val;
@@ -30,7 +32,7 @@ public class GqlvPropertyGetClobChars extends GqlvPropertyGetClobAbstract {
private final String graphqlPath;
public GqlvPropertyGetClobChars(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "chars");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobMimeType.java
index e6c1474059..aa8a26aad3 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobMimeType.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobMimeType.java
@@ -20,12 +20,14 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetClobMimeType extends GqlvPropertyGetClobAbstract {
public GqlvPropertyGetClobMimeType(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "mimeType");
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobName.java
index 0ce45e866f..fe4e42ea43 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyGetClobName.java
@@ -21,12 +21,14 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.MemberInteractor;
public class GqlvPropertyGetClobName extends GqlvPropertyGetClobAbstract {
public GqlvPropertyGetClobName(
- final Holder holder,
+ final MemberInteractor<OneToOneAssociation> holder,
final Context context) {
super(holder, context, "name");
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertySet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertySet.java
index 63afa77952..ac2b1973b6 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertySet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertySet.java
@@ -21,34 +21,30 @@ package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import java.util.Map;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.applib.annotation.Where;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
import org.apache.causeway.viewer.graphql.model.domain.SchemaType;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.exceptions.DisabledException;
import org.apache.causeway.viewer.graphql.model.exceptions.HiddenException;
import org.apache.causeway.viewer.graphql.model.exceptions.InvalidException;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
public class GqlvPropertySet extends GqlvAbstract {
- final Holder holder;
+ final PropertyInteractor holder;
public GqlvPropertySet(
- final Holder holder,
+ final PropertyInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -101,11 +97,4 @@ public class GqlvPropertySet extends GqlvAbstract {
return managedObject; // return the original object because setters return void
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<OneToOneAssociation>,
- SchemaTypeProvider {
-
- void addGqlArgument(OneToOneAssociation oneToOneAssociation, GraphQLFieldDefinition.Builder fieldBuilder, TypeMapper.InputContext inputContext);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyValidate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyValidate.java
index 89c8e01688..d62d3cd6c4 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyValidate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvPropertyValidate.java
@@ -19,30 +19,26 @@
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLOutputType;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
import org.apache.causeway.viewer.graphql.model.context.Context;
import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.common.interactors.PropertyInteractor;
import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider;
import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
import lombok.val;
public class GqlvPropertyValidate extends GqlvAbstract {
- final Holder holder;
+ final PropertyInteractor holder;
public GqlvPropertyValidate(
- final Holder holder,
+ final PropertyInteractor holder,
final Context context) {
super(context);
this.holder = holder;
@@ -76,11 +72,4 @@ public class GqlvPropertyValidate extends GqlvAbstract {
return valid.isVetoed() ? valid.getReasonAsString().orElse("invalid") : null;
}
- public interface Holder
- extends ObjectSpecificationProvider,
- ObjectMemberProvider<OneToOneAssociation>,
- SchemaTypeProvider {
-
- void addGqlArgument(OneToOneAssociation oneToOneAssociation, GraphQLFieldDefinition.Builder fieldBuilder, TypeMapper.InputContext inputContext);
- }
}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvTopLevelQuerySimpleSchema.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvTopLevelQuerySimpleSchema.java
index e96fbf4a9a..04de336714 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvTopLevelQuerySimpleSchema.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/simple/query/GqlvTopLevelQuerySimpleSchema.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.domain.simple.query;
import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQueryBothSchemas.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQueryBothSchemas.java
index c97d60f117..42dc7781ee 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQueryBothSchemas.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQueryBothSchemas.java
@@ -1,3 +1,21 @@
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.causeway.viewer.graphql.model.toplevel;
import graphql.schema.DataFetchingEnvironment;