performed javacscript:fix and worked on documentation
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / store / StoreUtil.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 java.util.UUID;
14
15 import org.eclipse.core.commands.operations.IOperationHistory;
16 import org.eclipse.core.commands.operations.IUndoContext;
17 import org.eclipse.jface.action.IStatusLineManager;
18
19 import eu.etaxonomy.taxeditor.model.AbstractUtility;
20 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
21
22 /**
23 * <p>StoreUtil class.</p>
24 *
25 * @author n.hoffmann
26 * @created 11.05.2009
27 * @version 1.0
28 */
29 public class StoreUtil extends AbstractUtility {
30
31 /**
32 * <p>checktaxonExists</p>
33 *
34 * @param fromString a {@link java.util.UUID} object.
35 */
36 public static void checktaxonExists(UUID fromString) {
37 // if (CdmStore.getTaxonService().getTaxonByUuid(UUID.fromString(uuid)) == null) {
38 // logger.warn("Couldn't find taxon with UUID " + uuid);
39 // return null;
40 // }
41 }
42
43 /**
44 * <p>getOperationHistory</p>
45 *
46 * @return a {@link org.eclipse.core.commands.operations.IOperationHistory} object.
47 */
48 public static IOperationHistory getOperationHistory() {
49 return TaxeditorStorePlugin.getDefault().getWorkbench().
50 getOperationSupport().getOperationHistory();
51 }
52
53 /**
54 * <p>setStatusLineManager</p>
55 *
56 * @param manager a {@link org.eclipse.jface.action.IStatusLineManager} object.
57 */
58 public static void setStatusLineManager(IStatusLineManager manager) {
59 statusLineManager = manager;
60 }
61
62
63 /**
64 * <p>getUndoContext</p>
65 *
66 * @return a {@link org.eclipse.core.commands.operations.IUndoContext} object.
67 */
68 public static IUndoContext getUndoContext(){
69 return IOperationHistory.GLOBAL_UNDO_CONTEXT;
70 }
71
72 /**
73 * <p>getPluginId</p>
74 *
75 * @return a {@link java.lang.String} object.
76 */
77 protected static String getPluginId(){
78 return TaxeditorStorePlugin.PLUGIN_ID;
79 }
80 }