You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(16) |
Sep
(10) |
Oct
(1) |
Nov
(2) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(148) |
Feb
(80) |
Mar
(41) |
Apr
(85) |
May
(247) |
Jun
(345) |
Jul
(237) |
Aug
(241) |
Sep
(439) |
Oct
(321) |
Nov
(413) |
Dec
(302) |
2004 |
Jan
(143) |
Feb
(147) |
Mar
(200) |
Apr
(107) |
May
(15) |
Jun
(36) |
Jul
(11) |
Aug
(1) |
Sep
(36) |
Oct
|
Nov
(6) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(115) |
May
(74) |
Jun
(215) |
Jul
(82) |
Aug
(47) |
Sep
(32) |
Oct
(8) |
Nov
(70) |
Dec
(24) |
2006 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/struts/struts-resume/src/ejb/org/appfuse/persistence In directory sc8-pr-cvs1:/tmp/cvs-serv28776 Added Files: BaseDAOHibernate.java BaseObject.java DAOException.java DAOFactory.java DAOFactoryHibernate.java Education.java Resume.java ResumeDAO.java ResumeDAOHibernate.java Role.java ServiceLocator.java Skill.java SkillGroup.java User.java UserDAO.java UserDAOHibernate.java Log Message: --- NEW FILE: BaseDAOHibernate.java --- package org.appfuse.persistence; import cirrus.hibernate.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Base class for Hibernate DAOs. This class defines common CRUD methods for * child classes to inherit. * * <p> * <a href="BaseDAOHibernate.java.html"><i>View Source</i></a> * </p> */ public class BaseDAOHibernate { //~ Instance fields ======================================================== /** The <code>Log</code> instance for this package. */ private Log log = LogFactory.getLog(BaseDAOHibernate.class); //~ Methods ================================================================ /** * */ protected void removeObject(Class clazz, String id, Object obj) throws DAOException { Session ses = null; try { ses = ServiceLocator.currentSession(); // Object must originate in this session obj = ses.load(clazz, id); ses.delete(obj); ses.flush(); ses.connection().commit(); } catch (Exception e) { try { ses.connection().rollback(); } catch (Exception ex) { e.printStackTrace(); } ; throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } ; } } /** * */ protected void removeObject(Class clazz, Long id, Object obj) throws DAOException { Session ses = null; try { ses = ServiceLocator.currentSession(); // Object must originate in this session obj = ses.load(clazz, id); ses.delete(obj); ses.flush(); ses.connection().commit(); } catch (Exception e) { try { ses.connection().rollback(); } catch (Exception ex) { e.printStackTrace(); } ; throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } ; } } /** * */ protected Object retrieveObject(Class clazz, String id) throws DAOException { Object obj = null; Session ses = null; try { ses = ServiceLocator.currentSession(); obj = ses.load(clazz, id); } catch (Exception e) { throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } ; } return obj; } /** * */ protected Object retrieveObject(Class clazz, Long id) throws DAOException { Object obj = null; Session ses = null; try { ses = ServiceLocator.currentSession(); obj = ses.load(clazz, id); } catch (Exception e) { throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } ; } return obj; } /** * */ protected void storeObject(Object obj) throws DAOException { Session ses = null; try { ses = ServiceLocator.currentSession(); ses.saveOrUpdate(obj); ses.flush(); ses.connection().commit(); } catch (Exception e) { try { ses.connection().rollback(); } catch (Exception ex) { e.printStackTrace(); } ; throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } ; } } } --- NEW FILE: BaseObject.java --- package org.appfuse.persistence; import java.io.Serializable; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Field; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; /** * Base class for Hibernate objects. This is basically for the toString method * at this time, but may be extended to override equals. * * <p> * <a href="BaseDAOHibernate.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible * @version $Revision: 1.1 $ $Date: 2003/01/08 05:52:35 $ */ public class BaseObject implements Serializable { //~ Methods ================================================================ public String toString() { StringBuffer results = new StringBuffer(); Class clazz = getClass(); results.append(getClass().getName() + "\n"); Field[] fields = clazz.getDeclaredFields(); try { AccessibleObject.setAccessible(fields, true); for (int i = 0; i < fields.length; i++) { results.append("\t" + fields[i].getName() + "=" + fields[i].get(this) + "\n"); } } catch (Exception e) { // ignored! } return results.toString(); } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode(Object o) { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: DAOException.java --- package org.appfuse.persistence; /** * A general DAOException that is thrown by all DAO classes. * * <p> * <a href="DAOException.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible */ public class DAOException extends Exception { //~ Constructors =========================================================== /** * Constructor for DAOException. */ public DAOException() { super(); } /** * Constructor for DAOException. * * @param message */ public DAOException(String message) { super(message); } /** * Constructor for DAOException. * * @param message * @param cause */ public DAOException(String message, Throwable cause) { super(message, cause); } /** * Constructor for DAOException. * * @param cause */ public DAOException(Throwable cause) { super(cause); } } --- NEW FILE: DAOFactory.java --- package org.appfuse.persistence; import org.appfuse.common.Constants; /** * This class is responsible for creating DAOs. * * <p> * <a href="DAOException.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible */ public abstract class DAOFactory { //~ Static fields/initializers ============================================= private static DAOFactory factory; //~ Methods ================================================================ // Factory method to create a factory instance. public static DAOFactory createFactory(String daoType) throws DAOException { // Create the factory if it doesn't already exist. if (factory == null) { // Hardcoded selection logic. Can be made more // flexible by "unhardcoding" the selection logic. if (daoType.equalsIgnoreCase(Constants.DAO_TYPE_HIBERNATE)) { factory = DAOFactoryHibernate.createFactory(); } else { // Bad daoType value, throw exception. throw new DAOException("Bad 'daoType' value in web.xml."); } } // Return the factory. return factory; } public abstract UserDAO createUserDAO() throws DAOException; public abstract ResumeDAO createResumeDAO() throws DAOException; } --- NEW FILE: DAOFactoryHibernate.java --- package org.appfuse.persistence; /** * This class creates Hibernate DAOs. * * <p> * <a href="DAOException.java.html"><i>View Source</i></a> * </p> */ public class DAOFactoryHibernate extends DAOFactory { //~ Methods ================================================================ /** * Factory method for creating Hibernate DAOs * * @return new factory */ public static DAOFactoryHibernate createFactory() { DAOFactoryHibernate factory = new DAOFactoryHibernate(); return factory; } public UserDAO createUserDAO() throws DAOException { return new UserDAOHibernate(); } public ResumeDAO createResumeDAO() throws DAOException { return new ResumeDAOHibernate(); } } --- NEW FILE: Education.java --- package org.appfuse.persistence; /** * Education class * * This class is used to represent a User's Education * on their resume * * @author Matt Raible * @created 22 December 2002 * * @struts.form include-all="true" * extends="org.appfuse.webapp.form.BaseForm" * * @hibernate.class table="education" * */ public class Education { private String id; private String name; private String location; private String resumeId; private String degree; private String gpa; /** * Returns the id. * @return String * * @hibernate.id column="id" type="long" * generator-class="native" unsaved-value="null" */ public String getId() { return id; } /** * Returns the name. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="name" type="string" not-null="true" unique="false" */ public String getName() { return name; } /** * Returns the location. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="location" type="string" not-null="false" unique="false" */ public String getLocation() { return location; } /** * Returns the parent resume. * @return String resumeId * * @hibernate.property not-null="true" */ public String getResumeId() { return resumeId; } /** * Sets the location. * @param location The location to set */ public void setLocation(String location) { this.location = location; } /** * Sets the id. * @param id The id to set */ public void setId(String id) { this.id = id; } /** * Sets the name. * @param name The name to set */ public void setName(String name) { this.name = name; } /** * Sets the user. * @param user The user to set */ public void setResumeId(String resumeId) { this.resumeId = resumeId; } /** * Returns the degree. * @return String * * @hibernate.property column="degree" */ public String getDegree() { return degree; } /** * Returns the gpa. * @return String * * @hibernate.property column="gpa" */ public String getGpa() { return gpa; } /** * Sets the degree. * @param degree The degree to set */ public void setDegree(String degree) { this.degree = degree; } /** * Sets the gpa. * @param gpa The gpa to set */ public void setGpa(String gpa) { this.gpa = gpa; } } --- NEW FILE: Resume.java --- package org.appfuse.persistence; /** * Resume class * * This class is used to represent a Resume object * * <p> * <a href="Resume.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible * @created 22 December 2002 * * @struts.form include-all="true" * extends="org.appfuse.webapp.form.BaseForm" * * @hibernate.class table="resume" * */ public class Resume extends BaseObject { private Long id; private String name; private String description; private String objective; private Long userId; /** * Returns the id. * @return String * * @hibernate.id column="id" type="long" * generator-class="native" unsaved-value="null" */ public Long getId() { return id; } /** * Returns the name. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="name" type="string" not-null="true" unique="false" */ public String getName() { return name; } /** * Returns the description. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="description" type="string" not-null="false" unique="false" */ public String getDescription() { return description; } /** * Returns the objective. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="objective" type="string" not-null="false" unique="false" */ public String getObjective() { return objective; } /** * Returns the user. * @return User * * @hibernate.property column="user_id" not-null="true" */ public Long getUserId() { return userId; } /** * Sets the description. * @param description The description to set */ public void setDescription(String description) { this.description = description; } /** * Sets the id. * @param id The id to set */ public void setId(Long id) { this.id = id; } /** * Sets the name. * @param name The name to set */ public void setName(String name) { this.name = name; } /** * Sets the objective. * @param objective The objective to set */ public void setObjective(String objective) { this.objective = objective; } /** * Sets the user. * @param user The user to set */ public void setUserId(Long userId) { this.userId = userId; } } --- NEW FILE: ResumeDAO.java --- package org.appfuse.persistence; import java.util.List; /** * User Data Access Object (DAO) interface. */ public interface ResumeDAO { //~ Methods ================================================================ /** * Gets resume by name, create new resume if necessary. * * @param userId the user's id * @throws Exception */ public List getResumesByUserId(Long userId) throws DAOException; /** * Gets a resume based on a resume's id * * @param resumeId * @return Resume * @throws Exception */ public Resume getResume(Long resumeId) throws Exception; /** * Saves a resume's information. This method is used for * both adding and for saving a resume object. * * @param resume the resume persistable object * @throws Exception */ public Resume saveResume(Resume resume) throws Exception; /** * Deletes a resume. * * @param resume * @throws Exception */ public void removeResume(Resume resume) throws Exception; } --- NEW FILE: ResumeDAOHibernate.java --- package org.appfuse.persistence; import cirrus.hibernate.Hibernate; import cirrus.hibernate.HibernateException; import cirrus.hibernate.MappingException; import cirrus.hibernate.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.List; public class ResumeDAOHibernate extends BaseDAOHibernate implements ResumeDAO { //~ Instance fields ======================================================== private Log log = LogFactory.getLog(ResumeDAOHibernate.class); //~ Methods ================================================================ /** * Get resume by name, create new one if necessary. * * @param userId the current user's id * @return a list of the user's resumes * @throws DAOException */ public List getResumesByUserId(Long userId) throws DAOException { Session ses = null; List resumes = null; try { ses = ServiceLocator.currentSession(); resumes = (List) ses.find("from r in class org.appfuse.persistence.Resume where r.userId=? order by upper(r.name)", userId, Hibernate.LONG); ses.flush(); ses.connection().commit(); } catch (Exception e) { try { ses.connection().rollback(); } catch (Exception ex) { e.printStackTrace(); } throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } } return resumes; } /** * @see org.appfuse.persistence.ResumeDAO#getResume(String) */ public Resume getResume(Long id) throws DAOException { return (Resume) retrieveObject(org.appfuse.persistence.Resume.class, id); } /** * @see org.appfuse.persistence.ResumeDAO#saveResume(Resume) */ public Resume saveResume(Resume resume) throws DAOException { storeObject(resume); return (Resume) retrieveObject(org.appfuse.persistence.Resume.class, resume.getId()); } /** * @see org.appfuse.persistence.ResumeDAO#removeResume(Resume) */ public void removeResume(Resume resume) throws DAOException { removeObject(org.appfuse.persistence.Resume.class, resume.getId(), resume); } } --- NEW FILE: Role.java --- package org.appfuse.persistence; /** * Role class used to determine roles for a user * * @author Matt Raible * @created 29 December 2002 * * @struts.form include-all="true" * extends="org.appfuse.webapp.form.BaseForm" * * @hibernate.class table="user_role" * */ public class Role extends BaseObject { // XDoclet's Hibernate module does not generate composite keys // yet, so we have to add an id to this table - it's never used. private Long id; private String username; private String rolename; /** * Returns the id. * @return String * * @hibernate.id column="id" type="long" * generator-class="native" unsaved-value="null" */ public Long getId() { return id; } /** * Sets the id. * @param id The id to set */ public void setId(Long id) { this.id = id; } /** * Returns the username. * @return String * * @struts.validator type="required" msgkey="errors.required" * @struts.validator type="email" msgkey="errors.email" * @hibernate.property column="username" * type="string" not-null="true" unique="false" */ public String getUsername() { return username; } /** * Sets the username. * @param username The username to set */ public void setUsername(String username) { this.username = username; } /** * Returns the rolename. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="role_name" type="string" not-null="true" unique="false" */ public String getRolename() { return rolename; } /** * Sets the rolename. * @param rolename The rolename to set */ public void setRolename(String rolename) { this.rolename = rolename; } } --- NEW FILE: ServiceLocator.java --- package org.appfuse.persistence; import java.sql.SQLException; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.naming.CommunicationException; import org.appfuse.common.Constants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import cirrus.hibernate.Datastore; import cirrus.hibernate.Hibernate; import cirrus.hibernate.HibernateException; import cirrus.hibernate.Session; import cirrus.hibernate.SessionFactory; /** * This class is used to get Hibernate Sessions and may * also contain methods (in the future) to get DBConnections * or Transactions from JNDI. */ public class ServiceLocator { public static final ThreadLocal session = new ThreadLocal(); private static Log log = LogFactory.getLog(ServiceLocator.class); public static Session currentSession() throws HibernateException, SQLException { Session s = (Session) session.get(); if (s == null) { SessionFactory sf = null; // Try to lookup a JNDI Connection try { sf = (SessionFactory) new InitialContext().lookup(Constants.SESSION_FACTORY); } catch (NamingException ne) { if (log.isDebugEnabled()) { log.warn("error communicating with JNDI, assuming testcase"); } Datastore datastore = Hibernate.createDatastore(); /* If you don't want to specify full class names here and in your DAO's, add the following to your hibernate.properties file: hibernate.query.imports=org.appfuse.persistence */ datastore.storeClass(org.appfuse.persistence.Education.class); datastore.storeClass(org.appfuse.persistence.Resume.class); datastore.storeClass(org.appfuse.persistence.Role.class); datastore.storeClass(org.appfuse.persistence.Skill.class); datastore.storeClass(org.appfuse.persistence.SkillGroup.class); datastore.storeClass(org.appfuse.persistence.User.class); sf = datastore.buildSessionFactory(); } s = sf.openSession(); session.set(s); } return s; } public static void closeSession() throws HibernateException, SQLException { Session s = (Session) session.get(); session.set(null); if (s != null) { s.close(); } } } --- NEW FILE: Skill.java --- package org.appfuse.persistence; /** * Skill class * * This class is used to represent a User's Skill * on their resume * * @author Matt Raible * @created 22 December 2002 * * @struts.form include-all="true" * extends="org.appfuse.webapp.form.BaseForm" * * @hibernate.class table="skill" * */ public class Skill extends BaseObject { private String id; private String name; private String description; /** * Returns the id. * @return String * * @hibernate.id column="id" type="long" * generator-class="native" unsaved-value="null" */ public String getId() { return id; } /** * Returns the name. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="name" type="string" not-null="true" unique="false" */ public String getName() { return name; } /** * Sets the id. * @param id The id to set */ public void setId(String id) { this.id = id; } /** * Sets the name. * @param name The name to set */ public void setName(String name) { this.name = name; } /** * Returns the description. * @return String * * @hibernate.property * column="name" type="string" not-null="false" unique="false" */ public String getDescription() { return description; } /** * Sets the description. * @param description The description to set */ public void setDescription(String description) { this.description = description; } } --- NEW FILE: SkillGroup.java --- package org.appfuse.persistence; /** * SkillGroup class * * This class is used to represent a User's SkillGroup * on their resume * * @author Matt Raible * @created 22 December 2002 * * @struts.form include-all="true" * extends="org.appfuse.webapp.form.BaseForm" * * @hibernate.class table="skill_group" * */ public class SkillGroup extends BaseObject { private String id; private String name; private String description; /** * Returns the id. * @return String * * @hibernate.id column="id" type="long" * generator-class="native" unsaved-value="null" */ public String getId() { return id; } /** * Returns the name. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="name" type="string" not-null="true" unique="false" */ public String getName() { return name; } /** * Sets the id. * @param id The id to set */ public void setId(String id) { this.id = id; } /** * Sets the name. * @param name The name to set */ public void setName(String name) { this.name = name; } /** * Returns the description. * @return String * * @hibernate.property * column="name" type="string" not-null="false" unique="false" */ public String getDescription() { return description; } /** * Sets the description. * @param description The description to set */ public void setDescription(String description) { this.description = description; } } --- NEW FILE: User.java --- package org.appfuse.persistence; import java.util.List; /** * User class * * This class is used to generate the Struts Validator Form * as well as the Hibernate persistence later. * * <p> * <a href="User.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible * @created 08 December 2002 * * @struts.form include-all="true" * extends="org.appfuse.webapp.form.BaseForm" * * @hibernate.class table="app_user" * */ public class User extends BaseObject { private Long id; private String username; private String password; private String firstName; private String lastName; private String address; private String city; private String province; private String country; private String postalCode; private String phoneNumber; private String email; private String website; private List roles; private List resumes; /** * Returns the id. * @return String * * @hibernate.id column="id" type="long" * generator-class="native" unsaved-value="null" */ public Long getId() { return id; } /** * Returns the username. * @return String * * @struts.validator type="required" msgkey="errors.required" * @struts.validator type="email" msgkey="errors.email" * @hibernate.property * column="username" type="string" not-null="true" unique="true" */ public String getUsername() { return username; } /** * Returns the firstName. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="firstName" type="string" not-null="true" unique="false" */ public String getFirstName() { return firstName; } /** * Returns the lastName. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="lastName" type="string" not-null="true" unique="false" */ public String getLastName() { return lastName; } /** * Returns the address. * @return String * * @hibernate.property * column="address" type="string" not-null="false" unique="false" */ public String getAddress() { return address; } /** * Returns the city. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="city" type="string" not-null="true" unique="false" */ public String getCity() { return city; } /** * Returns the country. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="country" type="string" not-null="true" unique="false" */ public String getCountry() { return country; } /** * Returns the email. This is an optional field for specifying a * different e-mail than the username. * @return String * * * @struts.validator type="email" msgkey="errors.email" * @hibernate.property * column="email" type="string" not-null="false" unique="true" */ public String getEmail() { return email; } /** * Returns the phoneNumber. * @return String * * @struts.validator type="mask" msgkey="errors.phone" * @struts.validator-var name="mask" value="${phone}" * @hibernate.property * column="phoneNumber" type="string" not-null="false" unique="false" */ public String getPhoneNumber() { return phoneNumber; } /** * Returns the postalCode. * @return String * * @struts.validator type="required" msgkey="errors.required" * @struts.validator type="mask" msgkey="errors.zip" * @struts.validator-var name="mask" value="${zip}" * @hibernate.property * column="postalCode" type="string" not-null="true" unique="false" */ public String getPostalCode() { return postalCode; } /** * Returns the province. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="province" type="string" not-null="true" unique="false" */ public String getProvince() { return province; } /** * Returns the website. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="website" type="string" not-null="false" unique="false" */ public String getWebsite() { return website; } /** * Returns the password. * @return String * * @struts.validator type="required" msgkey="errors.required" * @hibernate.property * column="password" type="string" not-null="true" unique="false" */ public String getPassword() { return password; } /** * Returns the user's roles. * @return List * * @hibernate.bag role="roles" table="user_role" readonly="true" * @hibernate.collection-key column="id" * @hibernate.collection-one-to-many class="org.appfuse.persistence.Role" */ public List getRoles() { return roles; } /** * Returns the resumes. * @return List * * @hibernate.bag role="resumes" table="resume" readonly="true" * @hibernate.collection-key column="id" length="32" * @hibernate.collection-one-to-many class="org.appfuse.persistence.Resume" */ public List getResumes() { return resumes; } /** * Adds a role for the user * @param role */ public void addRole(Role role) { role.setUsername(getUsername()); getRoles().add(role); } /** * Adds a resume for the user * @param resume */ public void addResume(Resume resume) { resume.setUserId(getId()); getResumes().add(resume); } /** * Lists the id. * @param id The id to set */ public void setId(Long id) { this.id = id; } /** * Lists the address. * @param address The address to set */ public void setAddress(String address) { this.address = address; } /** * Lists the city. * @param city The city to set */ public void setCity(String city) { this.city = city; } /** * Lists the country. * @param country The country to set */ public void setCountry(String country) { this.country = country; } /** * Lists the email. * @param email The email to set */ public void setEmail(String email) { this.email = email; } /** * Lists the firstName. * @param firstName The firstName to set */ public void setFirstName(String firstName) { this.firstName = firstName; } /** * Lists the lastName. * @param lastName The lastName to set */ public void setLastName(String lastName) { this.lastName = lastName; } /** * Lists the password. * @param password The password to set */ public void setPassword(String password) { this.password = password; } /** * Lists the phoneNumber. * @param phoneNumber The phoneNumber to set */ public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } /** * Lists the postalCode. * @param postalCode The postalCode to set */ public void setPostalCode(String postalCode) { this.postalCode = postalCode; } /** * Lists the province. * @param province The province to set */ public void setProvince(String province) { this.province = province; } /** * Lists the resumes. * @param resumes The resumes to set */ public void setResumes(List resumes) { this.resumes = resumes; } /** * Lists the username. * @param username The username to set */ public void setUsername(String username) { this.username = username; } /** * Lists the website. * @param website The website to set */ public void setWebsite(String website) { this.website = website; } /** * Lists the roles. * @param roles The roles to set */ public void setRoles(List roles) { this.roles = roles; } } --- NEW FILE: UserDAO.java --- package org.appfuse.persistence; /** * User Data Access Object (DAO) interface. * * <p> * <a href="UserDAO.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible */ public interface UserDAO { //~ Methods ================================================================ /** * Gets user by name, create new user if necessary. * * @return DOCUMENT ME! */ public User getUser(String userName) throws DAOException; /** * Saves a user's information * * @param user the user persistable object * * @return DOCUMENT ME! */ public User saveUser(User user) throws Exception; /** * Removes a user from the database by id */ public void removeUser(User user) throws Exception; /** * Adds a user's resume */ public Resume addResume(Resume resume) throws Exception; /** * Deletes a user's resume */ public void removeResume(Resume resume) throws Exception; /** * Adds a role */ public Role addRole(Role role) throws Exception; /** * Removes a role */ public void removeRole(Role role) throws Exception; } --- NEW FILE: UserDAOHibernate.java --- package org.appfuse.persistence; import cirrus.hibernate.Hibernate; import cirrus.hibernate.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.List; /** * This class interacts with Hibernate's Session object to save and retrieve * Resume objects. * * <p> * <a href="UserDAOHibernate.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible */ public class UserDAOHibernate extends BaseDAOHibernate implements UserDAO { //~ Instance fields ======================================================== private Log log = LogFactory.getLog(UserDAOHibernate.class); //~ Methods ================================================================ /** * Get user by name, create new one if necessary. * * @param username the user's username * @return a populated user object * @throws DAOException if anything goes wrong */ public User getUser(String username) throws DAOException { User user = null; Session ses = null; try { ses = ServiceLocator.currentSession(); List users = (List) ses.find("from user in class org.appfuse.persistence.User where user.username=?", username, Hibernate.STRING); if ((users != null) && (users.size() > 0)) { user = (User) users.get(0); } if (user == null) { log.warn("uh oh, user not found..."); throw new DAOException("User '" + username + "' not found in database!"); } user = (User) ses.load(User.class, user.getId()); ses.flush(); ses.connection().commit(); } catch (Exception e) { try { ses.connection().rollback(); } catch (Exception ex) { e.printStackTrace(); } throw new DAOException(e); } finally { try { ServiceLocator.closeSession(); } catch (Exception ex) { ex.printStackTrace(); } } return user; } public User saveUser(User user) throws DAOException { storeObject(user); return (User) retrieveObject(org.appfuse.persistence.User.class, user.getId()); } public void removeUser(User user) throws DAOException { removeObject(org.appfuse.persistence.User.class, user.getId(), user); } /** * @see org.appfuse.persistence.UserDAO#addResume(Resume) */ public Resume addResume(Resume resume) throws DAOException { storeObject(resume); return (Resume) retrieveObject(org.appfuse.persistence.Resume.class, resume.getId()); } /** * @see org.appfuse.persistence.UserDAO#removeResume(Resume) */ public void removeResume(Resume resume) throws DAOException { removeObject(org.appfuse.persistence.Resume.class, resume.getId(), resume); } /** * @see org.appfuse.persistence.UserDAO#addRole(Role) */ public Role addRole(Role role) throws Exception { storeObject(role); return (Role) retrieveObject(org.appfuse.persistence.Role.class, role.getId()); } /** * @see org.appfuse.persistence.UserDAO#removeRole(Role) */ public void removeRole(Role role) throws Exception { removeObject(org.appfuse.persistence.Role.class, role.getId(), role); } } |
From: <mr...@us...> - 2003-01-08 05:52:17
|
Update of /cvsroot/struts/struts-resume/src/ejb/org/appfuse/persistence In directory sc8-pr-cvs1:/tmp/cvs-serv28553/persistence Log Message: Directory /cvsroot/struts/struts-resume/src/ejb/org/appfuse/persistence added to the repository |
From: <mr...@us...> - 2003-01-08 05:52:12
|
Update of /cvsroot/struts/struts-resume/src/ejb/org/appfuse In directory sc8-pr-cvs1:/tmp/cvs-serv28500/appfuse Log Message: Directory /cvsroot/struts/struts-resume/src/ejb/org/appfuse added to the repository |
From: <mr...@us...> - 2003-01-08 05:52:07
|
Update of /cvsroot/struts/struts-resume/src/ejb/org In directory sc8-pr-cvs1:/tmp/cvs-serv28431/org Log Message: Directory /cvsroot/struts/struts-resume/src/ejb/org added to the repository |
From: <mr...@us...> - 2003-01-08 05:52:00
|
Update of /cvsroot/struts/struts-resume/src/common/org/appfuse/common/util In directory sc8-pr-cvs1:/tmp/cvs-serv28341 Added Files: BaseUtil.java StringUtil.java Log Message: --- NEW FILE: BaseUtil.java --- package org.appfuse.common.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * BaseUtil is used as a parent class for all other classes in the * common.utils package. * @author Matt Raible (matt@raibledesigns) */ public class BaseUtil { /** * The <code>Log</code> instance for this class. */ protected Log log = LogFactory.getLog(BaseUtil.class); } --- NEW FILE: StringUtil.java --- package org.appfuse.common.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.security.MessageDigest; /** * String Utility Class This is used to encode passwords programmatically * * @author Matt Raible * @version $Revision: 1.1 $ $Date: 2003/01/08 05:51:57 $ */ public class StringUtil extends BaseUtil { //~ Static fields/initializers ============================================= /** The <code>Log</code> instance for this class. */ private static Log log = LogFactory.getLog(StringUtil.class); //~ Methods ================================================================ /** * Encode a string using algorithm specified in web.xml and return the * resulting encrypted password. If exception, the plain credentials * string is returned * * @param password Password or other credentials to use in authenticating * this username * @param algorithm Algorithm used to do the digest * * @return DOCUMENT ME! */ public static String encodePassword(String password, String algorithm) { byte[] unencodedPassword = password.getBytes(); MessageDigest md = null; try { // first create an instance, given the provider md = MessageDigest.getInstance(algorithm); } catch (Exception e) { log.error("Exception: " + e); return password; } md.reset(); // call the update method one or more times // (useful when you don't know the size of your data, eg. stream) md.update(unencodedPassword); // now calculate the hash byte[] encodedPassword = md.digest(); StringBuffer buf = new StringBuffer(); for (int i = 0; i < encodedPassword.length; i++) { if (((int) encodedPassword[i] & 0xff) < 0x10) { buf.append("0"); } buf.append(Long.toString((int) encodedPassword[i] & 0xff, 16)); } return buf.toString(); } } |
From: <mr...@us...> - 2003-01-08 05:51:46
|
Update of /cvsroot/struts/struts-resume/src/common/org/appfuse/common In directory sc8-pr-cvs1:/tmp/cvs-serv28232 Added Files: Constants.java Log Message: --- NEW FILE: Constants.java --- package org.appfuse.common; /** * Constant values for use in Servlets and JSPs. * * <p> * <a href="Constants.java.html"><i>View Source</i></a> * </p> * * @author Matt Raible * @version $Revision: 1.1 $ $Date: 2003/01/08 05:51:43 $ */ public final class Constants { //~ Static fields/initializers ============================================= /** * The application scoped attribute for persistence engine and class that * implements it */ public final static String DAO_TYPE = "daoType"; public final static String DAO_TYPE_HIBERNATE = "hibernate"; /** * JNDI Name of SessionFactory used by hibernate. This string is configured * in web/WEB-INF/classes/hibernate.cfg.xml */ public final static String SESSION_FACTORY = "hibernate/sessionFactory"; /** Application scoped attribute for authentication url */ public static final String AUTH_URL = "authURL"; /** Application scoped attributes for SSL Switching */ public static final String HTTP_PORT = "httpPort"; public static final String HTTPS_PORT = "httpsPort"; /** The application scoped attribute for indicating a secure login */ public static final String SECURE_LOGIN = "secureLogin"; /** The encryption algorithm key to be used for passwords */ public final static String ENC_ALGORITHM = "algorithm"; /** File separator from System properties */ public final static String FILE_SEP = System.getProperty("file.separator"); /** User home from System properties */ public static final String USER_HOME = System.getProperty("user.home") + FILE_SEP; /** * The session scope attribute under which the breadcrumb ArrayStack is * stored */ public static final String BREADCRUMB = "breadcrumbs"; /** * The session scope attribute under which the User object for the * currently logged in user is stored. */ public final static String USER_KEY = "userForm"; /** * The request scope attribute for storing an list of a user's resumes */ public final static String USER_RESUMES = "userResumes"; } |
From: <mr...@us...> - 2003-01-08 05:51:40
|
Update of /cvsroot/struts/struts-resume/src/common/org/appfuse/common/util In directory sc8-pr-cvs1:/tmp/cvs-serv28175/util Log Message: Directory /cvsroot/struts/struts-resume/src/common/org/appfuse/common/util added to the repository |
From: <mr...@us...> - 2003-01-08 05:51:33
|
Update of /cvsroot/struts/struts-resume/src/common/org/appfuse/common In directory sc8-pr-cvs1:/tmp/cvs-serv28141/common Log Message: Directory /cvsroot/struts/struts-resume/src/common/org/appfuse/common added to the repository |
From: <mr...@us...> - 2003-01-08 05:51:28
|
Update of /cvsroot/struts/struts-resume/src/common/org/appfuse In directory sc8-pr-cvs1:/tmp/cvs-serv28115/appfuse Log Message: Directory /cvsroot/struts/struts-resume/src/common/org/appfuse added to the repository |
From: <mr...@us...> - 2003-01-08 05:51:24
|
Update of /cvsroot/struts/struts-resume/src/common/org In directory sc8-pr-cvs1:/tmp/cvs-serv28080/org Log Message: Directory /cvsroot/struts/struts-resume/src/common/org added to the repository |
From: <mr...@us...> - 2003-01-08 05:51:18
|
Update of /cvsroot/struts/struts-resume/src/web In directory sc8-pr-cvs1:/tmp/cvs-serv28042/web Log Message: Directory /cvsroot/struts/struts-resume/src/web added to the repository |
From: <mr...@us...> - 2003-01-08 05:51:18
|
Update of /cvsroot/struts/struts-resume/src/ejb In directory sc8-pr-cvs1:/tmp/cvs-serv28042/ejb Log Message: Directory /cvsroot/struts/struts-resume/src/ejb added to the repository |
From: <mr...@us...> - 2003-01-08 05:51:18
|
Update of /cvsroot/struts/struts-resume/src/common In directory sc8-pr-cvs1:/tmp/cvs-serv28042/common Log Message: Directory /cvsroot/struts/struts-resume/src/common added to the repository |
Update of /cvsroot/struts/struts-resume/metadata/web In directory sc8-pr-cvs1:/tmp/cvs-serv28019 Added Files: error-pages.xml filter-mappings.xml filters.xml global-exceptions.xml global-forwards.xml README.txt servlet-mappings.xml servlets.xml struts-actions.xml struts-controller.xml struts-message-resources.xml struts-plugins.xml struts-resume.xml taglibs.xml validation-global.xml web-resource-env-refs.xml web-security.xml web-settings.xml welcomefiles.xml Log Message: --- NEW FILE: error-pages.xml --- <error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page> <error-page> <error-code>400</error-code> <location>/index.jsp</location> </error-page> --- NEW FILE: filter-mappings.xml --- <XDtConfig:ifConfigParamEquals paramName="cactusOn" value="true"> <filter-mapping> <filter-name>FilterRedirector</filter-name> <url-pattern>/FilterRedirector</url-pattern> </filter-mapping> </XDtConfig:ifConfigParamEquals> --- NEW FILE: filters.xml --- <XDtConfig:ifConfigParamEquals paramName="cactusOn" value="true"> <filter> <filter-name>FilterRedirector</filter-name> <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class> </filter> </XDtConfig:ifConfigParamEquals> --- NEW FILE: global-exceptions.xml --- <global-exceptions> <exception type="org.appfuse.webapp.service.ConversionException" key="errors.conversion"/> <exception type="org.appfuse.webapp.action.GeneralException" key="errors.general"/> <exception type="org.appfuse.webapp.action.InvalidResumeException" key="errors.invalid.resume"/> </global-exceptions> --- NEW FILE: global-forwards.xml --- <global-forwards> <!-- Default forward to "mainMenu" action --> <!-- Demonstrates using index.jsp to forward --> <forward name="mainMenu" path="/mainMenu.do"/> <!-- Forwards specified in actions --> <forward name="updateUser" path="/userProfile.do"/> <forward name="cancelUser" path="/welcome.do"/> <!-- Forwards for links used in Menu --> <forward name="editProfile" path="/userProfile.do"/> <forward name="viewResumes" path="/viewResumes.do?action=Search"/> <forward name="addResume" path="/addResume.do?action=Add"/> <forward name="editResume" path="/editResume.do?action=Edit"/> <forward name="announceResume" path="/announceResume.do"/> <forward name="viewRoles" path="/viewRoles.do"/> <!-- Switch to 'upload' module --> <forward name="uploadResume" contextRelative="true" path="/upload/index.do" redirect="true" /> <!-- Logout by forward to a JSP, I do this b/c if I forward to an an action, and the users session is expired - they'll be prompted to login - just to logout! Seems silly to me. --> <forward name="logout" path="/logout.do" /> </global-forwards> --- NEW FILE: README.txt --- These are the possible files you can create to add your own custom entries to struts-config.xml: struts-data-sources.xml struts-forms.xml global-exceptions.xml global-forwards.xml struts-actions.xml struts-controller.xml struts-message-resources.xml struts-plugins.xml validation-global.xml --- NEW FILE: servlet-mappings.xml --- <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <XDtConfig:ifConfigParamEquals paramName="cactusOn" value="true"> <servlet-mapping> <servlet-name>ServletRedirector</servlet-name> <url-pattern>/ServletRedirector</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ServletRedirectorSecure</servlet-name> <url-pattern>/ServletRedirectorSecure</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ServletTestRunner</servlet-name> <url-pattern>/ServletTestRunner</url-pattern> </servlet-mapping> </XDtConfig:ifConfigParamEquals> --- NEW FILE: servlets.xml --- <!-- Standard Action Servlet Configuration (no debugging) --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>config/upload</param-name> <param-value>/WEB-INF/struts-upload.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <XDtConfig:ifConfigParamEquals paramName="cactusOn" value="true"> <servlet> <servlet-name>ServletRedirector</servlet-name> <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class> </servlet> <servlet> <servlet-name>ServletRedirectorSecure</servlet-name> <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class> </servlet> <servlet> <servlet-name>ServletTestRunner</servlet-name> <servlet-class>org.apache.cactus.server.runner.ServletTestRunner</servlet-class> </servlet> </XDtConfig:ifConfigParamEquals> --- NEW FILE: struts-actions.xml --- <!-- Default "mainMenu" action --> <!-- Forwards to the mainMenu tile definition --> <action path="/mainMenu" type="org.apache.struts.actions.ForwardAction" parameter="mainMenu"/> <action path="/userProfile" type="org.apache.struts.actions.ForwardAction" parameter="userProfile"/> <action path="/addResume" type="org.apache.struts.actions.ForwardAction" parameter="resumeAdd"/> <action path="/logout" type="org.apache.struts.actions.ForwardAction" parameter="/logout.jsp"/> --- NEW FILE: struts-controller.xml --- <controller nocache="true" inputForward="true" maxFileSize="2M"/> --- NEW FILE: struts-message-resources.xml --- <message-resources parameter="ApplicationResources"/> --- NEW FILE: struts-plugins.xml --- <!-- ========== Tiles plugin =================== --> <plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" /> <set-property property="moduleAware" value="true" /> <set-property property="definitions-parser-validate" value="true" /> </plug-in> <!-- ========== Validator plugin =================== --> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> </plug-in> <!-- ========== Menu plugin ======================== --> <plug-in className="com.fgm.web.menu.MenuPlugIn"> <set-property property="menuConfig" value="/WEB-INF/menu-config.xml"/> </plug-in> --- NEW FILE: struts-resume.xml --- <!-- ======================================================================= --> <!-- This file was designed to be used with Tomcat 4.1.x. You should be --> <!-- able to place it in $CATALINA_HOME/webapps, rather than in server.xml --> <!-- ======================================================================= --> <!-- AppFuse Application Context --> <Context path="/struts-resume" docBase="struts-resume" debug="0" reloadable="true" privileged="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="struts-resume_log." suffix=".txt" timestamp="true"/> <Realm roleNameCol="role_name" userCredCol="password" className="org.apache.catalina.realm.JDBCRealm" digest="SHA" userTable="app_user" debug="99" userRoleTable="user_role" userNameCol="username" connectionURL="jdbc:mysql://localhost/resume?user=root&password=admin&autoReconnect=true" driverName="org.gjt.mm.mysql.Driver"/> <Resource name="jdbc/resume" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/resume"> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <!-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. --> <parameter> <name>maxActive</name> <value>100</value> </parameter> <!-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. --> <parameter> <name>maxIdle</name> <value>30</value> </parameter> <!-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. --> <parameter> <name>maxWait</name> <value>10000</value> </parameter> <!-- MySQL dB username and password for dB connections --> <parameter> <name>username</name> <value>root</value> </parameter> <parameter> <name>password</name> <value>admin</value> </parameter> <!-- Class name for mm.mysql JDBC driver --> <parameter> <name>driverClassName</name> <value>org.gjt.mm.mysql.Driver</value> </parameter> <!-- Autocommit setting. This setting is required to make Hibernate work. Or you can remove calls to commit(). --> <parameter> <name>defaultAutoCommit</name> <value>false</value> </parameter> <!-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. --> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/resume?autoReconnect=true</value> </parameter> <!-- Recover abandoned connections --> <parameter> <name>removeAbandoned</name> <value>true</value> </parameter> <!-- Set the number of seconds a dB connection has been idle before it is considered abandoned. --> <parameter> <name>removeAbandonedTimeout</name> <value>60</value> </parameter> <!-- Log a stack trace of the code which abandoned the dB connection resources. --> <parameter> <name>logAbandoned</name> <value>true</value> </parameter> </ResourceParams> <!-- This is not used at this time, but may be in the future --> <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/> <ResourceParams name="mail/Session"> <parameter> <name>mail.smtp.host</name> <value>localhost</value> </parameter> </ResourceParams> </Context> --- NEW FILE: taglibs.xml --- <!-- Struts Tag Library Descriptors --> <!-- I'm simply using the URI specified in the taglib's .tld file so these can be loaded simply from having the jar in WEB-INF/lib --> <!-- <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> --> <taglib> <taglib-uri>/WEB-INF/struts-menu.tld</taglib-uri> <taglib-location>/WEB-INF/struts-menu.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/appfuse.tld</taglib-uri> <taglib-location>/WEB-INF/appfuse.tld</taglib-location> </taglib> --- NEW FILE: validation-global.xml --- <global> <constant> <constant-name>phone</constant-name> <constant-value>^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$</constant-value> </constant> <constant> <constant-name>zip</constant-name> <constant-value>^\d{5}\d*$</constant-value> </constant> </global> --- NEW FILE: web-resource-env-refs.xml --- <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/resume</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> --- NEW FILE: web-security.xml --- <!-- Restrict all users from accessing *.do --> <security-constraint> <web-resource-collection> <web-resource-name>My Application</web-resource-name> <description>Require users to authenticate</description> <url-pattern>*.do</url-pattern> <http-method>POST</http-method> <http-method>GET</http-method> </web-resource-collection> <auth-constraint> <description>Only allow users with role tomcat</description> <role-name>tomcat</role-name> </auth-constraint> <user-data-constraint> <description> Encryption is not required for the application in general. </description> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security-constraint> <!-- Login Configuration --> <XDtConfig:ifConfigParamEquals paramName="security" value="basic"> <login-config> <auth-method>BASIC</auth-method> <realm-name>My Friendly App</realm-name> </login-config> </XDtConfig:ifConfigParamEquals> <XDtConfig:ifConfigParamEquals paramName="security" value="form"> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.jsp</form-login-page> <form-error-page>/login.jsp?error=true</form-error-page> </form-login-config> </login-config> </XDtConfig:ifConfigParamEquals> <!-- The tomcat role --> <security-role> <description>Role to allow authentication</description> <role-name>tomcat</role-name> </security-role> --- NEW FILE: web-settings.xml --- <!-- You may experience issues in Mozilla < version 1.2 if you use --> <!-- ports other than 80 and 443, it seems to work fine with v1.2. --> <!-- For further information see the following article: --> <!-- http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html --> <context-param> <param-name>listenPort_http</param-name> <param-value>8080</param-value> </context-param> <context-param> <param-name>listenPort_https</param-name> <param-value>8443</param-value> </context-param> <!-- Possible values: hibernate (more to come later) --> <context-param> <param-name>daoType</param-name> <param-value>hibernate</param-value> </context-param> --- NEW FILE: welcomefiles.xml --- <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> |
From: <mr...@us...> - 2003-01-08 05:50:51
|
Update of /cvsroot/struts/struts-resume/metadata/templates In directory sc8-pr-cvs1:/tmp/cvs-serv27925 Added Files: struts_form.xdt Log Message: --- NEW FILE: struts_form.xdt --- package <XDtPackage:packageOf><XDtStrutsForm:strutsFormClass/></XDtPackage:packageOf>; import java.util.List; /** * <XDtI18n:getString bundle="xdoclet.modules.apache.struts.ejb.XDocletModulesApacheStrutsEjbMessages" resource="form_generated"/> * * @struts.form name="<XDtStrutsForm:strutsFormName/>" */ public class <XDtClass:classOf><XDtStrutsForm:strutsFormClass/></XDtClass:classOf> extends <XDtClass:classTagValue tagName="struts.form" paramName="extends" default="org.apache.struts.action.ActionForm" /> implements java.io.Serializable<XDtClass:ifHasClassTag tagName="struts.form" paramName="implements" superclasses="false">, <XDtClass:classTagValue tagName="struts.form" paramName="implements" superclasses="false"/></XDtClass:ifHasClassTag> { <XDtStrutsForm:forAllFormFields> <XDtType:ifIsOfType value="return-type" type="java.util.List" extent="concrete-type"> protected List <XDtMethod:propertyName/>; </XDtType:ifIsOfType> <XDtType:ifIsNotOfType value="return-type" type="java.util.List" extent="concrete-type"> protected String <XDtMethod:propertyName/>; </XDtType:ifIsNotOfType> </XDtStrutsForm:forAllFormFields> /** <XDtI18n:getString bundle="xdoclet.modules.apache.struts.ejb.XDocletModulesApacheStrutsEjbMessages" resource="form_empty_constructor"/> */ public <XDtClass:classOf><XDtStrutsForm:strutsFormClass/></XDtClass:classOf>() {} <XDtStrutsForm:forAllFormFields> <XDtType:ifIsOfType value="return-type" type="java.util.List" extent="concrete-type"> public List <XDtMethod:getterMethod/>()<XDtMethod:exceptionList/> </XDtType:ifIsOfType> <XDtType:ifIsNotOfType value="return-type" type="java.util.List" extent="concrete-type"> public String <XDtMethod:getterMethod/>()<XDtMethod:exceptionList/> </XDtType:ifIsNotOfType> { return this.<XDtMethod:propertyName/>; } /** <XDtMethod:forAllMethodTags tagName="struts.validator"> * @struts.validator <XDtMethod:methodTagValue tagName="struts.validator"/> </XDtMethod:forAllMethodTags> <XDtMethod:forAllMethodTags tagName="struts.validator-args"> * @struts.validator-args <XDtMethod:methodTagValue tagName="struts.validator-args"/> </XDtMethod:forAllMethodTags> <XDtMethod:forAllMethodTags tagName="struts.validator-var"> * @struts.validator-var <XDtMethod:methodTagValue tagName="struts.validator-var"/> </XDtMethod:forAllMethodTags> */ <XDtType:ifIsOfType value="return-type" type="java.util.List" extent="concrete-type"> public void <XDtMethod:setterMethod/>( List <XDtMethod:propertyName/> ) </XDtType:ifIsOfType> <XDtType:ifIsNotOfType value="return-type" type="java.util.List" extent="concrete-type"> public void <XDtMethod:setterMethod/>( String <XDtMethod:propertyName/> ) </XDtType:ifIsNotOfType> { this.<XDtMethod:propertyName/> = <XDtMethod:propertyName/>; } </XDtStrutsForm:forAllFormFields> } |
From: <mr...@us...> - 2003-01-08 05:50:40
|
Update of /cvsroot/struts/struts-resume/metadata/sql In directory sc8-pr-cvs1:/tmp/cvs-serv27889 Added Files: mysql-create.sql sample-data.xml Log Message: --- NEW FILE: mysql-create.sql --- CREATE DATABASE IF NOT EXISTS resume; --- NEW FILE: sample-data.xml --- <dataset> <table name='user_role'> <column>id</column> <column>username</column> <column>role_name</column> <row> <value><![CDATA[1]]></value> <value><![CDATA[tomcat]]></value> <value><![CDATA[tomcat]]></value> </row> </table> <table name='skill_group'> <column>id</column> <column>name</column> </table> <table name='skill'> <column>id</column> <column>name</column> </table> <table name='app_user'> <column>id</column> <column>address</column> <column>city</column> <column>country</column> <column>email</column> <column>firstName</column> <column>lastName</column> <column>password</column> <column>phoneNumber</column> <column>postalCode</column> <column>province</column> <column>username</column> <column>website</column> <row> <value><![CDATA[1]]></value> <value><![CDATA[new address]]></value> <value><![CDATA[]]></value> <value><![CDATA[]]></value> <null/> <value><![CDATA[Tomcat]]></value> <value><![CDATA[User]]></value> <value><![CDATA[536c0b339345616c1b33caf454454d8b8a190d6c]]></value> <null/> <value><![CDATA[]]></value> <value><![CDATA[]]></value> <value><![CDATA[tomcat]]></value> <null/> </row> </table> <table name='resume'> <column>id</column> <column>description</column> <column>name</column> <column>objective</column> <column>user_id</column> <row> <value><![CDATA[1]]></value> <value><![CDATA[description]]></value> <value><![CDATA[technical]]></value> <value><![CDATA[to write java]]></value> <value><![CDATA[1]]></value> </row> <row> <value><![CDATA[2]]></value> <value><![CDATA[consulting resume]]></value> <value><![CDATA[consulting]]></value> <value><![CDATA[to tell people how to write java]]></value> <value><![CDATA[1]]></value> </row> </table> <table name='education'> <column>id</column> <column>degree</column> <column>gpa</column> <column>location</column> <column>name</column> <column>resumeId</column> </table> <table name='skill_category'> <column>id</column> <column>name</column> </table> </dataset> |
From: <mr...@us...> - 2003-01-08 05:50:26
|
Update of /cvsroot/struts/struts-resume/metadata/web In directory sc8-pr-cvs1:/tmp/cvs-serv27797/web Log Message: Directory /cvsroot/struts/struts-resume/metadata/web added to the repository |
From: <mr...@us...> - 2003-01-08 05:50:26
|
Update of /cvsroot/struts/struts-resume/metadata/templates In directory sc8-pr-cvs1:/tmp/cvs-serv27797/templates Log Message: Directory /cvsroot/struts/struts-resume/metadata/templates added to the repository |
From: <mr...@us...> - 2003-01-08 05:50:25
|
Update of /cvsroot/struts/struts-resume/metadata/sql In directory sc8-pr-cvs1:/tmp/cvs-serv27797/sql Log Message: Directory /cvsroot/struts/struts-resume/metadata/sql added to the repository |
From: <mr...@us...> - 2003-01-08 05:50:20
|
Update of /cvsroot/struts/struts-resume/lib/xdoclet-1.2-beta2-20021223 In directory sc8-pr-cvs1:/tmp/cvs-serv27444 Added Files: xdoclet-1.2b2.jar xdoclet-apache-module-1.2b2.jar xdoclet-ejb-module-1.2b2.jar xdoclet-hibernate-module-1.2b2.jar xdoclet-web-module-1.2b2.jar xdoclet-xdoclet-module-1.2b2.jar xdoclet-xjavadoc-1.2b2.jar Log Message: --- NEW FILE: xdoclet-1.2b2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xdoclet-apache-module-1.2b2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xdoclet-ejb-module-1.2b2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xdoclet-hibernate-module-1.2b2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xdoclet-web-module-1.2b2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xdoclet-xdoclet-module-1.2b2.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xdoclet-xjavadoc-1.2b2.jar --- (This appears to be a binary file; contents omitted.) |
From: <mr...@us...> - 2003-01-08 05:48:58
|
Update of /cvsroot/struts/struts-resume/lib/webtest-build265/lib In directory sc8-pr-cvs1:/tmp/cvs-serv27113 Added Files: httpunit.jar Tidy.jar webtest.jar Log Message: --- NEW FILE: httpunit.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Tidy.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: webtest.jar --- (This appears to be a binary file; contents omitted.) |
From: <mr...@us...> - 2003-01-08 05:47:09
|
Update of /cvsroot/struts/struts-resume/lib/webtest-build265 In directory sc8-pr-cvs1:/tmp/cvs-serv26904 Added Files: httpunitWithJTidy.jar Log Message: --- NEW FILE: httpunitWithJTidy.jar --- (This appears to be a binary file; contents omitted.) |
From: <mr...@us...> - 2003-01-08 05:46:37
|
Update of /cvsroot/struts/struts-resume/lib/webtest-build265/lib In directory sc8-pr-cvs1:/tmp/cvs-serv26790/lib Log Message: Directory /cvsroot/struts/struts-resume/lib/webtest-build265/lib added to the repository |
From: <mr...@us...> - 2003-01-08 05:46:31
|
Update of /cvsroot/struts/struts-resume/lib/strutstest-dev_2.3 In directory sc8-pr-cvs1:/tmp/cvs-serv26753 Added Files: strutstest.jar Log Message: --- NEW FILE: strutstest.jar --- (This appears to be a binary file; contents omitted.) |
From: <mr...@us...> - 2003-01-08 05:45:43
|
Update of /cvsroot/struts/struts-resume/lib/junit3.8.1 In directory sc8-pr-cvs1:/tmp/cvs-serv26564 Added Files: junit.jar Log Message: --- NEW FILE: junit.jar --- (This appears to be a binary file; contents omitted.) |