You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2013/02/27 15:37:25 UTC
[1/3] git commit: MARMOTTA-105: renamed marmotta-ssl (and merged it
into core) and some more cleanup
MARMOTTA-105: renamed marmotta-ssl (and merged it into core)
and some more cleanup
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/2713e403
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/2713e403
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/2713e403
Branch: refs/heads/master
Commit: 2713e4032e27301be3d23db59a9e881afc57de5f
Parents: 75065e5
Author: Jakob Frank <ja...@apache.org>
Authored: Wed Feb 27 15:26:20 2013 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Wed Feb 27 15:33:08 2013 +0100
----------------------------------------------------------------------
.../js/widgets/configurator/configurator.coffee | 1 -
.../marmotta/platform/core/api/ssl/SSLService.java | 34 ++++++
.../platform/core/services/ssl/SSLServiceImpl.java | 89 +++++++++++++++
.../services/kiwi.core.api.io.RdfHtmlWriter | 1 -
.../at/newmedialab/lmf/ssl/api/SSLService.java | 34 ------
.../lmf/ssl/services/SSLServiceImpl.java | 88 --------------
6 files changed, 123 insertions(+), 124 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2713e403/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee b/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
index a2605f7..05f133c 100644
--- a/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
+++ b/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
@@ -53,7 +53,6 @@ class Model
else if value.type.match /java.lang.Integer.*/ then clazz = IntegerProperty
else if value.type.match /java.lang.String.*/ then clazz = StringProperty
else if value.type.match /java.net.URL.*/ then clazz = URIProperty
- else if value.type.match /at.newmedialab.lmf.SolrProgram.*/ then clazz = SolrProgramProperty
else if value.type.match /java.util.List.*/ then clazz = ListProperty
else clazz = Property
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2713e403/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/ssl/SSLService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/ssl/SSLService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/ssl/SSLService.java
new file mode 100644
index 0000000..2ed117d
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/ssl/SSLService.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (C) 2013 The Apache Software Foundation.
+ *
+ * Licensed 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.marmotta.platform.core.api.ssl;
+
+import org.apache.marmotta.platform.core.events.ConfigurationServiceInitEvent;
+
+/**
+ * A service managing the configuration of the SSL context needed for establishing SSL connections.
+ * <p/>
+ * Author: Sebastian Schaffert
+ */
+public interface SSLService {
+
+ /**
+ * React on the initialisation of the configuration service.
+ *
+ * @param e the event fired by the ConfigurationService
+ */
+ public void configurationServiceInitialised(ConfigurationServiceInitEvent e);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2713e403/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/ssl/SSLServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/ssl/SSLServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/ssl/SSLServiceImpl.java
new file mode 100644
index 0000000..90bac7c
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/ssl/SSLServiceImpl.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (C) 2013 The Apache Software Foundation.
+ *
+ * Licensed 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.marmotta.platform.core.services.ssl;
+
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.apache.marmotta.platform.core.api.ssl.SSLService;
+import org.apache.marmotta.platform.core.events.ConfigurationServiceInitEvent;
+import org.slf4j.Logger;
+
+/**
+ * A service managing the configuration of the SSL context needed for establishing SSL connections.
+ * <p/>
+ * Author: Sebastian Schaffert
+ */
+@ApplicationScoped
+public class SSLServiceImpl implements SSLService {
+
+ @Inject
+ private Logger log;
+
+
+ /**
+ * React on the initialisation of the configuration service.
+ *
+ * @param e the event fired by the ConfigurationService
+ */
+ @Override
+ public void configurationServiceInitialised(ConfigurationServiceInitEvent e) {
+ initSSLconfiguration();
+ }
+
+
+ private void initSSLconfiguration() {
+ log.info("SETUP: initialising SSL configuration ...");
+ /* Nervige SSL configuration */
+ SSLContext ctx = null;
+ try {
+ ctx = SSLContext.getInstance("TLS");
+ ctx.init(new KeyManager[0], new TrustManager[] { new DefaultTrustManager() }, new SecureRandom());
+ SSLContext.setDefault(ctx);
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } catch (KeyManagementException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ private static class DefaultTrustManager implements X509TrustManager {
+ @Override
+ public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
+ }
+
+ @Override
+ public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
+ }
+
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2713e403/platform/marmotta-core/src/main/resources/META-INF/services/kiwi.core.api.io.RdfHtmlWriter
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/META-INF/services/kiwi.core.api.io.RdfHtmlWriter b/platform/marmotta-core/src/main/resources/META-INF/services/kiwi.core.api.io.RdfHtmlWriter
deleted file mode 100644
index 49259fe..0000000
--- a/platform/marmotta-core/src/main/resources/META-INF/services/kiwi.core.api.io.RdfHtmlWriter
+++ /dev/null
@@ -1 +0,0 @@
-at.newmedialab.templating.writer.RDFHtmlExtendedWriter
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2713e403/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/api/SSLService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/api/SSLService.java b/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/api/SSLService.java
deleted file mode 100644
index 7ace8f6..0000000
--- a/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/api/SSLService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (C) 2013 The Apache Software Foundation.
- *
- * Licensed 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 at.newmedialab.lmf.ssl.api;
-
-import org.apache.marmotta.platform.core.events.ConfigurationServiceInitEvent;
-
-/**
- * A service managing the configuration of the SSL context needed for establishing SSL connections.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public interface SSLService {
-
- /**
- * React on the initialisation of the configuration service.
- *
- * @param e the event fired by the ConfigurationService
- */
- public void configurationServiceInitialised(ConfigurationServiceInitEvent e);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2713e403/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/services/SSLServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/services/SSLServiceImpl.java b/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/services/SSLServiceImpl.java
deleted file mode 100644
index 698273f..0000000
--- a/platform/marmotta-ssl/src/main/java/at/newmedialab/lmf/ssl/services/SSLServiceImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (C) 2013 The Apache Software Foundation.
- *
- * Licensed 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 at.newmedialab.lmf.ssl.services;
-
-import at.newmedialab.lmf.ssl.api.SSLService;
-import org.apache.marmotta.platform.core.events.ConfigurationServiceInitEvent;
-import org.slf4j.Logger;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-/**
- * A service managing the configuration of the SSL context needed for establishing SSL connections.
- * <p/>
- * Author: Sebastian Schaffert
- */
-@ApplicationScoped
-public class SSLServiceImpl implements SSLService {
-
- @Inject
- private Logger log;
-
-
- /**
- * React on the initialisation of the configuration service.
- *
- * @param e the event fired by the ConfigurationService
- */
- @Override
- public void configurationServiceInitialised(ConfigurationServiceInitEvent e) {
- initSSLconfiguration();
- }
-
-
- private void initSSLconfiguration() {
- log.info("SETUP: initialising SSL configuration ...");
- /* Nervige SSL configuration */
- SSLContext ctx = null;
- try {
- ctx = SSLContext.getInstance("TLS");
- ctx.init(new KeyManager[0], new TrustManager[] { new DefaultTrustManager() }, new SecureRandom());
- SSLContext.setDefault(ctx);
- } catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
- } catch (KeyManagementException e) {
- e.printStackTrace();
- }
- }
-
-
- private static class DefaultTrustManager implements X509TrustManager {
- @Override
- public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return null;
- }
- }
-
-}