Project

General

Profile

« Previous | Next » 

Revision 3d3773ab

Added by Niels Hoffmann over 12 years ago

Adapted to changes in homotypic group handling

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java
12 12

  
13 13
import java.util.Observable;
14 14

  
15
import org.eclipse.core.runtime.IProgressMonitor;
16
import org.eclipse.ui.IMemento;
15 17
import org.springframework.security.authentication.BadCredentialsException;
16 18
import org.springframework.security.authentication.LockedException;
17 19
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
......
22 24
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
23 25
import eu.etaxonomy.cdm.model.common.User;
24 26
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
27
import eu.etaxonomy.taxeditor.model.IContextListener;
25 28

  
26 29
/**
27 30
 * <p>LoginManager class.</p>
......
30 33
 * @created 03.07.2009
31 34
 * @version 1.0
32 35
 */
33
public class LoginManager extends Observable implements IConversationEnabled{
36
public class LoginManager extends Observable implements IConversationEnabled, IContextListener{
34 37
	
35 38
	private ConversationHolder conversation;
36 39
	
40
	public LoginManager(){
41
		CdmStore.getContextManager().addContextListener(this);
42
	}
43
	
37 44
	/**
38 45
	 * <p>authenticate</p>
39 46
	 *
......
112 119
		
113 120
		return "admin".equals(getAuthenticatedUser().getUsername());
114 121
	}
122

  
123
	@Override
124
	public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
125
		
126
	}
127

  
128
	@Override
129
	public void contextStop(IMemento memento, IProgressMonitor monitor) {
130
		
131
	}
132

  
133
	@Override
134
	public void contextStart(IMemento memento, IProgressMonitor monitor) {
135
		conversation = CdmStore.createConversation();
136
	}
137

  
138
	@Override
139
	public void contextRefresh(IProgressMonitor monitor) {
140
		conversation = CdmStore.createConversation();
141
	}
142

  
143
	@Override
144
	public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
145
		
146
	}
115 147
}

Also available in: Unified diff