http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java b/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java deleted file mode 100644 index 1053349..0000000 --- a/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java +++ /dev/null @@ -1,169 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ - -package org.apache.james.mailbox.jcr.user.model; - -import java.util.ArrayList; -import java.util.List; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -import org.apache.james.mailbox.jcr.JCRImapConstants; -import org.apache.james.mailbox.jcr.Persistent; -import org.apache.james.mailbox.store.user.model.Subscription; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * JCR implementation of a {@link Subscription}. - */ -public class JCRSubscription implements Subscription, Persistent, JCRImapConstants { - private static final Logger LOGGER = LoggerFactory.getLogger(JCRSubscription.class); - - private static final String TOSTRING_SEPARATOR = " "; - - public static final String USERNAME_PROPERTY = "jamesMailbox:user"; - public static final String MAILBOXES_PROPERTY = "jamesMailbox:subscriptionMailboxes"; - - private Node node; - private final String mailbox; - private String username; - - - public JCRSubscription(Node node, String mailbox) { - this.node = node; - this.mailbox = mailbox; - } - - public JCRSubscription(String username, String mailbox) { - this.username = username; - this.mailbox = mailbox; - } - - @Override - public String getMailbox() { - return mailbox; - } - - @Override - public String getUser() { - if (isPersistent()) { - try { - return node.getProperty(USERNAME_PROPERTY).getString(); - } catch (RepositoryException e) { - LOGGER.error("Unable to access Property " + USERNAME_PROPERTY, e); - } - return null; - } - return username; - } - - @Override - public Node getNode() { - return node; - } - - - @Override - public boolean isPersistent() { - return node != null; - } - - @Override - public void merge(Node node) throws RepositoryException { - node.setProperty(USERNAME_PROPERTY, getUser()); - if (node.hasProperty(MAILBOXES_PROPERTY)) { - Value[] mailboxes = node.getProperty(MAILBOXES_PROPERTY).getValues(); - List<String> newMailboxes = new ArrayList<>(); - for (Value mailbox : mailboxes) { - String m = mailbox.getString(); - newMailboxes.add(m); - } - if (newMailboxes.contains(getMailbox()) == false) { - newMailboxes.add(getMailbox()); - - } - - node.setProperty(MAILBOXES_PROPERTY, newMailboxes.toArray(new String[newMailboxes.size()])); - } else { - node.setProperty(MAILBOXES_PROPERTY, new String[] {getMailbox()}); - } - this.node = node; - } - - @Override - public int hashCode() { - final int PRIME = 31; - int result = 1; - result = PRIME * result + getUser().hashCode(); - result = PRIME * result + getMailbox().hashCode(); - - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final JCRSubscription other = (JCRSubscription) obj; - if (getUser() != null) { - if (!getUser().equals(other.getUser())) { - return false; - } - } else { - if (other.getUser() != null) { - return false; - } - } - if (getMailbox() != null) { - if (!getMailbox().equals(other.getMailbox())) { - return false; - } - } else { - if (other.getMailbox() != null) { - return false; - } - } - return true; - } - - /** - * Renders output suitable for debugging. - * - * @return output suitable for debugging - */ - public String toString() { - - return "Subscription ( " - + "user = " + this.getUser() + TOSTRING_SEPARATOR - + "mailbox = " + this.getMailbox() + TOSTRING_SEPARATOR - + " )"; - } - - -}
http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/main/resources/META-INF/spring/mailbox-jcr.xml ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/main/resources/META-INF/spring/mailbox-jcr.xml b/mailbox/jcr/src/main/resources/META-INF/spring/mailbox-jcr.xml deleted file mode 100644 index 4aff1cb..0000000 --- a/mailbox/jcr/src/main/resources/META-INF/spring/mailbox-jcr.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <!-- - Mailbox JCR - --> - - <bean id="jcr-mailboxmanager" class="org.apache.james.mailbox.jcr.JCRMailboxManager" init-method="init"> - <constructor-arg index="0" ref="jcr-sessionMapperFactory"/> - <constructor-arg index="1" ref="authenticator"/> - <constructor-arg index="2" ref="authorizator"/> - <constructor-arg index="3" ref="jcr-locker"/> - <constructor-arg index="4" ref="storeRightManager"/> - <property name="quotaManager" ref="quotaManager"/> - <property name="quotaRootResolver" ref="quotaRootResolver"/> - <property name="quotaUpdater" ref="quotaUpdater"/> - <property name="delegatingMailboxListener" ref="delegating-listener"/> - </bean> - <bean id ="jcr-subscriptionManager" class="org.apache.james.mailbox.jcr.JCRSubscriptionManager"> - <constructor-arg index="0" ref="jcr-sessionMapperFactory"/> - </bean> - <bean id="jcr-sessionMapperFactory" class="org.apache.james.mailbox.jcr.JCRMailboxSessionMapperFactory"> - <constructor-arg index="0" ref="jcr-sessionJcrRepository"/> - <constructor-arg index="1" ref="jcr-uidProvider"/> - <constructor-arg index="2" ref="jcr-modSeqProvider"/> - </bean> - <bean id ="jcr-sessionJcrRepository" class="org.apache.james.mailbox.jcr.GlobalMailboxSessionJCRRepository" depends-on="imapCndLoader"> - <constructor-arg index="0" ref="jcrRepository"/> - <constructor-arg index="1" value="james"/> - <constructor-arg index="2" value="james"/> - <constructor-arg index="3" value="james"/> - </bean> - <bean id="jcr-uidProvider" class="org.apache.james.mailbox.jcr.mail.JCRUidProvider"> - <constructor-arg index="0" ref="jcr-locker"/> - <constructor-arg index="1" ref="jcr-sessionJcrRepository"/> - </bean> - <bean id="jcr-modSeqProvider" class="org.apache.james.mailbox.jcr.mail.JCRModSeqProvider"> - <constructor-arg index="0" ref="jcr-locker"/> - <constructor-arg index="1" ref="jcr-sessionJcrRepository"/> - </bean> - <bean id="jcrRepository" class="org.apache.jackrabbit.core.RepositoryImpl" destroy-method="shutdown"> - <constructor-arg index="0" ref="config" /> - </bean> - <bean id="imapCndLoader" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> - <property name="targetObject"><ref local="jcrUtils"/></property> - <property name="targetMethod"><value>registerCnd</value></property> - <property name="arguments"> - <list> - <ref local="jcrRepository"/> - <value>james</value> - <value>james</value> - <value>james</value> - </list> - </property> - </bean> - <bean id="jcrUtils" class="org.apache.james.mailbox.jcr.JCRUtils"/> - <bean id="config" class="org.apache.jackrabbit.core.config.RepositoryConfig" factory-method="create"> - <constructor-arg index="0" value="classpath:META-INF/org/apache/james/jcr-repository.xml" type="java.io.InputStream"/> - <constructor-arg index="1" value="var/store/jackrabbit" /> - </bean> - <alias name="jvm-locker" alias="jcr-locker"/> - - <bean id="jcr-mailbox-id-deserializer" class="org.apache.james.mailbox.jcr.JCRMailboxIdDeserializer"/> - -</beans> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/main/resources/jcr-repository.xml ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/main/resources/jcr-repository.xml b/mailbox/jcr/src/main/resources/jcr-repository.xml deleted file mode 100644 index 3fa87cf..0000000 --- a/mailbox/jcr/src/main/resources/jcr-repository.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?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. ---> - -<!-- See http://james.apache.org/server/3/config.html for usage --> - -<!DOCTYPE Repository - PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN" - "http://jackrabbit.apache.org/dtd/repository-2.0.dtd"> - -<Repository> - <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> - <param name="path" value="${rep.home}/repository"/> - </FileSystem> - <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/> - <Security appName="Jackrabbit"> - <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security"> - </SecurityManager> - <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"> - </AccessManager> - <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"> - <param name="anonymousId" value="anonymous"/> - <param name="adminId" value="admin"/> - </LoginModule> - </Security> - <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="james"/> - <Workspace name="${wsp.name}"> - <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> - <param name="path" value="${wsp.home}"/> - </FileSystem> - <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager"> - <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/> - <param name="schemaObjectPrefix" value="${wsp.name}_"/> - </PersistenceManager> - <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> - <param name="path" value="${wsp.home}/index"/> - <param name="supportHighlighting" value="true"/> - </SearchIndex> - </Workspace> - <Versioning rootPath="${rep.home}/version"> - <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> - <param name="path" value="${rep.home}/version" /> - </FileSystem> - <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager"> - <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/> - <param name="schemaObjectPrefix" value="version_"/> - </PersistenceManager> - </Versioning> - <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> - <param name="path" value="${rep.home}/repository/index"/> - <param name="supportHighlighting" value="true"/> - </SearchIndex> -</Repository> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/main/resources/mailbox-jcr.cnd ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/main/resources/mailbox-jcr.cnd b/mailbox/jcr/src/main/resources/mailbox-jcr.cnd deleted file mode 100644 index 89aae11..0000000 --- a/mailbox/jcr/src/main/resources/mailbox-jcr.cnd +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -<jamesMailbox = 'http://james.apache.org/imap/jcr/'> - -[jamesMailbox:user] > mix:created - mixin - - jamesMailbox:user (String) - - jamesMailbox:subscriptionMailboxes (STRING) multiple - + * (nt:unstructured) multiple - -[jamesMailbox:messageProperty] > mix:created - mixin - - jamesMailbox:propertyNamespace (STRING) mandatory - - jamesMailbox:propertyLocalName (STRING) mandatory - - jamesMailbox:propertyValue(STRING) mandatory - - jamesMailbox:propertyOrder (Long) mandatory - -[jamesMailbox:message] > mix:referenceable, mix:created, mix:created - mixin - - jamesMailbox:mailboxUUID (String) mandatory - - jamesMailbox:uid (LONG) mandatory - - jamesMailbox:modSeq (LONG) - - jamesMailbox:size (LONG) mandatory - - jamesMailbox:answered (BOOLEAN) - - jamesMailbox:deleted (BOOLEAN) - - jamesMailbox:draft (BOOLEAN) - - jamesMailbox:flagged (BOOLEAN) - - jamesMailbox:recent (BOOLEAN) - - jamesMailbox:seen (BOOLEAN) - - jamesMailbox:internalDate (DATE) - - jamesMailbox:userFlags (STRING) multiple - - jamesMailbox:messageBodyStartOctet (LONG) mandatory - - jamesMailbox:messageTextualLineCount (LONG) - - jamesMailbox:messageSubType (String) mandatory - + messageProperty (nt:unstructured) multiple - -[jamesMailbox:mailbox] > mix:referenceable, mix:lockable, mix:created - mixin - - jamesMailbox:mailboxUidValidity (LONG) - - jamesMailbox:mailboxName (STRING) - - jamesMailbox:mailboxLastUid (LONG) - - jamesMailbox:mailboxNamespace (STRING) - - jamesMailbox:mailboxUser (STRING) - - jamesMailbox:mailboxLastUid (LONG) - - jamesMailbox:mailboxHighestModSeq (LONG) - + * (nt:unstructured) multiple http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/reporting-site/site.xml ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/reporting-site/site.xml b/mailbox/jcr/src/reporting-site/site.xml deleted file mode 100644 index d919164..0000000 --- a/mailbox/jcr/src/reporting-site/site.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - 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. ---> -<project name="${project.name}"> - - <body> - - <menu ref="parent" /> - <menu ref="reports" /> - - </body> - -</project> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java deleted file mode 100644 index 79b7a64..0000000 --- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ - -package org.apache.james.mailbox.jcr; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.apache.james.mailbox.store.mail.model.MailboxIdDeserializer; -import org.junit.Before; -import org.junit.Test; - -public class JCRMailboxIdDeserializerTest { - - private static final String SERIALIZED_ID = "some_string"; - private static final JCRId JCR_ID = JCRId.of(SERIALIZED_ID); - - private MailboxIdDeserializer mailboxIdDeserializer; - - @Before - public void setUp() { - mailboxIdDeserializer = new JCRMailboxIdDeserializer(); - } - - @Test - public void deserializeShouldWork() throws Exception { - assertThat(mailboxIdDeserializer.deserialize(SERIALIZED_ID)).isEqualTo(JCR_ID); - } - -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java deleted file mode 100644 index 9f4c613..0000000 --- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ - -package org.apache.james.mailbox.jcr; - -import org.apache.jackrabbit.core.RepositoryImpl; -import org.apache.jackrabbit.core.config.RepositoryConfig; -import org.apache.james.mailbox.acl.GroupMembershipResolver; -import org.apache.james.mailbox.acl.MailboxACLResolver; -import org.apache.james.mailbox.acl.SimpleGroupMembershipResolver; -import org.apache.james.mailbox.acl.UnionMailboxACLResolver; -import org.apache.james.mailbox.exception.MailboxException; -import org.apache.james.mailbox.jcr.mail.JCRModSeqProvider; -import org.apache.james.mailbox.jcr.mail.JCRUidProvider; -import org.apache.james.mailbox.store.Authenticator; -import org.apache.james.mailbox.store.Authorizator; -import org.apache.james.mailbox.store.JVMMailboxPathLocker; -import org.apache.james.mailbox.store.StoreMailboxAnnotationManager; -import org.apache.james.mailbox.store.StoreRightManager; -import org.apache.james.mailbox.store.event.DefaultDelegatingMailboxListener; -import org.apache.james.mailbox.store.event.MailboxEventDispatcher; -import org.apache.james.mailbox.store.mail.model.DefaultMessageId; -import org.apache.james.mailbox.store.mail.model.impl.MessageParser; -import org.xml.sax.InputSource; - -public class JCRMailboxManagerProvider { - public static final String JACKRABBIT_HOME = "target/jackrabbit"; - - public static RepositoryImpl createRepository() { - RepositoryConfig config; - try { - config = RepositoryConfig.create(new InputSource(JCRMailboxManagerTest.class.getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME); - return RepositoryImpl.create(config); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public static JCRMailboxManager provideMailboxManager(String user, String pass, String workspace, RepositoryImpl repository) { - JCRUtils.registerCnd(repository, workspace, user, pass); - MailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass); - JVMMailboxPathLocker locker = new JVMMailboxPathLocker(); - JCRUidProvider uidProvider = new JCRUidProvider(locker, sessionRepos); - JCRModSeqProvider modSeqProvider = new JCRModSeqProvider(locker, sessionRepos); - JCRMailboxSessionMapperFactory mf = new JCRMailboxSessionMapperFactory(sessionRepos, uidProvider, modSeqProvider); - - MailboxACLResolver aclResolver = new UnionMailboxACLResolver(); - GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver(); - MessageParser messageParser = new MessageParser(); - - Authenticator noAuthenticator = null; - Authorizator noAuthorizator = null; - DefaultDelegatingMailboxListener delegatingListener = new DefaultDelegatingMailboxListener(); - MailboxEventDispatcher mailboxEventDispatcher = new MailboxEventDispatcher(delegatingListener); - StoreRightManager storeRightManager = new StoreRightManager(mf, aclResolver, groupMembershipResolver, mailboxEventDispatcher); - StoreMailboxAnnotationManager annotationManager = new StoreMailboxAnnotationManager(mf, storeRightManager); - JCRMailboxManager manager = new JCRMailboxManager(mf, noAuthenticator, noAuthorizator, locker, - messageParser, new DefaultMessageId.Factory(), mailboxEventDispatcher, delegatingListener, - annotationManager, storeRightManager); - - try { - manager.init(); - } catch (MailboxException e) { - throw new RuntimeException(e); - } - - return manager; - } - -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java deleted file mode 100644 index 91e3d95..0000000 --- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ - -package org.apache.james.mailbox.jcr; - -import static org.apache.james.mailbox.jcr.JCRMailboxManagerProvider.JACKRABBIT_HOME; - -import java.io.File; -import java.io.IOException; -import java.util.Optional; - -import org.apache.commons.io.FileUtils; -import org.apache.jackrabbit.core.RepositoryImpl; -import org.apache.james.mailbox.MailboxManager; -import org.apache.james.mailbox.MailboxManagerStressTest; -import org.junit.After; -import org.junit.Before; - -public class JCRMailboxManagerStressTest extends MailboxManagerStressTest { - - private Optional<RepositoryImpl> repository = Optional.empty(); - - @Override - @Before - public void setUp() throws Exception { - super.setUp(); - } - - @Override - protected MailboxManager provideManager() { - String user = "user"; - String pass = "pass"; - String workspace = null; - - if (!repository.isPresent()) { - repository = Optional.of(JCRMailboxManagerProvider.createRepository()); - } - - return JCRMailboxManagerProvider.provideMailboxManager(user, pass, workspace, repository.get()); - } - - @After - public void tearDown() { - if (repository.isPresent()) { - repository.get().shutdown(); - try { - FileUtils.forceDelete(new File(JACKRABBIT_HOME)); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java deleted file mode 100644 index 28baf61..0000000 --- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ -package org.apache.james.mailbox.jcr; - -import static org.apache.james.mailbox.jcr.JCRMailboxManagerProvider.JACKRABBIT_HOME; - -import java.io.File; -import java.io.IOException; -import java.util.Optional; - -import org.apache.commons.io.FileUtils; -import org.apache.jackrabbit.core.RepositoryImpl; -import org.apache.james.mailbox.MailboxManager; -import org.apache.james.mailbox.MailboxManagerTest; -import org.junit.After; -import org.junit.Before; - -public class JCRMailboxManagerTest extends MailboxManagerTest { - - private Optional<RepositoryImpl> repository = Optional.empty(); - - @Override - @Before - public void setUp() throws Exception { - super.setUp(); - } - - @Override - protected MailboxManager provideMailboxManager() { - String user = "user"; - String pass = "pass"; - String workspace = null; - - if (!repository.isPresent()) { - repository = Optional.of(JCRMailboxManagerProvider.createRepository()); - } - - return JCRMailboxManagerProvider.provideMailboxManager(user, pass, workspace, repository.get()); - } - - @Override - @After - public void tearDown() throws Exception { - super.tearDown(); - if (repository.isPresent()) { - repository.get().shutdown(); - try { - FileUtils.forceDelete(new File(JACKRABBIT_HOME)); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java deleted file mode 100644 index 9fefd7b..0000000 --- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ -package org.apache.james.mailbox.jcr; - -import java.io.File; -import java.io.IOException; - -import javax.jcr.RepositoryException; - -import org.apache.commons.io.FileUtils; -import org.apache.jackrabbit.core.RepositoryImpl; -import org.apache.jackrabbit.core.config.RepositoryConfig; -import org.apache.james.mailbox.AbstractSubscriptionManagerTest; -import org.apache.james.mailbox.SubscriptionManager; -import org.apache.james.mailbox.exception.SubscriptionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.xml.sax.InputSource; - -public class JCRSubscriptionManagerTest extends AbstractSubscriptionManagerTest { - private static final String JACKRABBIT_HOME = "target/jackrabbit"; - - public static final String META_DATA_DIRECTORY = "target/user-meta-data"; - - private static RepositoryImpl repository; - private static final String user = "user"; - private static final String pass = "pass"; - private static final String workspace = null; - - @BeforeClass - public static void before() throws RepositoryException { - RepositoryConfig config = RepositoryConfig.create(new InputSource(JCRMailboxManagerTest.class.getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME); - repository = RepositoryImpl.create(config); - - // Register imap cnd file - JCRUtils.registerCnd(repository, workspace, user, pass); - } - - @AfterClass - public static void after() throws IOException { - if (repository != null) { - repository.shutdown(); - } - FileUtils.forceDelete(new File(JACKRABBIT_HOME)); - } - - @Before - public void setUp() throws Exception { - super.setup(); - } - - @After - public void tearDown() throws SubscriptionException { - super.teardown(); - } - - @Override - public SubscriptionManager createSubscriptionManager() { - MailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass); - JCRMailboxSessionMapperFactory mf = new JCRMailboxSessionMapperFactory(sessionRepos, null, null); - return new JCRSubscriptionManager(mf); - } - -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/resources/logback-test.xml ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/resources/logback-test.xml b/mailbox/jcr/src/test/resources/logback-test.xml deleted file mode 100644 index f9a0ffb..0000000 --- a/mailbox/jcr/src/test/resources/logback-test.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<configuration> - - <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"> - <resetJUL>true</resetJUL> - </contextListener> - - <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern> - <immediateFlush>false</immediateFlush> - </encoder> - </appender> - - <root level="WARN"> - <appender-ref ref="CONSOLE" /> - </root> -</configuration> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/jcr/src/test/resources/test-repository.xml ---------------------------------------------------------------------- diff --git a/mailbox/jcr/src/test/resources/test-repository.xml b/mailbox/jcr/src/test/resources/test-repository.xml deleted file mode 100644 index 592cca8..0000000 --- a/mailbox/jcr/src/test/resources/test-repository.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?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.mem.MemoryFileSystem'> - </FileSystem> - <!-- - security configuration - --> - <Security appName="Jackrabbit"> - <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="default"> - </SecurityManager> - - <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"> - </AccessManager> - - <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"> - <param name="adminId" value="admin"/> - </LoginModule> - </Security> - - <Workspaces rootPath='${rep.home}/workspaces' defaultWorkspace='default'/> - - <Workspace name='${wsp.name}'> - <FileSystem class='org.apache.jackrabbit.core.fs.mem.MemoryFileSystem'> - </FileSystem> - <!-- - persistence manager of the workspace: - class: FQN of class implementing the PersistenceManager interface - --> - <PersistenceManager class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager"> - <param name="persistent" value="false"/> - </PersistenceManager> - - <SearchIndex class='org.apache.jackrabbit.core.query.lucene.SearchIndex'> - <param name='path' value='${wsp.home}/index'/> - <param name='textFilterClasses' value='org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor'/> - <param name='extractorPoolSize' value='2'/> - <param name='supportHighlighting' value='true'/> - </SearchIndex> - - </Workspace> - - <!-- - Configures the versioning - --> - <Versioning rootPath='${rep.home}/version'> - <FileSystem class='org.apache.jackrabbit.core.fs.mem.MemoryFileSystem'> - </FileSystem> - - <PersistenceManager class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager"> - <param name="persistent" value="false"/> - </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='textFilterClasses' value='org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor'/> - <param name='extractorPoolSize' value='2'/> - <param name='supportHighlighting' value='true'/> - </SearchIndex> - -</Repository> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/pom.xml ---------------------------------------------------------------------- diff --git a/mailbox/pom.xml b/mailbox/pom.xml index 277eafe..3b09d85 100644 --- a/mailbox/pom.xml +++ b/mailbox/pom.xml @@ -40,7 +40,6 @@ <module>caching</module> <module>cassandra</module> <module>elasticsearch</module> - <module>jcr</module> <module>jpa</module> <module>lucene</module> <module>maildir</module> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/spring/pom.xml ---------------------------------------------------------------------- diff --git a/mailbox/spring/pom.xml b/mailbox/spring/pom.xml index 1884f79..10c32e2 100644 --- a/mailbox/spring/pom.xml +++ b/mailbox/spring/pom.xml @@ -44,10 +44,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-jcr</artifactId> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>apache-james-mailbox-jpa</artifactId> </dependency> <dependency> @@ -90,10 +86,6 @@ </exclusions> </dependency> <dependency> - <groupId>javax.jcr</groupId> - <artifactId>jcr</artifactId> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> @@ -121,23 +113,6 @@ <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> - <!-- - JCR temporary desactivated because jackrabbit still uses lucene 2 - <dependency> - <groupId>org.apache.lucene</groupId> - <artifactId>lucene-core</artifactId> - <version>2.4.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-jcr-commons</artifactId> - </dependency> - --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml ---------------------------------------------------------------------- diff --git a/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml b/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml index 0798d0f..2774572 100644 --- a/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml +++ b/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml @@ -28,15 +28,11 @@ --> <import resource="classpath:META-INF/spring/mailbox-locker.xml"/> - <!-- TODO: fix dependency issues with lucene and JCR and re-enable --> <import resource="classpath:META-INF/spring/mailbox-jpa.xml"/> <import resource="classpath:META-INF/spring/mailbox-index-lucene.xml" /> <!-- <import resource="classpath:META-INF/spring/mailbox-elasticsearch.xml"/> --> - <!-- TODO: update spring context creation to match new Jackrabbit version --> - <!--<import resource="classpath:META-INF/spring/mailbox-jcr.xml" />--> - <import resource="classpath:META-INF/spring/mailbox-maildir.xml"/> <import resource="classpath:META-INF/spring/mailbox-memory.xml"/> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mailbox/spring/src/main/resources/mailbox-jcr.cnd ---------------------------------------------------------------------- diff --git a/mailbox/spring/src/main/resources/mailbox-jcr.cnd b/mailbox/spring/src/main/resources/mailbox-jcr.cnd deleted file mode 100644 index 4e9e88b..0000000 --- a/mailbox/spring/src/main/resources/mailbox-jcr.cnd +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -<jamesMailbox = 'http://james.apache.org/imap/jcr/'> - -[jamesMailbox:user] > mix:created - mixin - - jamesMailbox:user (String) - - jamesMailbox:subscriptionMailboxes (STRING) multiple - + * (nt:unstructured) multiple - - -[jamesMailbox:messageHeader] > mix:created, mix:lockable - mixin - - jamesMailbox:headerFieldName (STRING) mandatory - - jamesMailbox:headerValue(STRING) mandatory - - jamesMailbox:headerLineNumber (LONG) mandatory - -[jamesMailbox:messageProperty] > mix:created - mixin - - jamesMailbox:propertyNamespace (STRING) mandatory - - jamesMailbox:propertyLocalName (STRING) mandatory - - jamesMailbox:propertyValue(STRING) mandatory - - jamesMailbox:propertyOrder (Long) mandatory - -[jamesMailbox:message] > mix:referenceable, mix:created, mix:created - mixin - - jamesMailbox:mailboxUUID (String) mandatory - - jamesMailbox:uid (LONG) mandatory - - jamesMailbox:modSeq (LONG) - - jamesMailbox:size (LONG) mandatory - - jamesMailbox:answered (BOOLEAN) - - jamesMailbox:deleted (BOOLEAN) - - jamesMailbox:draft (BOOLEAN) - - jamesMailbox:flagged (BOOLEAN) - - jamesMailbox:recent (BOOLEAN) - - jamesMailbox:seen (BOOLEAN) - - jamesMailbox:internalDate (DATE) - - jamesMailbox:userFlags (STRING) multiple - - jamesMailbox:messageBodyStartOctet (LONG) mandatory - - jamesMailbox:messageTextualLineCount (LONG) - - jamesMailbox:messageSubType (String) mandatory - + messageHeader (nt:unstructured) multiple - + messageProperty (nt:unstructured) multiple - -[jamesMailbox:mailbox] > mix:referenceable, mix:lockable, mix:created - mixin - - jamesMailbox:mailboxUidValidity (LONG) - - jamesMailbox:mailboxName (STRING) - - jamesMailbox:mailboxLastUid (LONG) - - jamesMailbox:mailboxNamespace (STRING) - - jamesMailbox:mailboxUser (STRING) - + * (nt:unstructured) multiple http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/core/src/main/resources/test-repository.xml ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/test-repository.xml b/mpt/impl/imap-mailbox/core/src/main/resources/test-repository.xml deleted file mode 100644 index 592cca8..0000000 --- a/mpt/impl/imap-mailbox/core/src/main/resources/test-repository.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?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.mem.MemoryFileSystem'> - </FileSystem> - <!-- - security configuration - --> - <Security appName="Jackrabbit"> - <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="default"> - </SecurityManager> - - <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"> - </AccessManager> - - <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"> - <param name="adminId" value="admin"/> - </LoginModule> - </Security> - - <Workspaces rootPath='${rep.home}/workspaces' defaultWorkspace='default'/> - - <Workspace name='${wsp.name}'> - <FileSystem class='org.apache.jackrabbit.core.fs.mem.MemoryFileSystem'> - </FileSystem> - <!-- - persistence manager of the workspace: - class: FQN of class implementing the PersistenceManager interface - --> - <PersistenceManager class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager"> - <param name="persistent" value="false"/> - </PersistenceManager> - - <SearchIndex class='org.apache.jackrabbit.core.query.lucene.SearchIndex'> - <param name='path' value='${wsp.home}/index'/> - <param name='textFilterClasses' value='org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor'/> - <param name='extractorPoolSize' value='2'/> - <param name='supportHighlighting' value='true'/> - </SearchIndex> - - </Workspace> - - <!-- - Configures the versioning - --> - <Versioning rootPath='${rep.home}/version'> - <FileSystem class='org.apache.jackrabbit.core.fs.mem.MemoryFileSystem'> - </FileSystem> - - <PersistenceManager class="org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager"> - <param name="persistent" value="false"/> - </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='textFilterClasses' value='org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor'/> - <param name='extractorPoolSize' value='2'/> - <param name='supportHighlighting' value='true'/> - </SearchIndex> - -</Repository> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/LICENSE.txt ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/LICENSE.txt b/mpt/impl/imap-mailbox/jcr/LICENSE.txt deleted file mode 100644 index 2bb9ad2..0000000 --- a/mpt/impl/imap-mailbox/jcr/LICENSE.txt +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/NOTICE.txt ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/NOTICE.txt b/mpt/impl/imap-mailbox/jcr/NOTICE.txt deleted file mode 100644 index 1f5a037..0000000 --- a/mpt/impl/imap-mailbox/jcr/NOTICE.txt +++ /dev/null @@ -1,11 +0,0 @@ - -========================================================================= -== NOTICE file for use with the Apache License, Version 2.0, == -========================================================================= - -Apache JAMES -Copyright 2007-2008 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/pom.xml ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/pom.xml b/mpt/impl/imap-mailbox/jcr/pom.xml deleted file mode 100644 index 7314dc6..0000000 --- a/mpt/impl/imap-mailbox/jcr/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.james</groupId> - <artifactId>apache-james-mpt-imapmailbox</artifactId> - <version>3.2.0-SNAPSHOT</version> - </parent> - - <artifactId>apache-james-mpt-imapmailbox-jcr</artifactId> - <name>Apache James MPT Imap Mailbox - JCR</name> - - <dependencies> - <dependency> - <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-jcr</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mpt-imapmailbox-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-core</artifactId> - <scope>test</scope> - </dependency> - <!-- Use lucene 2.4.1 for now to let jcr tests pass --> - <dependency> - <groupId>org.apache.lucene</groupId> - <artifactId>lucene-core</artifactId> - <version>${lucene-core.version}</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/src/reporting-site/site.xml ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/src/reporting-site/site.xml b/mpt/impl/imap-mailbox/jcr/src/reporting-site/site.xml deleted file mode 100644 index f842307..0000000 --- a/mpt/impl/imap-mailbox/jcr/src/reporting-site/site.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - 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. ---> -<project name="${project.name}"> - - <body> - - <menu ref="reports" /> - - </body> - -</project> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java deleted file mode 100644 index afe14d9..0000000 --- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ -package org.apache.james.mpt.imapmailbox.jcr; - -import org.junit.Ignore; - -@Ignore("MPT-7 : JCR mailbox does not correctly release resources + append problems") -public class JcrMailboxTest { - -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java deleted file mode 100644 index 0cbff27..0000000 --- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ -package org.apache.james.mpt.imapmailbox.jcr; - -import org.apache.james.mpt.api.HostSystem; -import org.apache.james.mpt.api.ImapHostSystem; -import org.apache.james.mpt.imapmailbox.jcr.host.JCRHostSystem; - -import com.google.inject.AbstractModule; -import com.google.inject.Provides; -import com.google.inject.Singleton; - -public class JcrMailboxTestModule extends AbstractModule { - - @Override - protected void configure() { - bind(HostSystem.class).to(ImapHostSystem.class); - } - - @Provides - @Singleton - public ImapHostSystem provideImapHostSystem() throws Exception { - return JCRHostSystem.build(); - } - -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java deleted file mode 100644 index 0f62859..0000000 --- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java +++ /dev/null @@ -1,191 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ -package org.apache.james.mpt.imapmailbox.jcr.host; - -import java.io.File; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.NotImplementedException; -import org.apache.jackrabbit.core.RepositoryImpl; -import org.apache.jackrabbit.core.config.RepositoryConfig; -import org.apache.james.core.quota.QuotaCount; -import org.apache.james.core.quota.QuotaSize; -import org.apache.james.imap.api.process.ImapProcessor; -import org.apache.james.imap.encode.main.DefaultImapEncoderFactory; -import org.apache.james.imap.main.DefaultImapDecoderFactory; -import org.apache.james.imap.processor.main.DefaultImapProcessorFactory; -import org.apache.james.mailbox.MailboxManager; -import org.apache.james.mailbox.MailboxSession; -import org.apache.james.mailbox.acl.GroupMembershipResolver; -import org.apache.james.mailbox.acl.MailboxACLResolver; -import org.apache.james.mailbox.acl.SimpleGroupMembershipResolver; -import org.apache.james.mailbox.acl.UnionMailboxACLResolver; -import org.apache.james.mailbox.jcr.GlobalMailboxSessionJCRRepository; -import org.apache.james.mailbox.jcr.JCRMailboxManager; -import org.apache.james.mailbox.jcr.JCRMailboxSessionMapperFactory; -import org.apache.james.mailbox.jcr.JCRSubscriptionManager; -import org.apache.james.mailbox.jcr.JCRUtils; -import org.apache.james.mailbox.jcr.mail.JCRModSeqProvider; -import org.apache.james.mailbox.jcr.mail.JCRUidProvider; -import org.apache.james.mailbox.store.JVMMailboxPathLocker; -import org.apache.james.mailbox.store.StoreMailboxAnnotationManager; -import org.apache.james.mailbox.store.StoreRightManager; -import org.apache.james.mailbox.store.event.DefaultDelegatingMailboxListener; -import org.apache.james.mailbox.store.event.MailboxEventDispatcher; -import org.apache.james.mailbox.store.mail.model.DefaultMessageId; -import org.apache.james.mailbox.store.mail.model.impl.MessageParser; -import org.apache.james.mailbox.store.quota.DefaultUserQuotaRootResolver; -import org.apache.james.mailbox.store.quota.NoQuotaManager; -import org.apache.james.metrics.logger.DefaultMetricFactory; -import org.apache.james.mpt.api.ImapFeatures; -import org.apache.james.mpt.api.ImapFeatures.Feature; -import org.apache.james.mpt.host.JamesImapHostSystem; -import org.xml.sax.InputSource; - -public class JCRHostSystem extends JamesImapHostSystem { - - public static JamesImapHostSystem build() throws Exception { - return new JCRHostSystem(); - } - - private final JCRMailboxManager mailboxManager; - - private static final String JACKRABBIT_HOME = "target/jackrabbit"; - public static final String META_DATA_DIRECTORY = "target/user-meta-data"; - private static final ImapFeatures SUPPORTED_FEATURES = ImapFeatures.of(Feature.NAMESPACE_SUPPORT); - - private RepositoryImpl repository; - - public JCRHostSystem() throws Exception { - - delete(new File(JACKRABBIT_HOME)); - - try { - - String user = "user"; - String pass = "pass"; - String workspace = null; - RepositoryConfig config = RepositoryConfig.create(new InputSource(this.getClass().getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME); - repository = RepositoryImpl.create(config); - GlobalMailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass); - - // Register imap cnd file - JCRUtils.registerCnd(repository, workspace, user, pass); - - JVMMailboxPathLocker locker = new JVMMailboxPathLocker(); - JCRUidProvider uidProvider = new JCRUidProvider(locker, sessionRepos); - JCRModSeqProvider modSeqProvider = new JCRModSeqProvider(locker, sessionRepos); - JCRMailboxSessionMapperFactory mf = new JCRMailboxSessionMapperFactory(sessionRepos, uidProvider, modSeqProvider); - - MailboxACLResolver aclResolver = new UnionMailboxACLResolver(); - GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver(); - MessageParser messageParser = new MessageParser(); - - DefaultDelegatingMailboxListener delegatingListener = new DefaultDelegatingMailboxListener(); - MailboxEventDispatcher mailboxEventDispatcher = new MailboxEventDispatcher(delegatingListener); - StoreRightManager storeRightManager = new StoreRightManager(mf, aclResolver, groupMembershipResolver, mailboxEventDispatcher); - StoreMailboxAnnotationManager annotationManager = new StoreMailboxAnnotationManager(mf, storeRightManager); - mailboxManager = new JCRMailboxManager(mf, authenticator, authorizator, new JVMMailboxPathLocker(), messageParser, - new DefaultMessageId.Factory(), mailboxEventDispatcher, delegatingListener, - annotationManager, storeRightManager); - mailboxManager.init(); - - final ImapProcessor defaultImapProcessorFactory = - DefaultImapProcessorFactory.createDefaultProcessor(mailboxManager, - new JCRSubscriptionManager(mf), - new NoQuotaManager(), - new DefaultUserQuotaRootResolver(mf), - new DefaultMetricFactory()); - resetUserMetaData(); - MailboxSession session = mailboxManager.createSystemSession("test"); - mailboxManager.startProcessingRequest(session); - //mailboxManager.deleteEverything(session); - mailboxManager.endProcessingRequest(session); - mailboxManager.logout(session, false); - - configure(new DefaultImapDecoderFactory().buildImapDecoder(), new DefaultImapEncoderFactory().buildImapEncoder(), defaultImapProcessorFactory); - } catch (Exception e) { - shutdownRepository(); - throw e; - } - } - - @Override - public void afterTest() throws Exception { - resetUserMetaData(); - - } - - public void resetUserMetaData() throws Exception { - File dir = new File(META_DATA_DIRECTORY); - if (dir.exists()) { - FileUtils.deleteDirectory(dir); - } - dir.mkdirs(); - } - - //JCR tests are broken partly because of that method not being run - public void afterTests() throws Exception { - shutdownRepository(); - } - - private void shutdownRepository() throws Exception { - if (repository != null) { - repository.shutdown(); - repository = null; - } - } - - private void delete(File home) throws Exception { - if (home.exists()) { - File[] files = home.listFiles(); - if (files == null) { - return; - } - for (File f : files) { - if (f.isDirectory()) { - delete(f); - } else { - f.delete(); - } - } - home.delete(); - } - } - - @Override - protected MailboxManager getMailboxManager() { - return mailboxManager; - } - - @Override - public boolean supports(Feature... features) { - return SUPPORTED_FEATURES.supports(features); - } - - @Override - public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) { - throw new NotImplementedException(); - } - - @Override - protected void await() { - - } -} http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/mpt/impl/imap-mailbox/pom.xml ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/pom.xml b/mpt/impl/imap-mailbox/pom.xml index f384f58..20e70a5 100644 --- a/mpt/impl/imap-mailbox/pom.xml +++ b/mpt/impl/imap-mailbox/pom.xml @@ -39,7 +39,6 @@ <module>elasticsearch</module> <module>external-james</module> <module>inmemory</module> - <module>jcr</module> <module>jpa</module> <module>lucenesearch</module> <module>maildir</module> @@ -79,12 +78,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mpt-imapmailbox-jcr</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>apache-james-mpt-imapmailbox-jpa</artifactId> <version>${project.version}</version> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 24e4525..a080b77 100644 --- a/pom.xml +++ b/pom.xml @@ -614,7 +614,6 @@ <junit.plateform.version>1.2.0</junit.plateform.version> <junit.vintage.version>5.2.0</junit.vintage.version> <concurrent.version>1.3.4</concurrent.version> - <jcr.version>2.0</jcr.version> <xbean-spring.version>4.9</xbean-spring.version> <netty.version>3.10.6.Final</netty.version> <geronimo-annotation-spec.version>1.0.1</geronimo-annotation-spec.version> @@ -756,11 +755,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-jcr</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>apache-james-mailbox-jpa</artifactId> <version>${project.version}</version> </dependency> @@ -1216,11 +1210,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>james-server-data-jcr</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>james-server-data-jdbc</artifactId> <version>${project.version}</version> </dependency> @@ -2019,11 +2008,6 @@ <version>${javax.inject.version}</version> </dependency> <dependency> - <groupId>javax.jcr</groupId> - <artifactId>jcr</artifactId> - <version>${jcr.version}</version> - </dependency> - <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> @@ -2193,16 +2177,6 @@ </exclusions> </dependency> <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-jcr-commons</artifactId> - <version>${jackrabbit.version}</version> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-jcr-rmi</artifactId> - <version>${jackrabbit.version}</version> - </dependency> - <dependency> <groupId>org.apache.james.jspf</groupId> <artifactId>apache-jspf-resolver</artifactId> <version>${apache-jspf-resolver.version}</version> http://git-wip-us.apache.org/repos/asf/james-project/blob/876987c8/server/Overview.md ---------------------------------------------------------------------- diff --git a/server/Overview.md b/server/Overview.md index f270e8c..04b910c 100644 --- a/server/Overview.md +++ b/server/Overview.md @@ -26,7 +26,6 @@ I'll explain what I mean by 'component' and 'service' bellow. |-- data `-- data-api `-- data-file - `-- data-jcr `-- data-jdbc `-- data-jpa `-- data-ldap --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
