Skip to content

Commit 0022146

Browse files
committed
correct prefixes
1 parent 4a07951 commit 0022146

File tree

3 files changed

+275
-0
lines changed

3 files changed

+275
-0
lines changed

os2web_acadre_esdh.drush.inc

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* This file implements various debugging methods available from drush
6+
*/
7+
8+
/**
9+
* Implements hook_drush_command().
10+
*/
11+
function acadreos2web__esdh_drush_command() {
12+
$items = array();
13+
$items['acadre-case-docs'] = array(
14+
'description' => 'Look up a case in the CM system, and list the included dokuments',
15+
'arguments' => array(
16+
'caseid' => 'The id of the case. Either the year/serial (ie. 11/4949) notation og the database case id',
17+
),
18+
'aliases' => array('esdh-cm-docs'),
19+
);
20+
$items['acadre-case'] = array(
21+
'description' => 'Look up a case in the CM system, and list the included dokuments',
22+
'arguments' => array(
23+
'caseid' => 'The id of the case. Either the year/serial (ie. 11/4949) notation og the database case id',
24+
),
25+
'aliases' => array('esdh-cm-case'),
26+
);
27+
$items['acadre-doc'] = array(
28+
'description' => 'Look up a document in the CM system, and list the included dokuments',
29+
'arguments' => array(
30+
'docid' => 'The id of the document. Either the serial/year (ie. 4949/11) notation og the database case id',
31+
),
32+
'aliases' => array('esdh-cm-doc'),
33+
);
34+
$items['acadre-case-docs-load'] = array(
35+
'description' => 'Look up a case in the CM system, and load the included dokuments',
36+
'arguments' => array(
37+
'caseid' => 'The id of the case. Either the year/serial (ie. 11/4949) notation og the database case id',
38+
),
39+
'aliases' => array('esdh-cm-docs-load'),
40+
);
41+
$items['acadre-cm-status'] = array(
42+
'description' => 'Check the status of the required webservices for CM',
43+
'arguments' => array(),
44+
'aliases' => array('esdh-st'),
45+
);
46+
$items['acadre-addenum-fix'] = array(
47+
'description' => 'Reorders addenums',
48+
'arguments' => array(),
49+
'aliases' => array('esdh-af'),
50+
);
51+
return $items;
52+
}
53+
54+
/**
55+
* Implements drush_COMMAND().
56+
*/
57+
function drush_os2web_acadre_esdh_acadre_doc($docid = NULL) {
58+
if (os2web_esdh_provider_has_api('cm')) {
59+
drush_log('API load', 'ok');
60+
$data = os2web_esdh_provider_invoke('cm', 'get_document', $docid);
61+
if ($data === FALSE) {
62+
drush_log('Document lookup..', 'fail');
63+
}
64+
else {
65+
drush_log('Document lookup..', 'ok');
66+
error_log(print_r($data, 1));
67+
}
68+
}
69+
else {
70+
drush_log('Api load', 'fail');
71+
}
72+
}
73+
74+
/**
75+
* Implements drush_COMMAND().
76+
*/
77+
function drush_os2web_acadre_esdh_acadre_case($caseid = NULL) {
78+
if (os2web_esdh_provider_has_api('cm')) {
79+
$data = os2web_esdh_provider_invoke('cm', 'get_case_data', $caseid);
80+
drush_log('API load', 'ok');
81+
if ($data === FALSE) {
82+
drush_log('Case lookup..', 'fail');
83+
}
84+
else {
85+
drush_log('Case lookup..', 'ok');
86+
error_log(print_r($data, 1));
87+
}
88+
}
89+
else {
90+
drush_log('Api load', 'fail');
91+
}
92+
}
93+
94+
/**
95+
* Implements drush_COMMAND().
96+
*/
97+
function drush_os2web_acadre_esdh_acadre_case_docs($caseid = NULL) {
98+
if (os2web_esdh_provider_has_api('cm')) {
99+
drush_log('API load', 'ok');
100+
$data = os2web_esdh_provider_invoke('cm', 'get_case_docs', $caseid);
101+
if ($data === FALSE) {
102+
drush_log('Case lookup..', 'fail');
103+
}
104+
else {
105+
drush_log('Case lookup..', 'ok');
106+
error_log(print_r($data, 1));
107+
}
108+
}
109+
else {
110+
drush_log('Api load', 'fail');
111+
}
112+
}
113+
114+
/**
115+
* Implements drush_COMMAND().
116+
*/
117+
function drush_os2web_acadre_esdh_acadre_case_docs_load($caseid = NULL) {
118+
if (os2web_esdh_provider_has_api('cm')) {
119+
drush_log('API load', 'ok');
120+
$data = os2web_esdh_provider_invoke('cm', 'get_case_docs', $caseid);
121+
if ($data === FALSE) {
122+
drush_log('Case lookup..', 'fail');
123+
}
124+
else {
125+
drush_log('Case lookup..', 'ok');
126+
$docs = array();
127+
foreach ($data as $doc) {
128+
$docs[] = os2web_esdh_provider_invoke('cm', 'get_document', $doc);
129+
}
130+
error_log(print_r($docs, 1));
131+
}
132+
}
133+
else {
134+
drush_log('Api load', 'fail');
135+
}
136+
}
137+
138+
/**
139+
* Implements drush_COMMAND().
140+
*/
141+
function drush_os2web_acadre_esdh_acadre_cm_status() {
142+
if (os2web_esdh_provider_has_api('cm')) {
143+
drush_log('API load', 'ok');
144+
$avail = os2web_esdh_provider_invoke('cm', 'available');
145+
drush_log('CM availability check..', $avail ? 'ok' : 'error');
146+
$avail = os2web_esdh_provider_invoke('cm', 'available');
147+
drush_log('CM availability check..', $avail ? 'ok' : 'error');
148+
}
149+
}
150+
151+
/**
152+
* Implements drush_COMMAND().
153+
*/
154+
function drush_os2web_acadre_esdh_acadre_addenum_fix() {
155+
if (os2web_esdh_provider_has_api('mm')) {
156+
if (os2web_esdh_provider_supports('mm', 'post_import_process')) {
157+
os2web_esdh_provider_invoke('mm', 'post_import_process');
158+
}
159+
}
160+
}

