[quote=ovelha]Ola,
1º) Post o seu bean ManterProjetoFacadeBean
2º) Eu, quando era estag, já tomei uma comida de rabo pode deixar o nome da minha empresa no pacote, postando uma duvida no forum rsrs, por isso não te aconselharia a fazer isso.[/quote]
Olá Ovelha, agradeço muito a resposta. Vou postar o fonte do EJB. Quanto ao nome da empresa no pacote, não costumo fazer isso. Enfim, isso não é foco do problema… Quanto ao EJB, ele é apenas um façade que faz propagação de chamadas para a camada seguinte…
@Stateless
public class ManterProjetoFacadeBean implements ManterProjetoFacade {
private static final Log log = LogFactory
.getLog(ManterProjetoFacadeBean.class);
public List<TipoProjetoTO> obterTipo(TipoProjetoTO filter)
throws SessionFacadeException {
List<TipoProjetoTO> tipoProjeto;
try {
ProjetoBO projetoBO = new ProjetoBO();
tipoProjeto = projetoBO.obterTipo(filter);
} catch (BOException e) {
log.error(
"Erro ao executar o metodo ManterProjetoFacade.obterTipo ",
e);
throw new SessionFacadeException(e);
}
return tipoProjeto;
}
@Override
public List<ProjetoTO> obterProjeto(ProjetoTO filter, boolean pesquisarExecucao)
throws SessionFacadeException {
List<ProjetoTO> listaProjeto = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaProjeto = projetoBO.obterProjetos(filter, pesquisarExecucao);
} catch (BOException e) {
log
.error(
"Erro ao executar o metodo ManterProjetoFacade.obterprojeto",
e);
throw new SessionFacadeException(e);
}
return listaProjeto;
}
@Override
public List<CategoriaProjetoTO> obterCategoriaProjeto(
CategoriaProjetoTO filter) throws SessionFacadeException {
List<CategoriaProjetoTO> listaProjeto = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaProjeto = projetoBO.obterCategoria(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaProjeto;
}
@Override
public List<TipoFaseTO> obterTipoFase(TipoFaseTO filter)
throws SessionFacadeException {
List<TipoFaseTO> listaTipoFase = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaTipoFase = projetoBO.obterTipoFase(filter);
} catch (BOException e) {
throw new SessionFacadeException(e);
}
return listaTipoFase;
}
@Override
public void alterarProjeto(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjeto(projetoTO);
} catch (BOException e) {
throw new SessionFacadeException(e);
}
}
@Override
public void excluirProjeto(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.excluirProjeto(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void incluirProjeto(ProjetoTO projetoTO)
throws Exception {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.incluirProjeto(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
catch (Exception e) {
log.error(e.getMessage(), e);
throw new Exception(e);
}
}
@Override
public List<UsuarioTO> obterUsuarioPorEntidade(EntidadeClasseTO entidadeClasseTO)
throws SessionFacadeException {
List<UsuarioTO> listaUsuario = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaUsuario = projetoBO.obterUsuarioPorEntidade(entidadeClasseTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException();
}
return listaUsuario;
}
@Override
public List<EntidadeClasseTO> obterEntidade(EntidadeClasseTO filter)
throws SessionFacadeException {
List<EntidadeClasseTO> listaEntidadeClasseTO = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaEntidadeClasseTO = projetoBO.obterEntidade(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaEntidadeClasseTO;
}
@Override
public List<ProgramaProjetoTO> obterProgramaProjeto(
ProgramaProjetoTO filter) throws SessionFacadeException {
List<ProgramaProjetoTO> listaProgramaProjetoTO = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaProgramaProjetoTO = projetoBO.obterProgramaProjeto(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaProgramaProjetoTO;
}
@Override
public List<ObjetivoEstrategicoTO> obterObjetivoEstrategico(
ObjetivoEstrategicoTO filter) throws SessionFacadeException {
List<ObjetivoEstrategicoTO> listaObjetivoEstrategico = null;
try {
ProjetoBO projetoBO = new ProjetoBO();
listaObjetivoEstrategico = projetoBO.obterObjetivoEstrategico(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaObjetivoEstrategico;
}
@Override
public List<TipoInstrumentoJuridicoTO> obterTipoInstrumentoJuridico(
TipoInstrumentoJuridicoTO filter) throws SessionFacadeException {
List<TipoInstrumentoJuridicoTO> listaTipoInstrumentoJuridico = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaTipoInstrumentoJuridico = projetoBO.obterTipoInstrumentoJuridico(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
new SessionFacadeException(e);
}
return listaTipoInstrumentoJuridico;
}
@Override
public ProjetoTO obterProjetoComRelacionamentos(ProjetoTO filter)
throws SessionFacadeException {
ProjetoTO projeto = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
projeto = projetoBO.obterProjetoComRelacionamentos(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
new SessionFacadeException(e);
}
return projeto;
}
@Override
public List<UnidadeApexTO> obterUnidadeApex(UnidadeApexTO filter)
throws SessionFacadeException {
List<UnidadeApexTO> listaUnidadeApexTO = null;
ProjetoBO projeto = new ProjetoBO();
try {
listaUnidadeApexTO = projeto.obterUnidadeApex(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaUnidadeApexTO;
}
@Override
public List<TipoComplexoTO> obterTipoComplexo(TipoComplexoTO filter)
throws SessionFacadeException {
List<TipoComplexoTO> listaTipoComplexoTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaTipoComplexoTO = projetoBO.obterTipoComplexo(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
return listaTipoComplexoTO;
}
@Override
public List<ProjetoPapelTO> obterProjetoPapel(ProjetoPapelTO filter)
throws SessionFacadeException {
List<ProjetoPapelTO> listaProjetoPapel = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaProjetoPapel = projetoBO.obterProjetoPapel(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaProjetoPapel;
}
@Override
public List<ResultadoPesquisaTO> obterListaProjeto()
throws SessionFacadeException {
List<ResultadoPesquisaTO> listaProjeto = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaProjeto = projetoBO.obterListaProjeto();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaProjeto;
}
@Override
public List<ResultadoPesquisaTO> obterListaProjeto(UsuarioTO usuarioTO)
throws SessionFacadeException {
List<ResultadoPesquisaTO> listaProjeto = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaProjeto = projetoBO.obterListaProjeto(usuarioTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaProjeto;
}
@Override
public List<PerfilAcessoTO> obterPerfilAcessos(PerfilAcessoTO filter)
throws SessionFacadeException {
List<PerfilAcessoTO> listaPerfilAcessoTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaPerfilAcessoTO = projetoBO.obterPerfilAcessos(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaPerfilAcessoTO;
}
@Override
public void alterarProjetoComEntidadesCoAutoras(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoComEntidadesCoAutoras(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoComProjetoPapels(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoComProjetoPapels(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoComObjetivoEstrategicos(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoComObjetivoEstrategicos(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public List<ResltadoPesquisaProjetoPapelTO> obterProjetoPapelPorProjeto(
ProjetoTO filter) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ResltadoPesquisaProjetoPapelTO> listaResltadoPesquisaProjetoPapelTO = null;
try {
listaResltadoPesquisaProjetoPapelTO = projetoBO.obterProjetoPapelPorProjeto(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaResltadoPesquisaProjetoPapelTO;
}
@Override
public void excluirProjetoPapel(ProjetoPapelTO projetoPapelTO)
throws SessionFacadeException {
try {
ProjetoBO projetoBO = new ProjetoBO();
projetoBO.excluirProjetoPapel(projetoPapelTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoOrcamentoSumario(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoOrcamentoSumario(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoPublicoAlvo(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoPublicoAlvo(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoEstrategiaObjetivo(ProjetoTO projetoTO)
throws SessionFacadeException , RegraNegocioException{
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoEstrategiaObjetivo(projetoTO);
}catch(RegraNegocioException e){
log.error(e.getMessage(), e);
throw new RegraNegocioException(e);
}catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoEstrategiaAnaliseSetor(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoEstrategiaAnaliseSetor(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e.getMessage());
}
}
@Override
public void alterarProjetoDadosGeraisSumario(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoDadosGeraisSumario(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoObjetivo(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoObjetivo(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoSumario(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoSumario(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void alterarProjetoTipoProprioCategoriaGestaoEspelcialPeiex(
ProjetoTO projetoTO) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoTipoProprioCategoriaGestaoEspelcialPeiex(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public ProjetoTO obterProjeto(Long idProjeto) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
ProjetoTO projetoTO = null;
try {
projetoTO = projetoBO.obterProjeto(idProjeto);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return projetoTO;
}
@Override
public void alterarProjetoSumarioDados(ProjetoTO projetoTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoSumarioDados(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public List<TipoContaTO> obterTipoContas(TipoContaTO filter)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<TipoContaTO> listaTipoContaTO = null;
try {
listaTipoContaTO = projetoBO.obterTipoContas(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaTipoContaTO;
}
@Override
public List<EntidadeClasseTO> obterInstituicaoPatrocinada(TipoContaTO tipoContaTO)
throws SessionFacadeException {
List<EntidadeClasseTO> listaEntidadeClasseTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaEntidadeClasseTO = projetoBO.obterEntidade(null);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaEntidadeClasseTO;
}
@Override
public ParametroValorTO obterCotacaoDolarAtual()
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
ParametroValorTO parametroValorTO = null;
try {
parametroValorTO = projetoBO.obterCotacaoDolarAtual();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return parametroValorTO;
}
@Override
public ParametroValorTO obterCotacaoEuroAtual()
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
ParametroValorTO parametroValorTO = null;
try {
parametroValorTO = projetoBO.obterCotacaoEuroAtual();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return parametroValorTO;
}
@Override
public List<UsuarioTO> obterUsuarioPorEntidade(Long idEntidade)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<UsuarioTO> listUsuarioTO = null;
try {
listUsuarioTO = projetoBO.obterUsuarioPorEntidade(idEntidade);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listUsuarioTO;
}
@Override
public TipoFaseTO obterTipoFaseAtualDoProjeto(ProjetoTO filter)
throws SessionFacadeException {
TipoFaseTO tipoFaseTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
tipoFaseTO = projetoBO.obterTipoFaseAtualDoProjeto(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return tipoFaseTO;
}
@Override
public TipoFaseTO obterTipoFaseAtualDoProjeto(ProjetoTO filter, Object object)
throws SessionFacadeException {
TipoFaseTO tipoFaseTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
tipoFaseTO = projetoBO.obterTipoFaseAtualDoProjeto(filter, object);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return tipoFaseTO;
}
@Override
public List<UsuarioTO> obterUsuariosInternosApex()
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<UsuarioTO> listUsuarioTO = null;
try {
listUsuarioTO = projetoBO.obterUsuariosInternosApex();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listUsuarioTO;
}
@Override
public List<EntidadeClasseTO> obterEntidadePorProjeto(ProjetoTO filter)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<EntidadeClasseTO> listaEntidade = null;
try {
listaEntidade = projetoBO.obterEntidadePorProjeto(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaEntidade;
}
@Override
public List<ObjetivoEstrategicoTO> obterObjetivoEstrategicoPorProjeto(
ProjetoTO projeto) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ObjetivoEstrategicoTO> listObjetivoEstrategicoTO = null;
try {
listObjetivoEstrategicoTO = projetoBO.obterObjetivoEstrategicoPorProjeto(projeto);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listObjetivoEstrategicoTO;
}
@Override
public List<InstituicaoTO> obterOrgaosParceiros()
throws SessionFacadeException {
List<InstituicaoTO> lista = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
lista = projetoBO.obterOrgaosParceiros();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return lista;
}
@Override
public List<ParticipanteTO> obterProjetoParticipantePorProjeto(Integer idProjeto)
throws SessionFacadeException {
List<ParticipanteTO> lista = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
lista = projetoBO.obterProjetoParticipantePorProjeto(idProjeto);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return lista;
}
@Override
public List<UsuarioTO> pesquisarUsuarios(Long idTipoConta,Long idInsituicao, String nome, String Flag)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<UsuarioTO> listaUsuarioTO = null;
try {
listaUsuarioTO = projetoBO.pesquisarUsuarios(idTipoConta, idInsituicao, nome, Flag);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaUsuarioTO;
}
@Override
public ParametroValorTO obrerParamentroAtualPorId(Long idParametro)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
ParametroValorTO parametroValorTO = null;
try {
parametroValorTO = projetoBO.obrerParamentroAtualPorId(idParametro);
} catch (BOException e) {
log.error(e);
throw new SessionFacadeException(e);
}
return parametroValorTO;
}
@Override
public void alterarProjetoPublicoAlvoTipoParceriaCategoriaNegocio(
ProjetoTO projeto) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoPublicoAlvoTipoParceriaCategoriaNegocio(projeto);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public List<UsuarioTO> pesquisarUsuariosRetornandoListaContaContato(
Long idTipoConta, Long idInsituicao, String nome, String idFuncao)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<UsuarioTO> listaUsuario = null;
try {
listaUsuario = projetoBO.pesquisarUsuariosRetornandoListaContaContato(
idTipoConta, idInsituicao, nome, idFuncao);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaUsuario;
}
@Override
public List<PerfilAcessoUsuarioTO> obterPerfilAcessoUsuarioPorIdPessoa(Integer idPessoa) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<PerfilAcessoUsuarioTO> listPerfilAcessoTO = null;
try {
listPerfilAcessoTO = projetoBO.obterPerfilAcessoUsuarioPorIdPessoa(idPessoa);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listPerfilAcessoTO;
}
@Override
public List<ObjetivoEstrategicoTO> obterObjetivoEstrategicoPorDataVigencia(
ObjetivoEstrategicoTO filter) throws SessionFacadeException {
List<ObjetivoEstrategicoTO> listaObjetivoEstrategicoTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaObjetivoEstrategicoTO = projetoBO.obterObjetivoEstrategicoPorDataVigencia(filter);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaObjetivoEstrategicoTO;
}
@Override
public void alterarProjetoEstrategiaObjetivo(ProjetoTO projeto, Set<ProjetoObjetivoEstrategicoTO> projetoObjetivoEstrategicoTOs) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoEstrategiaObjetivo(projeto, projetoObjetivoEstrategicoTOs);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
public void alterarProjetoEstrategiaObjetivoEmExecucao(ProjetoTO projeto, Set<ProjetoObjetivoEstrategicoTO> projetoObjetivoEstrategicoTOs) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoEstrategiaObjetivoEmExecucao(projeto, projetoObjetivoEstrategicoTOs);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void mudarFaseDoProjetoParaEnviado(Long id)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.mudarFaseDoProjetoParaEnviado(id);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void mudarFaseDoProjetoParaPlanejamento(Long id)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.mudarFaseDoProjetoParaPlanejamento(id);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public List<PerfilAcessoTO> obterPerfilsAcessoPadraoPorIdPessoa(Long codigo)
throws SessionFacadeException {
List<PerfilAcessoTO> listPerfilAcessoTO = new ArrayList<PerfilAcessoTO>();
ProjetoBO projetoBO = new ProjetoBO();
try {
listPerfilAcessoTO = projetoBO.obterPerfilsAcessoPadraoPorIdPessoa(codigo);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listPerfilAcessoTO;
}
@Override
public List<EntidadeTO> consultarEntidadesPorUsuario(Long long1)
throws SessionFacadeException {
List<EntidadeTO> listEntidadeTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listEntidadeTO = projetoBO.consultarEntidadesPorUsuario(long1);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listEntidadeTO;
}
@Override
public List<UsuarioTO> obterUsuariosExternosApex(Long idEntidadeExecutora)
throws SessionFacadeException {
List<UsuarioTO> listUsuarioTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listUsuarioTO = projetoBO.obterUsuariosExternosApex(idEntidadeExecutora);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listUsuarioTO;
}
@Override
public List<UsuarioTO> obterUsuariosGerente() throws SessionFacadeException {
List<UsuarioTO> listUsuarioTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listUsuarioTO = projetoBO.obterUsuariosGerente();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listUsuarioTO;
}
@Override
public UsuarioTO obterUsuarioInterno(Long idPessoa)
throws SessionFacadeException {
UsuarioTO usuarioTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
usuarioTO = projetoBO.obterUsuarioInterno(idPessoa);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return usuarioTO;
}
@Override
public void alterarProjetoEstrategiaObjetivoSemObjetivos(ProjetoTO projeto)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.alterarProjetoEstrategiaObjetivoSemObjetivos(projeto);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public List<TipoProjetoTO> obterTipoProjeto(TipoProjetoTO tipoProjetoTO)
throws SessionFacadeException {
List<TipoProjetoTO> listaTipoProjeto = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaTipoProjeto = projetoBO.obterTipo(null);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaTipoProjeto;
}
@Override
public List<ResultadoPesquisaTO> obterListaProjeto(String idComplexo, String idTipoMenu, String idTipoCategoriaMenu, String unidadeApexMenu) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ResultadoPesquisaTO> listResultadoPesquisaTO;
try {
listResultadoPesquisaTO = projetoBO.obterListaProjeto(idComplexo,
idTipoMenu, idTipoCategoriaMenu,
unidadeApexMenu);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listResultadoPesquisaTO;
}
@Override
public List<ResultadoPesquisaTO> obterListaProjeto(String idComplexo, String idTipoMenu, String idTipoCategoriaMenu, String unidadeApexMenu, UsuarioTO usuarioTO) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ResultadoPesquisaTO> listResultadoPesquisaTO;
try {
listResultadoPesquisaTO = projetoBO.obterListaProjeto(idComplexo,
idTipoMenu, idTipoCategoriaMenu,
unidadeApexMenu, usuarioTO );
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listResultadoPesquisaTO;
}
@Override
public List<EntidadeClasseTO> listaOrgaoParceiro() throws SessionFacadeException {
List<EntidadeClasseTO> listNomeEntidadeCoautora = new ArrayList<EntidadeClasseTO>();
OrgaoParceiroBO orgaoParceiroBO = new OrgaoParceiroBO();
try {
listNomeEntidadeCoautora = orgaoParceiroBO.listaOrgaoParceiro();
} catch (BOException e) {
e.printStackTrace();
} catch (DAOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
return listNomeEntidadeCoautora;
}
@Override
public List<SetorSecexTO> obterListaSetorSecexTO()
throws SessionFacadeException {
List<SetorSecexTO> listSetorSecexTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listSetorSecexTO = projetoBO.obterListaSetorSecexTO();
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
return listSetorSecexTO;
}
@Override
public List<GrupoPaisTO> obterListaGrupoPaisTO()
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<GrupoPaisTO> listaGrupoPaisTO = null;
try {
listaGrupoPaisTO = projetoBO.obterListaGrupoPaisTO();
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
return listaGrupoPaisTO;
}
@Override
public List<PaisTO> obterPaisesPorContinete(Long idContinente)
throws SessionFacadeException {
List<PaisTO> listaPais = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaPais = projetoBO.obterPaisesPorContinete(idContinente);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaPais;
}
@Override
public List<PaisTO> obterPaises()throws SessionFacadeException {
List<PaisTO> listaPais = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaPais = projetoBO.obterPaises();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaPais;
}
@Override
public List<UnidadeFederacaoTO> obterUnidadesDaFederacao()
throws SessionFacadeException {
List<UnidadeFederacaoTO> listaUnidadeFederacaoTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaUnidadeFederacaoTO = projetoBO.obterUnidadesDaFederacao();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaUnidadeFederacaoTO;
}
@Override
public List<ResultadoPesquisaProjetoTO> pesquisarProjetos(String[] idSetor, String[] idContinente,
String[] idPais, String[] idEstado) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ResultadoPesquisaProjetoTO> listaResultadoPesquisaProjetoTO = null;
try {
listaResultadoPesquisaProjetoTO = projetoBO.pesquisarProjetos(idSetor, idContinente, idPais, idEstado);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaResultadoPesquisaProjetoTO;
}
@Override
public List<PerfilAcessoTO> obterPerfilsAcessoPorIdPessoa(Long codigo) throws SessionFacadeException {
List<PerfilAcessoTO> listPerfilAcessoTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listPerfilAcessoTO = projetoBO.obterPerfilsAcessoPorIdPessoa(codigo);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listPerfilAcessoTO;
}
@Override
public List<PairTO> obterSetorSecexTO() throws SessionFacadeException {
List<PairTO> listaSetores = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaSetores = projetoBO.obterSetorSecexTO();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaSetores;
}
@Override
public List<PairTO> obterGrupoPais() throws SessionFacadeException {
List<PairTO> listaGrupoPais = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
listaGrupoPais = projetoBO.obterGrupoPais();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return listaGrupoPais;
}
/**
* @organization BRQ - IT Services
* @author Michel Sante
* @date 27/08/2009
* @description
* @param projeto
* @return ProjetoTO
* @throws SessionFacadeException
*/
@Override
public ProjetoTO recuperarDadosProjeto(Long projeto)throws SessionFacadeException{
ProjetoTO projetoTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoTO = projetoBO.recuperarDadosProjeto(projeto);
} catch (BOException be) {
log.error("Erro ao executar o metodo ManterProjetoFacadeBean.recuperarDadosProjeto", be);
throw new SessionFacadeException(be.getMessage());
}
return projetoTO;
}
@Override
public List<LembreteTO> carregarCaixaUsuario(LembreteTO lembreteTO, ParametroValorTO parametroValorTO) throws SessionFacadeException {
List<LembreteTO> lista = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
lista = projetoBO.carregarCaixaUsuario(lembreteTO, parametroValorTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return lista;
}
/**
* este metodo retorna menuva com as caixas que podem ser exibidas para o perfil logado
* @return
*/
public MenuVA obterCaixas(String idPerfil)throws SessionFacadeException {
MenuVA itensMenu = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
itensMenu = projetoBO.obterCaixas(idPerfil);
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
throw new SessionFacadeException(e);
}
return itensMenu;
}
/**
*
* @return
*/
public MenuVA obterFuncionalidades(String idPerfil, ProjetoTO projetoTO)throws SessionFacadeException {
MenuVA itensMenu = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
itensMenu = projetoBO.obterFuncionalidades(projetoTO, idPerfil);
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
throw new SessionFacadeException(e);
}
return itensMenu;
}
@Override
public List<PerfilAcessoUsuarioTO> buscarListasUsuariosPorPerfil(Integer idPerfil) throws SessionFacadeException {
List<PerfilAcessoUsuarioTO> lista = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
lista = projetoBO.buscarListasUsuariosPorPerfil(idPerfil);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return lista;
}
/**
*
* @organization BRQ - IT Services
* @author Felipe José Souza Brancaleone
* @date 17/09/2009
* @description Retorna uma lista do tipo InnerMetasResultados populado
* @param projetoTO
* @return
* @throws SessionFacadeException
*/
@Override
public List<InnerMetasResultados> obterMetasResultados(ProjetoTO projetoTO) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ProjetoVA.InnerMetasResultados> lista = new ArrayList<InnerMetasResultados>();
try {
lista.addAll(projetoBO.obterMetasResultados(projetoTO));
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return lista;
}
public CrmResultadoContas consultaListaContaPorSetor(String[] listaSetor) {
ProjetoBO projetoBO = new ProjetoBO();
CrmResultadoContas lista = new CrmResultadoContas();
try {
lista = projetoBO.consultaListaContaPorSetor(listaSetor);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return lista;
}
public List<ProjetoTO> obterProjetoPorEntidade(EntidadeTO entidadeTO) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ProjetoTO> lista = new ArrayList<ProjetoTO>();
try {
lista = projetoBO.obterProjetoPorEntidade(entidadeTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
@Override
public List<ProjetoTO> consultaProjetoPorContinente(String[] listaContinente) {
ProjetoBO projetoBO = new ProjetoBO();
List<ProjetoTO> lista = new ArrayList<ProjetoTO>();
try {
lista = projetoBO.consultaProjetoPorContinente(listaContinente);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
@Override
public List<SetorSecexTO> consultaListaSetor() throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<SetorSecexTO> lista = new ArrayList<SetorSecexTO>();
try {
lista = projetoBO.consultaListaSetor();
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
return lista;
}
@Override
public List<ProjetoTO> consultaProjetoPorPais(String[] listaPais) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ProjetoTO> lista = new ArrayList<ProjetoTO>();
try {
lista = projetoBO.consultaProjetoPorPais(listaPais);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
public List<ProjetoTO> consultaProjetoPorEstado(String[] listaEstado) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ProjetoTO> lista = new ArrayList<ProjetoTO>();
try {
lista = projetoBO.consultaProjetoPorEstado(listaEstado);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
@Override
public List<ProjetoTO> consultaPesquisaProjeto(String idsSetores, String[] idContinente, String idPais, String idEstado)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ProjetoTO> lista = new ArrayList<ProjetoTO>();
try {
lista = projetoBO.consultaPesquisaProjeto(idsSetores, idContinente, idPais, idEstado);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
public List<ResultadoPesquisaTO> consultaPesquisaListaProjeto(String idsSetores, String[] idContinente, String idPais, String idEstado)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ResultadoPesquisaTO> lista = new ArrayList<ResultadoPesquisaTO>();
try {
lista = projetoBO.consultaPesquisaListaProjeto(idsSetores, idContinente, idPais, idEstado);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
public List<ResultadoPesquisaTO> consultaPesquisaListaProjeto(String idsSetores, String[] idContinente, String idPais, String idEstado, UsuarioTO usuarioTO)
throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<ResultadoPesquisaTO> lista = new ArrayList<ResultadoPesquisaTO>();
try {
if(usuarioTO.getTipo().equals("1")){
return projetoBO.consultaPesquisaListaProjeto(idsSetores, idContinente, idPais, idEstado);
}
lista = projetoBO.consultaPesquisaListaProjeto(idsSetores, idContinente, idPais, idEstado, usuarioTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
@Override
public List<TipoAcaoTO> consultaPesquisaEventoPorData( String nomeAcao, Date dtInicio,Date dtTermino ,String idsSetores, String[] idContinente, String idPais) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
List<TipoAcaoTO> lista = new ArrayList<TipoAcaoTO>();
try {
lista = projetoBO.consultaPesquisaEventoPorData(nomeAcao, dtInicio, dtTermino, idsSetores, idContinente, idPais);
} catch (BOException e) {
log.error(e.getMessage(), e);
}
return lista;
}
public List<ProjetoTO> obterProjetosPorPapel(UsuarioTO usuarioTO)throws SessionFacadeException {
List<ProjetoTO> lista = new ArrayList<ProjetoTO>();
ProjetoBO projetoBO = new ProjetoBO();
try {
lista = projetoBO.obterProjetosPorPapel(usuarioTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
throw new SessionFacadeException(e.getMessage());
}
return lista;
}
@Override
public List<ProdutoTO> obterListaProduto() throws SessionFacadeException {
List<ProdutoTO> lista = new ArrayList<ProdutoTO>();
ProjetoBO projetoBO = new ProjetoBO();
try {
lista = projetoBO.obterListaProduto();
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
throw new SessionFacadeException(e.getMessage());
}
return lista;
}
@Override
public void gravarPendencia(LembreteTO lembreteTO, UsuarioTO usuarioLogadoTO) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoBO.gravarPendencia(lembreteTO, usuarioLogadoTO);
} catch (Exception e) {
log.error(e);
e.printStackTrace();
}
}
@Override
public LembreteTO obterAvisoProjetoDisponivelLeitura(ProjetoTO projetoTO) throws SessionFacadeException {
ProjetoBO projetoBO = new ProjetoBO();
try {
return projetoBO.obterAvisoProjetoDisponivelLeitura(projetoTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
throw new SessionFacadeException(e.getMessage());
}
}
@Override
public List<ProjetoTO> consultaProjetoDataEntidade(ProjetoTO projetoTO) throws SessionFacadeException {
List<ProjetoTO> lista;
try {
ProjetoBO projetoBO = new ProjetoBO();
lista = projetoBO.consultaProjetoDataEntidade(projetoTO);
} catch (BOException e) {
log.error(e.getMessage());
e.printStackTrace();
throw new SessionFacadeException(e);
}
return lista;
}
@Override
public ProjetoParcelaTO obterProjetoParcelaPorId(ProjetoParcelaTO parcelaTO) throws SessionFacadeException {
ProjetoParcelaTO projetoParcelaTO = null;
ProjetoBO projetoBO = new ProjetoBO();
try {
projetoParcelaTO = projetoBO.obterProjetoParcelaPorId(parcelaTO);
} catch (BOException e) {
log.error(e.getMessage(), e);
e.printStackTrace();
throw new SessionFacadeException(e.getMessage());
}
return projetoParcelaTO;
}
@Override
public List<ResultadoPesquisaTO> obterProjetoComFaseExecucao() throws SessionFacadeException {
List<ResultadoPesquisaTO> lista;
try {
ProjetoBO projetoBO = new ProjetoBO();
lista = projetoBO.obterProjetoComFaseExecucao();
} catch (BOException e) {
log.error(
"Erro ao executar o metodo ManterProjetoFacade.obterTipo ",
e);
throw new SessionFacadeException(e);
}
return lista;
}
@Override
public List<ResultadoPesquisaTO> obterProjetoComFaseExecucao(ProjetoTO projetoTO) throws SessionFacadeException {
List<ResultadoPesquisaTO> lista;
try {
ProjetoBO projetoBO = new ProjetoBO();
lista = projetoBO.obterProjetoComFaseExecucao(projetoTO);
} catch (BOException e) {
log.error(
"Erro ao executar o metodo ManterProjetoFacade.obterTipo ",
e);
throw new SessionFacadeException(e);
}
return lista;
}
@Override
public ProjetoTO obterProjetoUsuarioSel(Long idProjetoUsuarioSel) throws SessionFacadeException {
try {
return new ProjetoBO().obterProjetoUsuarioSel(idProjetoUsuarioSel);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
@Override
public void inserirNovaFaseProjeto(Long idProjeto, Integer novaFaseProjeto) throws SessionFacadeException {
try {
new ProjetoBO().inserirNovaFaseProjeto(idProjeto, novaFaseProjeto);
} catch (BOException e) {
log.error(e.getMessage(), e);
throw new SessionFacadeException(e);
}
}
}