Added a warning dialog for unimplemented functionality
authorn.hoffmann <n.hoffmann@localhost>
Thu, 21 Apr 2011 12:29:43 +0000 (12:29 +0000)
committern.hoffmann <n.hoffmann@localhost>
Thu, 21 Apr 2011 12:29:43 +0000 (12:29 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/GrantedAuthorityDetailSection.java

index f89d9859ca349bce425f0994ab8b497ff6390048..23d40259d5e9635ca93fe6690e78557c090ac0b4 100644 (file)
@@ -1,26 +1,24 @@
 // $Id$
 /**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy 
+ * http://www.e-taxonomy.eu
+ 
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 
 package eu.etaxonomy.taxeditor.ui.section.group;
 
 import java.util.Collection;
 
-import org.eclipse.jface.viewers.ISelectionProvider;
 import org.springframework.security.core.GrantedAuthority;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -28,7 +26,8 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  * @created Mar 9, 2011
  * @version 1.0
  */
-public class GrantedAuthorityDetailSection extends AbstractEntityCollectionSection<Group, GrantedAuthority> {
+public class GrantedAuthorityDetailSection extends
+               AbstractEntityCollectionSection<Group, GrantedAuthority> {
 
        /**
         * @param formFactory
@@ -40,57 +39,80 @@ public class GrantedAuthorityDetailSection extends AbstractEntityCollectionSecti
        public GrantedAuthorityDetailSection(CdmFormFactory formFactory,
                        ConversationHolder conversation, ICdmFormElement parentElement,
                        int style) {
-               super(formFactory, conversation, parentElement, "Granted Authorities", style);
+               super(formFactory, conversation, parentElement, "Granted Authorities",
+                               style);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getCollection(java.lang.Object)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
+        * getCollection(java.lang.Object)
         */
        @Override
        public Collection<GrantedAuthority> getCollection(Group entity) {
                return entity.getGrantedAuthorities();
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#createNewElement()
+       /*
+        * (non-Javadoc)
+        * 
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
+        * createNewElement()
         */
        @Override
        public GrantedAuthority createNewElement() {
-               GrantedAuthority selection = null; // TODO GrantedAuthoritySelectionDialog.select(...);
+               StoreUtil
+                               .warningDialog("Not implemented yet", getClass(),
+                                               "This functionality needs to be implemented in CDM Library first.");
+               // TODO GrantedAuthoritySelectionDialog.select(...);
+               GrantedAuthority selection = null;
                return selection;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#addElement(java.lang.Object)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#addElement
+        * (java.lang.Object)
         */
        @Override
        public void addElement(GrantedAuthority element) {
                getEntity().addGrantedAuthority(element);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#removeElement(java.lang.Object)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
+        * removeElement(java.lang.Object)
         */
        @Override
        public void removeElement(GrantedAuthority element) {
                getEntity().removeGrantedAuthority(element);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getEmptyString()
+       /*
+        * (non-Javadoc)
+        * 
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
+        * getEmptyString()
         */
        @Override
        public String getEmptyString() {
                return "No Granted Athorities yet.";
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getTooltipString()
+       /*
+        * (non-Javadoc)
+        * 
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
+        * getTooltipString()
         */
        @Override
        protected String getTooltipString() {
                return "Add a Granted Authority";
        }
 
-       
 }