Project

General

Profile

Download (1.86 KB) Statistics
| Branch: | Tag: | Revision:
1 729887cf n.hoffmann
/**
2
 * 
3
 */
4 f211dd28 n.hoffmann
package eu.etaxonomy.taxeditor.ui.section.supplemental;
5 729887cf n.hoffmann
6
import java.util.Collection;
7
8 2d9a13f7 n.hoffmann
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
9 729887cf n.hoffmann
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
10
import eu.etaxonomy.cdm.model.media.Rights;
11 78222507 n.hoffmann
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
12 dacb59c9 Patric Plitzner
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
13 f211dd28 n.hoffmann
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
14 729887cf n.hoffmann
15
/**
16 3be6ef3e n.hoffmann
 * <p>RightsSection class.</p>
17 729887cf n.hoffmann
 *
18 3be6ef3e n.hoffmann
 * @author nho
19
 * @version $Id: $
20 729887cf n.hoffmann
 */
21
public class RightsSection extends AbstractEntityCollectionSection<IdentifiableEntity, Rights> {
22
23
	/**
24 3be6ef3e n.hoffmann
	 * <p>Constructor for RightsSection.</p>
25
	 *
26 78222507 n.hoffmann
	 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
27 3be6ef3e n.hoffmann
	 * @param style a int.
28 78222507 n.hoffmann
	 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
29 3be6ef3e n.hoffmann
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
30 729887cf n.hoffmann
	 */
31 2d9a13f7 n.hoffmann
	public RightsSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
32
		super(cdmFormFactory, conversation, parentElement, "Rights", style);
33 729887cf n.hoffmann
	}
34
35 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
36 729887cf n.hoffmann
	@Override
37
	public Rights createNewElement() {
38
		return Rights.NewInstance();
39
	}
40
41 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
42 729887cf n.hoffmann
	@Override
43
	public Collection<Rights> getCollection(IdentifiableEntity entity) {
44 cfcb0ce6 n.hoffmann
		return entity.getRights();
45 729887cf n.hoffmann
	}
46
47 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
48 729887cf n.hoffmann
	@Override
49
	public String getEmptyString() {
50
		return "No rights yet.";
51
	}
52
53 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
54 729887cf n.hoffmann
	@Override
55
	protected String getTooltipString() {
56
		// TODO Auto-generated method stub
57
		return "Create new rights.";
58
	}
59
60 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
61 729887cf n.hoffmann
	@Override
62
	public void addElement(Rights element) {
63
		getEntity().addRights(element);
64
	}
65
66 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
67 729887cf n.hoffmann
	@Override
68
	public void removeElement(Rights element) {
69
		getEntity().removeRights(element);
70
	}
71
72
}