Commit e74cd06d authored by Malte Sussdorff's avatar Malte Sussdorff

- Malte

parent 4b204416
Pipeline #91 failed with stages
<?xml version="1.0"?>
<!-- Generated by the OpenACS Package Manager -->
<package key="acs-reference" url="http://www.arsdigita.com/acs-repository/apm/packages/acs-reference" type="apm_service">
<package key="acs-reference" url="http://openacs.org/repository/apm/packages/acs-reference" type="apm_service">
<package-name>ACS Reference Data</package-name>
<pretty-plural>ACS Reference Datas</pretty-plural>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<version name="5.1.5" url="http://openacs.org/repository/download/apm/acs-reference-5.1.5.apm">
<version name="5.3.1b1" url="http://openacs.org/repository/download/apm/acs-reference-5.3.1b1.apm">
<owner url="mailto:jon@jongriffin.com">Jon Griffin</owner>
<summary>Tools and API for managing refrence data.</summary>
<release-date>2004-02-28</release-date>
<release-date>2007-04-15</release-date>
<maturity>3</maturity>
<vendor url="http://www.mayuli.com">Mayuli Enterprises, LLC</vendor>
<license url="http://www.gnu.org/copyleft/gpl.html">GPL</license>
<maturity>3</maturity>
<description format="text/html">Reference Data provides an API to support:
&lt;ul&gt;
&lt;li&gt; A common set of reference data.
&lt;li&gt; Running standard reports on this data.
&lt;li&gt; Monitoring the usage of reference data.
&lt;/ul&gt;</description>
<provides url="acs-reference" version="5.1.4"/>
<requires url="acs-kernel" version="5.0.0"/>
<provides url="acs-reference" version="5.3.1b1"/>
<requires url="acs-kernel" version="5.3.1b1"/>
<callbacks>
</callbacks>
......
......@@ -46,14 +46,14 @@ create table acs_reference_repositories (
-- what is the table name we are monitoring
table_name varchar2(100)
constraint arr_table_name_nn not null
constraint arr_table_name_uq unique,
constraint arr_table_name_un unique,
-- is this external or internal data
internal_data_p char(1)
constraint arr_internal_data_p_ck
check (internal_data_p in ('t','f')),
-- Does this source include pl/sql package?
package_name varchar2(100)
constraint arr_package_name_uq unique,
constraint arr_package_name_un unique,
-- last updated
last_update date,
-- where is this data from
......@@ -134,7 +134,8 @@ as
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
object_type => object_type
object_type => object_type,
title => source
);
if first_names is not null and last_name is not null then
......
update acs_objects
set title = (select source
from acs_reference_repositories
where repository_id = object_id)
where object_type = 'acs_reference_repository';
create or replace package body acs_reference
as
function new (
repository_id in acs_reference_repositories.repository_id%TYPE default null,
table_name in acs_reference_repositories.table_name%TYPE,
internal_data_p in acs_reference_repositories.internal_data_p%TYPE default 'f',
package_name in acs_reference_repositories.package_name%TYPE default null,
last_update in acs_reference_repositories.last_update%TYPE default sysdate,
source in acs_reference_repositories.source%TYPE default null,
source_url in acs_reference_repositories.source_url%TYPE default null,
effective_date in acs_reference_repositories.effective_date%TYPE default sysdate,
expiry_date in acs_reference_repositories.expiry_date%TYPE default null,
notes in acs_reference_repositories.notes%TYPE default empty_blob(),
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
object_type in acs_objects.object_type%TYPE default 'acs_reference_repository',
first_names in persons.first_names%TYPE default null,
last_name in persons.last_name%TYPE default null
) return acs_objects.object_id%TYPE
is
v_repository_id acs_reference_repositories.repository_id%TYPE;
v_maintainer_id persons.person_id%TYPE;
begin
v_repository_id := acs_object.new (
object_id => repository_id,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
object_type => object_type,
title => source
);
if first_names is not null and last_name is not null then
v_maintainer_id := person.new (
first_names => first_names,
last_name => last_name,
email => null
);
else
v_maintainer_id := null;
end if;
insert into acs_reference_repositories
(repository_id,
table_name,
internal_data_p,
last_update,
package_name,
source,
source_url,
effective_date,
expiry_date,
maintainer_id,
notes)
values
(v_repository_id,
table_name,
internal_data_p,
last_update,
package_name,
source,
source_url,
effective_date,
expiry_date,
v_maintainer_id,
notes);
return v_repository_id;
end new;
procedure del (
repository_id in acs_reference_repositories.repository_id%TYPE
)
is
v_maintainer_id integer;
begin
select maintainer_id into v_maintainer_id
from acs_reference_repositories
where repository_id = acs_reference.del.repository_id;
delete from acs_reference_repositories
where repository_id = acs_reference.del.repository_id;
acs_object.del(repository_id);
person.del(v_maintainer_id);
end del;
function is_expired_p (
repository_id integer
) return char
is
v_expiry_date date;
begin
select expiry_date into v_expiry_date
from acs_reference_repositories
where repository_id = is_expired_p.repository_id;
if nvl(v_expiry_date,sysdate+1) < sysdate then
return 't';
else
return 'f';
end if;
end;
end acs_reference;
/
show errors
......@@ -41,12 +41,12 @@ create table acs_reference_repositories (
-- what is the table name we are monitoring
table_name varchar(100)
constraint arr_table_name_nn not null
constraint arr_table_name_uq unique,
constraint arr_table_name_un unique,
-- is this external or internal data
internal_data_p boolean,
-- Does this source include pl/sql package?
package_name varchar(100)
constraint arr_package_name_uq unique,
constraint arr_package_name_un unique,
-- last updated
last_update timestamptz,
-- where is this data from
......@@ -108,6 +108,9 @@ begin
now(),
p_creation_user,
p_creation_ip,
null,
''t'',
p_source,
null
);
......@@ -190,6 +193,7 @@ create function acs_reference__is_expired_p (integer)
returns char as '
declare
repository_id alias for $1;
v_expiry_date acs_reference_repositories.expiry_date%TYPE;
begin
select expiry_date into v_expiry_date
from acs_reference_repositories
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>acs-reference Design Documentation</title></head>
<body bgcolor=white text=#000000>
<h2>acs-reference Design Documentation</h2>
<h3>I. Essentials</h3>
<ul>
<li>There is no user accessible directory</li>
<li>There is no sub-site admin accessible diretory</li>
<p>
<li>Requirements document: <a href="requirements.html">Requirements</a>
<li>Data model:?? where does this really go? </a>
<li>ER diagram: None yet
</ul>
<h3>II. Introduction</h3>
Reference data is often overlooked in the rush to get coding. In reality, much of ....
<h3>III. Historical Considerations</h3>
Before the existence of acs-reference, the ACS required that you preload some tables in a script to get some basic reference functionality. There were many problems with this:
<ul>
<li>No easy way to find out what reference data even existed.</li>
<li>No way to find out how old the data was.</li>
<li>No way to find out where that data came from.</li>
<li>Very US/English slant on the data.</li>
</ul>
<h3> IV. Competitive Analysis</h3>
The only real competition is internally developed solutions.
<h3> V. Design Tradeoffs</h3>
<h4>Primary Goals</h4>
<ul>
<li>This system was designed with maintainability and reusability as its primary goals. By wrapping a layer around all of the reference tables we have increased the maintainability immensely.</li>
<li>Another goal was to bring together many different types of data and present them in a logical fashion. It was amazing how little of this data is available on the internet in a database friendly form.</li>
</ul>
<h4>Performance</h4>
When updating the reference tables their is overhead due to the fact that the table is registered with the repository. This should rarely occur anyway as the tables are only added once.
By not having the actual data itself in the acs-object system, subsequent additions and deletions to the reference tables themselves are unaffected by this overhead.
<h3> VI. API</h3>
<h3> VII. Data Model Discussion</h3>
<h3> VIII. User Interface</h3>
Their is no end user interface.
There will
<h3> IX. Configuration/Parameters</h3>
None
<h3> X. Future Improvements/Areas of Likely Change</h3>
A server based update mechanism will be supported. This will allow for tables to be updated (and preferably diffed) instead of being reloaded with a package upgrade.
An interface to produce xml/csv from the reference data would be a nice service to the community (allowing legacy applications a way to import this data).
<h3> XI. Authors</h3>
<h3> XII. Revision History</h3>
<pre>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>acs-reference Design Documentation</title></head>
<body bgcolor=white text="#000000">
<h2>acs-reference Design Documentation</h2>
<h3>I. Introduction</h3>
<p>
Reference data services are often overlooked in the rush to get
coding. Much of the code is redundant or of similarly patterned
implementations. This package intends to address some common features
and needs.
</p>
<h3>II. Historical Considerations</h3>
<p>
Before the existence of acs-reference, the ACS required that you preload some tables in a script to get some basic reference functionality. There were many problems with this:
</p>
<ul>
<li>No easy way to find out what reference data even existed.</li>
<li>No way to find out how old the data was.</li>
<li>No way to find out where that data came from.</li>
<li>Very US/English slant on the data.</li>
</ul>
<h3>III. Design Tradeoffs</h3>
<h4>Primary Goals</h4>
<ul>
<li>This system was designed with maintainability and reusability as its primary goals. By wrapping a layer around all of the reference tables we have increased the maintainability immensely.</li>
<li>Another goal was to bring together many different types of data and present them in a logical fashion. It was amazing how little of this data is available on the internet in a database friendly form.</li>
</ul>
<h4>Performance</h4>
When updating the reference tables their is overhead due to the fact that the table is registered with the repository. This should rarely occur anyway as the tables are only added once.
By not having the actual data itself in the acs-object system, subsequent additions and deletions to the reference tables themselves are unaffected by this overhead.
<h3>IV. API</h3>
<p>See <a href="/api-doc/index?about_package_key=acs-reference">api-browser</a></p>
<h3>V. Data Model Discussion</h3>
<p>The UNSPSC reference data has a data model for handling data
revisions. An application can determine any new/revised category based
on existing, obsolete data.</p>
<h3>VI. User Interface</h3>
<p>Their is no end user interface.
There needs to be some kind of admin UI to report status and possibly
manage updates per requirements.
</p>
<h3>VII. Configuration/Parameters</h3>
<p>None</p>
<h3>VIII. Future Improvements/Areas of Likely Change</h3>
<p>A server based update mechanism will be supported. This will allow for tables to be updated (and preferably diffed) instead of being reloaded with a package upgrade.
An interface to produce xml/csv from the reference data would be a nice service to the community (allowing legacy applications a way to import this data).
</p>
<h3>IX. Authors</h3>
<p>
Jon Griffin
</p>
<h3>X. Pre-CVS Revision History</h3>
<pre>
$Log$
Revision 1.4 2006/08/06 20:40:20 torbenb
upgrading html, closing li p tags, adding quotes to tag attributes
Revision 1.3 2006/08/06 18:54:02 torbenb
added documentation commentary, applied bs filter, renumbered sections
Revision 1.2 2006/08/06 18:30:57 torbenb
removing c-Ms, wrapping text with p tags, added link to api-browser in api section
Revision 1.1 2001/04/22 00:53:12 jong
initial openacs import
Revision 1.2 2000/12/13 04:39:00 jong
Added Revision History and corrected typo in reference link
</pre>
</body>
</html>
</pre>
</body>
</html>
......@@ -2,20 +2,17 @@
<html>
<head><title>ACS Reference Documentation</title></head>
<body bgcolor=#ffffff>
<body bgcolor="#ffffff">
<h2>ACS Reference Documentation</h2>
<hr>
<h3>Engineering Docs</h3>
<ul>
<li><a href="requirements.html">Requirements</a>
<li><a href="design.html">Design</a>
<li><a href="requirements.html">Requirements</a></li>
<li><a href="design.html">Design</a></li>
</ul>
Current docs are always at:<br>
<p>Current docs are always at:<br>
<a href="http://www.jongriffin.com/static/openacs">jongriffin.com</a>
<h3>Release Notes</h3>
<p>Please file bugs in the <a href="http://www.openacs.org/sdm/">SDM</a>.</p>
</p>
<hr>
<address><a href="mailto:jon@jongriffin.com">jon@jongriffin.com</a></address></body>
</html>
......
This diff is collapsed.
......@@ -16,7 +16,7 @@ ad_page_contract {
set title "Reference Data"
set package_id [ad_conn package_id]
set context_bar [list $title]
set user_id [ad_verify_and_get_user_id]
set user_id [ad_conn user_id]
set admin_p [ad_permission_p $package_id admin]
......
......@@ -17,7 +17,7 @@ set package_id [ad_conn package_id]
set title "List Reference Data"
set context_bar [list "$title"]
set user_id [ad_verify_and_get_user_id]
set user_id [ad_conn user_id]
db_multirow data data_select {
}
......
......@@ -17,7 +17,7 @@ ad_page_contract {
set package_id [ad_conn package_id]
set title "View one Table Structure"
set context_bar [list "$title"]
set user_id [ad_verify_and_get_user_id]
set user_id [ad_conn user_id]
ad_return_template
\ No newline at end of file
......@@ -17,7 +17,7 @@ ad_page_contract {
set package_id [ad_conn package_id]
set title "View one Table"
set context_bar [list [list "reference-list" "Reference List" ] "$title"]
set user_id [ad_verify_and_get_user_id]
set user_id [ad_conn user_id]
db_1row get_table { *SQL* } -column_array table_info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment