Revision 6864
Added by ben leinfelder almost 13 years ago
lib/metacat.properties.metadata.xml | ||
---|---|---|
26 | 26 |
<name>Handler Plugin Configuration</name> |
27 | 27 |
<description>Register Handler Plugin extensions</description> |
28 | 28 |
</group> |
29 |
|
|
30 |
<!-- hidden section for backup convenience --> |
|
31 |
<group> |
|
32 |
<index>6</index> |
|
33 |
<name> </name> |
|
34 |
<description> </description> |
|
35 |
</group> |
|
29 | 36 |
|
30 | 37 |
<config> |
31 | 38 |
<key>application.default-style</key> |
... | ... | |
342 | 349 |
<description>Comma-separated list of fully-qualified class names that implement MetacatHandlerPlugin interface</description> |
343 | 350 |
<helpFile>properties.html#plugin.handlers</helpFile> |
344 | 351 |
</config> |
352 |
|
|
353 |
<!-- DataONE configuration --> |
|
354 |
<config> |
|
355 |
<key>dataone.nodeName</key> |
|
356 |
<label>Node Name</label> |
|
357 |
<group>6</group> |
|
358 |
<index>1</index> |
|
359 |
<fieldType>hidden</fieldType> |
|
360 |
<description> </description> |
|
361 |
<helpFile> </helpFile> |
|
362 |
</config> |
|
363 |
<config> |
|
364 |
<key>dataone.nodeDescription</key> |
|
365 |
<label>Node Description</label> |
|
366 |
<group>6</group> |
|
367 |
<index>2</index> |
|
368 |
<fieldType>hidden</fieldType> |
|
369 |
<description> </description> |
|
370 |
<helpFile> </helpFile> |
|
371 |
</config> |
|
372 |
<config> |
|
373 |
<key>dataone.memberNodeId</key> |
|
374 |
<label>Node Identifier</label> |
|
375 |
<group>6</group> |
|
376 |
<index>3</index> |
|
377 |
<fieldType>hidden</fieldType> |
|
378 |
<description> </description> |
|
379 |
<helpFile> </helpFile> |
|
380 |
</config> |
|
381 |
<config> |
|
382 |
<key>dataone.subject</key> |
|
383 |
<label>Node Subject</label> |
|
384 |
<group>6</group> |
|
385 |
<index>4</index> |
|
386 |
<fieldType>hidden</fieldType> |
|
387 |
<description> </description> |
|
388 |
<helpFile> </helpFile> |
|
389 |
</config> |
|
390 |
<config> |
|
391 |
<key>dataone.nodeSynchronize</key> |
|
392 |
<label>Synchronize?</label> |
|
393 |
<group>6</group> |
|
394 |
<index>5</index> |
|
395 |
<fieldType>hidden</fieldType> |
|
396 |
<description> </description> |
|
397 |
<helpFile> </helpFile> |
|
398 |
</config> |
|
399 |
<config> |
|
400 |
<key>dataone.nodeReplicate</key> |
|
401 |
<label>Replicate?</label> |
|
402 |
<group>6</group> |
|
403 |
<index>6</index> |
|
404 |
<fieldType>hidden</fieldType> |
|
405 |
<description> </description> |
|
406 |
<helpFile> </helpFile> |
|
407 |
</config> |
|
408 |
<config> |
|
409 |
<key>D1Client.certificate.file</key> |
|
410 |
<label>Certificate file</label> |
|
411 |
<group>6</group> |
|
412 |
<index>7</index> |
|
413 |
<fieldType>hidden</fieldType> |
|
414 |
<description> </description> |
|
415 |
<helpFile> </helpFile> |
|
416 |
</config> |
|
417 |
|
|
345 | 418 |
|
346 | 419 |
</metadataConfig> |
lib/admin/properties-configuration.jsp | ||
---|---|---|
132 | 132 |
type="<%= fieldType %>"/> |
133 | 133 |
</div> |
134 | 134 |
<% |
135 |
} else if (fieldType.equals("hidden")) { |
|
136 |
%> |
|
137 |
<input id="<%= metaDataProperty.getKey() %>" |
|
138 |
name="<%= metaDataProperty.getKey() %>" |
|
139 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>" |
|
140 |
type="<%= fieldType %>"/> |
|
141 |
<% |
|
135 | 142 |
} else { |
136 | 143 |
%> |
137 | 144 |
<div class="form-row"> |
... | ... | |
147 | 154 |
<% |
148 | 155 |
} |
149 | 156 |
|
150 |
if (metaDataProperty.getDescription() != null) { |
|
157 |
if (metaDataProperty.getDescription() != null && metaDataProperty.getDescription().trim().length() > 0 ) {
|
|
151 | 158 |
%> |
152 | 159 |
|
153 | 160 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
lib/admin/dataone-configuration.jsp | ||
---|---|---|
131 | 131 |
<div class="textinput-label"><label for="dataone.nodeSynchronize" title="Share metadata with DataONE">Share with DataONE</label></div> |
132 | 132 |
|
133 | 133 |
<% |
134 |
boolean synchronize = (Boolean) request.getAttribute("dataone.nodeSynchronize"); |
|
134 |
|
|
135 |
boolean synchronize = false; |
|
136 |
String nodeSynchronize = (String) request.getAttribute("dataone.nodeSynchronize"); |
|
137 |
if (nodeSynchronize != null) { |
|
138 |
synchronize = Boolean.parseBoolean(nodeSynchronize); |
|
139 |
} |
|
140 |
|
|
135 | 141 |
if (synchronize) { |
136 | 142 |
%> |
137 | 143 |
<input type="checkbox" |
... | ... | |
155 | 161 |
<div class="textinput-label"><label for="dataone.nodeReplicate" title="Accept Replicas from other Member Nodes">Accept Replicas</label></div> |
156 | 162 |
|
157 | 163 |
<% |
158 |
boolean replicate = (Boolean) request.getAttribute("dataone.nodeReplicate"); |
|
164 |
boolean replicate = false; |
|
165 |
String nodeReplicate = (String) request.getAttribute("dataone.nodeReplicate"); |
|
166 |
if (nodeReplicate != null) { |
|
167 |
replicate = Boolean.parseBoolean(nodeReplicate); |
|
168 |
} |
|
159 | 169 |
if (replicate) { |
160 | 170 |
%> |
161 | 171 |
<input type="checkbox" |
src/edu/ucsb/nceas/metacat/admin/D1Admin.java | ||
---|---|---|
48 | 48 |
import edu.ucsb.nceas.metacat.util.RequestUtil; |
49 | 49 |
import edu.ucsb.nceas.utilities.GeneralPropertyException; |
50 | 50 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
51 |
import edu.ucsb.nceas.utilities.SortedProperties; |
|
51 | 52 |
|
52 | 53 |
/** |
53 | 54 |
* Control the display of the database configuration page and the processing |
... | ... | |
141 | 142 |
request.setAttribute("dataone.nodeName", nodeName); |
142 | 143 |
request.setAttribute("dataone.nodeDescription", nodeDescription); |
143 | 144 |
request.setAttribute("dataone.memberNodeId", memberNodeId); |
144 |
request.setAttribute("dataone.nodeSynchronize", synchronize);
|
|
145 |
request.setAttribute("dataone.nodeReplicate", replicate);
|
|
145 |
request.setAttribute("dataone.nodeSynchronize", Boolean.toString(synchronize));
|
|
146 |
request.setAttribute("dataone.nodeReplicate", Boolean.toString(replicate));
|
|
146 | 147 |
request.setAttribute("dataone.subject", subject); |
147 | 148 |
request.setAttribute("D1Client.certificate.file", certpath); |
148 | 149 |
|
... | ... | |
155 | 156 |
request.setAttribute("dataone.nodeSynchronization.schedule.min", min); |
156 | 157 |
request.setAttribute("dataone.nodeSynchronization.schedule.sec", sec); |
157 | 158 |
|
159 |
// try the backup properties |
|
160 |
SortedProperties backupProperties = null; |
|
161 |
if ((backupProperties = |
|
162 |
PropertyService.getMainBackupProperties()) != null) { |
|
163 |
Vector<String> backupKeys = backupProperties.getPropertyNames(); |
|
164 |
for (String key : backupKeys) { |
|
165 |
String value = backupProperties.getProperty(key); |
|
166 |
if (value != null) { |
|
167 |
request.setAttribute(key, value); |
|
168 |
} |
|
169 |
} |
|
170 |
} |
|
171 |
|
|
158 | 172 |
// Forward the request to the JSP page |
159 | 173 |
RequestUtil.forwardRequest(request, response, "/admin/dataone-configuration.jsp", null); |
160 | 174 |
} catch (GeneralPropertyException gpe) { |
Also available in: Unified diff
store D1 configuration properties in the main backup so that they persist between upgrades.