You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/03/27 13:15:14 UTC
[2/2] syncope git commit: [SYNCOPE-1050] CaptchaResource was not
included
[SYNCOPE-1050] CaptchaResource was not included
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5069b325
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5069b325
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5069b325
Branch: refs/heads/master
Commit: 5069b3258f85f3e2f7e5bbe7899bc5299cebbc46
Parents: 3039d68
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Mar 27 15:14:28 2017 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Mar 27 15:15:06 2017 +0200
----------------------------------------------------------------------
.../client/enduser/SyncopeEnduserApplication.java | 6 +++---
.../enduser/init/ClassPathScanImplementationLookup.java | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/5069b325/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java b/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java
index 756d2f9..7bec115 100644
--- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java
+++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java
@@ -28,7 +28,6 @@ import org.apache.commons.lang3.BooleanUtils;
import org.apache.syncope.client.enduser.annotations.Resource;
import org.apache.syncope.client.enduser.init.ClassPathScanImplementationLookup;
import org.apache.syncope.client.enduser.init.EnduserInitializer;
-import org.apache.syncope.client.enduser.resources.BaseResource;
import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.wicket.Page;
@@ -37,6 +36,7 @@ import org.apache.wicket.WicketRuntimeException;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
+import org.apache.wicket.request.resource.AbstractResource;
import org.apache.wicket.request.resource.IResource;
import org.apache.wicket.request.resource.ResourceReference;
import org.apache.wicket.util.lang.Args;
@@ -134,13 +134,13 @@ public class SyncopeEnduserApplication extends WebApplication implements Seriali
ClassPathScanImplementationLookup classPathScanImplementationLookup =
(ClassPathScanImplementationLookup) getServletContext().
getAttribute(EnduserInitializer.CLASSPATH_LOOKUP);
- for (final Class<? extends BaseResource> resource : classPathScanImplementationLookup.getResources()) {
+ for (final Class<? extends AbstractResource> resource : classPathScanImplementationLookup.getResources()) {
Resource annotation = resource.getAnnotation(Resource.class);
if (annotation == null) {
LOG.debug("No @Resource annotation found on {}, ignoring", resource.getName());
} else {
try {
- final BaseResource instance = resource.newInstance();
+ final AbstractResource instance = resource.newInstance();
mountResource(annotation.path(), new ResourceReference(annotation.key()) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/5069b325/client/enduser/src/main/java/org/apache/syncope/client/enduser/init/ClassPathScanImplementationLookup.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/init/ClassPathScanImplementationLookup.java b/client/enduser/src/main/java/org/apache/syncope/client/enduser/init/ClassPathScanImplementationLookup.java
index 2761a19..a482122 100644
--- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/init/ClassPathScanImplementationLookup.java
+++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/init/ClassPathScanImplementationLookup.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.syncope.client.enduser.annotations.Resource;
-import org.apache.syncope.client.enduser.resources.BaseResource;
+import org.apache.wicket.request.resource.AbstractResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
@@ -37,7 +37,7 @@ public class ClassPathScanImplementationLookup {
private static final String DEFAULT_BASE_PACKAGE = "org.apache.syncope.client.enduser";
- private List<Class<? extends BaseResource>> resources;
+ private List<Class<? extends AbstractResource>> resources;
/**
* This method can be overridden by subclasses to customize classpath scan.
@@ -53,7 +53,7 @@ public class ClassPathScanImplementationLookup {
resources = new ArrayList<>();
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
- scanner.addIncludeFilter(new AssignableTypeFilter(BaseResource.class));
+ scanner.addIncludeFilter(new AssignableTypeFilter(AbstractResource.class));
for (BeanDefinition bd : scanner.findCandidateComponents(getBasePackage())) {
try {
@@ -61,9 +61,9 @@ public class ClassPathScanImplementationLookup {
boolean isAbsractClazz = Modifier.isAbstract(clazz.getModifiers());
if (!isAbsractClazz) {
- if (BaseResource.class.isAssignableFrom(clazz)) {
+ if (AbstractResource.class.isAssignableFrom(clazz)) {
if (clazz.isAnnotationPresent(Resource.class)) {
- resources.add((Class<? extends BaseResource>) clazz);
+ resources.add((Class<? extends AbstractResource>) clazz);
} else {
LOG.error("Could not find annotation {} in {}, ignoring",
Resource.class.getName(), clazz.getName());
@@ -77,7 +77,7 @@ public class ClassPathScanImplementationLookup {
resources = Collections.unmodifiableList(resources);
}
- public List<Class<? extends BaseResource>> getResources() {
+ public List<Class<? extends AbstractResource>> getResources() {
return resources;
}