Index: topia-security/src/java/org/codelutin/topia/history/entities/HistoryImpl.java diff -u /dev/null topia-security/src/java/org/codelutin/topia/history/entities/HistoryImpl.java:1.1 --- /dev/null Tue Oct 17 13:50:44 2006 +++ topia-security/src/java/org/codelutin/topia/history/entities/HistoryImpl.java Tue Oct 17 13:50:39 2006 @@ -0,0 +1,66 @@ +/* *##% + * Copyright (C) 2006 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * HistoryImpl.java + * + * Created: 13 oct. 06 20:55:44 + * + * @author poussin + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2006/10/17 13:50:39 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia.history.entities; + +import java.io.Writer; +import java.util.Date; + +import org.codelutin.topia.persistence.TopiaId; +import org.codelutin.topia.security.util.TopiaSecurityUtil; + + +/** + * @author poussin + * + */ + +public class HistoryImpl extends HistoryAbstract { + + /* (non-Javadoc) + * @see org.codelutin.topia.security.entities.authorization.History#setAction(java.lang.String) + */ + public void setAction(String action) { + int val = TopiaSecurityUtil.actionsString2Int(action); + setAction(val); + } + + /* (non-Javadoc) + * @see org.codelutin.topia.security.entities.authorization.History#setTypeAndTarget(java.lang.String) + */ + public void setTypeAndTarget(String target) { + String type = TopiaId.getClassNameAsString(target); + setType(type); + setTarget(target); + } +} + +