Thread: [Ejtools-cvs] libraries/common/src/main/org/ejtools/util/service ProfileHolder.java,NONE,1.1 Profile
Brought to you by:
letiemble
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service In directory sc8-pr-cvs1:/tmp/cvs-serv20661/common/src/main/org/ejtools/util/service Modified Files: Profile.java ProfileMetaData.java ProfileService.java ProfileServiceProvider.java Added Files: ProfileHolder.java ProfileRule.java Log Message: Adjust Eclipse build files Adjust some Javadoc Integrate Persistence framework Integrate Image export as PNG --- NEW FILE: ProfileHolder.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.util.service; /** * Description of the Interface * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface ProfileHolder { /** * Sets the profile attribute of the ProfileHolder object * * @param profile The new profile value */ void setProfile(Profile profile); } --- NEW FILE: ProfileRule.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.util.service; import java.util.Map; import org.ejtools.util.state.DefaultRule; import org.xml.sax.Attributes; /** * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class ProfileRule extends DefaultRule { /** * Description of the Method * * @param context Description of the Parameter */ public void loadEnter(Map context) { ProfileHolder holder = (ProfileHolder) context.get("HOLDER"); Profile profile = new Profile(); holder.setProfile(profile); context.put("PROFILE", profile); } /** * Description of the Class * * @author letiembl * @version $Revision: 1.1 $ * @created 18 juillet 2003 */ public static class ProfilePropertyRule extends DefaultRule { /** Description of the Field */ private String key; /** * Description of the Method * * @param context Description of the Parameter */ public void loadBody(Map context) { Profile profile = (Profile) context.get("PROFILE"); String text = (String) context.get("TEXT"); profile.put(this.key, text); } /** * Description of the Method * * @param context Description of the Parameter */ public void loadEnter(Map context) { Attributes attrs = (Attributes) context.get("ATTRIBUTES"); this.key = attrs.getValue("key"); } /** * Description of the Method * * @param context Description of the Parameter */ public void loadExit(Map context) { Profile profile = (Profile) context.get("PROFILE"); String text = profile.getProperty(this.key); if (text == null) { profile.setProperty(this.key, ""); } } } } Index: Profile.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/Profile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Profile.java 8 Jan 2003 21:18:02 -0000 1.1 --- Profile.java 15 Sep 2003 22:23:45 -0000 1.2 *************** *** 11,16 **** /** ! * @author letiembl ! * @created 24 septembre 2002 * @version $Revision$ */ --- 11,15 ---- /** ! * @author Laurent Etiemble * @version $Revision$ */ Index: ProfileMetaData.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileMetaData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProfileMetaData.java 8 Jan 2003 21:17:55 -0000 1.1 --- ProfileMetaData.java 15 Sep 2003 22:23:45 -0000 1.2 *************** *** 10,15 **** /** ! * @author letiembl ! * @created 14 novembre 2002 * @version $Revision$ */ --- 10,14 ---- /** ! * @author Laurent Etiemble * @version $Revision$ */ Index: ProfileService.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProfileService.java 8 Jan 2003 21:18:03 -0000 1.1 --- ProfileService.java 15 Sep 2003 22:23:45 -0000 1.2 *************** *** 10,15 **** /** ! * @author letiembl ! * @created 4 septembre 2002 * @version $Revision$ */ --- 10,14 ---- /** ! * @author Laurent Etiemble * @version $Revision$ */ Index: ProfileServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProfileServiceProvider.java 21 Feb 2003 22:41:00 -0000 1.2 --- ProfileServiceProvider.java 15 Sep 2003 22:23:45 -0000 1.3 *************** *** 16,25 **** import java.util.Vector; ! import org.apache.log4j.Category; import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; /** ! * @author letiembl ! * @created 4 septembre 2002 * @version $Revision$ */ --- 16,24 ---- import java.util.Vector; ! import org.apache.log4j.Logger; import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; /** ! * @author Laurent Etiemble * @version $Revision$ */ *************** *** 33,37 **** protected ProfileService service = null; /** Description of the Field */ ! private static Category logger = Category.getInstance(ProfileServiceProvider.class); --- 32,36 ---- protected ProfileService service = null; /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ProfileServiceProvider.class); *************** *** 149,152 **** --- 148,152 ---- { String key = orderedKeys[i]; + logger.debug("Loading key " + key); Profile data = new Profile(); *************** *** 164,167 **** --- 164,168 ---- catch (IOException e) { + logger.error("Error while loading profiles", e); } } |