Merge pull request #25 from thomasdarimont/issue/LDAP-337-java8-build
LDAP-337 - Enable Java 8 build.
This commit is contained in:
12
build.gradle
12
build.gradle
@@ -31,12 +31,12 @@ allprojects {
|
||||
ext.snapshotBuild = version.endsWith('SNAPSHOT')
|
||||
|
||||
ext.javadocLinks = [
|
||||
"http://download.oracle.com/javase/1.5.0/docs/api",
|
||||
"http://static.springframework.org/spring/docs/3.0.x/api/",
|
||||
"http://docs.oracle.com/javase/7/docs/api/",
|
||||
"http://docs.spring.io/spring/docs/3.2.x/javadoc-api/",
|
||||
"http://logging.apache.org/log4j/1.2/apidocs/",
|
||||
"http://commons.apache.org/logging/apidocs/",
|
||||
"http://commons.apache.org/dbcp/apidocs/",
|
||||
"http://commons.apache.org/pool/apidocs/",
|
||||
"http://commons.apache.org/proper/commons-logging/apidocs/",
|
||||
"http://commons.apache.org/proper/commons-dbcp/apidocs/",
|
||||
"http://commons.apache.org/proper/commons-pool/apidocs/",
|
||||
"http://junit.sourceforge.net/javadoc/",
|
||||
] as String[]
|
||||
}
|
||||
@@ -111,7 +111,7 @@ task api(type: Javadoc) {
|
||||
options.splitIndex = true
|
||||
options.links(project.ext.javadocLinks)
|
||||
|
||||
maxMemory = "1024m"
|
||||
maxMemory = "1536m"
|
||||
destinationDir = new File(buildDir, "api")
|
||||
|
||||
source coreModules*.javadoc*.source
|
||||
|
||||
@@ -279,7 +279,7 @@ public interface SimpleLdapOperations {
|
||||
* {@link ContextSource#getContext(String, String)}, thus authenticating the
|
||||
* entry.
|
||||
* <p>
|
||||
* Example:<br/>
|
||||
* Example:<br>
|
||||
*
|
||||
* <pre>
|
||||
* AndFilter filter = new AndFilter();
|
||||
@@ -304,7 +304,7 @@ public interface SimpleLdapOperations {
|
||||
* {@link ContextSource#getContext(String, String)}, thus authenticating the
|
||||
* entry.
|
||||
* <p>
|
||||
* Example:<br/>
|
||||
* Example:<br>
|
||||
*
|
||||
* <pre>
|
||||
* AndFilter filter = new AndFilter();
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.lang.reflect.Method;
|
||||
* needs the constructor arguments to be provided. It also handles most of the
|
||||
* work in the post processing of the response control, only delegating to a
|
||||
* template method for the actual value retrieval. In short, it makes it easy to
|
||||
* implement a custom DirContextProcessor.</p>
|
||||
* implement a custom DirContextProcessor.<p>
|
||||
*
|
||||
* <pre>
|
||||
* public class SortControlDirContextProcessor extends AbstractFallbackRequestAndResponseControlDirContextProcessor {
|
||||
|
||||
@@ -60,7 +60,6 @@ import java.util.ListIterator;
|
||||
* <dt>Name[2]</dt>
|
||||
* <dd>uid=adam.skogman</dd>
|
||||
* </dl>
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>Name</code> instances, and consequently <code>DistinguishedName</code>
|
||||
* instances are naturally mutable, which is useful when constructing
|
||||
@@ -74,7 +73,6 @@ import java.util.ListIterator;
|
||||
* </pre>
|
||||
*
|
||||
* will render <code>uid=adam.skogman,ou=People,dc=jayway,dc=se</code>.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>NOTE:</b> The fact that DistinguishedName instances are mutable needs to
|
||||
* be taken into careful account, as this means that they may be modified
|
||||
@@ -83,7 +81,6 @@ import java.util.ListIterator;
|
||||
* as a constant, you should consider getting an immutable copy of the instance
|
||||
* using {@link #immutableDistinguishedName()} or
|
||||
* {@link #immutableDistinguishedName(String)}.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>NB:</b>As of version 1.3 the default toString representation of
|
||||
* DistinguishedName now defaults to a compact one, without spaces between the
|
||||
|
||||
@@ -1311,7 +1311,7 @@ public interface LdapOperations {
|
||||
* {@link ContextSource#getContext(String, String)}, thus authenticating the
|
||||
* entry.
|
||||
* <p>
|
||||
* Example:<br/>
|
||||
* Example:<br>
|
||||
*
|
||||
* <pre>
|
||||
* AndFilter filter = new AndFilter();
|
||||
@@ -1337,7 +1337,7 @@ public interface LdapOperations {
|
||||
* {@link ContextSource#getContext(String, String)}, thus authenticating the
|
||||
* entry.
|
||||
* <p>
|
||||
* Example:<br/>
|
||||
* Example:<br>
|
||||
*
|
||||
* <pre>
|
||||
* AndFilter filter = new AndFilter();
|
||||
@@ -1627,8 +1627,6 @@ public interface LdapOperations {
|
||||
*
|
||||
* @param query the LDAP query specification.
|
||||
* @param callbackHandler the <code>NameClassPairCallbackHandler</code> to supply all found entries to.
|
||||
* @return a <code>List</code> containing all entries received from the
|
||||
* <code>ContextMapper</code>.
|
||||
*
|
||||
* @throws NamingException if any error occurs.
|
||||
* @since 2.0
|
||||
|
||||
@@ -198,12 +198,12 @@ public class LdapTemplate implements LdapOperations, InitializingBean {
|
||||
|
||||
/**
|
||||
* Set the default scope to be used in searches if not explicitly specified.
|
||||
* Default is {@link SearchControls.SUBTREE_SCOPE}.
|
||||
* Default is {@link javax.naming.directory.SearchControls#SUBTREE_SCOPE}.
|
||||
*
|
||||
* @param defaultSearchScope the default search scope to use in searches.
|
||||
* One of {@link SearchControls.OBJECT_SCOPE},
|
||||
* {@link SearchControls.ONELEVEL_SCOPE},
|
||||
* or {@link SearchControls.SUBTREE_SCOPE}
|
||||
* One of {@link SearchControls#OBJECT_SCOPE},
|
||||
* {@link SearchControls#ONELEVEL_SCOPE},
|
||||
* or {@link SearchControls#SUBTREE_SCOPE}
|
||||
* @since 2.0
|
||||
*/
|
||||
public void setDefaultSearchScope(int defaultSearchScope) {
|
||||
|
||||
@@ -47,7 +47,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Abstract implementation of the {@link ContextSource} interface. By default,
|
||||
* returns an authenticated
|
||||
* <code>DirContext<code> implementation for both read-only and
|
||||
* <code>DirContext</code> implementation for both read-only and
|
||||
* read-write operations. To have an anonymous environment created for read-only
|
||||
* operations, set the <code>anonymousReadOnly</code> property to
|
||||
* <code>true</code>.
|
||||
@@ -58,7 +58,7 @@ import java.util.Map;
|
||||
* <p>
|
||||
* If an {@link AuthenticationSource} is set, this will be used for getting user
|
||||
* principal and password for each new connection, otherwise a default one will
|
||||
* be created using the specified <code>userDn<code> and <code>password</code>.
|
||||
* be created using the specified <code>userDn</code> and <code>password</code>.
|
||||
* <p>
|
||||
* <b>Note:</b> When using implementations of this class outside of a Spring
|
||||
* Context it is necessary to call {@link #afterPropertiesSet()} when all
|
||||
|
||||
@@ -54,7 +54,6 @@ import java.util.Hashtable;
|
||||
* <code>HostnameVerifier</code> is supplied to
|
||||
* {@link #setHostnameVerifier(HostnameVerifier)}, that will be applied to the
|
||||
* processing.
|
||||
* </p>
|
||||
* <p>
|
||||
* For further information regarding TLS, refer to <a
|
||||
* href="http://java.sun.com/products/jndi/tutorial/ldap/ext/starttls.html">this
|
||||
@@ -94,7 +93,7 @@ public abstract class AbstractTlsDirContextAuthenticationStrategy implements Dir
|
||||
|
||||
/**
|
||||
* Set the optional
|
||||
* <code>HostnameVerifier<code> to use for verifying incoming certificates. Defaults to <code>null</code>
|
||||
* <code>HostnameVerifier</code> to use for verifying incoming certificates. Defaults to <code>null</code>
|
||||
* , meaning that the default hostname verification will take place.
|
||||
*
|
||||
* @param hostnameVerifier The <code>HostnameVerifier</code> to use, if any.
|
||||
|
||||
@@ -42,7 +42,6 @@ import java.util.Set;
|
||||
/**
|
||||
* Utility class that helps with reading all attribute values from Active Directory using <em>Incremental Retrieval of
|
||||
* Multi-valued Properties</em>.
|
||||
* <p/>
|
||||
* <p>Example usage of this attribute mapper:
|
||||
* <pre>
|
||||
* List values = DefaultIncrementalAttributeMapper.lookupAttributeValues(ldapTemplate, theDn, "oneAttribute");
|
||||
@@ -58,13 +57,11 @@ import java.util.Set;
|
||||
*
|
||||
* List values = incrementalAttributeMapper.getValues("someAttribute");
|
||||
* </pre>
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>NOTE:</b> Instances of this class are highly stateful and must not be reused or shared between threads in any way.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>NOTE:</b> Instances of this class can only be used with <b>lookups</b>. No support is given for searches.
|
||||
* </p>
|
||||
* <p>
|
||||
*
|
||||
* @author Marius Scurtescu
|
||||
* @author Mattias Hellborg Arthursson
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class BinaryLogicalFilter extends AbstractFilter {
|
||||
|
||||
/**
|
||||
* Implement this in subclass to return the logical operator, for example
|
||||
* &qout;&&qout;.
|
||||
* "&".
|
||||
*
|
||||
* @return the logical operator.
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ package org.springframework.ldap.filter;
|
||||
*
|
||||
* @author Adam Skogman
|
||||
* @see <a href="http://www.ietf.org/rfc/rfc1960.txt">RFC 1960: A String
|
||||
* Representation of LDAP Search Filters< /a>
|
||||
* Representation of LDAP Search Filters</a>
|
||||
*/
|
||||
public interface Filter {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.ldap.filter;
|
||||
|
||||
/**
|
||||
* A filter to compare >=. LDAP RFC does not allow > comparison. The following
|
||||
* A filter to compare >=. LDAP RFC does not allow > comparison. The following
|
||||
* code:
|
||||
*
|
||||
* <pre>
|
||||
|
||||
@@ -37,12 +37,11 @@ import org.springframework.util.StringUtils;
|
||||
* <property name="filter" value="(&amp;(objectClass=user)(!(objectClass=computer)))" />
|
||||
* </bean>
|
||||
* </pre>
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Note 2</b>: There will be no validation to ensure that the supplied filter is
|
||||
* valid. Using this implementation to build filters from user input is strongly
|
||||
* discouraged.
|
||||
* </p>
|
||||
* <p>
|
||||
* @author Justen Stepka
|
||||
* @author Mathieu Larchet
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.ldap.filter;
|
||||
|
||||
/**
|
||||
* A filter to compare <=. LDAP RFC does not allow < comparison. The following
|
||||
* A filter to compare <=. LDAP RFC does not allow < comparison. The following
|
||||
* code:
|
||||
*
|
||||
* <pre>
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.lang.annotation.Target;
|
||||
* <p>
|
||||
* The containing class must be annotated with {@link Entry}.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @see Entry
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
|
||||
@@ -9,8 +9,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* This annotation marks a Java class to be persisted in an LDAP directory.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.lang.annotation.Target;
|
||||
* The marked field must be of type {@link javax.naming.Name} and must <em>not</em>
|
||||
* be annotated {@link Attribute}.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
* @see Attribute
|
||||
* @see javax.naming.Name
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.lang.annotation.Target;
|
||||
* This annotation identifies a field in an {@link Entry} annotated class that
|
||||
* should <em>not</em> be persisted to LDAP.
|
||||
*
|
||||
* @author Paul Harvey <paul@pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul@pauls-place.me.uk>
|
||||
*
|
||||
* @see Entry
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Provides a set of annotations to describe the mapping of a Java class to an LDAP entry.
|
||||
* <p>
|
||||
* These annotations are for use with {@link org.springframework.ldap.odm.core.OdmManager}.
|
||||
* These annotations are for use with <a href="{@docRoot}/org/springframework/ldap/odm/core/OdmManager.html">OdmManager</a>.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.odm.annotations;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.ldap.NamingException;
|
||||
/**
|
||||
* The root of the Spring LDAP ODM exception hierarchy.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
@@ -54,7 +54,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* Default implementation of {@link ObjectDirectoryMapper}. Unless you need to explicitly configure
|
||||
* converters there is typically no reason to explicitly consider yourself with this class.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Mattias Hellborg Arthursson
|
||||
* @since 2.0
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.ldap.odm.core.OdmException;
|
||||
/**
|
||||
* Thrown to indicate that an instance is not suitable for persisting in the LDAP directory.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.ldap.odm.core.OdmException;
|
||||
/**
|
||||
* Thrown to indicate an error in the annotated meta-data.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.ldap.odm.core.OdmException;
|
||||
* Thrown when an OdmManager method is called with a class
|
||||
* which is not being managed by the OdmManager.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Provides a single public class which implements {@link org.springframework.ldap.odm.core.OdmManager}.
|
||||
* Provides a single public class which implements <a href="{@docRoot}/org/springframework/ldap/odm/core/OdmManager.html">OdmManager</a>.
|
||||
* <p>
|
||||
* The OdmManager implementation works in conjunction with {@link org.springframework.ldap.odm.typeconversion} to provide
|
||||
* conversion between the representation of attributes in LDAP and in Java.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
package org.springframework.ldap.odm.core.impl;
|
||||
@@ -4,7 +4,7 @@
|
||||
* Implementations of this interface are intended to be used in conjunction with classes
|
||||
* annotated with {@link org.springframework.ldap.odm.annotations}.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.odm.core;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.ldap.NamingException;
|
||||
/**
|
||||
* Thrown by the conversion framework to indicate an error condition - typically a failed type conversion.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public final class ConverterException extends NamingException {
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.ldap.odm.typeconversion;
|
||||
/**
|
||||
* A simple interface to be implemented to provide type conversion functionality.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public interface ConverterManager {
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.ldap.odm.typeconversion.impl;
|
||||
/**
|
||||
* Interface specifying the conversion between two classes
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public interface Converter {
|
||||
/**
|
||||
|
||||
@@ -40,55 +40,55 @@ import java.util.Set;
|
||||
* Integer, Long, Float, Double, Boolean</code> to <code>String</code></li>
|
||||
* </ul>
|
||||
* <pre>
|
||||
* <bean id="converterManager" class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean">
|
||||
* <property name="converterConfig">
|
||||
* <set>
|
||||
* <bean class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig">
|
||||
* <property name="fromClasses">
|
||||
* <set>
|
||||
* <value>java.lang.String</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="toClasses">
|
||||
* <set>
|
||||
* <value>java.lang.Byte</value>
|
||||
* <value>java.lang.Short</value>
|
||||
* <value>java.lang.Integer</value>
|
||||
* <value>java.lang.Long</value>
|
||||
* <value>java.lang.Float</value>
|
||||
* <value>java.lang.Double</value>
|
||||
* <value>java.lang.Boolean</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="converter" ref="fromStringConverter" />
|
||||
* </bean>
|
||||
* <bean class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig">
|
||||
* <property name="fromClasses">
|
||||
* <set>
|
||||
* <value>java.lang.Byte</value>
|
||||
* <value>java.lang.Short</value>
|
||||
* <value>java.lang.Integer</value>
|
||||
* <value>java.lang.Long</value>
|
||||
* <value>java.lang.Float</value>
|
||||
* <value>java.lang.Double</value>
|
||||
* <value>java.lang.Boolean</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="toClasses">
|
||||
* <set>
|
||||
* <value>java.lang.String</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="converter" ref="toStringConverter" />
|
||||
* </bean>
|
||||
* </set>
|
||||
* </property>
|
||||
* </bean>
|
||||
* <bean id="converterManager" class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean">
|
||||
* <property name="converterConfig">
|
||||
* <set>
|
||||
* <bean class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig">
|
||||
* <property name="fromClasses">
|
||||
* <set>
|
||||
* <value>java.lang.String</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="toClasses">
|
||||
* <set>
|
||||
* <value>java.lang.Byte</value>
|
||||
* <value>java.lang.Short</value>
|
||||
* <value>java.lang.Integer</value>
|
||||
* <value>java.lang.Long</value>
|
||||
* <value>java.lang.Float</value>
|
||||
* <value>java.lang.Double</value>
|
||||
* <value>java.lang.Boolean</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="converter" ref="fromStringConverter"/>
|
||||
* </bean>
|
||||
* <bean class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig">
|
||||
* <property name="fromClasses">
|
||||
* <set>
|
||||
* <value>java.lang.Byte</value>
|
||||
* <value>java.lang.Short</value>
|
||||
* <value>java.lang.Integer</value>
|
||||
* <value>java.lang.Long</value>
|
||||
* <value>java.lang.Float</value>
|
||||
* <value>java.lang.Double</value>
|
||||
* <value>java.lang.Boolean</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="toClasses">
|
||||
* <set>
|
||||
* <value>java.lang.String</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* <property name="converter" ref="toStringConverter"/>
|
||||
* </bean>
|
||||
* </set>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
* {@link ConverterConfig} has a second constructor which takes an additional parameter to allow
|
||||
* an LDAP syntax to be defined.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class ConverterManagerFactoryBean implements FactoryBean {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ConverterManagerFactoryBean.class);
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.Map;
|
||||
* <li>If this fails then throw a {@link org.springframework.ldap.odm.typeconversion.ConverterException}.</li>
|
||||
* </ol>
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class ConverterManagerImpl implements ConverterManager {
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.lang.reflect.Constructor;
|
||||
* <p>
|
||||
* This should only be used as a fall-back converter, as a last attempt.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class FromStringConverter implements Converter {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.ldap.odm.typeconversion.impl.Converter;
|
||||
* <p>
|
||||
* This should only be used as a fall-back converter, as a last attempt.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class ToStringConverter implements Converter {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Provides some basic implementations of the {@link org.springframework.ldap.odm.typeconversion.impl.Converter} interface.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.odm.typeconversion.impl.converters;
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Provides an implementation of the {@link org.springframework.ldap.odm.typeconversion.ConverterManager} interface.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.odm.typeconversion.impl;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* <p>
|
||||
* This is used to convert between the LDAP and Java representations of attributes.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.odm.typeconversion;
|
||||
|
||||
@@ -41,7 +41,7 @@ import java.util.Collection;
|
||||
* <br>
|
||||
* <br>
|
||||
* Configuration:
|
||||
* <table border="1">
|
||||
* <table border="1" summary="Configuration">
|
||||
* <tr>
|
||||
* <th align="left">Property</th> <th align="left">Description</th> <th
|
||||
* align="left">Required</th> <th align="left">Default</th>
|
||||
|
||||
@@ -34,7 +34,7 @@ import javax.naming.directory.SearchResult;
|
||||
* <br>
|
||||
* <br>
|
||||
* Configuration:
|
||||
* <table border="1">
|
||||
* <table border="1" summary="Configuration">
|
||||
* <tr>
|
||||
* <th align="left">Property</th>
|
||||
* <th align="left">Description</th>
|
||||
@@ -64,8 +64,8 @@ import javax.naming.directory.SearchResult;
|
||||
* </td>
|
||||
* <td valign="top">No</td>
|
||||
* <td valign="top">
|
||||
* {@link SearchControls#setCountLimit(long)} = 1<br/>
|
||||
* {@link SearchControls#setReturningAttributes(String[])} = new String[] { "objectclass" }<br/>
|
||||
* {@link SearchControls#setCountLimit(long)} = 1<br>
|
||||
* {@link SearchControls#setReturningAttributes(String[])} = new String[] { "objectclass" }<br>
|
||||
* {@link SearchControls#setTimeLimit(int)} = 500
|
||||
* </td>
|
||||
* </tr>
|
||||
|
||||
@@ -118,11 +118,11 @@ public final class LdapEncoder {
|
||||
/**
|
||||
* LDAP Encodes a value for use with a DN. Escapes for LDAP, not JNDI!
|
||||
*
|
||||
* <br/>Escapes:<br/> ' ' [space] - "\ " [if first or last] <br/> '#'
|
||||
* [hash] - "\#" <br/> ',' [comma] - "\," <br/> ';' [semicolon] - "\;" <br/> '=
|
||||
* [equals] - "\=" <br/> '+' [plus] - "\+" <br/> '<' [less than] -
|
||||
* "\<" <br/> '>' [greater than] - "\>" <br/> '"' [double quote] -
|
||||
* "\"" <br/> '\' [backslash] - "\\" <br/>
|
||||
* <br>Escapes:<br> ' ' [space] - "\ " [if first or last] <br> '#'
|
||||
* [hash] - "\#" <br> ',' [comma] - "\," <br> ';' [semicolon] - "\;" <br> '=
|
||||
* [equals] - "\=" <br> '+' [plus] - "\+" <br> '<' [less than] -
|
||||
* "\<" <br> '>' [greater than] - "\>" <br> '"' [double quote] -
|
||||
* "\"" <br> '\' [backslash] - "\\" <br>
|
||||
*
|
||||
* @param value
|
||||
* the value to escape.
|
||||
|
||||
@@ -27,10 +27,10 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
* A Transaction Manager to manage LDAP and Hibernate 3 operations within the same
|
||||
* transaction. Note that even though the same logical transaction is used, this
|
||||
* is <b>not</b> a JTA XA transaction; no two-phase commit will be performed,
|
||||
* and thus commit and rollback may yield unexpected results.<br />
|
||||
* and thus commit and rollback may yield unexpected results.<br>
|
||||
* This Transaction Manager is as good as it gets when you are using in LDAP in
|
||||
* combination with a Hibernate 3 and unable to use XA transactions because LDAP
|
||||
* is not transactional by design to begin with.<br />
|
||||
* is not transactional by design to begin with.<br>
|
||||
*
|
||||
* Furthermore, this manager <b>does not support nested transactions</b>
|
||||
* @author Hans Westerbeek
|
||||
|
||||
@@ -52,7 +52,6 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
* rolled back, the outcome of this is undetermined, and may in the worst case
|
||||
* result in total failure.</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
* <p>
|
||||
* While the points above should be noted and considered, the compensating
|
||||
* transaction approach will be perfectly sufficient for all but the most
|
||||
@@ -60,14 +59,12 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
* absence of server-side transaction support in the LDAP world, being able to
|
||||
* mark operations as transactional in the same way as for relational database
|
||||
* operations is surely a step forward.
|
||||
* </p>
|
||||
* <p>
|
||||
* An LDAP transaction is tied to a {@link ContextSource}, to be supplied to
|
||||
* the {@link #setContextSource(ContextSource)} method. While the actual
|
||||
* ContextSource used by the target LdapTemplate instance needs to be of the
|
||||
* type {@link TransactionAwareContextSourceProxy}, the ContextSource supplied
|
||||
* to this class should be the actual target ContextSource.
|
||||
* </p>
|
||||
* <p>
|
||||
* Using this TransactionManager along with
|
||||
* {@link TransactionAwareContextSourceProxy}, all modifying operations (bind,
|
||||
@@ -78,7 +75,6 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
* {@link CompensatingTransactionOperationExecutor} which is then used to
|
||||
* execute the actual operation and is later called for performing the commit or
|
||||
* rollback.
|
||||
* </p>
|
||||
* <p>
|
||||
* For several of the operations, performing a rollback is pretty
|
||||
* straightforward. For example, in order to roll back a rename operation, it
|
||||
@@ -96,13 +92,12 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
* {@link TempEntryRenamingStrategy} (default
|
||||
* {@link DefaultTempEntryRenamingStrategy}), specified in
|
||||
* {@link #setRenamingStrategy(TempEntryRenamingStrategy)}.
|
||||
* </p>
|
||||
* <p>
|
||||
* The actual work of this Transaction Manager is delegated to a
|
||||
* {@link ContextSourceTransactionManagerDelegate}. This is because the exact
|
||||
* same logic needs to be used if we want to wrap a JDBC and LDAP transaction in
|
||||
* the same logical transaction.
|
||||
* </p>
|
||||
* <p>
|
||||
*
|
||||
* @author Mattias Hellborg Arthursson
|
||||
*
|
||||
|
||||
@@ -84,14 +84,14 @@ TOKEN: { <#ESCAPEDSTART: <BACKSLASHCHAR> (<HASHCHAR> | <SPACE>)> }
|
||||
}
|
||||
|
||||
/**
|
||||
* input -> dn
|
||||
* dn -> rdn ( ( "," | ";" ) rdn )*
|
||||
* rdn -> attributeTypeAndValue ( "+" attributeTypeAndValue )*
|
||||
* attributeTypeAndValue ->
|
||||
* ( <SPACE> )* AttributeType SpacedEquals AttributeValue ( <SPACE> )*
|
||||
* SpacedEquals -> <SPACED_EQUALS>
|
||||
* AttributeType -> <LDAP_OID> | <ATTRIBUTE_TYPE_STRING>
|
||||
* AttributeValue -> <ATTRVALUE>
|
||||
* input -> dn
|
||||
* dn -> rdn ( ( "," | ";" ) rdn )*
|
||||
* rdn -> attributeTypeAndValue ( "+" attributeTypeAndValue )*
|
||||
* attributeTypeAndValue ->
|
||||
* ( <SPACE> )* AttributeType SpacedEquals AttributeValue ( <SPACE> )*
|
||||
* SpacedEquals -> <SPACED_EQUALS>
|
||||
* AttributeType -> <LDAP_OID> | <ATTRIBUTE_TYPE_STRING>
|
||||
* AttributeValue -> <ATTRVALUE>
|
||||
*/
|
||||
void input() :
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime"
|
||||
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.7.1.201405082137", classifier: "runtime"
|
||||
dependencyManagement {
|
||||
springIoTestRuntime {
|
||||
imports {
|
||||
|
||||
@@ -47,7 +47,7 @@ import java.util.NoSuchElementException;
|
||||
* The {@link LdifParser LdifParser} does ignores <i>changetype</i> LDIF entries as their usefulness in the
|
||||
* context of an application has yet to be determined.
|
||||
* <p>
|
||||
* <b>Design</b><br/>
|
||||
* <b>Design</b><br>
|
||||
* {@link LdifParser LdifParser} provides the main interface for operation but requires three supporting classes to
|
||||
* enable operation:
|
||||
* <ul>
|
||||
@@ -57,7 +57,7 @@ import java.util.NoSuchElementException;
|
||||
* </ul>
|
||||
* Together, these 4 classes read from the resource line by line and translate the data into objects for use.
|
||||
* <p>
|
||||
* <b>Usage</b><br/>
|
||||
* <b>Usage</b><br>
|
||||
* {@link #getRecord() getRecord()} reads the next available record from the resource. Lines are read and
|
||||
* passed to the {@link SeparatorPolicy SeparatorPolicy} for interpretation. The parser continues to read
|
||||
* lines and appends them to the buffer until it encounters the start of a new attribute or an end of record
|
||||
|
||||
@@ -59,7 +59,7 @@ public interface Parser {
|
||||
/**
|
||||
* Resets the line read parser.
|
||||
*
|
||||
* @throws Exception if a problem is encountered while trying to reset the resource.
|
||||
* @throws IOException if a problem is encountered while trying to reset the resource.
|
||||
*/
|
||||
void reset() throws IOException;
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ public class DefaultAttributeValidationPolicy implements AttributeValidationPoli
|
||||
* <ol>
|
||||
* <li>A standard attribute pattern of the form: ATTR_ID[;options]: VALUE</li>
|
||||
* <li>A Base64 attribute pattern of the form: ATTR_ID[;options]:: BASE64_VALUE</li>
|
||||
* <li>A url attribute pattern of the form: ATTR_ID[;options]:< URL_VALUE</li>
|
||||
* <li>A url attribute pattern of the form: ATTR_ID[;options]:< URL_VALUE</li>
|
||||
* </ol>
|
||||
* <p>
|
||||
* Upon success an LdapAttribute object is returned.
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
* Each managed Java class must be appropriately annotated using
|
||||
* {@link org.springframework.ldap.odm.annotations}.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Mattias Hellborg Arthursson
|
||||
*
|
||||
* @see org.springframework.ldap.odm.annotations.Entry
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.Set;
|
||||
* uses {@link org.springframework.ldap.odm.typeconversion.ConverterManager} to
|
||||
* convert between Java and LDAP representations of attribute values.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Mattias Hellborg Arthursson
|
||||
* @deprecated This functionality is automatically available in LdapTemplate as of version 2.0
|
||||
*/
|
||||
|
||||
@@ -30,19 +30,19 @@ import java.util.Set;
|
||||
* <p>
|
||||
* Typical configuration would appear as follows:
|
||||
* <pre>
|
||||
* <bean id="odmManager" class="org.springframework.ldap.odm.core.impl.OdmManagerImplFactoryBean">
|
||||
* <property name="converterManager" ref="converterManager" />
|
||||
* <property name="contextSource" ref="contextSource" />
|
||||
* <property name="managedClasses">
|
||||
* <set>
|
||||
* <value>org.myorg.myldapentries.Person</value>
|
||||
* <value>org.myorg.myldapentries.OrganizationalUnit</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* </bean>
|
||||
* <bean id="odmManager" class="org.springframework.ldap.odm.core.impl.OdmManagerImplFactoryBean">
|
||||
* <property name="converterManager" ref="converterManager" />
|
||||
* <property name="contextSource" ref="contextSource" />
|
||||
* <property name="managedClasses">
|
||||
* <set>
|
||||
* <value>org.myorg.myldapentries.Person</value>
|
||||
* <value>org.myorg.myldapentries.OrganizationalUnit</value>
|
||||
* </set>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @deprecated This functionality is automatically available in LdapTemplate as of version 2.0
|
||||
*/
|
||||
public final class OdmManagerImplFactoryBean implements FactoryBean {
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.util.StringUtils;
|
||||
* <p>
|
||||
* It is only public to allow Freemarker access.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class AttributeSchema {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Set;
|
||||
* <p>
|
||||
* It is public only to allow Freemarker access.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class ObjectSchema {
|
||||
private final Set<AttributeSchema> must = new HashSet<AttributeSchema>();
|
||||
|
||||
@@ -77,19 +77,18 @@ import java.util.regex.Pattern;
|
||||
* Command line flags are as follows:
|
||||
* <p>
|
||||
* <ul>
|
||||
* <li><code>-c,--class <class name></code> Name of the Java class to create. Mandatory.</li>
|
||||
* <li><code>-s,--syntaxmap <map file></code> Configuration file of LDAP syntaxes to Java classes mappings. Optional.</li>
|
||||
* <li><code>-c,--class <class name></code> Name of the Java class to create. Mandatory.</li>
|
||||
* <li><code>-s,--syntaxmap <map file></code> Configuration file of LDAP syntaxes to Java classes mappings. Optional.</li>
|
||||
* <li><code>-h,--help</code> Print this help message then exit.</li>
|
||||
* <li><code>-k,--package <package name></code> Package to create the Java class in. Mandatory.</li>
|
||||
* <li><code>-l,--url <ldap url></code> Ldap url of the directory service to bind to. Defaults to <code>ldap://127.0.0.1:389</code>. Optional.</li>
|
||||
* <li><code>-o,--objectclasses <LDAP object class lists></code> Comma separated list of LDAP object classes. Mandatory.</li>
|
||||
* <li><code>-u,--username <dn></code> DN to bind with. Defaults to "". Optional.</li>
|
||||
* <li><code>-p,--password <password></code> Password to bind with. Defaults to "". Optional.</li>
|
||||
* <li><code>-t,--outputdir <output directory></code> Base output directory, defaults to ".". Optional.</li>
|
||||
* <li><code>-k,--package <package name></code> Package to create the Java class in. Mandatory.</li>
|
||||
* <li><code>-l,--url <ldap url></code> Ldap url of the directory service to bind to. Defaults to <code>ldap://127.0.0.1:389</code>. Optional.</li>
|
||||
* <li><code>-o,--objectclasses <LDAP object class lists></code> Comma separated list of LDAP object classes. Mandatory.</li>
|
||||
* <li><code>-u,--username <dn></code> DN to bind with. Defaults to "". Optional.</li>
|
||||
* <li><code>-p,--password <password></code> Password to bind with. Defaults to "". Optional.</li>
|
||||
* <li><code>-t,--outputdir <output directory></code> Base output directory, defaults to ".". Optional.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
public final class SchemaToJava {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SchemaToJava.class);
|
||||
|
||||
@@ -27,17 +27,17 @@ import java.util.Hashtable;
|
||||
* <code>SchemaViewer</code> takes the following flags:
|
||||
* <ul>
|
||||
* <li><code>-h,--help<</code> Print this help message</li>
|
||||
* <li><code>-l,--url <arg></code> Ldap url of directory to bind to (defaults to ldap://127.0.0.1:389)</li>
|
||||
* <li><code>-u,--username <arg></code> DN to bind with (defaults to "")</li>
|
||||
* <li><code>-p,--password <arg></code> Password to bind with (defaults to "")</li>
|
||||
* <li><code>-o,--objectclass <arg></code> Object class name or ? for all. Print object class schema</li>
|
||||
* <li><code>-a,--attribute <arg></code> Attribute name or ? for all. Print attribute schema</li>
|
||||
* <li><code>-s,--syntax <arg></code> Syntax or ? for all. Print syntax</li>
|
||||
* <li><code>-l,--url <arg></code> Ldap url of directory to bind to (defaults to ldap://127.0.0.1:389)</li>
|
||||
* <li><code>-u,--username <arg></code> DN to bind with (defaults to "")</li>
|
||||
* <li><code>-p,--password <arg></code> Password to bind with (defaults to "")</li>
|
||||
* <li><code>-o,--objectclass <arg></code> Object class name or ? for all. Print object class schema</li>
|
||||
* <li><code>-a,--attribute <arg></code> Attribute name or ? for all. Print attribute schema</li>
|
||||
* <li><code>-s,--syntax <arg></code> Syntax or ? for all. Print syntax</li>
|
||||
* </ul>
|
||||
*
|
||||
* Only one of <code>-a</code>, <code>-o</code> and <code>-s</code> should be specified.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*
|
||||
*/
|
||||
public final class SchemaViewer {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Provides a tool to create a Java class representation of a set of LDAP object classes
|
||||
* and a simple tool to view LDAP schema.
|
||||
*
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
* @author Paul Harvey <paul.at.pauls-place.me.uk>
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.odm.tools;
|
||||
@@ -32,7 +32,7 @@ import java.util.Collections;
|
||||
* for running integration tests against certain server configurations, enabling integration tests aimed at e.g. a particluar
|
||||
* DB server to run transparently at the computer of each individual developer without having to have the actual server software
|
||||
* installed on their computers.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Public AMIs will need to be created, bundled and registered for each server setup. A subclass of this FactoryBean
|
||||
* is then added to create the actual target object (e.g. a DataSource), implementing the {link #doCreateInstance} method.
|
||||
* This method will be supplied the IP address of the instance that was created, enabling the subclass to configure the
|
||||
|
||||
@@ -94,7 +94,7 @@ idea {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime"
|
||||
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.7.1.201405082137", classifier: "runtime"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
Reference in New Issue
Block a user