Exemplo n.º 1
0
 public virtual void AddProfile(Profile profile)
 {
     if (listProfile == null)
         listProfile = new ArrayList();
     listProfile.Add(profile);
 }
Exemplo n.º 2
0
 /// <exception cref="System.Exception"></exception>
 public static User Popula(IOdb odb)
 {
     // cria perfil
     var profileAdmin = new Profile("administrador");
     odb.Store(profileAdmin);
     var profileOper = new Profile("operador");
     odb.Store(profileOper);
     // cria funcao
     CreateFunctionProfile(odb, profileAdmin, profileOper);
     // cria usuario
     var user = new User();
     user.SetCreationDate(new DateTime());
     user.SetDeleted(false);
     user.SetLastLogin(new DateTime());
     user.SetLogin("admin");
     user.SetName("Administrador");
     user.SetPassword("trocar");
     user.SetProfileId(profileAdmin);
     user.SetRejectedLogin(0);
     user.SetUpdateDate(new DateTime());
     user.SetStatus(true);
     user.SetSessionKey("123456");
     odb.Store(user);
     return user;
 }
Exemplo n.º 3
0
Arquivo: User.cs Projeto: danfma/NDB
 /// <param name="profileId"> The profileId to set. </param>
 public virtual void SetProfileId(Profile profileId)
 {
     this.profileId = profileId;
 }
