3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.preference
.menu
;
12 import java
.util
.Collection
;
13 import java
.util
.List
;
16 import org
.eclipse
.jface
.preference
.PreferencePage
;
18 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
19 import eu
.etaxonomy
.taxeditor
.session
.ICdmEntitySession
;
20 import eu
.etaxonomy
.taxeditor
.session
.ICdmEntitySessionEnabled
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
28 public abstract class CdmPreferencePage
extends PreferencePage
implements ICdmEntitySessionEnabled
{
30 public CdmPreferencePage() {
34 public CdmPreferencePage(String title
) {
39 private void bindNullSession() {
40 if(CdmStore
.isActive()) {
41 CdmStore
.getCurrentSessionManager().bindNullSession();
45 protected void disposeNullSession() {
46 if(CdmStore
.isActive()) {
47 CdmStore
.getCurrentSessionManager().disposeNullSession();
52 public boolean performOk() {
54 return super.performOk();
58 public boolean performCancel() {
60 return super.performCancel();
64 * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
67 public ICdmEntitySession
getCdmEntitySession() {
68 return CdmStore
.getCurrentSessionManager().getNullSession();
72 * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
75 public <T
extends CdmBase
> Collection
<T
> getRootEntities() {
80 * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
83 public Map
<Object
, List
<String
>> getPropertyPathsMap() {