os2web_acadre_esdh.info

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name = OS2Web Acadre ESDH System
2+
description = Acadre backend for ESDH system.
3+
4+
package = OS2Web - AcadreRP
5+
project = OS2Web Acadre ESDH System
6+
core = 7.x
7+
version = "7.x-1.11"
8+
9+
dependencies[] = os2web_esdh_provider
10+
dependencies[] = os2web_adlib_api
11+
dependencies[] = ctools
12+
13+
files[] = plugins/cm/acadre.inc
14+
files[] = plugins/cp/acadre.inc
15+
files[] = plugins/cp/ArpService.class.inc
16+
files[] = plugins/cp/TraenPublishingDestinationSystemService.wsdl
17+
files[] = plugins/cp/TraenPublishingDestinationSystemService.xsd
18+
files[] = plugins/cp/TraenPublishingDestinationSystemService1.xsd
19+
files[] = plugins/cp/TraenPublishingDestinationSystemService2.xsd
20+
files[] = plugins/mm/acadre.inc

os2web_acadre_esdh.module

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* This module implements Acadre ESDH backend for use in os2web
6+
*/
7+
8+
define('ACADRE_MM_IMPORT_DIR', 'public://acadre');
9+
define('ACADRE_MM_DEFAULT_APPROVED', '62,59,64,53,54,56,57,63,58,51,55,61,68,69,42');
10+
11+
/**
12+
* Implements hook_ctools_plugin_directory().
13+
*
14+
* Register as provider of esdh plugins
15+
*/
16+
function os2web_acadre_esdh_ctools_plugin_directory($module, $plugin) {
17+
if ($module == 'os2web_esdh_provider') {
18+
return "plugins/$plugin";
19+
}
20+
}
21+
22+
/**
23+
* Implements hook_form_alter().
24+
*
25+
* Add configuration to the settings form.
26+
*/
27+
function os2web_acadre_esdh_form_os2web_settings_settings_form_alter(&$form, &$form_state) {
28+
// MM configuration.
29+
$form['meetings'] = array(
30+
'#type' => 'fieldset',
31+
'#title' => 'Referat import',
32+
'#description' => 'Indstillinger der vedrører importen af Acadre referater og dagsordener.',
33+
'#collapsible' => TRUE,
34+
'#collapsed' => FALSE,
35+
);
36+
$form['meetings']['os2web_meetings_path'] = array(
37+
'#type' => 'textfield',
38+
'#title' => 'Sti til acadre publish folder.',
39+
'#description' => 'Dette er stien hvor Acadre publisere .XML filer til.',
40+
'#default_value' => variable_get('os2web_meetings_path', ACADRE_MM_IMPORT_DIR),
41+
);
42+
$form['meetings']['os2web_meetings_approved_committee'] = array(
43+
'#type' => 'textfield',
44+
'#title' => 'Godkendte Udvalg',
45+
'#maxlength' => 200,
46+
'#description' => 'Komma sepereret liste over udvalgs-id der er godkendt til publisering.',
47+
'#default_value' => variable_get('os2web_meetings_approved_committee', ACADRE_MM_DEFAULT_APPROVED),
48+
);
49+
50+
// CM Configuration.
51+
$form['os2web_pws_config_group'] = array(
52+
'#type' => 'fieldset',
53+
'#title' => t('PWS Endpoint configuration'),
54+
);
55+
$form['os2web_pws_config_group']['os2web_pws_url'] = array(
56+
'#type' => 'textfield',
57+
'#default_value' => variable_get('os2web_pws_url'),
58+
'#title' => t('PWS URL for V4'),
59+
'#description' => t('URL to the PWS webservice endpoint.'),
60+
);
61+
$form['os2web_pws_config_group']['os2web_pws_url_v6'] = array(
62+
'#type' => 'textfield',
63+
'#default_value' => variable_get('os2web_pws_url_v6'),
64+
'#title' => t('PWS URL for V6'),
65+
'#description' => t('URL to the PWSv6 webservice endpoint.'),
66+
);
67+
$form['os2web_pws_config_group']['os2web_pws_url_search'] = array(
68+
'#type' => 'textfield',
69+
'#default_value' => variable_get('os2web_pws_url_search'),
70+
'#title' => t('PWS URL for Search service'),
71+
'#description' => t('URL to the webservice endpoint that runs the search service.'),
72+
);
73+
$form['os2web_pws_config_group']['os2web_pws_user'] = array(
74+
'#type' => 'textfield',
75+
'#default_value' => variable_get('os2web_pws_user'),
76+
'#title' => t('PWS login user'),
77+
'#description' => t('PWS HTTP authentification user.'),
78+
);
79+
$form['os2web_pws_config_group']['os2web_pws_password'] = array(
80+
'#type' => 'textfield',
81+
'#default_value' => variable_get('os2web_pws_password'),
82+
'#title' => t('PWS password'),
83+
'#description' => t('PWS HTTP authentification password.'),
84+
);
85+
$form['os2web_pws_adlib_group'] = array(
86+
'#type' => 'fieldset',
87+
'#title' => t('Adlib Endpoint configuration'),
88+
);
89+
$form['os2web_pws_adlib_group']['os2web_adlib_url'] = array(
90+
'#type' => 'textfield',
91+
'#default_value' => variable_get('os2web_adlib_url', 'http://706CAR01/ExponentWSA/ExponentWSA.asmx?wsdl'),
92+
'#title' => t('URL for Adlib service endpoint'),
93+
'#description' => t('URL to the webservice endpoint that runs the Adlib service.'),
94+
);
95+
}

0 commit comments

Comments
 (0)