Return-Path: X-Original-To: apmail-clerezza-commits-archive@www.apache.org Delivered-To: apmail-clerezza-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 271B617FEB for ; Sun, 22 Mar 2015 12:11:00 +0000 (UTC) Received: (qmail 4216 invoked by uid 500); 22 Mar 2015 12:11:00 -0000 Delivered-To: apmail-clerezza-commits-archive@clerezza.apache.org Received: (qmail 4149 invoked by uid 500); 22 Mar 2015 12:10:59 -0000 Mailing-List: contact commits-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list commits@clerezza.apache.org Received: (qmail 2931 invoked by uid 99); 22 Mar 2015 12:10:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Mar 2015 12:10:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 419A3E17BD; Sun, 22 Mar 2015 12:10:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: reto@apache.org To: commits@clerezza.apache.org Date: Sun, 22 Mar 2015 12:11:46 -0000 Message-Id: In-Reply-To: <741c867283454c148bfd5214ac43a778@git.apache.org> References: <741c867283454c148bfd5214ac43a778@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [50/51] [partial] clerezza git commit: CLEREZZA-966: started hierarchical project structure, moved platform bundles to platform, only moved RDF artifacts ported to use commons to the rdf folder. http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/maven-ontologies-plugin/LICENSE ---------------------------------------------------------------------- diff --git a/maven-ontologies-plugin/LICENSE b/maven-ontologies-plugin/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/maven-ontologies-plugin/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/maven-ontologies-plugin/pom.xml ---------------------------------------------------------------------- diff --git a/maven-ontologies-plugin/pom.xml b/maven-ontologies-plugin/pom.xml deleted file mode 100644 index f4884a1..0000000 --- a/maven-ontologies-plugin/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - 4.0.0 - - clerezza - org.apache.clerezza - 1.0.0-SNAPSHOT - ../parent - - org.apache.clerezza - maven-ontologies-plugin - maven-plugin - 1.0.0-SNAPSHOT - Clerezza - Maven Ontologies Plugin - - - org.apache.maven - maven-plugin-api - - - junit - junit - test - - - org.slf4j - slf4j-simple - - - org.apache.clerezza - rdf.schemagen - 1.0.0-SNAPSHOT - - - org.apache.maven - maven-project - 2.0.9 - - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java ---------------------------------------------------------------------- diff --git a/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java b/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java deleted file mode 100644 index e67ba00..0000000 --- a/maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java +++ /dev/null @@ -1,203 +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.clerezza.ontologiesplugin; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; -import org.apache.clerezza.rdf.schemagen.SchemaGen; -import org.apache.clerezza.rdf.schemagen.SchemaGenArguments; - -/** - * Generates java source code out of an ontology described in various RDF - * formats. The generated java file contains constants for rdf classes and - * properties described by the ontology. - * - * - * @goal generate - * - * @phase generate-sources - */ -public class OntologyJavaClassCreatorMojo extends AbstractMojo { - - /** - * Path to the root directory - * - * @parameter expression="${basedir}" - */ - private String baseDir; - - /** - * Path to the root dir of the RDF+XML files. Default is - * src/main/ontologies. - * - * @parameter optional - */ - private String resourcePath; - - /** - * Namespace of ontologies - * - * @parameter optional - */ - private Properties namespaceOfOntology; - - /** - * Additional source directories. - * - * @parameter optional - */ - private File [] sources; - - /** - * @parameter expression="${project}" - * @required - * @readonly - */ - private MavenProject project; - - private Map supportedFormats = new HashMap(); - - @Override - public void execute() throws MojoExecutionException { - supportedFormats.put(".nt", "application/n-triples"); - supportedFormats.put(".n3", "text/rdf+n3"); - supportedFormats.put(".rdf", "application/rdf+xml"); - supportedFormats.put(".ttl", "text/turtle"); - supportedFormats.put(".turtle", "text/turtle"); - File file = null; - - if (resourcePath == null) { - resourcePath = baseDir + File.separator + "src" + File.separator - + "main" + File.separator + "ontologies"; - } else if (resourcePath.contains("/")) { - resourcePath = resourcePath.replace("/", File.separator); - } else if (resourcePath.contains("\\")) { - resourcePath = resourcePath.replace("\\", File.separator); - } - file = new File(resourcePath); - checkDir(file); - if(sources != null) { - for ( int i = 0; i < sources.length; ++i ) { - project.addCompileSourceRoot( this.sources[i].getAbsolutePath() ); - getLog().info( "Source directory: " + this.sources[i] + " added." ); - } - } - } - - private void checkDir(File ontologiesDir) { - for (File file : ontologiesDir.listFiles()) { - if (file.isDirectory()) { - checkDir(file); - } else { - String fileName = file.getName(); - int indexOfLastDot = fileName.lastIndexOf("."); - if (indexOfLastDot != -1) { - String fileEnding = fileName.substring(indexOfLastDot); - if (supportedFormats.containsKey(fileEnding)) { - createJavaClassFile(file, fileEnding); - } - } - } - } - } - - private void createJavaClassFile(final File file, final String fileEnding) { - final String fileName = file.getName(); - final String absolutePath = file.getAbsolutePath(); - final String className = fileName.replace(fileEnding, "").toUpperCase(); - final String pathToJavaClass = absolutePath.substring( - absolutePath.indexOf(resourcePath) + resourcePath.length() + 1) - .replace(fileName, ""); - final String packageName = pathToJavaClass.replace(File.separator, ".") - + className; - SchemaGenArguments arguments = new SchemaGenArguments() { - - public URL getSchemaUrl() { - try { - return file.toURI().toURL(); - } catch (MalformedURLException e) { - getLog().error(e.getMessage(), e); - } - return null; - } - - public String getNamespace() { - if (namespaceOfOntology != null - && namespaceOfOntology.containsKey(fileName)) { - return namespaceOfOntology.getProperty(fileName); - } - return null; - } - - public String getFormatIdentifier() { - return supportedFormats.get(fileEnding); - } - - public String getClassName() { - return packageName; - } - }; - - SchemaGen schemaGen; - try { - schemaGen = new SchemaGen(arguments); - } catch (IOException e) { - getLog().error(e.getMessage(), e); - return; - } catch (URISyntaxException e) { - getLog().error(e.getMessage(), e); - return; - } - String rootPath = baseDir + File.separator + "target" - + File.separator + "generated-sources" + File.separator - + "main" + File.separator + "java" + File.separator; - File dir = new File(rootPath + pathToJavaClass); - dir.mkdirs(); - PrintWriter out = null; - try { - out = new PrintWriter(new File(rootPath + pathToJavaClass + className + ".java"), "utf-8"); - } catch (FileNotFoundException e) { - getLog().error(e.getMessage(), e); - return; - } catch (UnsupportedEncodingException e) { - getLog().error(e.getMessage(), e); - throw new RuntimeException("utf-8 not supported!"); - } - try { - schemaGen.writeClass(out); - } finally { - out.flush(); - } - } -} http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/LICENSE ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/LICENSE b/platform.accountcontrolpanel/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/platform.accountcontrolpanel/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml deleted file mode 100644 index 7a7b7f9..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml +++ /dev/null @@ -1,198 +0,0 @@ - - 4.0.0 - - org.apache.clerezza - platform.accountcontrolpanel - 0.10 - - org.apache.clerezza - platform.accountcontrolpanel.core - 1.0.0-SNAPSHOT - bundle - Clerezza - Platform Account Control Panel Core - - - - org.scala-tools - maven-scala-plugin - - - - compile - testCompile - - - - - - - - - - maven-compiler-plugin - - 1.6 - 1.6 - - - - org.apache.felix - maven-bundle-plugin - - - OSGI-INF/serviceComponents.xml - org.apache.clerezza.platform.accountcontrolpanel.* - ${project.groupId}.${project.artifactId} - - - - - org.codehaus.xsite - xsite-maven-plugin - - ${basedir}/src/site/xsite - content/sitemap.xml - templates/skin.html - ${basedir}/target/site/documentation - - - - pre-site - - run - - - - - - - - - javax.ws.rs - jsr311-api - - - org.osgi - org.osgi.core - - - org.osgi - org.osgi.compendium - - - org.apache.clerezza - rdf.core - 0.14 - - - org.apache.clerezza - rdf.scala.utils - 0.4 - - - org.apache.clerezza - rdf.ontologies - 0.12 - - - org.apache.clerezza - jaxrs.utils - 0.9 - - - org.apache.clerezza - platform.typerendering.seedsnipe - 0.7 - - - org.apache.clerezza - platform.typerendering.scalaserverpages - 0.4 - - - org.apache.clerezza - platform.users.core - 0.2 - - - org.apache.clerezza - platform.config - 0.4 - - - org.scala-lang - scala-library - - - org.apache.clerezza - platform.typerendering.scala - 0.2 - - - org.apache.clerezza - platform.globalmenu.api - 0.3 - - - org.apache.clerezza - platform.accountcontrolpanel.ontologies - 0.3 - - - org.apache.clerezza - platform.usermanager - 0.14 - - - org.apache.clerezza - web.fileserver - 0.10 - - - org.apache.clerezza - permissiondescriptions - 0.2 - - - org.apache.clerezza - ssl.keygen.base - 0.6 - - - org.apache.clerezza - platform.security.foafssl.ontologies - 0.2 - - - org.apache.clerezza.ext - slf4j-scala-api - 1.6.3 - - - org.apache.stanbol - org.apache.stanbol.commons.security.core - 0.11.0 - - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js deleted file mode 100644 index 6d0803d..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js +++ /dev/null @@ -1,287 +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. - * -*/ - -/** - * - * Copyright (c) 2008-2010, The University of Manchester, United Kingdom. All - * rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. Redistributions in binary - * form must reproduce the above copyright notice, this list of conditions and - * the following disclaimer in the documentation and/or other materials provided - * with the distribution. Neither the name of the The University of Manchester - * nor the names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * Author........: Bruno Harbulot - * - */ - - - -function createCsrCertEnroll(enrollFactObj, keylength) { - /* - * Creates a CX509EnrollmentWebClassFactory (used to create all the other - * objects). - */ - if (enrollFactObj == null) { - enrollFactObj = new ActiveXObject( - "X509Enrollment.CX509EnrollmentWebClassFactory"); - } - - /* - * Load the information about the providers. - */ - var providerInfosObj = enrollFactObj - .CreateObject("X509Enrollment.CCspInformations"); - providerInfosObj.AddAvailableCsps(); - - /* - * Find the provider of RSA type (sufficient for this example). The type - * numbers for this are 1, 2 and 24. - * http://msdn.microsoft.com/en-us/library/aa379427%28VS.85%29.aspx - */ - var providerType = -1; - var providerName = null; - for ( var i = 0; i < providerInfosObj.Count; i++) { - var providerInfoObj = providerInfosObj.ItemByIndex(i); - switch (providerInfoObj.Type) { - case 1: - case 2: - case 24: - providerType = providerInfoObj.Type; - providerName = providerInfoObj.Name; - break; - default: - } - } - - /* - * Creates a 2048-bit key with this provider. - */ - var privKeyObj = enrollFactObj - .CreateObject("X509Enrollment.CX509PrivateKey"); - privKeyObj.ProviderType = providerInfoObj.Type; - privKeyObj.KeySpec = 1; - privKeyObj.Length = keylength; - // http://msdn.microsoft.com/en-us/library/aa379024%28VS.85%29.aspx - privKeyObj.MachineContext = false; - // http://msdn.microsoft.com/en-us/library/aa379414%28VS.85%29.aspx - privKeyObj.KeyProtection = 2; - // http://msdn.microsoft.com/en-us/library/aa379002%28VS.85%29.aspx - privKeyObj.ExportPolicy = 1; - - /* - * Creates the PKCS#10 object and initialise as a user context. - */ - var pkcs10CsrObj = enrollFactObj - .CreateObject("X509Enrollment.CX509CertificateRequestPkcs10"); - pkcs10CsrObj.InitializeFromPrivateKey(1, privKeyObj, ""); - - /* - * Creates the enrolment object and exports the CSR. - */ - var enrollObj = enrollFactObj - .CreateObject("X509Enrollment.CX509Enrollment"); - enrollObj.InitializeFromRequest(pkcs10CsrObj); - var csr = enrollObj.CreateRequest(1); - csr = "-----BEGIN CERTIFICATE REQUEST-----\r\n" + csr - + "-----END CERTIFICATE REQUEST-----"; - - /* - * Makes the request to the server. - */ - xmlHttpRequest = createRequest(csr); - - /** - * What to do on response - */ - xmlHttpRequest.onreadystatechange = function() { - if (xmlHttpRequest.readyState == 4) { - if (xmlHttpRequest.status == 200) { - /* - * Installs the certificate. - */ - try { - enrollObj.InstallResponse(4, xmlHttpRequest.responseText, - 0, ""); - window.alert("A certificate has been installed."); - } catch (e1) { - try { - enrollObj.InstallResponse(0, - xmlHttpRequest.responseText, 0, ""); - window.alert("A certificate has been installed."); - } catch (e2) { - window - .alert("You're probably using Vista without SP1 or above, in which case you need to add the certificate of this authority as a trusted root certificate (not recommended in general)."); - } - } - } else { - window.alert("The server returned an error status: " - + xmlHttpRequest.status); - } - } - } -} - - -function createRequest(csrString) { - var xmlHttpRequest = new XMLHttpRequest(); - - xmlHttpRequest.open("POST", kgnFloctn, true); - - var params = "webId=" + encodeURIComponent(document.getElementById("webId").value); - params += "&cn=" + encodeURIComponent(document.getElementById("cn").value); - params += "&csr=" + encodeURIComponent(csrString); - params += "&days="+encodeURIComponent(document.getElementById("days").value); - params += "&hours="+encodeURIComponent(document.getElementById("hours").value); - - xmlHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - xmlHttpRequest.setRequestHeader("Content-length", params.length); - xmlHttpRequest.setRequestHeader("Connection", "close"); - - xmlHttpRequest.send(params); - - return xmlHttpRequest; - -} - - -function createCsrXenroll(enrollObj, keylength) { - if (enrollObj == null) { - enrollObj = new ActiveXObject("CEnroll.CEnroll"); - } - - // http://msdn.microsoft.com/en-us/library/aa379941%28VS.85%29.aspx - // CRYPT_EXPORTABLE: 1? - enrollObj.GenKeyFlags = (keylength * 256 * 256) + 1; - enrollObj.KeySpec = 2; - - var csr = enrollObj.createPKCS10("", ""); - csr = "-----BEGIN CERTIFICATE REQUEST-----\r\n" + csr - + "-----END CERTIFICATE REQUEST-----"; - - xmlHttpRequest = createRequest(csr); - - xmlHttpRequest.onreadystatechange = function() { - if (xmlHttpRequest.readyState == 4) { - if (xmlHttpRequest.status == 200) { - enrollObj.acceptPKCS7(xmlHttpRequest.responseText); - window.alert("A certificate has been installed."); - } else { - window.alert("The server returned an error status: " - + xmlHttpRequest.status); - } - } - } -} - -function createCsr() { - var keystrengthSelectElem = document.getElementById("keylength"); - var keylength = keystrengthSelectElem.value; - - var enrollFactObj = null; - try { - enrollFactObj = new ActiveXObject( - "X509Enrollment.CX509EnrollmentWebClassFactory"); - } catch (e) { - } - - if (enrollFactObj != null) { - createCsrCertEnroll(enrollFactObj, keylength); - } else { - var enrollObj = null; - try { - enrollObj = new ActiveXObject("CEnroll.CEnroll"); - } catch (e) { - } - if (enrollObj != null) { - createCsrXenroll(enrollObj, keylength); - } else { - window.alert("ActiveX certificate creation not supported or not enabled."); - } - } -} -// kgnFloctn needs to be calculated first -var kgnFloctn = "errorKeyGenLoctn"; -function configurePage() { - kgnFloctn = document.getElementById("keygenform").getAttribute("action"); - - var keygenElem = document.getElementById("spkac"); - - if (navigator.appName == "Microsoft Internet Explorer") { - var keygenFormElem = document.getElementById("keygenform"); - keygenFormElem.removeAttribute("action"); - keygenFormElem.removeAttribute("method"); - - /* - * Try the ActiveX approach, assume Internet Explorer. - */ - - var iehelptextElem = document.getElementById("iehelptext"); - iehelptextElem.style.display = "block"; - - var submitButtonElem = document.getElementById("keygensubmit"); - var newSumbitButtonElem = document.createElement("input"); - newSumbitButtonElem.setAttribute("type", "button"); - newSumbitButtonElem.setAttribute("value", "Submit"); - submitButtonElem.parentNode.replaceChild(newSumbitButtonElem, - submitButtonElem); - submitButtonElem = newSumbitButtonElem; - - if (submitButtonElem.attachEvent) { - submitButtonElem.attachEvent("onclick", createCsr); - } else { - submitButtonElem.setAttribute("onclick", "createCsr()"); - } - - var keystrengthSelectElem = document.createElement("select"); - keystrengthSelectElem.setAttribute("id", "keylength"); - keystrengthSelectElem.setAttribute("name", "keylength"); - var optionElem; - optionElem = document.createElement("option"); - optionElem.setAttribute("value", "1024"); - optionElem.appendChild(document.createTextNode("1024")); - keystrengthSelectElem.appendChild(optionElem); - optionElem = document.createElement("option"); - optionElem.setAttribute("value", "2048"); - optionElem.appendChild(document.createTextNode("2048")); - keystrengthSelectElem.appendChild(optionElem); - var keystrengthTdElem = document.getElementById("keystrenghtd"); - keystrengthTdElem.appendChild(keystrengthSelectElem); - } -} http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js deleted file mode 100644 index 6ad1db2..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js +++ /dev/null @@ -1,64 +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. - * -*/ - -$(document).ready(function() { - $('#newWebIdButton').click(function() { - $("#newOrExistingSelection").css({display: "none"}) - $("#createNewWebId").css({display: "block"}) - }); - $("#existingWebIdButton").click(function() { - $("#newOrExistingSelection").css({display: "none"}) - $("#setExistingWebId").css({display: "block"}) - }); - $("#keygenform").submit(function() { - return spkacFix(); - }); -}); - -var crmfObject; -function setCRMFRequest() { - var hiddenField = $(""); - $("#keygenform").append(hiddenField) - //var formContents = $("#keygenform").serialize(); - //var newContents = jQuery.extend({}, formContents); - hiddenField.val(crmfObject.request) - $("#keygenform").submit() -} - -function spkacFix() { - - if ($("#spkac").val()) { - return true; - } else { - if ($("#crmf").val()) { - return true; - } - //alert("fix needed by firefox in xhtml mode") - crmfObject = crypto.generateCRMFRequest( - 'CN=Ignored', - "regToken", "authenticator", // not sure - null, // base-64 cert for key - // escrow. set this to null - "setCRMFRequest();", // callback - 2048, null, "rsa-dual-use"); // key parameters - return false; - } -} http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css deleted file mode 100644 index 64e52c4..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css +++ /dev/null @@ -1,51 +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. - * -*/ - -#associateSelection { - width: 80% -} -#createNewWebId { - display: none -} -#setExistingWebId { - display: none -} -/* we need to override a table td:first-child in /style/table.css */ -td.propvalue:first-child { - text-align: right; -} - -td.formlabel:first-child { - width: 10em; - text-align: right; -} - -td.multiline:first-child { - vertical-align: text-top; -} - -img.mugshot { - width: 80px; -} - -td.personInABox { - width: 100px; -} http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml deleted file mode 100644 index 8e50481..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala deleted file mode 100644 index 5d41410..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala +++ /dev/null @@ -1,75 +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.clerezza.platform.accountcontrolpanel - -import java.util.HashSet -import java.util.Set -import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider -import org.apache.clerezza.permissiondescriptions.PermissionDescripton -import org.apache.felix.scr.annotations.Component -import org.apache.felix.scr.annotations.Service - -/** - * PermissionDescriptionsProvider implementation that provides - * PermissionDescriptons of Account Control Panel permissions. - * The following permissions are described: - *
    - *
  • org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission
  • - *
  • org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission
  • - *
  • org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission
  • - *
- * - * @author mir - */ -object AcpPermissionDescriptionsProvider { - private val ACP_PERMISSION_DESCRIPTIONS: Set[PermissionDescripton] = new HashSet[PermissionDescripton] - ACP_PERMISSION_DESCRIPTIONS.add( - new PermissionDescripton("Change Own Password Permission", - "Grants permission to the user to change its own password", - null, classOf[ChangePasswordPermission], - "(org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission \"{username}\" \"\")" - ) - ) - - ACP_PERMISSION_DESCRIPTIONS.add( - new PermissionDescripton("Access Own Account Control Panel Permission", - "Grants permission to the user to access its own Account Control Panel", - null, classOf[AccountControlPanelAppPermission], - "(org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission \"{username}\" \"\")" - ) - ) - - ACP_PERMISSION_DESCRIPTIONS.add( - new PermissionDescripton("Bundle Upload Permission", - "Grants permission to the user to upload a bundle", - null, classOf[AccountControlPanelAppPermission], - "(org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission \"{username}\" \"\")" - ) - ) - -} - -class AcpPermissionDescriptionsProvider extends PermissionDescriptionsProvider { - - import AcpPermissionDescriptionsProvider._ - - def getPermissionDescriptors: Set[PermissionDescripton] = { - return ACP_PERMISSION_DESCRIPTIONS - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala ---------------------------------------------------------------------- diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala deleted file mode 100644 index ce09780..0000000 --- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala +++ /dev/null @@ -1,71 +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.clerezza.platform.accountcontrolpanel - -import java.io.UnsupportedEncodingException -import java.net.URLEncoder -import java.security.AccessControlContext -import java.security.AccessControlException -import java.security.AccessController -import java.security.Principal -import java.security.PrivilegedActionException -import java.security.PrivilegedExceptionAction -import java.util.HashSet -import java.util.Iterator -import java.util.Set -import javax.security.auth.Subject -import org.apache.felix.scr.annotations.Component -import org.apache.felix.scr.annotations.Service -import org.apache.clerezza.platform.globalmenu.GlobalMenuItem -import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider -import org.apache.stanbol.commons.security.UserUtil - -/** - * - * Provides menu-item to profile or settings-panel or none depending on user - * permissions. - * - * @author reto - */ -class MenuItemProvider extends GlobalMenuItemsProvider { - def getMenuItems: Set[GlobalMenuItem] = { - var items: Set[GlobalMenuItem] = new HashSet[GlobalMenuItem] - var userName: String = UserUtil.getCurrentUserName - if (userName != null) { - try { - AccessController.checkPermission(new AccountControlPanelAppPermission(userName, "")) - } - catch { - case e: AccessControlException => { - return items - } - } - try { - var path: String = "/user/" + URLEncoder.encode(userName, "utf-8") + "/control-panel" - items.add(new GlobalMenuItem(path, "ACP", "Account Control Panel", 5, "Administration")) - } - catch { - case e: UnsupportedEncodingException => { - throw new RuntimeException(e) - } - } - } - return items - } -} \ No newline at end of file