/hostadmiral/trunk/src/ak/hostadmiral/core/model/MailboxManager.java |
---|
261,7 → 261,7 |
{ |
Collection mailboxes = store.listOwnMailboxes(user); |
return iterateBeforeDelete(editor, mailboxes, known, CascadeDeleteElement.DELETE); |
return iterateBeforeDelete(editor, mailboxes, known); |
} |
public void userDeleting(User editor, User user) |
279,7 → 279,7 |
{ |
Collection mailboxes = store.listMailboxesForDomain(domain); |
return iterateBeforeDelete(editor, mailboxes, known, CascadeDeleteElement.DELETE); |
return iterateBeforeDelete(editor, mailboxes, known); |
} |
public void inetDomainDeleting(User editor, InetDomain domain) |
297,7 → 297,7 |
{ |
Collection mailboxes = store.listMailboxesForSystemUser(user); |
return iterateBeforeDelete(editor, mailboxes, known, CascadeDeleteElement.CHANGE); |
return iterateBeforeDelete(editor, mailboxes, known); |
} |
public void systemUserDeleting(User editor, SystemUser user) |
306,13 → 306,12 |
Collection mailboxes = store.listMailboxesForSystemUser(user); |
for(Iterator i = mailboxes.iterator(); i.hasNext(); ) { |
Mailbox mailbox = (Mailbox)i.next(); |
mailbox.setSystemUser(null); |
save(editor, mailbox); |
// FIXME do not delete, just reset system user (?) |
delete(editor, (Mailbox)i.next()); |
} |
} |
private Collection iterateBeforeDelete(User editor, Collection mailboxes, Collection known, int action) |
private Collection iterateBeforeDelete(User editor, Collection mailboxes, Collection known) |
throws ModelException |
{ |
Collection cascade = new ArrayList(); |
322,9 → 321,7 |
known.add(mailbox); |
if(mailbox.viewableBy(editor)) { |
if(action == CascadeDeleteElement.CHANGE && mailbox.editableBy(editor)) |
cascade.add(new CascadeDeleteElement(mailbox, CascadeDeleteElement.CHANGE, null)); |
else if(action == CascadeDeleteElement.DELETE && mailbox.deleteableBy(editor)) |
if(mailbox.deleteableBy(editor)) |
cascade.add(new CascadeDeleteElement(mailbox, CascadeDeleteElement.DELETE, |
this.beforeDelete(editor, mailbox, known))); |
else |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/store/hibernate/MailAliasHibernate.java |
---|
5,9 → 5,9 |
import java.util.Map; |
import java.util.HashMap; |
import org.hibernate.Hibernate; |
import org.hibernate.HibernateException; |
import org.hibernate.type.Type; |
import net.sf.hibernate.Hibernate; |
import net.sf.hibernate.HibernateException; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.CollectionInfo; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/store/hibernate/UserHibernate.java |
---|
5,9 → 5,9 |
import java.util.Map; |
import java.util.HashMap; |
import org.hibernate.Hibernate; |
import org.hibernate.HibernateException; |
import org.hibernate.type.Type; |
import net.sf.hibernate.Hibernate; |
import net.sf.hibernate.HibernateException; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.CollectionInfo; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/store/hibernate/MailboxHibernate.java |
---|
5,9 → 5,9 |
import java.util.Map; |
import java.util.HashMap; |
import org.hibernate.Hibernate; |
import org.hibernate.HibernateException; |
import org.hibernate.type.Type; |
import net.sf.hibernate.Hibernate; |
import net.sf.hibernate.HibernateException; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.CollectionInfo; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/store/hibernate/MailAliasDestinationHibernate.java |
---|
5,9 → 5,9 |
import java.util.Map; |
import java.util.HashMap; |
import org.hibernate.Hibernate; |
import org.hibernate.HibernateException; |
import org.hibernate.type.Type; |
import net.sf.hibernate.Hibernate; |
import net.sf.hibernate.HibernateException; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.CollectionInfo; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/store/hibernate/SystemUserHibernate.java |
---|
5,9 → 5,9 |
import java.util.Map; |
import java.util.HashMap; |
import org.hibernate.Hibernate; |
import org.hibernate.HibernateException; |
import org.hibernate.type.Type; |
import net.sf.hibernate.Hibernate; |
import net.sf.hibernate.HibernateException; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.CollectionInfo; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/store/hibernate/InetDomainHibernate.java |
---|
5,9 → 5,9 |
import java.util.Map; |
import java.util.HashMap; |
import org.hibernate.Hibernate; |
import org.hibernate.HibernateException; |
import org.hibernate.type.Type; |
import net.sf.hibernate.Hibernate; |
import net.sf.hibernate.HibernateException; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.CollectionInfo; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/Mailbox.java |
---|
131,7 → 131,7 |
/** |
* |
* @hibernate.set cascade="all" |
* @hibernate.set cascade="all" lazy="true" |
* @hibernate.collection-key column="obj" |
* @hibernate.collection-one-to-many class="ak.hostadmiral.core.model.PasswordStoreAbstract" |
*/ |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/User.java |
---|
174,7 → 174,7 |
/** |
* |
* @hibernate.set cascade="all" |
* @hibernate.set cascade="all" lazy="true" |
* @hibernate.collection-key column="obj" |
* @hibernate.collection-one-to-many class="ak.hostadmiral.core.model.PasswordStoreAbstract" |
*/ |
301,7 → 301,7 |
/** |
* |
* @hibernate.set |
* @hibernate.set lazy="true" |
* @hibernate.collection-key column="usr" |
* @hibernate.collection-one-to-many class="ak.hostadmiral.core.model.UserLogin" |
*/ |
/hostadmiral/trunk/src/ak/hostadmiral/core/model/MailAlias.java |
---|
118,7 → 118,7 |
/** |
* @return Collection(MailAliasDestination) |
* |
* @hibernate.bag inverse="true" cascade="all-delete-orphan" |
* @hibernate.bag inverse="true" cascade="all-delete-orphan" lazy="true" |
* @hibernate.collection-key column="alias" |
* @hibernate.collection-one-to-many class="ak.hostadmiral.core.model.MailAliasDestination" |
*/ |
/hostadmiral/trunk/src/ak/hostadmiral/core/config/Configurator.java |
---|
9,7 → 9,7 |
import org.apache.log4j.Logger; |
import org.apache.commons.digester.Digester; |
import org.hibernate.HibernateException; |
import net.sf.hibernate.HibernateException; |
import ak.hostadmiral.util.ConfigInit; |
import ak.hostadmiral.util.ModelException; |
/hostadmiral/trunk/src/ak/hostadmiral/core/servlet/LoginFilter.java |
---|
111,7 → 111,7 |
if(!(request instanceof HttpServletRequest)) |
throw new ServletException("Do not know how to handle non-HTTP requests"); |
if(!(response instanceof HttpServletResponse)) |
throw new ServletException("Do not know how to handle non-HTTP responses"); |
throw new ServletException("Do not know how to handle non-HTTP response"); |
HttpServletRequest httpRequest = (HttpServletRequest)request; |
HttpServletResponse httpResponse = (HttpServletResponse)response; |
/hostadmiral/trunk/src/ak/hostadmiral/core/servlet/HibernateFilter.java |
---|
20,7 → 20,7 |
import org.apache.log4j.Logger; |
import org.hibernate.HibernateException; |
import net.sf.hibernate.HibernateException; |
import ak.hostadmiral.util.ModelException; |
import ak.hostadmiral.util.hibernate.HibernateUtil; |
/hostadmiral/trunk/src/ak/hostadmiral/util/hibernate/HibernateUtil.java |
---|
10,10 → 10,9 |
import java.sql.ResultSet; |
import java.sql.SQLException; |
import org.hibernate.*; |
import org.hibernate.cfg.*; |
import org.hibernate.type.Type; |
import org.hibernate.classic.Session; |
import net.sf.hibernate.*; |
import net.sf.hibernate.cfg.*; |
import net.sf.hibernate.type.Type; |
import ak.hostadmiral.util.ModelStoreException; |
/hostadmiral/trunk/webapp/WEB-INF/lib/hibernate-3_1_2.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/dom4j-1.6.1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/log4j-1.2.11.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/jdbc2_0-stdext.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/asm-attrs.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/ehcache-1.1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/asm.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/jta.licence.txt |
---|
File deleted |
/hostadmiral/trunk/webapp/WEB-INF/lib/jdbc2_0-stdext.licence.txt |
---|
File deleted |
\ No newline at end of file |
/hostadmiral/trunk/webapp/WEB-INF/lib/commons-logging-1.0.4.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/apache.license.txt |
---|
File deleted |
/hostadmiral/trunk/webapp/WEB-INF/lib/commons-collections-2.1.1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/antlr-2.7.6rc1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/apache.license-2.0.txt |
---|
File deleted |
/hostadmiral/trunk/webapp/WEB-INF/lib/antlr.license.txt |
---|
File deleted |
/hostadmiral/trunk/webapp/WEB-INF/lib/cglib-2.1.3.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/hibernate2.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/commons-collections.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/commons-logging.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/cglib-full-2.0.1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/dom4j-1.4.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/log4j.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/lib/ehcache-0.7.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/webapp/WEB-INF/conf/hostadmiral_config.xml.default |
---|
37,7 → 37,7 |
<url>jdbc:postgresql://localhost/hostadmiral</url> |
<!-- DB dialect, must conform to DB driver --> |
<dialect>org.hibernate.dialect.PostgreSQLDialect</dialect> |
<dialect>net.sf.hibernate.dialect.PostgreSQLDialect</dialect> |
</settings> |
</datasource> |
/hostadmiral/trunk/doc/todo.txt |
---|
1,11 → 1,7 |
Host Admiral TODO |
================================================================================================================ |
Implement listerners as weak reference, create a general engine for this (?), possible java 1.5. |
Move logged in users accounting from the session hack to model, as weak references. |
======================================================================================================================== |
Show user no exceptions, just 'internal error'. |
Do not show any exceptions to user, show just 'internal error'. |
No unique error handle by mail alias creation. |
80,11 → 76,10 |
Double check concurency update. |
Study Hibernate behavior if it cannot save some information - seems to be not recoverable, |
restart needed. |
Study Hibernate behavior if it cannot save some information - seems to be not recoverable, restart needed. |
Done |
---------------------------------------------------------------------------------------------------------------- |
------------------------------------------------------------------------------------------------------------------------ |
+ Track database structure version. |
/hostadmiral/trunk/lib/ant/commons-logging-1.0.4.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xdoclet-hibernate-module-1.2.3.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xjavadoc-1.1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/log4j-1.2.11.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xdoclet-1.2.3.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xdoclet-xdoclet-module-1.2.3.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/commons-logging.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/log4j.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xdoclet-1.2.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xdoclet-hibernate-module-1.2.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xdoclet-xdoclet-module-1.2.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/hostadmiral/trunk/lib/ant/xjavadoc-1.0.2.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |