001package fr.ifremer.adagio.core.service.administration.user;
002
003/*
004 * #%L
005 * SIH-Adagio :: Core
006 * $Id:$
007 * $HeadURL:$
008 * %%
009 * Copyright (C) 2012 - 2014 Ifremer
010 * %%
011 * This program is free software: you can redistribute it and/or modify
012 * it under the terms of the GNU Affero General Public License as published by
013 * the Free Software Foundation, either version 3 of the License, or
014 * (at your option) any later version.
015 * 
016 * This program is distributed in the hope that it will be useful,
017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
019 * GNU General Public License for more details.
020 * 
021 * You should have received a copy of the GNU Affero General Public License
022 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
023 * #L%
024 */
025
026import org.springframework.stereotype.Service;
027import org.springframework.transaction.annotation.Transactional;
028
029@Transactional(readOnly = true)
030public interface PersonSessionService {
031
032    /**
033     * Init a session for a user. This will create a new session, or update if one session already exists for the user.
034     * 
035     * @param personId
036     *            the person identifier
037     * @return The session identifier
038     * @throws UserNotFoundException
039     *             if user not exists in the database
040     */
041    int initPersonSession(int personId) throws UserNotFoundException;
042
043}