+ boolean wasMember = getTeamMembers().remove(person);
+ if (wasMember){
+ firePropertyChange("teamMember", person, null);
+ }
+
+ }
+
+
+ /**
+ * Generates or returns the {@link TeamOrPersonBase#getnomenclaturalTitle() nomenclatural identification} string for <i>this</i> team.
+ * This method overrides {@link TeamOrPersonBase#getNomenclaturalTitle() getNomenclaturalTitle}.
+ * This string is built with the {@link TeamOrPersonBase#getNomenclaturalTitle() abbreviated names}
+ * of all persons belonging to its (ordered) members' list if the flag
+ * {@link #protectedNomenclaturalTitleCache protectedNomenclaturalTitleCache} is not set.
+ * Otherwise this method returns the present nomenclatural abbreviation.
+ * In case the string is generated the cache strategy used is defined in
+ * {@link eu.etaxonomy.cdm.strategy.cache.agent.TeamDefaultCacheStrategy TeamDefaultCacheStrategy}.
+ * The result might be kept as nomenclatural abbreviation
+ * by using the {@link #setNomenclaturalTitle(String) setNomenclaturalTitle} method.
+ *
+ * @return a string which identifies <i>this</i> team for nomenclature
+ */
+ @Override
+ @Transient
+ public String getNomenclaturalTitle() {
+ if (protectedNomenclaturalTitleCache == PROTECTED){
+ return this.nomenclaturalTitle;
+ }
+ if (nomenclaturalTitle == null){
+ this.nomenclaturalTitle = cacheStrategy.getNomenclaturalTitle(this);
+ }else{
+ //as long as team members to not inform the team about changes the cache must be created new each time
+ nomenclaturalTitle = cacheStrategy.getNomenclaturalTitle(this);
+ }
+ return nomenclaturalTitle;
+ }
+
+ /**
+ * Assigns a {@link TeamOrPersonBase#nomenclaturalTitle nomenclatural identification} string to <i>this</i> team
+ * and protects it from overwriting.
+ * This method overrides {@link TeamOrPersonBase#setNomenclaturalTitle(String) setNomenclaturalTitle}.
+ *
+ * @see #getNomenclaturalTitle()
+ * @see #setNomenclaturalTitle(String, boolean)
+ */
+ @Override
+ public void setNomenclaturalTitle(String nomenclaturalTitle) {
+ this.setNomenclaturalTitle(nomenclaturalTitle, PROTECTED);
+ }
+
+ /**
+ * Assigns a {@link TeamOrPersonBase#nomenclaturalTitle nomenclatural identification} string to <i>this</i> team
+ * and a protection flag status to this string.
+ *
+ * @see #getNomenclaturalTitle()
+ */
+ public void setNomenclaturalTitle(String nomenclaturalTitle, boolean protectedNomenclaturalTitleCache) {
+ firePropertyChange("nomenclaturalTitle", this.nomenclaturalTitle, nomenclaturalTitle);
+ this.nomenclaturalTitle = nomenclaturalTitle;
+ this.protectedNomenclaturalTitleCache = protectedNomenclaturalTitleCache;