001package org.nuxeo.project.sample;
002
003import java.util.List;
004
005import javax.faces.component.UIComponent;
006import javax.faces.context.FacesContext;
007import javax.faces.model.SelectItem;
008
009import org.jboss.seam.annotations.remoting.WebRemote;
010import org.nuxeo.ecm.core.api.DocumentModelList;
011import org.nuxeo.project.sample.BookManagerBean.BookInfo;
012
013/**
014 * Interface for the <code>bookManager</code> Seam component.
015 * <p>
016 * Use of this interface would be of course necessary if the Seam component was also an EJB3. In that latter case, the
017 * <code>WebRemote</code> annotation has to be put on the interface method, instead of the implementation method.
018 * </p>
019 */
020public interface BookManager {
021
022    public List<SelectItem> getAvailableKeywords();
023
024    public List<String> getKeywords();
025
026    public void setKeywords(List<String> keywords);
027
028    public void changeData();
029
030    public String getFirstName();
031
032    public void setFirstName(String s);
033
034    public void randomFirstName();
035
036    public String getLastName();
037
038    public void setLastName(String s);
039
040    public void randomLastName();
041
042    public String getIsbn();
043
044    public void setIsbn(String s);
045
046    public String toWizardPage(String page);
047
048    public String getWizardPage();
049
050    public String validateWizard();
051
052    public void resetKeywordValues();
053
054    public int getRating();
055
056    public void setRating(int rating);
057
058    public void validation(FacesContext context, UIComponent component, Object value);
059
060    public DocumentModelList getSearchResults();
061
062    public String getParentTitle();
063
064    public String duplicateSiblings();
065
066    public List<BookInfo> getBooksInFolder();
067
068    public boolean hasFilter();
069
070    public String getFilter();
071
072    public void setFilter(String filter);
073
074    /**
075     * Method to demonstrate Seam Remoting.
076     * <p>
077     * The annotation has to be on the interface in EJB3 situation. Otherwise it has to be on the component
078     * implementation.
079     * </p>
080     *
081     * @param param parameter used from the javascript code.
082     * @return something that uses the parameter
083     */
084    @WebRemote
085    public String something(String param);
086
087}