001/* 002 * Copyright 2011 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.glossary; 017 018import java.util.Collection; 019import java.util.Set; 020 021import org.ametys.plugins.repository.AmetysRepositoryException; 022 023/** 024 * A glossary definition. 025 */ 026public interface Definition 027{ 028 029 /** 030 * Get the word. 031 * @return the word 032 * @throws AmetysRepositoryException if an error occurs. 033 */ 034 public String getWord() throws AmetysRepositoryException; 035 036 /** 037 * Set the word. 038 * @param word the word to set 039 * @throws AmetysRepositoryException if an error occurs. 040 */ 041 public void setWord(String word) throws AmetysRepositoryException; 042 043 /** 044 * Get the variants. 045 * @return the variants 046 * @throws AmetysRepositoryException if an error occurs. 047 */ 048 public Set<String> getVariants() throws AmetysRepositoryException; 049 050 /** 051 * Set the variants. 052 * @param variants the variants to set 053 * @throws AmetysRepositoryException if an error occurs. 054 */ 055 public void setVariants(Collection<String> variants) throws AmetysRepositoryException; 056 057 /** 058 * Get the content. 059 * @return _the content 060 * @throws AmetysRepositoryException if an error occurs. 061 */ 062 public String getContent() throws AmetysRepositoryException; 063 064 /** 065 * Set the content. 066 * @param content the content to set 067 * @throws AmetysRepositoryException if an error occurs. 068 */ 069 public void setContent(String content) throws AmetysRepositoryException; 070 071 /** 072 * Get the displayOnText. 073 * @return _the displayOnText 074 * @throws AmetysRepositoryException if an error occurs. 075 */ 076 public boolean displayOnText() throws AmetysRepositoryException; 077 078 /** 079 * Set the displayOnText. 080 * @param displayOnText the displayOnText to set 081 * @throws AmetysRepositoryException if an error occurs. 082 */ 083 public void setDisplayOnText(boolean displayOnText) throws AmetysRepositoryException; 084 085 /** 086 * Get all forms. 087 * @return a list of all the word forms (word + variants). 088 * @throws AmetysRepositoryException if an error occurs. 089 */ 090 public Set<String> getAllForms() throws AmetysRepositoryException; 091 092}