<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
-#Mon Nov 23 13:34:23 CET 2009
+#Sun Feb 21 11:17:20 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null
+additional.bundles = com.springsource.org.apache.directory.server.core
+source.. = src/main/java/
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
+@SuppressWarnings("restriction")
public class AdsContainer implements InitializingBean, DisposableBean {
private final static Log log = LogFactory.getLog(AdsContainer.class);
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
-#Wed Sep 16 10:02:19 CEST 2009
+#Sun Feb 21 11:14:36 CET 2010
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null
+additional.bundles = org.springframework.web,\
+ org.springframework.web.servlet,\
+ org.springframework.xml
+source.. = src/main/java/
private Marshaller marshaller;
private String contentTypeCharset = "UTF-8";
+ @SuppressWarnings("restriction")
public void serialize(Object obj, HttpServletRequest request,
HttpServletResponse response) {
response.setContentType("text/xml;charset=" + contentTypeCharset);
this.serializer = serializer;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "restriction" })
@Override
protected void renderMergedOutputModel(Map model,
HttpServletRequest request, HttpServletResponse response)
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
--- /dev/null
+additional.bundles = org.springframework.core
+source.. = src/main/java/
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" path="src/test/java"/>
- <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
-#Tue Nov 24 18:41:10 CET 2009
+#Sun Feb 21 11:15:10 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null
+additional.bundles = com.springsource.junit
+source.. = src/main/java/,\
+ src/test/java/,\
+ src/test/resources/
--- /dev/null
+/*
+ * 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.argeo.jcr;
+
+/**
+ * Copied from org.apache.jackrabbit.JcrConstants v1.6.0 in order to avoid a
+ * dependency to Jackrabbit.
+ */
+public interface ArgeoJcrConstants {
+ /**
+ * jcr:autoCreated
+ */
+ public static final String JCR_AUTOCREATED = "jcr:autoCreated";
+ /**
+ * jcr:baseVersion
+ */
+ public static final String JCR_BASEVERSION = "jcr:baseVersion";
+ /**
+ * jcr:child
+ */
+ public static final String JCR_CHILD = "jcr:child";
+ /**
+ * jcr:childNodeDefinition
+ */
+ public static final String JCR_CHILDNODEDEFINITION = "jcr:childNodeDefinition";
+ /**
+ * jcr:content
+ */
+ public static final String JCR_CONTENT = "jcr:content";
+ /**
+ * jcr:created
+ */
+ public static final String JCR_CREATED = "jcr:created";
+ /**
+ * jcr:data
+ */
+ public static final String JCR_DATA = "jcr:data";
+ /**
+ * jcr:defaultPrimaryType
+ */
+ public static final String JCR_DEFAULTPRIMARYTYPE = "jcr:defaultPrimaryType";
+ /**
+ * jcr:defaultValues
+ */
+ public static final String JCR_DEFAULTVALUES = "jcr:defaultValues";
+ /**
+ * jcr:encoding
+ */
+ public static final String JCR_ENCODING = "jcr:encoding";
+ /**
+ * jcr:frozenMixinTypes
+ */
+ public static final String JCR_FROZENMIXINTYPES = "jcr:frozenMixinTypes";
+ /**
+ * jcr:frozenNode
+ */
+ public static final String JCR_FROZENNODE = "jcr:frozenNode";
+ /**
+ * jcr:frozenPrimaryType
+ */
+ public static final String JCR_FROZENPRIMARYTYPE = "jcr:frozenPrimaryType";
+ /**
+ * jcr:frozenUuid
+ */
+ public static final String JCR_FROZENUUID = "jcr:frozenUuid";
+ /**
+ * jcr:hasOrderableChildNodes
+ */
+ public static final String JCR_HASORDERABLECHILDNODES = "jcr:hasOrderableChildNodes";
+ /**
+ * jcr:isCheckedOut
+ */
+ public static final String JCR_ISCHECKEDOUT = "jcr:isCheckedOut";
+ /**
+ * jcr:isMixin
+ */
+ public static final String JCR_ISMIXIN = "jcr:isMixin";
+ /**
+ * jcr:language
+ */
+ public static final String JCR_LANGUAGE = "jcr:language";
+ /**
+ * jcr:lastModified
+ */
+ public static final String JCR_LASTMODIFIED = "jcr:lastModified";
+ /**
+ * jcr:lockIsDeep
+ */
+ public static final String JCR_LOCKISDEEP = "jcr:lockIsDeep";
+ /**
+ * jcr:lockOwner
+ */
+ public static final String JCR_LOCKOWNER = "jcr:lockOwner";
+ /**
+ * jcr:mandatory
+ */
+ public static final String JCR_MANDATORY = "jcr:mandatory";
+ /**
+ * jcr:mergeFailed
+ */
+ public static final String JCR_MERGEFAILED = "jcr:mergeFailed";
+ /**
+ * jcr:mimeType
+ */
+ public static final String JCR_MIMETYPE = "jcr:mimeType";
+ /**
+ * jcr:mixinTypes
+ */
+ public static final String JCR_MIXINTYPES = "jcr:mixinTypes";
+ /**
+ * jcr:multiple
+ */
+ public static final String JCR_MULTIPLE = "jcr:multiple";
+ /**
+ * jcr:name
+ */
+ public static final String JCR_NAME = "jcr:name";
+ /**
+ * jcr:nodeTypeName
+ */
+ public static final String JCR_NODETYPENAME = "jcr:nodeTypeName";
+ /**
+ * jcr:onParentVersion
+ */
+ public static final String JCR_ONPARENTVERSION = "jcr:onParentVersion";
+ /**
+ * jcr:predecessors
+ */
+ public static final String JCR_PREDECESSORS = "jcr:predecessors";
+ /**
+ * jcr:primaryItemName
+ */
+ public static final String JCR_PRIMARYITEMNAME = "jcr:primaryItemName";
+ /**
+ * jcr:primaryType
+ */
+ public static final String JCR_PRIMARYTYPE = "jcr:primaryType";
+ /**
+ * jcr:propertyDefinition
+ */
+ public static final String JCR_PROPERTYDEFINITION = "jcr:propertyDefinition";
+ /**
+ * jcr:protected
+ */
+ public static final String JCR_PROTECTED = "jcr:protected";
+ /**
+ * jcr:requiredPrimaryTypes
+ */
+ public static final String JCR_REQUIREDPRIMARYTYPES = "jcr:requiredPrimaryTypes";
+ /**
+ * jcr:requiredType
+ */
+ public static final String JCR_REQUIREDTYPE = "jcr:requiredType";
+ /**
+ * jcr:rootVersion
+ */
+ public static final String JCR_ROOTVERSION = "jcr:rootVersion";
+ /**
+ * jcr:sameNameSiblings
+ */
+ public static final String JCR_SAMENAMESIBLINGS = "jcr:sameNameSiblings";
+ /**
+ * jcr:statement
+ */
+ public static final String JCR_STATEMENT = "jcr:statement";
+ /**
+ * jcr:successors
+ */
+ public static final String JCR_SUCCESSORS = "jcr:successors";
+ /**
+ * jcr:supertypes
+ */
+ public static final String JCR_SUPERTYPES = "jcr:supertypes";
+ /**
+ * jcr:system
+ */
+ public static final String JCR_SYSTEM = "jcr:system";
+ /**
+ * jcr:uuid
+ */
+ public static final String JCR_UUID = "jcr:uuid";
+ /**
+ * jcr:valueConstraints
+ */
+ public static final String JCR_VALUECONSTRAINTS = "jcr:valueConstraints";
+ /**
+ * jcr:versionHistory
+ */
+ public static final String JCR_VERSIONHISTORY = "jcr:versionHistory";
+ /**
+ * jcr:versionLabels
+ */
+ public static final String JCR_VERSIONLABELS = "jcr:versionLabels";
+ /**
+ * jcr:versionStorage
+ */
+ public static final String JCR_VERSIONSTORAGE = "jcr:versionStorage";
+ /**
+ * jcr:versionableUuid
+ */
+ public static final String JCR_VERSIONABLEUUID = "jcr:versionableUuid";
+
+ /**
+ * Pseudo property jcr:path used with query results
+ */
+ public static final String JCR_PATH = "jcr:path";
+ /**
+ * Pseudo property jcr:score used with query results
+ */
+ public static final String JCR_SCORE = "jcr:score";
+
+ /**
+ * mix:lockable
+ */
+ public static final String MIX_LOCKABLE = "mix:lockable";
+ /**
+ * mix:referenceable
+ */
+ public static final String MIX_REFERENCEABLE = "mix:referenceable";
+ /**
+ * mix:versionable
+ */
+ public static final String MIX_VERSIONABLE = "mix:versionable";
+ /**
+ * mix:shareable
+ */
+ public static final String MIX_SHAREABLE = "mix:shareable";
+ /**
+ * nt:base
+ */
+ public static final String NT_BASE = "nt:base";
+ /**
+ * nt:childNodeDefinition
+ */
+ public static final String NT_CHILDNODEDEFINITION = "nt:childNodeDefinition";
+ /**
+ * nt:file
+ */
+ public static final String NT_FILE = "nt:file";
+ /**
+ * nt:folder
+ */
+ public static final String NT_FOLDER = "nt:folder";
+ /**
+ * nt:frozenNode
+ */
+ public static final String NT_FROZENNODE = "nt:frozenNode";
+ /**
+ * nt:hierarchyNode
+ */
+ public static final String NT_HIERARCHYNODE = "nt:hierarchyNode";
+ /**
+ * nt:linkedFile
+ */
+ public static final String NT_LINKEDFILE = "nt:linkedFile";
+ /**
+ * nt:nodeType
+ */
+ public static final String NT_NODETYPE = "nt:nodeType";
+ /**
+ * nt:propertyDefinition
+ */
+ public static final String NT_PROPERTYDEFINITION = "nt:propertyDefinition";
+ /**
+ * nt:query
+ */
+ public static final String NT_QUERY = "nt:query";
+ /**
+ * nt:resource
+ */
+ public static final String NT_RESOURCE = "nt:resource";
+ /**
+ * nt:unstructured
+ */
+ public static final String NT_UNSTRUCTURED = "nt:unstructured";
+ /**
+ * nt:version
+ */
+ public static final String NT_VERSION = "nt:version";
+ /**
+ * nt:versionHistory
+ */
+ public static final String NT_VERSIONHISTORY = "nt:versionHistory";
+ /**
+ * nt:versionLabels
+ */
+ public static final String NT_VERSIONLABELS = "nt:versionLabels";
+ /**
+ * nt:versionedChild
+ */
+ public static final String NT_VERSIONEDCHILD = "nt:versionedChild";
+}
--- /dev/null
+package org.argeo.jcr;
+
+import java.beans.PropertyDescriptor;
+import java.beans.PropertyEditor;
+import java.io.InputStream;
+import java.util.Calendar;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.jcr.Item;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+
+public class BeanNodeMapper {
+ private final static Log log = LogFactory.getLog(BeanNodeMapper.class);
+
+ private Boolean versioning = false;
+ private String uuidProperty = "uuid";
+ private String classProperty = "class";
+ private Boolean strictUuidReference = false;
+ private String primaryNodeType = null;
+
+ public String storagePath(Object obj) {
+ String clss = obj.getClass().getName();
+ StringBuffer buf = new StringBuffer("/objects/");
+ StringTokenizer st = new StringTokenizer(clss, ".");
+ while (st.hasMoreTokens()) {
+ buf.append(st.nextToken()).append('/');
+ }
+ buf.append(obj.toString());
+ return buf.toString();
+ }
+
+ public Node saveOrUpdate(Session session, Object obj) {
+ return saveOrUpdate(session, storagePath(obj), obj);
+ }
+
+ public Node saveOrUpdate(Session session, String path, Object obj) {
+ try {
+ BeanWrapper beanWrapper = new BeanWrapperImpl(obj);
+ final Node node;
+ if (session.itemExists(path)) {
+ Item item = session.getItem(path);
+ if (!item.isNode())
+ throw new ArgeoException("An item exist under " + path
+ + " but it is not a node: " + item);
+ node = (Node) item;
+ } else {
+ String parentPath = JcrUtils.parentPath(path);
+ Node parentNode;
+ if (session.itemExists(path))
+ parentNode = (Node) session.getItem(parentPath);
+ else
+ parentNode = JcrUtils.mkdirs(session, parentPath, null,
+ versioning);
+ // create node
+ if (primaryNodeType != null)
+ node = parentNode.addNode(JcrUtils.lastPathElement(path),
+ primaryNodeType);
+ else
+ node = parentNode.addNode(JcrUtils.lastPathElement(path));
+ }
+
+ beanToNode(session, beanWrapper, node);
+ return node;
+ } catch (ArgeoException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new ArgeoException("Cannot save or update " + obj + " under "
+ + path, e);
+ }
+ }
+
+ protected void beanToNode(Session session, BeanWrapper beanWrapper,
+ Node node) throws RepositoryException {
+ if (log.isDebugEnabled())
+ log.debug("Map bean to node " + node.getPath());
+
+ properties: for (PropertyDescriptor pd : beanWrapper
+ .getPropertyDescriptors()) {
+ String name = pd.getName();
+
+ Object value = beanWrapper.getPropertyValue(name);
+ if (value == null)
+ continue properties;// skip
+
+ // if (uuidProperty != null && uuidProperty.equals(name)) {
+ // // node.addMixin(ArgeoJcrConstants.MIX_REFERENCEABLE);
+ // node.setProperty(ArgeoJcrConstants.JCR_UUID, value.toString());
+ // continue properties;
+ // }
+
+ if ("class".equals(name)) {
+ if (classProperty != null) {
+ node.setProperty(classProperty, ((Class<?>) value)
+ .getName());
+ // TODO: store a class hierarchy?
+ }
+ continue properties;
+ }
+
+ Value val = asValue(session, value);
+ if (val != null) {
+ node.setProperty(name, val);
+ continue properties;
+ }
+
+ if (value instanceof List<?>) {
+ List<?> lst = (List<?>) value;
+ Value[] values = new Value[lst.size()];
+ boolean atLeastOneSet = false;
+ for (int i = 0; i < lst.size(); i++) {
+ Object lstValue = lst.get(i);
+ values[i] = asValue(session, lstValue);
+ if (values[i] != null) {
+ atLeastOneSet = true;
+ } else {
+ Node childNode = findChildReference(session,
+ new BeanWrapperImpl(lstValue));
+ if (childNode != null) {
+ values[i] = session.getValueFactory().createValue(
+ childNode);
+ atLeastOneSet = true;
+ }
+ }
+ }
+
+ if (!atLeastOneSet && lst.size() != 0)
+ throw new ArgeoException(
+ "This type of list is not supported "
+ + lst.getClass());
+
+ node.setProperty(name, values);
+ continue properties;
+ }
+
+ if (value instanceof Map<?, ?>) {
+ Map<?, ?> map = (Map<?, ?>) value;
+ // TODO: add map specific type
+ Node mapNode = node.addNode(name);
+ for (Object key : map.keySet()) {
+ Object mapValue = map.get(key);
+ PropertyEditor pe = beanWrapper.findCustomEditor(key
+ .getClass(), null);
+ String keyStr = pe.getAsText();
+ // TODO: check string format
+ Node entryNode = mapNode.addNode(keyStr);
+ beanToNode(session, new BeanWrapperImpl(mapValue),
+ entryNode);
+ }
+
+ continue properties;
+ }
+
+ BeanWrapper child = new BeanWrapperImpl(value);
+ // TODO: delegate to another mapper
+
+ Node childNode = findChildReference(session, child);
+ if (childNode != null) {
+ node.setProperty(name, childNode);
+ continue properties;
+ }
+
+ // default case (recursive)
+ childNode = node.addNode(name);
+ beanToNode(session, child, childNode);
+ // if (childNode.isNodeType(ArgeoJcrConstants.MIX_REFERENCEABLE)) {
+ // log.debug("Add reference to " + childNode.getPath());
+ // node.setProperty(name, childNode);
+ // }
+ }
+ }
+
+ /** Returns null if value cannot be found */
+ protected Value asValue(Session session, Object value)
+ throws RepositoryException {
+ ValueFactory valueFactory = session.getValueFactory();
+ if (value instanceof Integer)
+ return valueFactory.createValue((Integer) value);
+ else if (value instanceof Long)
+ return valueFactory.createValue((Long) value);
+ else if (value instanceof Float)
+ return valueFactory.createValue((Float) value);
+ else if (value instanceof Double)
+ return valueFactory.createValue((Double) value);
+ else if (value instanceof Boolean)
+ return valueFactory.createValue((Boolean) value);
+ else if (value instanceof Calendar)
+ return valueFactory.createValue((Calendar) value);
+ else if (value instanceof CharSequence)
+ return valueFactory.createValue(value.toString());
+ else if (value instanceof InputStream)
+ return valueFactory.createValue((InputStream) value);
+ else
+ return null;
+ }
+
+ protected Node findChildReference(Session session, BeanWrapper child)
+ throws RepositoryException {
+ if (child.isReadableProperty(uuidProperty)) {
+ String childUuid = child.getPropertyValue(uuidProperty).toString();
+ try {
+ return session.getNodeByUUID(childUuid);
+ } catch (ItemNotFoundException e) {
+ if (strictUuidReference)
+ throw new ArgeoException("No node found with uuid "
+ + childUuid, e);
+ }
+ }
+ return null;
+ }
+
+ protected String propertyName(String name) {
+ return name;
+ }
+
+ public void setVersioning(Boolean versioning) {
+ this.versioning = versioning;
+ }
+
+}
--- /dev/null
+package org.argeo.jcr;
+
+import java.util.StringTokenizer;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+
+public class JcrUtils {
+ private final static Log log = LogFactory.getLog(JcrUtils.class);
+
+ public static String parentPath(String path) {
+ if (path.equals("/"))
+ throw new ArgeoException("Root path '/' has no parent path");
+ if (path.charAt(0) != '/')
+ throw new ArgeoException("Path " + path + " must start with a '/'");
+ String pathT = path;
+ if (pathT.charAt(pathT.length() - 1) == '/')
+ pathT = pathT.substring(0, pathT.length() - 2);
+
+ int index = pathT.lastIndexOf('/');
+ return pathT.substring(0, index);
+ }
+
+ public static String lastPathElement(String path) {
+ if (path.charAt(path.length() - 1) == '/')
+ throw new ArgeoException("Path " + path + " cannot end with '/'");
+ int index = path.lastIndexOf('/');
+ if (index <= 0)
+ throw new ArgeoException("Cannot find last path element for "
+ + path);
+ return path.substring(index + 1);
+ }
+
+ public static Node mkdirs(Session session, String path, String type,
+ Boolean versioning) {
+ try {
+ if (path.equals('/'))
+ return session.getRootNode();
+
+ StringTokenizer st = new StringTokenizer(path, "/");
+ StringBuffer current = new StringBuffer("/");
+ Node currentNode = session.getRootNode();
+ while (st.hasMoreTokens()) {
+ String part = st.nextToken();
+ current.append(part).append('/');
+ if (!session.itemExists(current.toString())) {
+ if (type != null)
+ currentNode = currentNode.addNode(part, type);
+ else
+ currentNode = currentNode.addNode(part);
+ if (versioning)
+ currentNode.addMixin(ArgeoJcrConstants.MIX_VERSIONABLE);
+ if (log.isTraceEnabled())
+ log.debug("Added folder " + part + " as " + current);
+ } else {
+ currentNode = (Node) session.getItem(current.toString());
+ }
+ }
+ session.save();
+ return currentNode;
+ } catch (RepositoryException e) {
+ throw new ArgeoException("Cannot mkdirs " + path, e);
+ }
+ }
+
+ /** Recursively outputs the contents of the given node. */
+ public static void debug(Node node) throws RepositoryException {
+ // First output the node path
+ log.debug(node.getPath());
+ // Skip the virtual (and large!) jcr:system subtree
+ if (node.getName().equals(ArgeoJcrConstants.JCR_SYSTEM)) {
+ return;
+ }
+
+ // Then the children nodes (recursive)
+ NodeIterator it = node.getNodes();
+ while (it.hasNext()) {
+ Node childNode = it.nextNode();
+ debug(childNode);
+ }
+
+ // Then output the properties
+ PropertyIterator properties = node.getProperties();
+ while (properties.hasNext()) {
+ Property property = properties.nextProperty();
+ if (property.getDefinition().isMultiple()) {
+ // A multi-valued property, print all values
+ Value[] values = property.getValues();
+ for (int i = 0; i < values.length; i++) {
+ log.debug(property.getPath() + "=" + values[i].getString());
+ }
+ } else {
+ // A single-valued property
+ log.debug(property.getPath() + "=" + property.getString());
+ }
+ }
+
+ }
+}
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
+@SuppressWarnings("restriction")
public class JackrabbitContainer implements InitializingBean, DisposableBean,
Repository {
private Resource configuration;
// }
}
+ @SuppressWarnings("restriction")
@Override
protected void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
-import java.util.StringTokenizer;
import javax.activation.MimetypesFileTypeMap;
import javax.jcr.Node;
import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
-import javax.jcr.Value;
import javax.jcr.version.Version;
import javax.jcr.version.VersionHistory;
import javax.jcr.version.VersionIterator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
// private String restoreBase = "/.restore";
public void mkdirs(String path) {
- try {
- StringTokenizer st = new StringTokenizer(path, "/");
- StringBuffer current = new StringBuffer("/");
- Node currentNode = session().getRootNode();
- while (st.hasMoreTokens()) {
- String part = st.nextToken();
- current.append(part).append('/');
- if (!session().itemExists(current.toString())) {
- currentNode = currentNode.addNode(part, "nt:folder");
- if (versioning)
- currentNode.addMixin("mix:versionable");
- if (log.isTraceEnabled())
- log.debug("Added folder " + part + " as " + current);
- } else {
- currentNode = (Node) session().getItem(current.toString());
- }
- }
- session().save();
- } catch (RepositoryException e) {
- throw new ArgeoException("Cannot mkdirs " + path, e);
- }
+ JcrUtils.mkdirs(session(), path, "nt:folder", versioning);
}
public void create(String path, Resource file, String mimeType) {
try {
Node fileNode = (Node) session().getItem(path);
-
- // if (revision == 0) {
- // InputStream in = fromVersion(fileNode.getBaseVersion());
- // if (log.isDebugEnabled())
- // log.debug("Retrieved " + path + " at base revision ");
- // return in;
- // }
-
VersionHistory history = fileNode.getVersionHistory();
int count = 0;
Version version = null;
return in;
}
- // protected InputStream restoreOrGetRevision(Node fileNode, Version
- // version,
- // Integer revision) throws RepositoryException {
- // Node parentFolder = (Node) fileNode
- // .getAncestor(fileNode.getDepth() - 1);
- // String restoreFolderPath = restoreBase + parentFolder.getPath();
- // mkdirs(restoreFolderPath);
- // String subNodeName = fileNode.getName() + "__" + fill(revision);
- // Node restoreFolder = (Node) session().getItem(restoreFolderPath);
- // if (!restoreFolder.hasNode(subNodeName)) {
- // parentFolder.restore(version, subNodeName, true);
- // }
- // return parentFolder.getNode(subNodeName + "/jcr:content").getProperty(
- // "jcr:data").getStream();
- // }
-
protected Session session() {
return session;
}
this.defaultEncoding = defaultEncoding;
}
- /** Recursively outputs the contents of the given node. */
- public static void debug(Node node) throws RepositoryException {
- // First output the node path
- log.debug(node.getPath());
- // Skip the virtual (and large!) jcr:system subtree
- if (node.getName().equals("jcr:system")) {
- return;
- }
-
- // Then output the properties
- PropertyIterator properties = node.getProperties();
- while (properties.hasNext()) {
- Property property = properties.nextProperty();
- if (property.getDefinition().isMultiple()) {
- // A multi-valued property, print all values
- Value[] values = property.getValues();
- for (int i = 0; i < values.length; i++) {
- log.debug(property.getPath() + " = "
- + values[i].getString());
- }
- } else {
- // A single-valued property
- log.debug(property.getPath() + " = " + property.getString());
- }
- }
-
- }
-
protected String fill(Integer number) {
int size = 4;
String str = number.toString();
--- /dev/null
+package org.argeo.jcr;
+
+import java.io.File;
+
+import javax.jcr.Repository;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.TransientRepository;
+import org.argeo.server.jcr.JcrResourceAdapterTest;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+public abstract class AbstractJcrTestCase extends TestCase {
+ private TransientRepository repository;
+
+ @Override
+ protected void setUp() throws Exception {
+ File homeDir = new File(System.getProperty("java.io.tmpdir"),
+ JcrResourceAdapterTest.class.getSimpleName());
+ FileUtils.deleteDirectory(homeDir);
+ repository = new TransientRepository(getRepositoryFile(), homeDir);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ }
+
+ protected File getRepositoryFile() throws Exception {
+ Resource res = new ClassPathResource("org/argeo/jcr/repository.xml");
+ return res.getFile();
+ }
+
+ protected Repository getRepository() {
+ return repository;
+ }
+}
--- /dev/null
+package org.argeo.jcr;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CollectionsObject {
+ private String id;
+ private String label;
+ private SimpleObject simpleObject;
+ private List<String> stringList = new ArrayList<String>();
+ private Map<String, Float> floatMap = new HashMap<String, Float>();
+ private Map<SimpleObject, String> objectMap = new HashMap<SimpleObject, String>();
+ private Map<String, Map<String, String>> mapOfMaps = new HashMap<String, Map<String, String>>();
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public SimpleObject getSimpleObject() {
+ return simpleObject;
+ }
+
+ public void setSimpleObject(SimpleObject simpleObject) {
+ this.simpleObject = simpleObject;
+ }
+
+ public List<String> getStringList() {
+ return stringList;
+ }
+
+ public void setStringList(List<String> stringList) {
+ this.stringList = stringList;
+ }
+
+ public Map<String, Float> getFloatMap() {
+ return floatMap;
+ }
+
+ public void setFloatMap(Map<String, Float> floatMap) {
+ this.floatMap = floatMap;
+ }
+
+ public Map<SimpleObject, String> getObjectMap() {
+ return objectMap;
+ }
+
+ public void setObjectMap(Map<SimpleObject, String> objectMap) {
+ this.objectMap = objectMap;
+ }
+
+ public Map<String, Map<String, String>> getMapOfMaps() {
+ return mapOfMaps;
+ }
+
+ public void setMapOfMaps(Map<String, Map<String, String>> mapOfMaps) {
+ this.mapOfMaps = mapOfMaps;
+ }
+}
--- /dev/null
+package org.argeo.jcr;
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+
+public class MapperTest extends AbstractJcrTestCase {
+ public void testSimpleObject() throws Exception {
+ SimpleObject mySo = new SimpleObject();
+ mySo.setInteger(100);
+ mySo.setString("hello world");
+
+ OtherObject oo1 = new OtherObject();
+ oo1.setKey("someKey");
+ oo1.setValue("stringValue");
+ mySo.setOtherObject(oo1);
+
+ OtherObject oo2 = new OtherObject();
+ oo2.setKey("anotherSimpleObject");
+ oo2.setValue(new SimpleObject());
+ mySo.setAnotherObject(oo2);
+
+ Session session = getRepository().login(
+ new SimpleCredentials("demo", "demo".toCharArray()));
+ BeanNodeMapper bnm = new BeanNodeMapper();
+
+ Node node = bnm.saveOrUpdate(session, mySo);
+ session.save();
+ JcrUtils.debug(node);
+ }
+}
--- /dev/null
+package org.argeo.jcr;
+
+public class OtherObject {
+ private String key;
+ private Object value;
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+}
--- /dev/null
+package org.argeo.jcr;
+
+import java.util.UUID;
+
+public class SimpleObject {
+ private String string;
+ private String uuid = UUID.randomUUID().toString();
+ private Integer integer;
+ private OtherObject otherObject;
+ private OtherObject anotherObject;
+
+ public String getString() {
+ return string;
+ }
+
+ public void setString(String sting) {
+ this.string = sting;
+ }
+
+ public Integer getInteger() {
+ return integer;
+ }
+
+ public void setInteger(Integer integer) {
+ this.integer = integer;
+ }
+
+ public OtherObject getOtherObject() {
+ return otherObject;
+ }
+
+ public void setOtherObject(OtherObject otherObject) {
+ this.otherObject = otherObject;
+ }
+
+ public OtherObject getAnotherObject() {
+ return anotherObject;
+ }
+
+ public void setAnotherObject(OtherObject anotherObject) {
+ this.anotherObject = anotherObject;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return string.equals(((SimpleObject) obj).string);
+ }
+
+ @Override
+ public int hashCode() {
+ return string.hashCode();
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+}
package org.argeo.server.jcr;
-import java.io.File;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
-import junit.framework.TestCase;
-
-import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.jackrabbit.core.TransientRepository;
+import org.argeo.jcr.AbstractJcrTestCase;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
-public class JcrResourceAdapterTest extends TestCase {
+public class JcrResourceAdapterTest extends AbstractJcrTestCase {
private static SimpleDateFormat sdf = new SimpleDateFormat(
"yyyyMMdd:hhmmss.SSS");
.getLog(JcrResourceAdapterTest.class);
private JcrResourceAdapter jra;
- private TransientRepository repository;
public void testCreate() throws Exception {
String basePath = "/test/subdir";
@Override
protected void setUp() throws Exception {
- File homeDir = new File(System.getProperty("java.io.tmpdir"),
- JcrResourceAdapterTest.class.getSimpleName());
- FileUtils.deleteDirectory(homeDir);
- Resource res = new ClassPathResource(
- "org/argeo/server/jcr/repository.xml");
- repository = new TransientRepository(res.getFile(), homeDir);
-
+ super.setUp();
jra = new JcrResourceAdapter();
- jra.setRepository(repository);
+ jra.setRepository(getRepository());
jra.setUsername("demo");
jra.setPassword("demo");
jra.afterPropertiesSet();
@Override
protected void tearDown() throws Exception {
+ super.tearDown();
jra.destroy();
- // repository.shutdown();
}
}
--- /dev/null
+<?xml version="1.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.
+-->
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
+ "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
+<!-- Example Repository Configuration File
+ Used by
+ - org.apache.jackrabbit.core.config.RepositoryConfigTest.java
+ -
+-->
+<Repository>
+ <!--
+ virtual file system where the repository stores global state
+ (e.g. registered namespaces, custom node types, etc.)
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+ </FileSystem>
+
+ <!--
+ security configuration
+ -->
+ <Security appName="Jackrabbit">
+ <!--
+ security manager:
+ class: FQN of class implementing the JackrabbitSecurityManager interface
+ -->
+ <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security">
+ <!--
+ workspace access:
+ class: FQN of class implementing the WorkspaceAccessManager interface
+ -->
+ <!-- <WorkspaceAccessManager class="..."/> -->
+ <!-- <param name="config" value="${rep.home}/security.xml"/> -->
+ </SecurityManager>
+
+ <!--
+ access manager:
+ class: FQN of class implementing the AccessManager interface
+ -->
+ <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
+ <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+ </AccessManager>
+
+ <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
+ <!--
+ anonymous user name ('anonymous' is the default value)
+ -->
+ <param name="anonymousId" value="anonymous"/>
+ <!--
+ administrator user id (default value if param is missing is 'admin')
+ -->
+ <param name="adminId" value="admin"/>
+ </LoginModule>
+ </Security>
+
+ <!--
+ location of workspaces root directory and name of default workspace
+ -->
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+ <!--
+ workspace configuration template:
+ used to create the initial workspace if there's no workspace yet
+ -->
+ <Workspace name="${wsp.name}">
+ <!--
+ virtual file system of the workspace:
+ class: FQN of class implementing the FileSystem interface
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>
+ <!--
+ persistence manager of the workspace:
+ class: FQN of class implementing the PersistenceManager interface
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:memory:db;create=true"/>
+ <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+ </PersistenceManager>
+ <!--
+ Search index and the file system it uses.
+ class: FQN of class implementing the QueryHandler interface
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${wsp.home}/index"/>
+ <param name="extractorPoolSize" value="2"/>
+ <param name="supportHighlighting" value="true"/>
+ </SearchIndex>
+ </Workspace>
+
+ <!--
+ Configures the versioning
+ -->
+ <Versioning rootPath="${rep.home}/version">
+ <!--
+ Configures the filesystem to use for versioning for the respective
+ persistence manager
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/version" />
+ </FileSystem>
+
+ <!--
+ Configures the persistence manager to be used for persisting version state.
+ Please note that the current versioning implementation is based on
+ a 'normal' persistence manager, but this could change in future
+ implementations.
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:memory:version;create=true"/>
+ <param name="schemaObjectPrefix" value="version_"/>
+ </PersistenceManager>
+ </Versioning>
+
+ <!--
+ Search index for content that is shared repository wide
+ (/jcr:system tree, contains mainly versions)
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${rep.home}/repository/index"/>
+ <param name="extractorPoolSize" value="2"/>
+ <param name="supportHighlighting" value="true"/>
+ </SearchIndex>
+</Repository>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
-#Wed Sep 16 09:48:59 CEST 2009
+#Sun Feb 21 11:16:01 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null
+source.. = src/main/java/,\
+ src/test/java/
objectMapper.setSerializerProvider(serializerProvider);
}
+ @SuppressWarnings("restriction")
public void serialize(Object obj, HttpServletRequest request,
HttpServletResponse response) {
if (asHtml)
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
-#Thu Oct 01 12:06:12 CEST 2009
+#Sun Feb 21 11:16:56 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null
+additional.bundles = com.springsource.junit
+source.. = src/main/java/,\
+ src/test/java/,\
+ src/test/resources/
import org.springframework.core.io.ClassPathResource;
+@SuppressWarnings("restriction")
public class JxlDaoSupportTest extends TestCase {
public void testBasic() throws Exception {
JxlDaoSupport jsd = new JxlDaoSupport();
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
--- /dev/null
+additional.bundles = org.springframework.web.servlet,\
+ org.springframework.web,\
+ org.springframework.context,\
+ org.springframework.beans
+source.. = src/main/java/
<module>org.argeo.server.ads</module>
<module>org.argeo.server.jackrabbit</module>
</modules>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>META-INF/**</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>META-INF</directory>
+ <includes>
+ <include>MANIFEST.MF</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${version.maven-bundle-plugin}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <manifestLocation>META-INF</manifestLocation>
+ <instructions>
+ <Bundle-Version>${project.version}-r${buildNumber}</Bundle-Version>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
+ <_removeheaders>Bnd-LastModified</_removeheaders>
+ </instructions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file