package org.appfuse.service;

import java.util.List;


/**
 * Business Delegate (Proxy) Interface to handle communication between web and
 * persistence layer.
 *
 * <p>
 * <a href="ResumeManager.java.html"><i>View Source</i></a>
 * </p>
 *
 * @author <a href="mailto:[email protected]">Matt Raible</a>
 * @version $Revision: 1.1 $ $Date: 2004/03/31 13:04:17 $
 */
public interface ResumeManager {
    //~ Methods ================================================================
    
    /**
     * Retrieves resumes based on a userId
     *
     * @param userId
     * @return List of resumes for user
     */
    public List getResumesForUser(String userId) throws Exception;

    /**
     * Retrives a single resume object based on a resumeId
     *
     * @param resumeId
     * @return populated Resume object
     */
    public Object getResume(String resumeId) throws Exception;

    /**
     * Saves a resume's information.  This method can also be used to add a new
     * resume.
     *
     * @param resume a populated resume object
     * @return updated resume information
     */
    public Object saveResume(Object resume) throws Exception;

    /**
     * Generic method to save an object - handles both update and insert.
     * @param o the object to save
     * @throws Exception
     */
    public Object saveObject(Object o) throws Exception;
    
    /**
     * Removes an object from the database by id
     *
     * @param obj the object to remove
     * @throws Exception when something goes wrong
     */
    public void removeObject(Object obj) throws Exception;

    /**
     * Gets a list of education experiences based on the passed in resumeId.
     * @param resumeId
     * @return
     * @throws Exception
     */
    public List getSchools(String resumeId) throws Exception;
    
    /**
     * Gets a specific education experience based on its id.
     * @param id
     * @return
     * @throws Exception
     */
    public Object getEducation(String id) throws Exception;

    /**
     * Gets a list of work experiences based on the passed in resumeId.
     * @param resumeId
     * @return
     * @throws Exception
     */
    public List getWorkHistory(String resumeId) throws Exception;
    
    /**
     * Gets a specific work experience based on its id.
     * @param id
     * @return
     * @throws Exception
     */
    public Object getExperience(String id) throws Exception;

    /**
     * Retrieves a single skill object based on its id
     *
     * @param id
     * @return populated ResumeSkill object
     */
    public Object getResumeSkill(String id) throws Exception;

    /**
     * Retrieves multiple skill objects based on a resumeId
     *
     * @param resumeId
     * @return List a list of position objects
     */
    public List getResumeSkills(String resumeId) throws Exception;
    
    /**
     * Gets a list of references based on the passed in resumeId.
     * @param resumeId
     * @return
     * @throws Exception
     */
    public List getReferences(String resumeId) throws Exception;

    /**
     * Gets a specific reference based on its id.
     * @param id
     * @return
     * @throws Exception
     */
    public Object getReference(String id) throws Exception;

        /**
     * Gets a list of memberships based on the passed in resumeId.
     * @param resumeId
     * @return
     * @throws Exception
     */
    public List getMemberships(String resumeId) throws Exception;

    /**
     * Gets a specific membership based on its id.
     * @param id
     * @return
     * @throws Exception
     */
    public Object getMembership(String id) throws Exception;
}