text
stringlengths
0
234
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Object_Id);
Stmt.Add_Param (Value => Object.User);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
end if;
end if;
Function Definition: procedure List (Object : in out Visit_Vector;
Function Body: Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, VISIT_DEF'Access);
begin
Stmt.Execute;
Visit_Vectors.Clear (Object);
while Stmt.Has_Elements loop
declare
Item : Visit_Ref;
Impl : constant Visit_Access := new Visit_Impl;
begin
Impl.Load (Stmt, Session);
ADO.Objects.Set_Object (Item, Impl.all'Access);
Object.Append (Item);
Function Definition: procedure Register_Functions is
Function Body: new ASF.Applications.Main.Register_Functions (AWA.Permissions.Services.Set_Functions);
begin
Log.Info ("Initializing application components");
ASF.Applications.Main.Application (App).Initialize_Components;
App.Add_Components (AWA.Components.Factory.Definition);
Register_Functions (App);
end Initialize_Components;
-- ------------------------------
-- Read the application configuration file <b>awa.xml</b>. This is called after the servlets
-- and filters have been registered in the application but before the module registration.
-- ------------------------------
procedure Load_Configuration (App : in out Application;
Files : in String) is
procedure Load_Config (File : in String;
Done : out Boolean);
Paths : constant String := App.Get_Config (P_Module_Dir.P);
Ctx : aliased EL.Contexts.Default.Default_Context;
procedure Load_Config (File : in String;
Done : out Boolean) is
Path : constant String := Util.Files.Find_File_Path (File, Paths);
begin
Done := False;
AWA.Applications.Configs.Read_Configuration (App, Path, Ctx'Unchecked_Access, True);
exception
when Ada.IO_Exceptions.Name_Error =>
Log.Warn ("Application configuration file '{0}' does not exist", Path);
end Load_Config;
begin
Util.Files.Iterate_Path (Files, Load_Config'Access);
end Load_Configuration;
-- ------------------------------
-- Initialize the AWA modules provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the modules used by the application.
-- ------------------------------
procedure Initialize_Modules (App : in out Application) is
begin
null;
end Initialize_Modules;
-- ------------------------------
-- Start the application. This is called by the server container when the server is started.
-- ------------------------------
overriding
procedure Start (App : in out Application) is
Manager : constant Security.Policies.Policy_Manager_Access
:= App.Get_Security_Manager;
begin
-- Start the security manager.
AWA.Permissions.Services.Permission_Manager'Class (Manager.all).Start;
-- Start the event service.
App.Events.Start;
-- Start the application.
ASF.Applications.Main.Application (App).Start;
-- Dump the route and filters to help in configuration issues.
App.Dump_Routes (Util.Log.INFO_LEVEL);
end Start;