Exemplo n.º 4
0
 /// <exception cref="System.Exception"></exception>
 public static void CreateFunctionProfile(IOdb odb, Profile admin, Profile oper)
 {
     var function = new Functions();
     function.SetDescription("Inclus√£o de usu√£rio");
     function.SetName("incluiUsuario");
     function.SetNameUrl("usuario.do/criar");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de Usu√£rio");
     function.SetName("editaUsuario");
     function.SetNameUrl("usuario.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de Usu√£rio");
     function.SetName("excluiUsuario");
     function.SetNameUrl("usuario.do/excluir");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de Usu√£rios");
     function.SetName("listaUsuario");
     function.SetNameUrl("usuario.do/visualizar");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do usu√£rio");
     function.SetName("usuario");
     function.SetNameUrl("consultaUsuario.do/editar");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do usu√£rio");
     function.SetName("usuario");
     function.SetNameUrl("consultaUsuario.do/excluir");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do usu√£rio");
     function.SetName("usuario");
     function.SetNameUrl("consultaUsuario.do/visualizar");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller da senha");
     function.SetName("alteraSenha");
     function.SetNameUrl("alteraSenha.do/editar");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller da senha");
     function.SetName("alteraSenha");
     function.SetNameUrl("alteraSenha.do");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Altera√£√£o de Senha de outros");
     function.SetName("alteraSenhaOutros");
     function.SetNameUrl("alteraSenhaOutros.do/editar");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Altera√£√£o de Senha de outros");
     function.SetName("alteraSenhaOutros");
     function.SetNameUrl("alteraSenhaOutros.do");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("P√£gina Principal");
     function.SetName("main");
     function.SetNameUrl("main.jsp");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("P√£gina Sobre");
     function.SetName("main_sobre");
     function.SetNameUrl("main_sobre.jsp");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Inclus√£o de PMV");
     function.SetName("incluiPmv");
     function.SetNameUrl("pmv.do/create");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de PMV");
     function.SetName("editaPmv");
     function.SetNameUrl("pmv.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de Pmv");
     function.SetName("excluiPmv");
     function.SetNameUrl("pmv.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de PMV");
     function.SetName("listaPmv");
     function.SetNameUrl("pmv.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do PMV");
     function.SetName("PMV");
     function.SetNameUrl("searchPmv.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do PMV");
     function.SetName("PMV");
     function.SetNameUrl("searchPmv.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do PMV");
     function.SetName("PMV");
     function.SetNameUrl("searchPmv.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Inclus√£o de Fornecedor");
     function.SetName("incluiFornecedor");
     function.SetNameUrl("constructor.do/create");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de Fornecedor");
     function.SetName("editaFornecedor");
     function.SetNameUrl("constructor.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de Fornecedor");
     function.SetName("excluiFornecedor");
     function.SetNameUrl("constructor.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de Fornecedor");
     function.SetName("listaFornecedor");
     function.SetNameUrl("constructor.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Fornecedor");
     function.SetName("Fornecedor");
     function.SetNameUrl("searchConstructor.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Fornecedor");
     function.SetName("Fornecedor");
     function.SetNameUrl("searchConstructor.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Fornecedor");
     function.SetName("Fornecedor");
     function.SetNameUrl("searchConstructor.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Inclus√£o de AT");
     function.SetName("incluiAT");
     function.SetNameUrl("at.do/create");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de AT");
     function.SetName("editaAT");
     function.SetNameUrl("at.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de AT");
     function.SetName("excluiAT");
     function.SetNameUrl("at.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de AT");
     function.SetName("listaAT");
     function.SetNameUrl("at.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do AT");
     function.SetName("AT");
     function.SetNameUrl("searchAt.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do AT");
     function.SetName("AT");
     function.SetNameUrl("searchAt.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do AT");
     function.SetName("AT");
     function.SetNameUrl("searchAt.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Inclus√£o de Sensor AT");
     function.SetName("incluiSensorAT");
     function.SetNameUrl("sensorAt.do/create");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de Sensor AT");
     function.SetName("editaSensorAT");
     function.SetNameUrl("sensorAt.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de Sensor AT");
     function.SetName("excluiSensorAT");
     function.SetNameUrl("sensorAt.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de Sensor AT");
     function.SetName("listaSensorAT");
     function.SetNameUrl("sensorAt.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Sensor AT");
     function.SetName("SensorAT");
     function.SetNameUrl("searchSensorAt.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Sensor AT");
     function.SetName("SensorAT");
     function.SetNameUrl("searchSensorAt.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Sensor AT");
     function.SetName("SensorAT");
     function.SetNameUrl("searchSensorAt.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Inclus√£o de Meteo");
     function.SetName("incluiMeteo");
     function.SetNameUrl("meteo.do/create");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de Meteo");
     function.SetName("editaMeteo");
     function.SetNameUrl("meteo.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de Meteo");
     function.SetName("excluiMeteo");
     function.SetNameUrl("meteo.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de Meteo");
     function.SetName("listaMeteo");
     function.SetNameUrl("meteo.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Meteo");
     function.SetName("Meteo");
     function.SetNameUrl("searchMeteo.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Meteo");
     function.SetName("Meteo");
     function.SetNameUrl("searchMeteo.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Meteo");
     function.SetName("Meteo");
     function.SetNameUrl("searchMeteo.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Inclus√£o de Sensor Meteo");
     function.SetName("incluiSensorMeteo");
     function.SetNameUrl("sensorMeteo.do/create");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Edi√£√£o de Sensor Meteo");
     function.SetName("editaSensorMeteo");
     function.SetNameUrl("sensorMeteo.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Exclus√£o de Sensor Meteo");
     function.SetName("excluiSensorMeteo");
     function.SetNameUrl("sensorMeteo.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Consulta de Sensor Meteo");
     function.SetName("listaSensorMeteo");
     function.SetNameUrl("sensorMeteo.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Sensor Meteo");
     function.SetName("SensorMeteo");
     function.SetNameUrl("searchSensorMeteo.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Sensor Meteo");
     function.SetName("SensorMeteo");
     function.SetNameUrl("searchSensorMeteo.do/delete");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Sensor Meteo");
     function.SetName("SensorMeteo");
     function.SetNameUrl("searchSensorMeteo.do/view");
     function.AddProfile(admin);
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do PmvMessage");
     function.SetName("sendPmvMessage");
     function.SetNameUrl("sendMessagePmv.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do ActiveConf");
     function.SetName("activeConf");
     function.SetNameUrl("activeConf.do/edit");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Monitor");
     function.SetName("monitor");
     function.SetNameUrl("monitor.do/view");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller do Monitor");
     function.SetName("monitor");
     function.SetNameUrl("monitor.do/view");
     function.AddProfile(oper);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller da Consulta Mensage");
     function.SetName("searchMessagePMV");
     function.SetNameUrl("searchMessagePmv.do/view");
     function.AddProfile(admin);
     odb.Store(function);
     function = new Functions();
     function.SetDescription("Controller da Consulta Mensage");
     function.SetName("searchMessagePMV");
     function.SetNameUrl("searchMessagePmv.do/view");
     function.AddProfile(oper);
     odb.Store(function);
 }