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 2015/02/13 12:44:53 UTC
[49/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java
deleted file mode 100644
index dd06e47..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java
+++ /dev/null
@@ -1,100 +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.syncope.buildtools;
-
-import java.io.PrintWriter;
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.jndi.CoreContextFactory;
-
-public class ApacheDSRootDseServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1514567335969002735L;
-
- @Override
- protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException {
-
- try {
- resp.setContentType("text/plain");
- PrintWriter out = resp.getWriter();
-
- out.println("*** ApacheDS RootDSE ***\n");
-
- DirContext ctx = new InitialDirContext(this.createEnv());
-
- SearchControls ctls = new SearchControls();
- ctls.setReturningAttributes(new String[] { "*", "+" });
- ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
-
- NamingEnumeration<SearchResult> result = ctx.search("", "(objectClass=*)", ctls);
- if (result.hasMore()) {
- SearchResult entry = result.next();
- Attributes as = entry.getAttributes();
-
- NamingEnumeration<String> ids = as.getIDs();
- while (ids.hasMore()) {
- String id = ids.next();
- Attribute attr = as.get(id);
- for (int i = 0; i < attr.size(); ++i) {
- out.println(id + ": " + attr.get(i));
- }
- }
- }
- ctx.close();
-
- out.flush();
- } catch (Exception e) {
- throw new ServletException(e);
- }
- }
-
- /**
- * Creates an environment configuration for JNDI access.
- */
- private Hashtable<Object, Object> createEnv() {
- // Fetch directory service from servlet context
- ServletContext servletContext = this.getServletContext();
- DirectoryService directoryService = (DirectoryService) servletContext.getAttribute(DirectoryService.JNDI_KEY);
-
- Hashtable<Object, Object> env = new Hashtable<Object, Object>();
- env.put(DirectoryService.JNDI_KEY, directoryService);
- env.put(Context.PROVIDER_URL, "");
- env.put(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
-
- env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
- env.put(Context.SECURITY_CREDENTIALS, "secret");
- env.put(Context.SECURITY_AUTHENTICATION, "simple");
-
- return env;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
deleted file mode 100644
index 92e7564..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
+++ /dev/null
@@ -1,254 +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.syncope.buildtools;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.List;
-import java.util.regex.Pattern;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.DefaultDirectoryService;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.core.partition.ldif.LdifPartition;
-import org.apache.directory.server.core.schema.SchemaPartition;
-import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.entry.ServerEntry;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Start and stop an embedded ApacheDS instance alongside with Servlet Context.
- */
-public class ApacheDSStartStopListener implements ServletContextListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(ApacheDSStartStopListener.class);
-
- private DirectoryService service;
-
- private LdapServer server;
-
- /**
- * Initialize the schema manager and add the schema partition to directory service.
- *
- * @throws Exception if the schema LDIF files are not found on the classpath
- */
- private void initSchemaPartition(final ServletContext servletContext) throws Exception {
- final Pattern sharedLdapSchemaManagerPattern = Pattern.compile(".*apacheds-all-.*\\.jar");
- File found = null;
- for (final File jarFile : new File(servletContext.getRealPath("/WEB-INF/lib")).listFiles()) {
- if (sharedLdapSchemaManagerPattern.matcher(jarFile.getAbsolutePath()).matches()) {
- found = jarFile;
- }
- }
- if (found == null) {
- throw new RuntimeException("No apache-ds-all JAR found under WEB-INF/lib");
- }
-
- final SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();
-
- // Init the LdifPartition
- final LdifPartition ldifPartition = new LdifPartition();
- final String workingDirectory = service.getWorkingDirectory().getPath();
- ldifPartition.setWorkingDirectory(workingDirectory + "/schema");
-
- // Extract the schema on disk (a brand new one) and load the registries
- final File schemaRepository = new File(workingDirectory, "schema");
- final SchemaLdifExtractor extractor = new JarSchemaLdifExtractor(new File(workingDirectory), found);
- extractor.extractOrCopy(true);
-
- schemaPartition.setWrappedPartition(ldifPartition);
-
- final SchemaLoader loader = new LdifSchemaLoader(schemaRepository);
- final SchemaManager schemaManager = new DefaultSchemaManager(loader);
- service.setSchemaManager(schemaManager);
-
- // Enable nis so that posixAccount and posixGroup are available
- schemaManager.enable("nis");
- // We have to load the schema now, otherwise we won't be able
- // to initialize the Partitions, as we won't be able to parse
- // and normalize their suffix DN
- schemaManager.loadAllEnabled();
-
- schemaPartition.setSchemaManager(schemaManager);
-
- final List<Throwable> errors = schemaManager.getErrors();
- if (!errors.isEmpty()) {
- throw new RuntimeException("Schema load failed : " + errors);
- }
- }
-
- /**
- * Add a new partition to the server.
- *
- * @param partitionId The partition Id
- * @param partitionDn The partition DN
- * @return The newly added partition
- * @throws Exception If the partition can't be added
- */
- private Partition addPartition(final String partitionId, final String partitionDn) throws Exception {
- // Create a new partition named 'foo'.
- final JdbmPartition partition = new JdbmPartition();
- partition.setId(partitionId);
- partition.setPartitionDir(new File(service.getWorkingDirectory(), partitionId));
- partition.setSuffix(partitionDn);
- service.addPartition(partition);
-
- return partition;
- }
-
- /**
- * Add a new set of index on the given attributes.
- *
- * @param partition The partition on which we want to add index
- * @param attrs The list of attributes to index
- */
- private void addIndex(final Partition partition, final String... attrs) {
- // Index some attributes on the apache partition
- final HashSet<Index<?, ServerEntry, Long>> indexedAttributes = new HashSet<Index<?, ServerEntry, Long>>();
- for (String attribute : attrs) {
- indexedAttributes.add(new JdbmIndex<String, ServerEntry>(attribute));
- }
-
- ((JdbmPartition) partition).setIndexedAttributes(indexedAttributes);
- }
-
- /**
- * Initialize the server. It creates the partition, adds the index, and injects the context entries for the created
- * partitions.
- *
- * @param workDir the directory to be used for storing the data
- * @param loadDefaultContent if default content should be loaded
- * @throws Exception if there were some problems while initializing
- */
- private void initDirectoryService(final ServletContext servletContext, final File workDir,
- final boolean loadDefaultContent) throws Exception {
-
- // Initialize the LDAP service
- service = new DefaultDirectoryService();
- service.setWorkingDirectory(workDir);
-
- // first load the schema
- initSchemaPartition(servletContext);
-
- // then the system partition
- // this is a MANDATORY partition
- final Partition systemPartition = addPartition("system", ServerDNConstants.SYSTEM_DN);
- service.setSystemPartition(systemPartition);
-
- // Disable the ChangeLog system
- service.getChangeLog().setEnabled(false);
- service.setDenormalizeOpAttrsEnabled(true);
-
- // Now we can create as many partitions as we need
- final Partition ispPartition = addPartition("isp", "o=isp");
- addIndex(ispPartition, "objectClass", "ou", "uid");
-
- // And start the service
- service.startup();
-
- // Finally, load content LDIF
- if (loadDefaultContent) {
- final LdifURLLoader contentLoader = new LdifURLLoader(service.getAdminSession(),
- servletContext.getResource("/WEB-INF/classes/content.ldif"));
- final int numEntries = contentLoader.execute();
- LOG.info("Successfully created {} entries", numEntries);
- }
- }
-
- /**
- * Startup ApacheDS embedded.
- *
- * @param sce ServletContext event
- */
- @Override
- public void contextInitialized(final ServletContextEvent sce) {
- File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
- workDir = new File(workDir, "server-work");
-
- final boolean loadDefaultContent = !workDir.exists();
-
- if (loadDefaultContent && !workDir.mkdirs()) {
- throw new RuntimeException("Could not create " + workDir.getAbsolutePath());
- }
-
- Entry result;
- try {
- initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent);
-
- server = new LdapServer();
- server.setTransports(
- new TcpTransport(Integer.valueOf(sce.getServletContext().getInitParameter("testds.port"))));
- server.setDirectoryService(service);
-
- server.start();
-
- // store directoryService in context to provide it to servlets etc.
- sce.getServletContext().setAttribute(DirectoryService.JNDI_KEY, service);
-
- result = service.getAdminSession().lookup(new DN("o=isp"));
- } catch (Exception e) {
- LOG.error("Fatal error in context init", e);
- throw new RuntimeException(e);
- }
-
- if (result == null) {
- throw new RuntimeException("Base DN not found");
- } else {
- LOG.info("ApacheDS startup completed succesfully");
- }
- }
-
- /**
- * Shutdown ApacheDS embedded.
- *
- * @param scEvent ServletContext event
- */
- @Override
- public void contextDestroyed(final ServletContextEvent scEvent) {
- try {
- if (server != null) {
- server.stop();
- }
- if (service != null) {
- service.shutdown();
- }
- } catch (Exception e) {
- LOG.error("Fatal error in context shutdown", e);
- throw new RuntimeException(e);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
deleted file mode 100644
index 9ef2d42..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
+++ /dev/null
@@ -1,103 +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.syncope.buildtools;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import org.identityconnectors.common.security.SecurityUtil;
-import org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager;
-import org.identityconnectors.framework.server.ConnectorServer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConnIdStartStopListener implements ServletContextListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(ConnIdStartStopListener.class);
-
- private static final String SERVER = "ConnIdConnectorServer";
-
- /**
- * Build list of URLs from bundles available under /WEB-INF/lib
- *
- * @param ctx ServletContext needed for getting ConnId jar bundles URLs
- */
- private List<URL> getBundleURLs(final ServletContext ctx) {
- final List<URL> bundleURLs = new ArrayList<URL>();
-
- for (String bundleFile : new String[] {
- "testconnectorserver.soap.bundle",
- "testconnectorserver.db.bundle",
- "testconnectorserver.csvdir.bundle",
- "testconnectorserver.ldap.bundle"}) {
-
- URL url = null;
- try {
- url = ctx.getResource("/WEB-INF/lib/" + ctx.getInitParameter(bundleFile));
- } catch (MalformedURLException e) {
- // ignore
- }
- if (url != null) {
- bundleURLs.add(url);
- }
- }
-
- LOG.info("ConnId bundles loaded: " + bundleURLs);
-
- return bundleURLs;
- }
-
- @Override
- public void contextInitialized(final ServletContextEvent sce) {
- final ConnectorServer _server = ConnectorServer.newInstance();
-
- try {
- _server.setPort(Integer.parseInt(
- sce.getServletContext().getInitParameter("testconnectorserver.port")));
-
- _server.setBundleURLs(getBundleURLs(sce.getServletContext()));
-
- _server.setKeyHash(SecurityUtil.computeBase64SHA1Hash(
- sce.getServletContext().getInitParameter("testconnectorserver.key").toCharArray()));
-
- _server.start();
- LOG.info("ConnId connector server listening on port " + _server.getPort());
- } catch (Exception e) {
- LOG.error("Could not start ConnId connector server", e);
- }
-
- sce.getServletContext().setAttribute(SERVER, _server);
- }
-
- @Override
- public void contextDestroyed(final ServletContextEvent sce) {
- final ConnectorServer _server = (ConnectorServer) sce.getServletContext().getAttribute(SERVER);
- if (_server != null && _server.isStarted()) {
- _server.stop();
- }
- ThreadClassLoaderManager.clearInstance();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java b/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
deleted file mode 100644
index ce1a87f..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
+++ /dev/null
@@ -1,100 +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.syncope.buildtools;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.sql.DataSource;
-import org.h2.tools.Server;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jdbc.datasource.DataSourceUtils;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-/**
- * Utility servlet context listener managing H2 test server instance (to be used as external resource).
- */
-public class H2StartStopListener implements ServletContextListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(H2StartStopListener.class);
-
- private static final String H2_TESTDB = "h2TestDb";
-
- @Override
- public void contextInitialized(final ServletContextEvent sce) {
- final ServletContext context = sce.getServletContext();
-
- try {
- final Server h2TestDb = new Server();
- h2TestDb.runTool("-tcp", "-tcpDaemon", "-web", "-webDaemon",
- "-webPort", sce.getServletContext().getInitParameter("testdb.webport"));
-
- context.setAttribute(H2_TESTDB, h2TestDb);
- } catch (SQLException e) {
- LOG.error("Could not start H2 test db", e);
- }
-
- final WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
- final DataSource datasource = ctx.getBean(DataSource.class);
-
- Connection conn = null;
- Statement stmt = null;
- try {
- conn = DataSourceUtils.getConnection(datasource);
- stmt = conn.createStatement();
- stmt.executeUpdate("RUNSCRIPT FROM 'classpath:/testdb.sql'");
-
- LOG.info("Database successfully initialized");
- } catch (Exception e) {
- LOG.error("While loading data into testdb", e);
- } finally {
- if (stmt != null) {
- try {
- stmt.close();
- } catch (SQLException e) {
- }
- }
- if (conn != null) {
- try {
- conn.close();
- } catch (SQLException e) {
- }
- }
- DataSourceUtils.releaseConnection(conn, datasource);
- }
- }
-
- @Override
- public void contextDestroyed(final ServletContextEvent sce) {
- final ServletContext context = sce.getServletContext();
-
- final Server h2TestDb = (Server) context.getAttribute(H2_TESTDB);
- if (h2TestDb != null) {
- h2TestDb.shutdown();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java b/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java
deleted file mode 100644
index 682954d..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.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.syncope.buildtools;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Pattern;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
-
-/**
- * Extracts LDIF files for the schema repository onto a destination directory,
- * from specified JAR.
- */
-public class JarSchemaLdifExtractor implements SchemaLdifExtractor {
-
- private static final String SCHEMA_SUBDIR = "schema";
-
- private boolean extracted;
-
- private final File outputDirectory;
-
- private final File schemaDirectory;
-
- private final File jarFile;
-
- /**
- * Creates an extractor which deposits files into the specified output
- * directory.
- *
- * @param outputDirectory the directory where the schema root is extracted
- * @param jarFile the JAR file
- */
- public JarSchemaLdifExtractor(final File outputDirectory, final File jarFile) throws IOException {
-
- this.outputDirectory = outputDirectory;
- this.schemaDirectory = new File(outputDirectory, SCHEMA_SUBDIR);
- this.jarFile = jarFile;
-
- if (!outputDirectory.exists() && !outputDirectory.mkdir()) {
- throw new IOException("Failed to create outputDirectory: " + outputDirectory);
- }
-
- extracted = !schemaDirectory.exists();
- }
-
- /**
- * Gets whether or not schema folder has been created or not.
- *
- * @return true if schema folder has already been extracted.
- */
- @Override
- public boolean isExtracted() {
- return extracted;
- }
-
- /**
- * Extracts the LDIF files from a Jar file.
- *
- * @param overwrite over write extracted structure if true, false otherwise
- * @throws IOException if schema already extracted and on IO errors
- */
- @Override
- public void extractOrCopy(final boolean overwrite) throws IOException {
-
- if (!outputDirectory.exists() && !outputDirectory.mkdir()) {
- throw new IOException("Could not create " + outputDirectory.getAbsolutePath());
- }
-
- if (!schemaDirectory.exists()) {
- if (!schemaDirectory.mkdir()) {
- throw new IOException("Could not create " + schemaDirectory.getAbsolutePath());
- }
- } else if (!overwrite) {
- throw new IOException(I18n.err(I18n.ERR_08001, schemaDirectory.getAbsolutePath()));
- }
-
- final Pattern pattern = Pattern.compile(".*schema/ou=schema.*\\.ldif");
- for (String entry : getResources(pattern)) {
- extractFromJar(entry);
- }
- }
-
- /**
- * Extracts the LDIF files from a Jar file or copies exploded LDIF
- * resources without overwriting the resources if the schema has
- * already been extracted.
- *
- * @throws IOException if schema already extracted and on IO errors
- */
- @Override
- public void extractOrCopy() throws IOException {
-
- extractOrCopy(false);
- }
-
- private Set<String> getResources(final Pattern pattern) throws IOException {
-
- final Set<String> result = new HashSet<String>();
-
- final ZipFile zipFile = new ZipFile(jarFile);
- final Enumeration<? extends ZipEntry> entries = zipFile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = entries.nextElement();
- if (pattern.matcher(entry.getName()).matches()) {
- result.add(entry.getName());
- }
- }
- zipFile.close();
-
- return result;
- }
-
- /**
- * Extracts the LDIF schema resource from a Jar.
- *
- * @param resource the LDIF schema resource
- * @throws IOException if there are IO errors
- */
- private void extractFromJar(final String resource) throws IOException {
-
- final InputStream in = DefaultSchemaLdifExtractor.getUniqueResourceAsStream(resource,
- "LDIF file in schema repository");
- try {
- final File destination = new File(outputDirectory, resource);
-
- /*
- * Do not overwrite an LDIF file if it has already been extracted.
- */
- if (destination.exists()) {
- return;
- }
-
- if (!destination.getParentFile().exists() && !destination.getParentFile().mkdirs()) {
-
- throw new IOException("Could not create " + destination.getParentFile().getAbsolutePath());
- }
-
- final FileOutputStream out = new FileOutputStream(destination);
- final byte[] buf = new byte[512];
- try {
- while (in.available() > 0) {
- final int readCount = in.read(buf);
- out.write(buf, 0, readCount);
- }
- out.flush();
- } finally {
- out.close();
- }
- } finally {
- in.close();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java b/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
deleted file mode 100644
index 42b28dd..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
+++ /dev/null
@@ -1,127 +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.syncope.buildtools;
-
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.List;
-import javax.naming.NamingException;
-import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.shared.ldap.entry.DefaultServerEntry;
-import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.DN;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Support for commands to load an LDIF from an URL into a DirContext.
- *
- * Inspired from <tt>org.apache.directory.server.protocol.shared.store.LdifFileLoader</tt>.
- */
-public class LdifURLLoader {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(LdifURLLoader.class);
-
- /**
- * A handle on the top core session.
- */
- protected CoreSession coreSession;
-
- /**
- * The LDIF URL.
- */
- protected URL ldif;
-
- /**
- * The total count of entries loaded.
- */
- private int count;
-
- public LdifURLLoader(final CoreSession coreSession, final URL ldif) {
- this.coreSession = coreSession;
- this.ldif = ldif;
- }
-
- /**
- * Opens the LDIF file and loads the entries into the context.
- *
- * @return The count of entries created.
- */
- public int execute() {
- DN rdn = null;
- InputStream in = null;
-
- try {
- in = ldif.openStream();
-
- for (final LdifEntry ldifEntry : new LdifReader(in)) {
- final DN dn = ldifEntry.getDn();
-
- if (ldifEntry.isEntry()) {
- final Entry entry = ldifEntry.getEntry();
- try {
- coreSession.lookup(dn);
- LOG.info("Found {}, will not create.", rdn);
- } catch (Exception e) {
- try {
- coreSession.add(new DefaultServerEntry(
- coreSession.getDirectoryService().getSchemaManager(), entry));
- count++;
- LOG.info("Created {}.", rdn);
- } catch (NamingException ne) {
- LOG.info("Could not create entry {}", entry, ne);
- }
- }
- } else {
- //modify
- final List<Modification> items = ldifEntry.getModificationItems();
- try {
- coreSession.modify(dn, items);
- LOG.info("Modified: " + dn + " with modificationItems: " + items);
- } catch (NamingException e) {
- LOG.info("Could not modify: " + dn + " with modificationItems: " + items, e);
- }
- }
- }
- } catch (FileNotFoundException fnfe) {
- LOG.error(I18n.err(I18n.ERR_173));
- } catch (Exception ioe) {
- LOG.error(I18n.err(I18n.ERR_174), ioe);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (Exception e) {
- LOG.error(I18n.err(I18n.ERR_175), e);
- }
- }
- }
-
- return count;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
deleted file mode 100644
index f1b690a..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
+++ /dev/null
@@ -1,105 +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.syncope.buildtools;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Just used to verify a connector request timeout.
- */
-public class ServiceTimeoutServlet extends HttpServlet {
-
- private static final long serialVersionUID = -1467488672392710293L;
-
- /**
- * Processes requests for both HTTP
- * <code>GET</code> and
- * <code>POST</code> methods.
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- protected void processRequest(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
-
- response.setContentType("text/html;charset=UTF-8");
-
- try {
- Thread.sleep(60000);
- } catch (InterruptedException ignore) {
- // ignore
- }
-
- final PrintWriter out = response.getWriter();
- try {
- out.println("OK");
- } finally {
- out.close();
- }
- }
-
- /**
- * Handles the HTTP
- * <code>GET</code> method.
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- @Override
- protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
-
- processRequest(request, response);
- }
-
- /**
- * Handles the HTTP
- * <code>POST</code> method.
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- @Override
- protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
-
- processRequest(request, response);
- }
-
- /**
- * Returns a short description of the servlet.
- *
- * @return a String containing servlet description
- */
- @Override
- public String getServletInfo() {
- return "Service Timeout";
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/applicationContext.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/applicationContext.xml b/build-tools/src/main/resources/applicationContext.xml
deleted file mode 100644
index d89e067..0000000
--- a/build-tools/src/main/resources/applicationContext.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="testDataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="${testdb.driver}"/>
- <property name="url" value="${testdb.url}"/>
- <property name="username" value="${testdb.username}"/>
- <property name="password" value="${testdb.password}"/>
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/content.ldif
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/content.ldif b/build-tools/src/main/resources/content.ldif
deleted file mode 100644
index aa47af5..0000000
--- a/build-tools/src/main/resources/content.ldif
+++ /dev/null
@@ -1,57 +0,0 @@
-# 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.
-DN: o=isp
-objectClass: organization
-objectClass: top
-o: isp
-
-DN: ou=People,o=isp
-objectClass: organizationalUnit
-objectClass: top
-ou: People
-
-DN: ou=Groups,o=isp
-objectClass: organizationalUnit
-objectClass: top
-ou: Groups
-
-DN: cn=testLDAPGroup,ou=Groups,o=isp
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: testLDAPGroup
-uniqueMember: uid=admin,ou=system
-uniqueMember: uid=syncFromLDAP,ou=People,o=isp
-owner: uid=syncFromLDAP,ou=People,o=isp
-
-DN: uid=syncFromLDAP,ou=People,o=isp
-objectClass: organizationalPerson
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: top
-cn: syncFromLDAP
-description: Active
-mail: syncFromLDAP@syncope.apache.org
-sn: Surname
-uid: syncFromLDAP
-userpassword:: cGFzc3dvcmQxMjM=
-givenname: syncFromLDAP
-registeredAddress: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
-jpegPhoto:: /9j/4AAQSkZJRgABAQEBKwErAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH
- BwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQk
- UDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wg
- ARCAAEAAQDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQBAQAAAAAAAAAAAAAAA
- AAAAAD/2gAMAwEAAhADEAAAAUuf/8QAFhABAQEAAAAAAAAAAAAAAAAAAwAS/9oACAEBAAEFAiLV
- /8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/
- aAAgBAgEBPwF//8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABESEiQf/aAAgBAQAGPwI9k2orq//EAB
- kQAAMAAwAAAAAAAAAAAAAAAAERIQBBYf/aAAgBAQABPyF20CYlpT3P/9oADAMBAAIAAwAAABCf/
- 8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
- AAgBAgEBPxB//8QAGhABAAIDAQAAAAAAAAAAAAAAAREhAEFRYf/aAAgBAQABPxCUKGDcAUFrvhoz/9k=
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/log4j.xml b/build-tools/src/main/resources/log4j.xml
deleted file mode 100644
index c0aec05..0000000
--- a/build-tools/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
-
--->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %-5p [%C.%M():%L] %m%n"/>
- </layout>
- </appender>
-
- <category name="org.apache.directory">
- <level value="off"/>
- </category>
-
- <root>
- <priority value="info"/>
- <appender-ref ref="stdout"/>
- </root>
-</log4j:configuration>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml b/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml
deleted file mode 100644
index ed27f91..0000000
--- a/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
-
--->
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
-"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-<!--
-
- Checkstyle configuration that checks the sun coding conventions from:
-
- - the Java Language Specification at
- http://java.sun.com/docs/books/jls/second_edition/html/index.html
-
- - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
-
- - the Javadoc guidelines at
- http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
-
- - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
-
- - some best practices
-
- Checkstyle is very configurable. Be sure to read the documentation at
- http://checkstyle.sf.net (or in your downloaded distribution).
-
- Most Checks are configurable, be sure to consult the documentation.
-
- To completely disable a check, just comment it out or delete it from the file.
-
- Finally, it is worth reading the documentation.
-
--->
-<module name="Checker">
- <!--
- If you set the basedir property below, then all reported file
- names will be relative to the specified directory. See
- http://checkstyle.sourceforge.net/5.x/config.html#Checker
-
- <property name="basedir" value="${basedir}"/>
- -->
-
- <!-- Checks that a package-info.java file exists for each package. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
- <module name="JavadocPackage"/>
-
- <!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile"/>
-
- <!-- Checks that property files contain the same keys. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
- <module name="Translation"/>
-
- <!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="FileLength"/>
-
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="FileTabCharacter"/>
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="RegexpSingleline">
- <property name="format" value="\s+$"/>
- <property name="minimum" value="0"/>
- <property name="maximum" value="2"/>
- <property name="message" value="Line has trailing spaces."/>
- </module>
-
- <module name="TreeWalker">
-
- <property name="cacheFile" value="target/checkstyle.cache"/>
-
- <!-- Checks for Javadoc comments. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html -->
- <module name="JavadocMethod"/>
- <module name="JavadocType"/>
- <module name="JavadocVariable"/>
- <module name="JavadocStyle"/>
-
-
- <!-- Checks for Naming Conventions. -->
- <!-- See http://checkstyle.sf.net/config_naming.html -->
- <module name="ConstantName"/>
- <module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName"/>
- <module name="MethodName"/>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="StaticVariableName"/>
- <module name="TypeName"/>
-
-
- <!-- Checks for Headers -->
- <!-- See http://checkstyle.sf.net/config_header.html -->
- <!-- <module name="Header"> -->
- <!-- The follow property value demonstrates the ability -->
- <!-- to have access to ANT properties. In this case it uses -->
- <!-- the ${basedir} property to allow Checkstyle to be run -->
- <!-- from any directory within a project. See property -->
- <!-- expansion, -->
- <!-- http://checkstyle.sf.net/config.html#properties -->
- <!-- <property -->
- <!-- name="headerFile" -->
- <!-- value="${basedir}/java.header"/> -->
- <!-- </module> -->
-
- <!-- Following interprets the header file as regular expressions. -->
- <!-- <module name="RegexpHeader"/> -->
-
-
- <!-- Checks for imports -->
- <!-- See http://checkstyle.sf.net/config_import.html -->
- <module name="AvoidStarImport"/>
- <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
- <module name="RedundantImport"/>
- <module name="UnusedImports"/>
-
-
- <!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="LineLength">
- <property name="max" value="120"/>
- <property name="ignorePattern" value="^import"/>
- </module>
- <module name="MethodLength"/>
- <module name="ParameterNumber"/>
-
-
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="EmptyForIteratorPad"/>
- <module name="GenericWhitespace"/>
- <module name="MethodParamPad"/>
- <!--<module name="NoWhitespaceAfter"/>
- <module name="NoWhitespaceBefore"/>-->
- <module name="OperatorWrap"/>
- <module name="ParenPad"/>
- <module name="TypecastParenPad"/>
- <module name="WhitespaceAfter"/>
- <module name="WhitespaceAround"/>
-
-
- <!-- Modifier Checks -->
- <!-- See http://checkstyle.sf.net/config_modifiers.html -->
- <module name="ModifierOrder"/>
- <module name="RedundantModifier"/>
-
-
- <!-- Checks for blocks. You know, those {}'s -->
- <!-- See http://checkstyle.sf.net/config_blocks.html -->
- <module name="AvoidNestedBlocks"/>
- <module name="EmptyBlock"/>
- <module name="LeftCurly"/>
- <module name="NeedBraces"/>
- <module name="RightCurly"/>
-
-
- <!-- Checks for common coding problems -->
- <!-- See http://checkstyle.sf.net/config_coding.html -->
-<!-- <module name="AvoidInlineConditionals"/>-->
- <!--module name="DoubleCheckedLocking"/--> <!-- MY FAVOURITE -->
- <module name="EmptyStatement"/>
- <module name="EqualsHashCode"/>
- <module name="HiddenField">
- <property name="ignoreSetter" value="true"/>
- <property name="ignoreConstructorParameter" value="true"/>
- </module>
- <module name="IllegalInstantiation"/>
- <module name="InnerAssignment"/>
- <!--<module name="MagicNumber"/>-->
- <module name="MissingSwitchDefault"/>
- <module name="RedundantThrows"/>
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
-
- <!-- Checks for class design -->
- <!-- See http://checkstyle.sf.net/config_design.html -->
- <!--<module name="DesignForExtension"/>-->
- <module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
- <module name="InterfaceIsType"/>
- <module name="VisibilityModifier">
- <property name="protectedAllowed" value="true"/>
- </module>
-
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="ArrayTypeStyle"/>
- <module name="FinalParameters"/>
- <module name="TodoComment"/>
- <module name="UpperEll"/>
-
- </module>
-
-</module>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml b/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml
deleted file mode 100644
index d491f7f..0000000
--- a/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml
+++ /dev/null
@@ -1,310 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-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.
-
--->
-<profiles version="12">
- <profile kind="CodeFormatterProfile" name="Syncope" version="12">
- <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="49"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
- <setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
- <setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
- <setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="32"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
- <setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
- <setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="48"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="48"/>
- <setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="32"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="120"/>
- <setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
- </profile>
-</profiles>