You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/11/18 17:48:42 UTC
[isis] branch v2 updated: ISIS-890: removing and cleaning up
'exploration'
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/v2 by this push:
new c5b14e0 ISIS-890: removing and cleaning up 'exploration'
c5b14e0 is described below
commit c5b14e0e0c21e439269fc7d4b308e456e8c01e34
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Nov 18 18:48:36 2018 +0100
ISIS-890: removing and cleaning up 'exploration'
Task-Url: https://issues.apache.org/jira/browse/ISIS-890
---
.../apache/isis/applib/DomainObjectContainer.java | 12 +-
.../authentication/AuthenticationSession.java | 3 +-
.../interaction/ActionNamedFacetFactory.java | 73 -----
.../AuthenticationRequestExploration.java | 55 ----
.../exploration/ExplorationAuthenticator.java | 124 --------
.../ExplorationAuthenticatorConstants.java | 35 ---
.../exploration/ExplorationSession.java | 65 ----
.../standard/AuthenticatorAbstract.java | 10 +-
.../actions/ActionMethodsFacetFactoryTest.java | 48 ++-
.../exploration/ExplorationAuthenticatorTest.java | 99 -------
.../fixture/LogonFixtureAuthenticatorTest.java | 26 +-
...gerStandardInstallerAbstractForDfltRuntime.java | 9 +-
.../singleuser/SingleUserSession.java | 2 +-
.../FixturesInstallerFromConfiguration.java | 19 +-
.../runtime/system/session/IsisSessionFactory.java | 7 +-
.../auth/AuthenticationSessionStrategyDefault.java | 11 -
.../DummyAction.java | 329 ---------------------
.../DummyOneToManyAssociation.java | 175 -----------
.../DummyOneToOneAssociation.java | 178 -----------
.../DummyValueAssociation.java | 166 -----------
.../JavaFieldTest.java | 67 -----
.../ActionAuthorisationTest.java | 60 ----
.../MockAuthorisationManager.java | 55 ----
.../OneToManyAuthorisationTest.java | 62 ----
.../OneToOneAuthorisationTest.java | 57 ----
.../JavaObjectWithBasicProgramConventions.java | 9 +-
.../AuthenticationSessionStrategyTrusted.java | 44 ---
.../viewer/wicket/model/links/LinkAndLabel.java | 4 +-
.../wicket/model/mementos/PageParameterNames.java | 6 +-
29 files changed, 45 insertions(+), 1765 deletions(-)
diff --git a/core/legacy/transition-1-2/src/main/java/org/apache/isis/applib/DomainObjectContainer.java b/core/legacy/transition-1-2/src/main/java/org/apache/isis/applib/DomainObjectContainer.java
index 1409883..392e469 100644
--- a/core/legacy/transition-1-2/src/main/java/org/apache/isis/applib/DomainObjectContainer.java
+++ b/core/legacy/transition-1-2/src/main/java/org/apache/isis/applib/DomainObjectContainer.java
@@ -490,7 +490,7 @@ public class DomainObjectContainer {
* </p>
*
* <p>
- * This method is useful during exploration/prototyping, but - because the filtering is performed client-side -
+ * This method is useful during prototyping, but - because the filtering is performed client-side -
* this method is only really suitable for initial development/prototyping, or for classes with very few
* instances. Use {@link #allMatches(Query)} for production code.
* </p>
@@ -520,7 +520,7 @@ public class DomainObjectContainer {
* </p>
*
* <p>
- * This method is useful during exploration/prototyping, but - because the filtering is performed client-side -
+ * This method is useful during prototyping, but - because the filtering is performed client-side -
* this method is only really suitable for initial development/prototyping, or for classes with very few
* instances. Use {@link #allMatches(Query)} for production code.
* </p>
@@ -569,7 +569,7 @@ public class DomainObjectContainer {
* that matches the supplied title, or <tt>null</tt> if none.
*
* <p>
- * This method is useful during exploration/prototyping, but - because the filtering is performed client-side -
+ * This method is useful during prototyping, but - because the filtering is performed client-side -
* this method is only really suitable for initial development/prototyping, or for classes with very few
* instances. Use {@link #firstMatch(Query)} for production code.
* </p>
@@ -587,7 +587,7 @@ public class DomainObjectContainer {
* that matches the supplied object as a pattern, or <tt>null</tt> if none.
*
* <p>
- * This method is useful during exploration/prototyping, but - because the filtering is performed client-side -
+ * This method is useful during prototyping, but - because the filtering is performed client-side -
* this method is only really suitable for initial development/prototyping, or for classes with very few
* instances. Use {@link #firstMatch(Query)} for production code.
* </p>
@@ -639,7 +639,7 @@ public class DomainObjectContainer {
* there is more that one instances a run-time exception will be thrown.
*
* <p>
- * This method is useful during exploration/prototyping, but - because the filtering is performed client-side -
+ * This method is useful during prototyping, but - because the filtering is performed client-side -
* this method is only really suitable for initial development/prototyping, or for classes with very few
* instances. Use {@link #uniqueMatch(Query)} for production code.
* </p>
@@ -664,7 +664,7 @@ public class DomainObjectContainer {
* </p>
*
* <p>
- * This method is useful during exploration/prototyping, but - because the filtering is performed client-side -
+ * This method is useful during prototyping, but - because the filtering is performed client-side -
* this method is only really suitable for initial development/prototyping, or for classes with very few
* instances. Use {@link #uniqueMatch(Query)} for production code.
* </p>
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java b/core/metamodel/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
index 838463d..488f028 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
@@ -48,8 +48,7 @@ public interface AuthenticationSession extends Encodable, Serializable {
* <p>
* This can be used to confirm that this session has been properly created
* and the user has been authenticated. It should return an empty string (
- * <tt>""</tt>) if this is unauthenticated user (i.e., as created within an
- * exploration system).
+ * <tt>""</tt>) if this is unauthenticated user
*/
String getValidationCode();
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/interaction/ActionNamedFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/interaction/ActionNamedFacetFactory.java
deleted file mode 100644
index 39cbee2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/interaction/ActionNamedFacetFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.isis.core.metamodel.facets.actions.interaction;
-
-import java.lang.reflect.Method;
-
-import org.apache.isis.core.commons.lang.StringExtensions;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.MethodPrefixBasedFacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacetInferred;
-
-/**
- * Sets up {@link org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacet} and also an {@link org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacet}, along with a number of supporting facets that are based on the action's name.
- *
- * <p>
- * In addition a {@link NamedFacet} is inferred from the name.
- *
- * @deprecated
- */
-@Deprecated
-public class ActionNamedFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
- public ActionNamedFacetFactory() {
- super(FeatureType.ACTIONS_ONLY, OrphanValidation.VALIDATE);
- }
-
- // ///////////////////////////////////////////////////////
- // Actions
- // ///////////////////////////////////////////////////////
-
- @Override
- public void process(final ProcessMethodContext processMethodContext) {
-
- attachNamedFacetInferredFromMethodName(processMethodContext);
- }
-
-
-
- /**
- * Must be called after added the debug, exploration etc facets.
- */
- private void attachNamedFacetInferredFromMethodName(final ProcessMethodContext processMethodContext) {
-
- final Method method = processMethodContext.getMethod();
-
- String name = StringExtensions.asCapitalizedName(method.getName());
- name = StringExtensions.asNaturalName2(name);
-
- final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
- FacetUtil.addFacet(new NamedFacetInferred(name, facetedMethod));
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/AuthenticationRequestExploration.java b/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/AuthenticationRequestExploration.java
deleted file mode 100644
index 80ccf32..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/AuthenticationRequestExploration.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.isis.core.runtime.authentication.exploration;
-
-import java.util.List;
-
-import org.apache.isis.applib.fixtures.LogonFixture;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestAbstract;
-
-/**
-* @deprecated no longer supported
-*/
-@Deprecated
-public class AuthenticationRequestExploration extends AuthenticationRequestAbstract {
-
- private static final String EXPLORATION_USER = "exploration";
-
- private final LogonFixture logonFixture;
-
- public AuthenticationRequestExploration() {
- this(null);
- }
-
- public AuthenticationRequestExploration(final LogonFixture logonFixture) {
- super(logonFixture != null ? logonFixture.getUsername() : EXPLORATION_USER);
- this.logonFixture = logonFixture;
- }
-
- @Override
- public List<String> getRoles() {
- return logonFixture != null ? logonFixture.getRoles() : super.getRoles();
- }
-
- public boolean isDefaultUser() {
- return EXPLORATION_USER.equals(getName());
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticator.java b/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticator.java
deleted file mode 100644
index e291cb7..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticator.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.isis.core.runtime.authentication.exploration;
-
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
-import org.apache.isis.core.runtime.authentication.standard.AuthenticatorAbstract;
-import org.apache.isis.core.runtime.authentication.standard.SimpleSession;
-
-/**
- * Creates a session suitable for {@link org.apache.isis.core.metamodel.deployment.DeploymentCategory#PROTOTYPING}
- * mode.
- *
- * <p>
- * The format of the {@value ExplorationAuthenticatorConstants#USERS} key should
- * be:
- *
- * <pre>
- * <:userName> [:<role>[|<role>]...], <userName>...
- * </pre>
- * @deprecated no longer supported
- */
-@Deprecated
-public class ExplorationAuthenticator extends AuthenticatorAbstract {
-
- // -- Constructor, fields
- private final Set<SimpleSession> registeredSessions = new LinkedHashSet<SimpleSession>();;
- private final String users;
-
-
- public ExplorationAuthenticator(final IsisConfiguration configuration) {
- super(configuration);
- users = getConfiguration().getString(ExplorationAuthenticatorConstants.USERS);
- if (users != null) {
- registeredSessions.addAll(parseUsers(users));
- }
- }
-
-
-
- private List<SimpleSession> parseUsers(final String users) {
- final List<SimpleSession> registeredUsers = new ArrayList<SimpleSession>();
-
- final StringTokenizer st = new StringTokenizer(users, ",");
- while (st.hasMoreTokens()) {
- final String token = st.nextToken();
- final int end = token.indexOf(':');
- final List<String> roles = new ArrayList<String>();
- final String userName;
- if (end == -1) {
- userName = token.trim();
- } else {
- userName = token.substring(0, end).trim();
- final String roleList = token.substring(end + 1);
- final StringTokenizer st2 = new StringTokenizer(roleList, "|");
- while (st2.hasMoreTokens()) {
- final String role = st2.nextToken().trim();
- roles.add(role);
- }
- }
- registeredUsers.add(createSimpleSession(userName, roles));
- }
- return registeredUsers;
- }
-
- private SimpleSession createSimpleSession(final String userName, final List<String> roles) {
- return new SimpleSession(userName, roles.toArray(new String[roles.size()]));
- }
-
- // //////////////////////////////////////////////////////////////////
- // API
- // //////////////////////////////////////////////////////////////////
-
- /**
- * Can authenticate if a {@link AuthenticationRequestExploration}.
- */
- @Override
- public final boolean canAuthenticate(final Class<? extends AuthenticationRequest> authenticationRequestClass) {
- return AuthenticationRequestExploration.class.isAssignableFrom(authenticationRequestClass);
- }
-
- @Override
- protected final boolean isValid(final AuthenticationRequest request) {
- return false; //was true only for deprecated exploring mode
- }
-
- @Override
- public AuthenticationSession authenticate(final AuthenticationRequest request, final String code) {
- final AuthenticationRequestExploration authenticationRequestExploration = (AuthenticationRequestExploration) request;
- if (!authenticationRequestExploration.isDefaultUser()) {
- registeredSessions.add(createSimpleSession(authenticationRequestExploration.getName(), authenticationRequestExploration.getRoles()));
- }
- if (registeredSessions.size() >= 1) {
- return registeredSessions.iterator().next();
- } else {
- return new ExplorationSession(code);
- }
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticatorConstants.java b/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticatorConstants.java
deleted file mode 100644
index 504f91c..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticatorConstants.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.isis.core.runtime.authentication.exploration;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-
-/**
-* @deprecated no longer supported
-*/
-@Deprecated
-public final class ExplorationAuthenticatorConstants {
-
- public static final String USERS = ConfigurationConstants.ROOT + "exploration.users";
-
- private ExplorationAuthenticatorConstants() {
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationSession.java b/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationSession.java
deleted file mode 100644
index baabccb..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationSession.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.isis.core.runtime.authentication.exploration;
-
-import java.io.IOException;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSessionAbstract;
-import org.apache.isis.core.commons.encoding.DataInputExtended;
-import org.apache.isis.core.commons.encoding.DataOutputExtended;
-import org.apache.isis.core.commons.encoding.Encodable;
-
-/**
- * @deprecated no longer supported
- */
-@Deprecated
-public final class ExplorationSession extends AuthenticationSessionAbstract implements Encodable {
-
- private static final long serialVersionUID = 1L;
-
- private static final String DEFAULT_USER_NAME = "exploration";
-
- /**
- * Defaults validation code to <tt>""</tt>.
- */
- public ExplorationSession() {
- this("");
- }
-
- public ExplorationSession(final String code) {
- super(DEFAULT_USER_NAME, code);
- initialized();
- }
-
- public ExplorationSession(final DataInputExtended input) throws IOException {
- super(input);
- initialized();
- }
-
- @Override
- public void encode(final DataOutputExtended output) throws IOException {
- super.encode(output);
- }
-
- private void initialized() {
- // nothing to do
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorAbstract.java
index ed812d9..0c7b02e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorAbstract.java
@@ -60,16 +60,8 @@ public abstract class AuthenticatorAbstract implements Authenticator {
/**
- * Whether this {@link Authenticator} is valid in the running context (and
+ * Whether this {@link Authenticator} is valid/applicable in the running context (and
* optionally with respect to the provided {@link AuthenticationRequest}).
- *
- * <p>
- * For example, the <tt>ExplorationAuthenticator</tt> (in the default
- * runtime) is only available for authentication if running in
- * <i>exploration mode</i>.
- *
- * <p>
- * TODO: [ISIS-292] should change visibility to <tt>protected</tt> when remove from the API.
*/
protected abstract boolean isValid(AuthenticationRequest request);
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/ActionMethodsFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/ActionMethodsFacetFactoryTest.java
index 4261fbd..0ebf671 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/ActionMethodsFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/ActionMethodsFacetFactoryTest.java
@@ -40,11 +40,9 @@ import org.apache.isis.core.metamodel.facets.FacetedMethod;
import org.apache.isis.core.metamodel.facets.actions.defaults.ActionDefaultsFacet;
import org.apache.isis.core.metamodel.facets.actions.defaults.method.ActionDefaultsFacetViaMethod;
import org.apache.isis.core.metamodel.facets.actions.defaults.method.ActionDefaultsFacetViaMethodFactory;
-import org.apache.isis.core.metamodel.facets.actions.interaction.ActionNamedFacetFactory;
import org.apache.isis.core.metamodel.facets.actions.validate.ActionValidationFacet;
import org.apache.isis.core.metamodel.facets.actions.validate.method.ActionValidationFacetViaMethod;
import org.apache.isis.core.metamodel.facets.actions.validate.method.ActionValidationFacetViaMethodFactory;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
import org.apache.isis.core.metamodel.facets.members.disabled.forsession.DisableForSessionFacet;
import org.apache.isis.core.metamodel.facets.members.disabled.forsession.DisableForSessionFacetViaMethod;
import org.apache.isis.core.metamodel.facets.members.disabled.forsession.DisableForSessionFacetViaMethodFactory;
@@ -126,29 +124,29 @@ public class ActionMethodsFacetFactoryTest extends AbstractFacetFactoryTest {
}
- public void testProvidesDefaultNameForActionButIgnoresAnyNamedAnnotation() {
- final ActionNamedFacetFactory facetFactory = new ActionNamedFacetFactory();
-
- facetFactory.setServicesInjector(mockServicesInjector);
-
- // mockSpecificationLoader.setLoadSpecificationStringReturn(voidSpec);
- allowing_specificationLoader_loadSpecification_any_willReturn(this.voidSpec);
-
- class Customer {
- @SuppressWarnings("unused")
- public void anActionWithNamedAnnotation() {
- }
- }
- final Method method = findMethod(Customer.class, "anActionWithNamedAnnotation");
-
- facetFactory.process(new ProcessMethodContext(Customer.class, null, method, methodRemover, facetedMethod));
-
- final Facet facet = facetedMethod.getFacet(NamedFacet.class);
- assertNotNull(facet);
- assertTrue(facet instanceof NamedFacet);
- final NamedFacet namedFacet = (NamedFacet) facet;
- assertEquals("An Action With Named Annotation", namedFacet.value());
- }
+// public void testProvidesDefaultNameForActionButIgnoresAnyNamedAnnotation() {
+// final ActionNamedFacetFactory facetFactory = new ActionNamedFacetFactory();
+//
+// facetFactory.setServicesInjector(mockServicesInjector);
+//
+// // mockSpecificationLoader.setLoadSpecificationStringReturn(voidSpec);
+// allowing_specificationLoader_loadSpecification_any_willReturn(this.voidSpec);
+//
+// class Customer {
+// @SuppressWarnings("unused")
+// public void anActionWithNamedAnnotation() {
+// }
+// }
+// final Method method = findMethod(Customer.class, "anActionWithNamedAnnotation");
+//
+// facetFactory.process(new ProcessMethodContext(Customer.class, null, method, methodRemover, facetedMethod));
+//
+// final Facet facet = facetedMethod.getFacet(NamedFacet.class);
+// assertNotNull(facet);
+// assertTrue(facet instanceof NamedFacet);
+// final NamedFacet namedFacet = (NamedFacet) facet;
+// assertEquals("An Action With Named Annotation", namedFacet.value());
+// }
public void testInstallsValidateMethodNoArgsFacetAndRemovesMethod() {
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticatorTest.java b/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticatorTest.java
deleted file mode 100644
index f14842e..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/exploration/ExplorationAuthenticatorTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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.isis.core.runtime.authentication.exploration;
-
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestAbstract;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-@RunWith(JMock.class)
-public class ExplorationAuthenticatorTest {
-
- private final Mockery mockery = new JUnit4Mockery();
-
- private IsisConfiguration mockConfiguration;
- private ExplorationAuthenticator authenticator;
-
- private AuthenticationRequestExploration explorationRequest;
-
- private SomeOtherAuthenticationRequest someOtherRequest;
-
- private static class SomeOtherAuthenticationRequest extends AuthenticationRequestAbstract {
- public SomeOtherAuthenticationRequest() {
- super("other");
- }
- }
-
- @Before
- public void setUp() {
- mockConfiguration = mockery.mock(IsisConfiguration.class);
-
- mockery.checking(new Expectations() {
- {
- allowing(mockConfiguration).getString(ExplorationAuthenticatorConstants.USERS);
- will(returnValue("unit-testing"));
- }
- });
-
- explorationRequest = new AuthenticationRequestExploration();
- someOtherRequest = new SomeOtherAuthenticationRequest();
-
- authenticator = new ExplorationAuthenticator(mockConfiguration);
- }
-
- @Test
- public void canAuthenticateExplorationRequest() throws Exception {
- assertThat(authenticator.canAuthenticate(explorationRequest.getClass()), is(true));
- }
-
- @Test
- public void canAuthenticateSomeOtherTypeOfRequest() throws Exception {
- assertThat(authenticator.canAuthenticate(someOtherRequest.getClass()), is(false));
- }
-
-// @Test
-// public void isValidExplorationRequestWhenRunningInExplorationMode() throws Exception {
-// authenticator.init(DeploymentCategory.EXPLORING);
-// assertThat(authenticator.isValid(explorationRequest), is(true));
-// }
-//
-// @Test
-// public void isNotValidExplorationRequestWhenRunningInSomethingOtherThanExplorationMode() throws Exception {
-// authenticator.init(DeploymentCategory.PROTOTYPING);
-// assertThat(authenticator.isValid(explorationRequest), is(false));
-// }
-//
-// @Test
-// public void isValidSomeOtherTypeOfRequest() throws Exception {
-// authenticator.init(DeploymentCategory.PROTOTYPING);
-// assertThat(authenticator.canAuthenticate(someOtherRequest.getClass()), is(false));
-// }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/fixture/LogonFixtureAuthenticatorTest.java b/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/fixture/LogonFixtureAuthenticatorTest.java
index f49c067..3b9abb7 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/fixture/LogonFixtureAuthenticatorTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/runtime/authentication/fixture/LogonFixtureAuthenticatorTest.java
@@ -62,7 +62,7 @@ public class LogonFixtureAuthenticatorTest {
}
@Test
- public void canAuthenticateExplorationRequest() throws Exception {
+ public void canAuthenticateLogonFixtureRequest() throws Exception {
assertThat(authenticator.canAuthenticate(logonFixtureRequest.getClass()), is(true));
}
@@ -71,28 +71,4 @@ public class LogonFixtureAuthenticatorTest {
assertThat(authenticator.canAuthenticate(someOtherRequest.getClass()), is(false));
}
-// @Test
-// public void isValidLogonFixtureRequestWhenRunningInExplorationMode() throws Exception {
-// authenticator.init(DeploymentCategory.EXPLORING);
-// assertThat(authenticator.isValid(logonFixtureRequest), is(true));
-// }
-//
-// @Test
-// public void isValidLogonFixtureRequestWhenRunningInPrototypeMode() throws Exception {
-// authenticator.init(DeploymentCategory.PROTOTYPING);
-// assertThat(authenticator.isValid(logonFixtureRequest), is(true));
-// }
-//
-// @Test
-// public void isNotValidExplorationRequestWhenRunningInSomethingOtherThanExplorationOrPrototypeMode() throws Exception {
-// authenticator.init(DeploymentCategory.PRODUCTION);
-// assertThat(authenticator.isValid(logonFixtureRequest), is(false));
-// }
-//
-// @Test
-// public void isValidSomeOtherTypeOfRequest() throws Exception {
-// authenticator.init(DeploymentCategory.EXPLORING);
-// assertThat(authenticator.canAuthenticate(SomeOtherAuthenticationRequest.class), is(false));
-// }
-
}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManagerStandardInstallerAbstractForDfltRuntime.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManagerStandardInstallerAbstractForDfltRuntime.java
index 1bc7486..4cb11b2 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManagerStandardInstallerAbstractForDfltRuntime.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManagerStandardInstallerAbstractForDfltRuntime.java
@@ -22,8 +22,6 @@ package org.apache.isis.core.runtime.authentication;
import org.apache.isis.applib.fixtures.LogonFixture;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-import org.apache.isis.core.runtime.authentication.exploration.ExplorationAuthenticator;
-import org.apache.isis.core.runtime.authentication.exploration.ExplorationSession;
import org.apache.isis.core.runtime.authentication.fixture.LogonFixtureAuthenticator;
import org.apache.isis.core.runtime.authentication.standard.AuthenticationManagerStandard;
import org.apache.isis.core.runtime.authentication.standard.AuthenticationManagerStandardInstallerAbstract;
@@ -39,15 +37,13 @@ public abstract class AuthenticationManagerStandardInstallerAbstractForDfltRunti
/**
* Returns an instance of {@link AuthenticationManagerStandard} that has no need to log in when running in
- * exploration mode.
+ * prototyping mode.
*
* <p>
* Specifically:
* <ul>
- * <li> the {@link ExplorationAuthenticator} will always provide a special {@link ExplorationSession} if running
- * in the exploration mode.
* <li> the {@link LogonFixtureAuthenticator} will set up a session using the login provided by a
- * {@link LogonFixture}, provided running in exploration or prototyping mode.
+ * {@link LogonFixture}, provided running in prototyping mode.
* </ul>
*/
@Override
@@ -57,7 +53,6 @@ public abstract class AuthenticationManagerStandardInstallerAbstractForDfltRunti
final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(configuration);
// we add to start to ensure that these special case authenticators are always consulted first
- authenticationManager.addAuthenticatorToStart(new ExplorationAuthenticator(configuration));
authenticationManager.addAuthenticatorToStart(new LogonFixtureAuthenticator(configuration));
return authenticationManager;
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/singleuser/SingleUserSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/singleuser/SingleUserSession.java
index 0cc47be..9dc7c3f 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/singleuser/SingleUserSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/singleuser/SingleUserSession.java
@@ -30,7 +30,7 @@ public final class SingleUserSession extends AuthenticationSessionAbstract imple
private static final long serialVersionUID = 1L;
- private static final String DEFAULT_USER_NAME = "exploration";
+ private static final String DEFAULT_USER_NAME = "prototyping";
/**
* Defaults validation code to <tt>""</tt>.
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/fixtures/FixturesInstallerFromConfiguration.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/fixtures/FixturesInstallerFromConfiguration.java
index 361ec6c..c976e4d 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/fixtures/FixturesInstallerFromConfiguration.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/fixtures/FixturesInstallerFromConfiguration.java
@@ -34,13 +34,11 @@ public class FixturesInstallerFromConfiguration extends FixturesInstallerAbstrac
public static final String FIXTURES = ConfigurationConstants.ROOT + "fixtures";
/**
- * @deprecated - just adds to the cognotive load...
+ * @deprecated - just adds to the cognitive load...
*/
@Deprecated
private static final String FIXTURES_PREFIX = ConfigurationConstants.ROOT + "fixtures.prefix";
- private static final String EXPLORATION_OBJECTS = ConfigurationConstants.ROOT + "exploration-objects";
-
public FixturesInstallerFromConfiguration(final IsisSessionFactory isisSessionFactory) {
super(isisSessionFactory);
}
@@ -81,21 +79,6 @@ public class FixturesInstallerFromConfiguration extends FixturesInstallerAbstrac
this.fixtures = fixtures;
}
- void setFixtures(String fixturesStr) {
- if(fixturesStr != null) {
- setFixtures(new String[]{fixturesStr});
- } else {
- setFixtures(new String[]{});
- }
-
- }
-
- @SuppressWarnings("unused")
- boolean hasFixtures() {
- return fixtures != null && fixtures.length != 0;
- }
-
-
// -- fixturePrefix
private String fixturePrefix;
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactory.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactory.java
index e47f89f..f8b6a2c 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactory.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactory.java
@@ -44,7 +44,6 @@ import org.apache.isis.core.metamodel.specloader.ServiceInitializer;
import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
import org.apache.isis.core.plugins.environment.DeploymentType;
import org.apache.isis.core.runtime.authentication.AuthenticationManager;
-import org.apache.isis.core.runtime.authentication.exploration.ExplorationSession;
import org.apache.isis.core.runtime.authorization.AuthorizationManager;
import org.apache.isis.core.runtime.fixtures.FixturesInstallerFromConfiguration;
import org.apache.isis.core.runtime.system.MessageRegistry;
@@ -238,10 +237,8 @@ implements ApplicationScopedComponent, AppManifestProvider {
* The {@link LogonFixture}, if any, obtained by running fixtures.
*
* <p>
- * Intended to be used when for {@link DeploymentType#SERVER_EXPLORATION
- * exploration} (instead of an {@link ExplorationSession}) or
- * {@link DeploymentType#SERVER_PROTOTYPE prototype} deployments (saves logging
- * in). Should be <i>ignored</i> in other {@link DeploymentType}s.
+ * Intended to be used when for {@link DeploymentType#SERVER_PROTOTYPE prototype} deployments
+ * (saves logging in). Should be <i>ignored</i> in other {@link DeploymentType}s.
*/
@Programmatic
public LogonFixture getLogonFixture() {
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/auth/AuthenticationSessionStrategyDefault.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/auth/AuthenticationSessionStrategyDefault.java
index dcb67f9..5b24925 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/auth/AuthenticationSessionStrategyDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/auth/AuthenticationSessionStrategyDefault.java
@@ -26,7 +26,6 @@ import javax.servlet.http.HttpSession;
import org.apache.isis.applib.fixtures.LogonFixture;
import org.apache.isis.core.commons.authentication.AuthenticationSession;
import org.apache.isis.core.runtime.authentication.AuthenticationManager;
-import org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration;
import org.apache.isis.core.runtime.fixtures.authentication.AuthenticationRequestLogonFixture;
import org.apache.isis.core.runtime.system.context.IsisContext;
import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
@@ -42,8 +41,6 @@ import org.apache.isis.core.webapp.WebAppConstants;
* <ul>
* <li>it looks up from the {@link HttpSession} using the value
* {@link WebAppConstants#HTTP_SESSION_AUTHENTICATION_SESSION_KEY}</li>
- * <li>failing that, if in exploration mode, then returns an exploration session
- * </li>
* <li>failing that, if a {@link LogonFixture} has been provided and not already
* used, will provide an session for that fixture. The {@link HttpSession} also
* stores the value
@@ -79,14 +76,6 @@ public class AuthenticationSessionStrategyDefault extends AuthenticationSessionS
}
final LogonFixture logonFixture = sessionFactory.getLogonFixture();
- // see if exploration is supported
- if (false) {
- authSession = authenticationManager.authenticate(new AuthenticationRequestExploration(logonFixture));
- if (authSession != null) {
- return authSession;
- }
- }
-
final boolean loggedInUsingLogonFixture = httpSession.getAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY) != null;
if (logonFixture != null && !loggedInUsingLogonFixture) {
httpSession.setAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY, true);
diff --git a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyAction.java b/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyAction.java
deleted file mode 100644
index 886383a..0000000
--- a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyAction.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * 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.isis.nof.reflect.remote.spec;
-
-import org.apache.isis.noa.adapter.ObjectAdapter;
-import org.apache.isis.noa.adapter.ObjectAdapterReference;
-import org.apache.isis.noa.facets.Facet;
-import org.apache.isis.applib.internal._Constants;
-import org.apache.isis.metamodel.facets.actions.debug.DebugFacet;
-import org.apache.isis.metamodel.facets.actions.executed.ExecutedFacet;
-import org.apache.isis.metamodel.facets.actions.exploration.ExplorationFacet;
-import org.apache.isis.noa.reflect.Consent;
-import org.apache.isis.noa.reflect.ObjectAction;
-import org.apache.isis.noa.reflect.ObjectActionParameter;
-import org.apache.isis.noa.reflect.ObjectActionParameter.Filter;
-import org.apache.isis.noa.spec.ObjectSpecification;
-import org.apache.isis.nof.core.context.IsisContext;
-import org.apache.isis.nof.core.reflect.Allow;
-import org.apache.isis.nof.core.util.NameConvertor;
-import org.apache.isis.nof.core.util.NotImplementedException;
-import org.apache.isis.nof.reflect.peer.ActionPeer;
-import org.apache.isis.nof.reflect.peer.MemberIdentifier;
-import org.apache.isis.nof.reflect.spec.DefaultOneToOneActionParameter;
-import org.apache.isis.nof.reflect.spec.DefaultValueActionParameter;
-import org.apache.isis.testing.TestSession;
-
-
-public class DummyAction implements ObjectAction {
- public final ActionPeer peer;
-
- public DummyAction(final ActionPeer peer) {
- this.peer = peer;
- }
-
- public boolean[] canParametersWrap() {
- return null;
- }
-
- public String debugData() {
- return "";
- }
-
- public ObjectAdapter execute(final ObjectAdapterReference object, final ObjectAdapter[] parameters) {
- return peer.execute(object, parameters);
- }
-
- public ObjectAction[] getActions() {
- return new ObjectAction[0];
- }
-
- public ObjectAdapter[] getDefaultParameterValues(ObjectAdapterReference target) {
- throw new NotImplementedException();
- }
-
- public String getDescription() {
- return "";
- }
-
- public Facet getFacet(final Class cls) {
- return null;
- }
-
- public Class[] getFacetTypes() {
- return _Constants.emptyClasses;
- }
-
- public Facet[] getFacets(Facet.Filter filter) {
- return new Facet[]{};
- }
-
- public void addFacet(Facet facet) {
- }
-
- public void removeFacet(Facet facet) {
- }
-
- public String getHelp() {
- return "";
- }
-
- public String getId() {
- return NameConvertor.simpleName(peer.getIdentifier().getName());
- }
-
- public MemberIdentifier getIdentifier() {
- throw new NotImplementedException();
- }
-
- public String getName() {
- return "";
- }
-
- public ObjectSpecification getOnType() {
- return peer.getOnType();
- }
-
- public ObjectAdapter[][] getOptions(ObjectAdapterReference target) {
- return null;
- }
-
- public int getParameterCount() {
- return peer.getParameterCount();
- }
-
- public String[] getParameterDescriptions() {
- return null;
- }
-
- public int[] getParameterMaxLengths() {
- return null;
- }
-
- public String[] getParameterNames() {
- return new String[]{};
- }
-
- public int[] getParameterNoLines() {
- return null;
- }
-
- /**
- * Build lazily by {@link #getParameters()}.
- */
- private ObjectActionParameter[] parameters;
- public ObjectActionParameter[] getParameters() {
- if (parameters == null) {
- parameters = new ObjectActionParameter[getParameterCount()];
- ObjectSpecification[] parameterTypes = getParameterTypes();
- String[] parameterNames = getParameterNames();
- String[] parameterDescriptions = getParameterDescriptions();
- boolean[] optionalParameters = getOptionalParameters();
-
- int[] parameterNoLines = getParameterNoLines();
- boolean[] canParametersWrap = canParametersWrap();
- int[] parameterMaxLengths = getParameterMaxLengths();
- int[] parameterTypicalLengths = getParameterTypicalLengths();
-
- for(int i=0; i<getParameterCount(); i++) {
- if (parameterTypes[i].getType() == ObjectSpecification.VALUE) {
- parameters[i] = new DefaultValueActionParameter(
- i,
- this,
- null,
- parameterTypes[i],
- parameterNames[i], parameterDescriptions[i],
- optionalParameters[i],
- parameterTypicalLengths[i], parameterMaxLengths[i],
- parameterNoLines[i], canParametersWrap[i]);
- } else if (parameterTypes[i].getType() == ObjectSpecification.OBJECT) {
- parameters[i] = new DefaultOneToOneActionParameter(
- i,
- this,
- null,
- parameterTypes[i],
- parameterNames[i], parameterDescriptions[i],
- optionalParameters[i]);
- } else if (parameterTypes[i].getType() == ObjectSpecification.COLLECTION) {
- // TODO: not supported; should we throw an exception of some sort here?
- parameters[i] = null;
- }
-
- }
- }
- return parameters;
- }
-
-
- public ObjectActionParameter[] getParameters(
- Filter filter) {
- ObjectActionParameter[] allParameters = getParameters();
-
- ObjectActionParameter[] selectedParameters = new ObjectActionParameter[allParameters.length];
- int v = 0;
- for (int i = 0; i < allParameters.length; i++) {
- if (filter.accept(allParameters[i])) {
- selectedParameters[v++] = allParameters[i];
- }
- }
-
- ObjectActionParameter[] parameters = new ObjectActionParameter[v];
- System.arraycopy(selectedParameters, 0, parameters, 0, v);
- return parameters;
- }
-
-
-// public ObjectSpecification[] getParameterTypes() {
-// return peer.getParameterTypes();
-// }
-
- public int[] getParameterTypicalLengths() {
- return null;
- }
-
-// public boolean[] getOptionalParameters() {
-// return peer.getOptionalParameters();
-// }
-
- public ObjectSpecification getReturnType() {
- return peer.getReturnType();
- }
-
- public Target getTarget() {
- ExecutedFacet executedFacet = (ExecutedFacet) peer.getFacet(ExecutedFacet.class);
- return executedFacet == null?ObjectAction.DEFAULT:executedFacet.getTarget();
- }
-
- public Type getType() {
- DebugFacet debugFacet = (DebugFacet) peer.getFacet(DebugFacet.class);
- if (debugFacet != null) {
- return ObjectAction.DEBUG;
- }
- ExplorationFacet explorationFacet = (ExplorationFacet) peer.getFacet(ExplorationFacet.class);
- if (explorationFacet != null) {
- return ObjectAction.EXPLORATION;
- }
- return ObjectAction.USER;
- }
-
- public boolean hasReturn() {
- return false;
- }
-
- public boolean isOnInstance() {
- return peer.isOnInstance();
- }
-
- /**
- * Delegates to {@link #isParameterSetValidDeclaratively(ObjectAdapterReference, ObjectAdapter[])} and
- * then {@link #isParameterSetValidImperatively(ObjectAdapterReference, ObjectAdapter[])}, as per the
- * contract in the {@link ObjectAction implemented interface}.
- */
- public Consent isParameterSetValid(final ObjectAdapterReference object,
- final ObjectAdapter[] parameters) {
- Consent consentDeclaratively = isParameterSetValidDeclaratively(object, parameters);
- if (consentDeclaratively.isVetoed()) {
- return consentDeclaratively;
- }
- return isParameterSetValidImperatively(object, parameters);
- }
-
- /**
- * Always returns an {@link Allow}.
- */
- public Consent isParameterSetValidDeclaratively(
- ObjectAdapterReference object,
- ObjectAdapter[] parameters) {
- return Allow.DEFAULT;
- }
-
- public Consent isParameterSetValidImperatively(
- ObjectAdapterReference object,
- ObjectAdapter[] parameters) {
- return peer.isParameterSetValidImperatively(object, parameters);
- }
-
- public Consent isUsable(final ObjectAdapterReference target) {
- return peer.isUsable(target);
- }
-
- public Consent isUsable() {
- Consent usableDeclaratively = isUsableDeclaratively();
- if (usableDeclaratively.isVetoed()) {
- return usableDeclaratively;
- }
- return isUsableForSession();
- }
-
- public Consent isUsableDeclaratively() {
- return peer.isUsableDeclaratively();
- }
-
- public Consent isUsableForSession() {
- return peer.isUsableForSession(IsisContext.getSession());
- }
-
- public boolean isContributedMethodWithSuitableParameter() {
- return false;
- }
-
- public boolean isVisible() {
- return isVisibleDeclaratively() && isVisibleForSession();
- }
-
- public boolean isVisibleDeclaratively() {
- return peer.isVisibleDeclaratively();
- }
-
- public boolean isVisibleForSession() {
- return peer.isVisibleForSession(new TestSession());
- }
-
- public boolean isVisible(final ObjectAdapterReference target) {
- return peer.isVisible(target);
- }
-
- public ObjectAdapter[] parameterStubs() {
- throw new NotImplementedException();
- }
-
- public ObjectAdapterReference realTarget(ObjectAdapterReference target) {
- return target;
- }
-
- public ObjectSpecification getSpecification() {
- return null;
- }
-
-
-
-
-}
diff --git a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyOneToManyAssociation.java b/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyOneToManyAssociation.java
deleted file mode 100644
index cfe399a..0000000
--- a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyOneToManyAssociation.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * 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.isis.nof.reflect.remote.spec;
-
-import org.apache.isis.noa.adapter.ObjectAdapter;
-import org.apache.isis.noa.adapter.ObjectAdapterReference;
-import org.apache.isis.noa.facets.Facet;
-import org.apache.isis.noa.reflect.Consent;
-import org.apache.isis.noa.reflect.ObjectField;
-import org.apache.isis.noa.spec.ObjectSpecification;
-import org.apache.isis.nof.core.reflect.Allow;
-import org.apache.isis.nof.reflect.peer.OneToManyPeer;
-
-
-public class DummyOneToManyAssociation implements ObjectField {
-
- private final OneToManyPeer fieldPeer;
-
- public DummyOneToManyAssociation(final OneToManyPeer fieldPeer) {
- this.fieldPeer = fieldPeer;
- }
-
- public String getBusinessKeyName() {
- return null;
- }
-
- public OneToManyPeer getPeer() {
- return fieldPeer;
- }
-
- public ObjectSpecification getSpecification() {
- return null;
- }
-
- public boolean isCollection() {
- return false;
- }
-
- public boolean isPersisted() {
- return true;
- }
-
- public boolean isEmpty(final ObjectAdapter adapter) {
- return false;
- }
-
- public boolean isObject() {
- return false;
- }
-
- public boolean isValue() {
- return false;
- }
-
- public boolean isMandatory() {
- return false;
- }
-
- public boolean isOptionEnabled() {
- return false;
- }
-
- public ObjectAdapter get(final ObjectAdapter fromObject) {
- return null;
- }
-
- public Object getDefault(
- ObjectAdapter adapter) {
- return null;
- }
-
- public void toDefault(ObjectAdapter target) {
- }
-
- public Facet getFacet(final Class cls) {
- return null;
- }
-
- public Class[] getFacetTypes() {
- return null;
- }
-
- public Facet[] getFacets(Facet.Filter filter) {
- return null;
- }
-
- public void addFacet(Facet facet) {
- }
-
- public void removeFacet(Facet facet) {
- }
-
-
- public String getName() {
- return null;
- }
-
- public String getId() {
- return fieldPeer.getIdentifier().getName();
- }
-
- public String getDescription() {
- return null;
- }
-
- public ObjectAdapter[] getOptions(final ObjectAdapter target) {
- return null;
- }
-
- public Consent isUsable() {
- Consent usableDeclaratively = isUsableDeclaratively();
- if (usableDeclaratively.isVetoed()) {
- return usableDeclaratively;
- }
- return isUsableForSession();
- }
-
- public Consent isUsableDeclaratively() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsableForSession() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsable(final ObjectAdapterReference target) {
- return null;
- }
-
- public boolean isVisible() {
- return isVisibleDeclaratively() && isVisibleForSession();
- }
-
- public boolean isVisibleDeclaratively() {
- return false;
- }
-
- public boolean isVisibleForSession() {
- return false;
- }
-
- public boolean isVisible(final ObjectAdapterReference target) {
- return true;
- }
-
-
- public String getHelp() {
- return null;
- }
-
- public String debugData() {
- return "";
- }
-
-
-
-}
diff --git a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyOneToOneAssociation.java b/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyOneToOneAssociation.java
deleted file mode 100644
index 04268bb..0000000
--- a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyOneToOneAssociation.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * 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.isis.nof.reflect.remote.spec;
-
-import org.apache.isis.noa.adapter.ObjectAdapter;
-import org.apache.isis.noa.adapter.ObjectAdapterReference;
-import org.apache.isis.noa.facets.Facet;
-import org.apache.isis.noa.reflect.Consent;
-import org.apache.isis.noa.reflect.ObjectField;
-import org.apache.isis.noa.spec.ObjectSpecification;
-import org.apache.isis.nof.core.reflect.Allow;
-import org.apache.isis.nof.reflect.peer.OneToOnePeer;
-
-
-public class DummyOneToOneAssociation implements ObjectField {
-
- private final OneToOnePeer fieldPeer;
-
- public DummyOneToOneAssociation(final OneToOnePeer fieldPeer) {
- this.fieldPeer = fieldPeer;
- }
-
- public String getBusinessKeyName() {
- return null;
- }
-
- public Object getDefault(
- ObjectAdapter adapter) {
- return null;
- }
-
- public void toDefault(ObjectAdapter target) {
- }
-
- public ObjectAdapter[] getOptions(final ObjectAdapter target) {
- return null;
- }
-
- public OneToOnePeer getPeer() {
- return fieldPeer;
- }
-
- public ObjectSpecification getSpecification() {
- return null;
- }
-
- public boolean isCollection() {
- return false;
- }
-
- public boolean isPersisted() {
- return true;
- }
-
- public boolean isEmpty(final ObjectAdapter adapter) {
- return false;
- }
-
- public boolean isObject() {
- return false;
- }
-
- public boolean isValue() {
- return false;
- }
-
- public boolean isMandatory() {
- return false;
- }
-
- public boolean isOptionEnabled() {
- return false;
- }
-
-
- public ObjectAdapter get(final ObjectAdapter fromObject) {
- return null;
- }
-
- public Facet getFacet(final Class cls) {
- return null;
- }
-
- public Class[] getFacetTypes() {
- return null;
- }
-
- public Facet[] getFacets(Facet.Filter filter) {
- return null;
- }
-
- public void addFacet(Facet facet) {
- }
-
- public void removeFacet(Facet facet) {
- }
-
- public String getName() {
- return null;
- }
-
- public String getId() {
- return fieldPeer.getIdentifier().getName();
- }
-
- public boolean hasHint() {
- return false;
- }
-
- public String getDescription() {
- return null;
- }
-
- public Consent isUsable() {
- Consent usableDeclaratively = isUsableDeclaratively();
- if (usableDeclaratively.isVetoed()) {
- return usableDeclaratively;
- }
- return isUsableForSession();
- }
-
- public Consent isUsableDeclaratively() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsableForSession() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsable(final ObjectAdapterReference target) {
- return null;
- }
-
- public boolean isVisible() {
- return isVisibleDeclaratively() && isVisibleForSession();
- }
-
- public boolean isVisibleDeclaratively() {
- return false;
- }
-
- public boolean isVisibleForSession() {
- return false;
- }
-
- public boolean isVisible(final ObjectAdapterReference target) {
- return true;
- }
-
- public String getHelp() {
- return null;
- }
-
- public String debugData() {
- return "";
- }
-
-
-
-}
diff --git a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyValueAssociation.java b/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyValueAssociation.java
deleted file mode 100644
index 01301e3..0000000
--- a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/DummyValueAssociation.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.isis.nof.reflect.remote.spec;
-
-import org.apache.isis.noa.adapter.ObjectAdapter;
-import org.apache.isis.noa.adapter.ObjectAdapterReference;
-import org.apache.isis.noa.facets.Facet;
-import org.apache.isis.noa.reflect.Consent;
-import org.apache.isis.noa.reflect.ObjectField;
-import org.apache.isis.noa.spec.ObjectSpecification;
-import org.apache.isis.nof.core.reflect.Allow;
-import org.apache.isis.nof.reflect.peer.ValuePeer;
-
-
-public class DummyValueAssociation implements ObjectField {
-
- private final ValuePeer fieldPeer;
-
- public DummyValueAssociation(final ValuePeer fieldPeer) {
- this.fieldPeer = fieldPeer;
- }
-
- public String getBusinessKeyName() {
- return null;
- }
-
- public ObjectSpecification getSpecification() {
- return null;
- }
-
- public Object getDefault(
- ObjectAdapter adapter) {
- return null;
- }
-
- public void toDefault(ObjectAdapter target) {
- }
-
- public ObjectAdapter[] getOptions(final ObjectAdapter target) {
- return null;
- }
-
- public boolean isCollection() {
- return false;
- }
-
- public boolean isPersisted() {
- return true;
- }
-
- public boolean isEmpty(final ObjectAdapter adapter) {
- return false;
- }
-
- public boolean isObject() {
- return false;
- }
-
- public boolean isOptionEnabled() {
- return false;
- }
-
- public boolean isValue() {
- return false;
- }
-
- public boolean isMandatory() {
- return false;
- }
-
-
- public ObjectAdapter get(final ObjectAdapter fromObject) {
- return null;
- }
-
- public Facet getFacet(final Class cls) {
- return null;
- }
-
- public Class[] getFacetTypes() {
- return null;
- }
-
- public Facet[] getFacets(Facet.Filter filter) {
- return null;
- }
-
- public void addFacet(Facet facet) {
- }
-
- public void removeFacet(Facet facet) {
- }
-
- public String getName() {
- return "Id";
- }
-
- public String getId() {
- return fieldPeer.getIdentifier().getName();
- }
-
- public String getDescription() {
- return null;
- }
-
- public boolean isVisible() {
- return isVisibleDeclaratively() && isVisibleForSession();
- }
-
- public boolean isVisibleDeclaratively() {
- return false;
- }
-
- public boolean isVisibleForSession() {
- return false;
- }
-
- public Consent isUsable() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsableDeclaratively() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsableForSession() {
- return Allow.DEFAULT;
- }
-
- public Consent isUsable(final ObjectAdapterReference target) {
- return null;
- }
-
- public boolean isVisible(final ObjectAdapterReference target) {
- return true;
- }
-
- public String getHelp() {
- return null;
- }
-
- public String debugData() {
- return "";
- }
-
-
-
-}
diff --git a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/JavaFieldTest.java b/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/JavaFieldTest.java
deleted file mode 100644
index 8d7ae4c..0000000
--- a/core/runtime/src/test-archived/org.nakedobjects.nof.reflect.remote.spec/JavaFieldTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.isis.nof.reflect.remote.spec;
-
-import junit.framework.TestSuite;
-
-import org.apache.isis.noa.adapter.ObjectAdapter;
-import org.apache.isis.nof.reflect.peer.MemberIdentifierImpl;
-import org.apache.isis.nof.testsystem.ProxyTestCase;
-import org.apache.isis.nof.testsystem.TestProxySpecification;
-
-
-public class JavaFieldTest extends ProxyTestCase {
- private static final String MEMBERS_FIELD_NAME = "members";
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(new TestSuite(JavaFieldTest.class));
- }
-
- private JavaField field;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- MemberIdentifierImpl memberIdentifierImpl = new MemberIdentifierImpl("cls", MEMBERS_FIELD_NAME);
-
- field = new JavaField(memberIdentifierImpl, String.class){
- public boolean isEmpty(ObjectAdapter inObject) {
- return true;
- }
- };
-
- }
-
- protected void tearDown() throws Exception {
- system.shutdown();
- }
-
- public void testType() {
- TestProxySpecification spec = system.getSpecification(String.class);
- assertEquals(spec, field.getSpecification());
- }
-
- public void testIsEmpty() throws Exception {
- ObjectAdapter inObject = system.createPersistentTestObject();
- assertTrue(field.isEmpty(inObject));
- }
-
-}
diff --git a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/ActionAuthorisationTest.java b/core/runtime/src/test-archived/test.org.nakedobjects.object.security/ActionAuthorisationTest.java
deleted file mode 100644
index a72e452..0000000
--- a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/ActionAuthorisationTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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 test.org.apache.isis.object.security;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.nof.core.context.StaticContext;
-import org.apache.isis.testing.NullSession;
-
-import test.org.apache.isis.object.reflect.DummyActionPeer;
-
-
-public class ActionAuthorisationTest extends TestCase {
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(ActionAuthorisationTest.class);
- }
-
- private MockAuthorisationManager manager;
- private ActionAuthorisation action;
-
- protected void setUp() throws Exception {
- StaticContext.createInstance();
- DummyActionPeer peer = new DummyActionPeer();
- manager = new MockAuthorisationManager();
- action = new ActionAuthorisation(peer, manager);
- }
-
- public void testIsAccessible() {
- manager.setupUsable(true);
- manager.setupVisible(true);
-
- assertTrue(action.isVisibleForSession(new NullSession()));
- }
-
- public void testIsNotAccessible() {
- manager.setupUsable(true);
- manager.setupVisible(false);
-
- assertFalse(action.isVisibleForSession(new NullSession()));
- }
-}
diff --git a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/MockAuthorisationManager.java b/core/runtime/src/test-archived/test.org.nakedobjects.object.security/MockAuthorisationManager.java
deleted file mode 100644
index 8e0ad4c..0000000
--- a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/MockAuthorisationManager.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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 test.org.apache.isis.object.security;
-
-import org.apache.isis.noa.authentication.Sessionessionession;
-import org.apache.isis.nof.reflect.peer.MemberIdentifier;
-import org.apache.isis.nof.reflect.security.AuthorisationManager;
-
-
-public class MockAuthorisationManager implements AuthorisationManager {
- private boolean visible;
- private boolean usable;
-
- public boolean isUsable(final Session session, final MemberIdentifier identifier) {
- return usable;
- }
-
- public boolean isVisible(final Session session, final MemberIdentifier identifier) {
- return visible;
- }
-
- public void setupVisible(final boolean b) {
- visible = b;
- }
-
- public void setupUsable(final boolean usable) {
- this.usable = usable;
- }
-
- public void init() {}
-
- public void shutdown() {}
-
- public boolean isEditable(final Session session, final MemberIdentifier identifier) {
- return false;
- }
-}
diff --git a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/OneToManyAuthorisationTest.java b/core/runtime/src/test-archived/test.org.nakedobjects.object.security/OneToManyAuthorisationTest.java
deleted file mode 100644
index 6d78f49..0000000
--- a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/OneToManyAuthorisationTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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 test.org.apache.isis.object.security;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.nof.core.context.StaticContext;
-import org.apache.isis.nof.reflect.security.OneToManyAuthorisation;
-import org.apache.isis.testing.NullSession;
-
-import test.org.apache.isis.object.reflect.DummyOneToManyPeer;
-
-
-public class OneToManyAuthorisationTest extends TestCase {
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(OneToManyAuthorisationTest.class);
- }
-
- private MockAuthorisationManager manager;
- private OneToManyAuthorisation oneToMany;
-
- protected void setUp() throws Exception {
- StaticContext.createInstance();
-
- DummyOneToManyPeer peer = new DummyOneToManyPeer();
- manager = new MockAuthorisationManager();
- oneToMany = new OneToManyAuthorisation(peer, manager);
- }
-
- public void testAccessible() {
- manager.setupUsable(true);
- manager.setupVisible(true);
-
- assertTrue(oneToMany.isVisibleForSession(new NullSession()));
- }
-
- public void testNotAccessible() {
- manager.setupUsable(true);
- manager.setupVisible(false);
-
- assertFalse(oneToMany.isVisibleForSession(new NullSession()));
- }
-}
diff --git a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/OneToOneAuthorisationTest.java b/core/runtime/src/test-archived/test.org.nakedobjects.object.security/OneToOneAuthorisationTest.java
deleted file mode 100644
index 8c11529..0000000
--- a/core/runtime/src/test-archived/test.org.nakedobjects.object.security/OneToOneAuthorisationTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 test.org.apache.isis.object.security;
-
-import junit.framework.TestCase;
-
-import org.apache.isis.nof.core.context.StaticContext;
-import org.apache.isis.nof.reflect.security.OneToOneAuthorisation;
-import org.apache.isis.testing.NullSession;
-
-import test.org.apache.isis.object.reflect.DummyOneToOnePeer;
-
-
-public class OneToOneAuthorisationTest extends TestCase {
-
- public static void main(final String[] args) {
- junit.textui.TestRunner.run(OneToOneAuthorisationTest.class);
-
- }
-
- private MockAuthorisationManager manager;
- private OneToOneAuthorisation oneToOne;
-
- protected void setUp() throws Exception {
- StaticContext.createInstance();
-
- DummyOneToOnePeer peer = new DummyOneToOnePeer();
- manager = new MockAuthorisationManager();
- oneToOne = new OneToOneAuthorisation(peer, manager);
- }
-
- public void testGetHint() {
-
- manager.setupUsable(true);
- manager.setupVisible(true);
-
- assertTrue(oneToOne.isVisibleForSession(new NullSession()));
- }
-}
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectWithBasicProgramConventions.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectWithBasicProgramConventions.java
index 0057d61..c402059 100644
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectWithBasicProgramConventions.java
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectWithBasicProgramConventions.java
@@ -22,7 +22,7 @@ package org.apache.isis.core.runtime.system;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.apache.isis.applib.security.UserMemento;
@@ -246,7 +246,7 @@ public class JavaObjectWithBasicProgramConventions implements Interface1, Interf
return "five";
}
- public List getNine() {
+ public List<?> getNine() {
return collection;
}
@@ -262,10 +262,7 @@ public class JavaObjectWithBasicProgramConventions implements Interface1, Interf
public String debugTwo(final String parameter) {
return "action two";
}
-
- // exploration method
- public void explorationSetUp() {
- }
+
}
interface Interface2 {
diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/authentication/AuthenticationSessionStrategyTrusted.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/authentication/AuthenticationSessionStrategyTrusted.java
deleted file mode 100644
index 75fe97a..0000000
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/authentication/AuthenticationSessionStrategyTrusted.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.isis.viewer.restfulobjects.server.authentication;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
-import org.apache.isis.core.webapp.auth.AuthenticationSessionStrategyDefault;
-
-public class AuthenticationSessionStrategyTrusted extends AuthenticationSessionStrategyDefault {
-
- @Override
- public AuthenticationSession lookupValid(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) {
- final AuthenticationSession session = super.lookupValid(httpServletRequest, httpServletResponse);
- if (session != null) {
- return session;
- }
-
- // will always succeed.
- final AuthenticationRequestExploration request = new AuthenticationRequestExploration();
- return isisSessionFactoryFrom(httpServletRequest).getAuthenticationManager().authenticate(request);
- }
-
-}
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/links/LinkAndLabel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/links/LinkAndLabel.java
index 4a5b3a8..1270890 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/links/LinkAndLabel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/links/LinkAndLabel.java
@@ -51,7 +51,7 @@ public class LinkAndLabel implements Serializable {
final String name = ObjectAction.Util.nameFor(objectAction);
- final boolean explorationOrPrototype = objectAction.isPrototype();
+ final boolean isPrototype = objectAction.isPrototype();
final String actionIdentifier = ObjectAction.Util.actionIdentifierFor(objectAction);
final String description = ObjectAction.Util.descriptionOf(objectAction);
final String cssClass = ObjectAction.Util.cssClassFor(objectAction, objectAdapter);
@@ -64,7 +64,7 @@ public class LinkAndLabel implements Serializable {
return new LinkAndLabel(
link, name,
disabledReasonIfAny, description,
- blobOrClob, explorationOrPrototype,
+ blobOrClob, isPrototype,
actionIdentifier,
cssClass, cssClassFa, cssClassFaPosition, actionLayoutPosition,
semantics,
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java
index 2d83862..c1809a8 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java
@@ -21,12 +21,10 @@ package org.apache.isis.viewer.wicket.model.mementos;
import java.util.List;
-import java.util.function.Function;
-import org.apache.isis.commons.internal.collections._Lists;
-
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.util.string.StringValue;
+import org.apache.isis.commons.internal.collections._Lists;
import org.apache.isis.core.commons.lang.StringExtensions;
import org.apache.isis.core.metamodel.adapter.oid.Oid;
@@ -56,7 +54,7 @@ public enum PageParameterNames {
ACTION_OWNING_SPEC,
/**
- * Whether user, exploration, prototype etc.
+ * Whether user, prototype etc.
*/
ACTION_TYPE,