// $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;
/**
* @created Mar 9, 2011
* @version 1.0
*/
-public class GrantedAuthorityDetailSection extends AbstractEntityCollectionSection<Group, GrantedAuthority> {
+public class GrantedAuthorityDetailSection extends
+ AbstractEntityCollectionSection<Group, GrantedAuthority> {
/**
* @param formFactory
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";
}
-
}