Java tutorial
// license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: TrocaDeSenhaObrigatoriaProcessarFormImpl.java.vsl in andromda-bpm4struts-cartridge-coppetec. // package br.mdarte.exemplo.academico.accessControl; import br.mdarte.exemplo.academico.util.Constantes; public class TrocaDeSenhaObrigatoriaProcessarFormImpl extends LoginFormImpl implements java.io.Serializable, TrocaEfetuadaComSucessoForm { private java.lang.String novaSenha; private java.lang.String usuario; private java.lang.String senha; private java.lang.String confirmacao; public TrocaDeSenhaObrigatoriaProcessarFormImpl() { } /** * Resets the given <code>novaSenha</code>. */ public void resetNovaSenha() { this.novaSenha = null; } public void setNovaSenha(java.lang.String novaSenha) { this.novaSenha = novaSenha; } /** * */ public java.lang.String getNovaSenha() { return this.novaSenha; } /** * Resets the given <code>usuario</code>. */ public void resetUsuario() { this.usuario = null; } public void setUsuario(java.lang.String usuario) { this.usuario = usuario; } /** * */ public java.lang.String getUsuario() { return this.usuario; } /** * Resets the given <code>senha</code>. */ public void resetSenha() { this.senha = null; } public void setSenha(java.lang.String senha) { this.senha = senha; } /** * */ public java.lang.String getSenha() { return this.senha; } /** * Resets the given <code>confirmacao</code>. */ public void resetConfirmacao() { this.confirmacao = null; } public void setConfirmacao(java.lang.String confirmacao) { this.confirmacao = confirmacao; } /** * */ public java.lang.String getConfirmacao() { return this.confirmacao; } /** * @see org.apache.struts.validator.ValidatorForm#reset(org.apache.struts.action.ActionMapping,javax.servlet.http.HttpServletRequest) */ public void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { } public String toString() { org.apache.commons.lang.builder.ToStringBuilder builder = new org.apache.commons.lang.builder.ToStringBuilder( this); builder.append("novaSenha", "***"); builder.append("usuario", this.usuario); builder.append("senha", "***"); builder.append("confirmacao", "***"); return builder.toString(); } /** * Allows you to clean all values from this form. Objects will be set to <code>null</code>, numeric values will be * set to zero and boolean values will be set to <code>false</code>. Backinglists for selectable fields will * also be set to <code>null</code>. */ public void clean() { this.novaSenha = null; this.usuario = null; this.senha = null; this.confirmacao = null; } /** * Override to provide population of current form with request parameters when validation fails. * * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) */ public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { org.apache.struts.action.ActionErrors errors = new org.apache.struts.action.ActionErrors(); if (request.getParameter("menu") == null) { //final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request); if (errors != null && !errors.isEmpty()) { Object formObj = org.andromda.presentation.bpm4struts.PageSessionObjectUtil.getPageForm(request, "${action.useCase.name}"); if (formObj != null) { try { formObj.getClass() .getMethod("resetCheckBoxes", new Class[] { org.apache.struts.action.ActionMapping.class, javax.servlet.http.HttpServletRequest.class }) .invoke(formObj, new Object[] { null, null }); } catch (Exception e2) { // ignoring } final java.util.Map parameters = new java.util.HashMap(); for (final java.util.Enumeration names = request.getParameterNames(); names .hasMoreElements();) { final String name = String.valueOf(names.nextElement()); parameters.put(name, request.getParameterValues(name)); } try { org.apache.commons.beanutils.BeanUtils.populate(formObj, parameters); } catch (java.lang.Exception populateException) { // ignore if we have an exception here (we just don't populate). } } } } else { request.getSession().setAttribute(Constantes.MENU, "true"); } return errors; } public boolean isFieldVisibleInOperationMode(String field, java.util.Collection modosOperacao) { return true; } public String getOperationModeKey() { return ""; } }