performed javacscript:fix and worked on documentation
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / store / StoreStateManager.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.store;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.ui.IMemento;
15
16 import eu.etaxonomy.taxeditor.dialogs.LoginDialog;
17 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
18
19 /**
20 * <p>StoreStateManager class.</p>
21 *
22 * @author n.hoffmann
23 * @created Sep 30, 2010
24 * @version 1.0
25 */
26 public class StoreStateManager extends ContextListenerAdapter {
27
28 /* (non-Javadoc)
29 * @see eu.etaxonomy.taxeditor.model.IContextListener#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
30 */
31 /** {@inheritDoc} */
32 @Override
33 public void contextStart(IMemento memento, IProgressMonitor monitor) {
34 authenticate();
35 }
36
37 private int authenticate(){
38 LoginDialog loginDialog = new LoginDialog(StoreUtil.getShell());
39 return loginDialog.open();
40 }
41 }