Project

General

Profile

« Previous | Next » 

Revision 7002

include member node id text field now that the CN is not assigning random Ids.
https://redmine.dataone.org/issues/2308

View differences:

lib/admin/dataone-configuration.jsp
141 141
		<div class="textinput-label">
142 142
			<label for="dataone.memberNodeId" title="The DataONE-assigned unique identifier for this node">Node Identifier</label>
143 143
		</div>
144
		<span class="textinput" 
144
		<input class="textinput" 
145 145
			id="dataone.memberNodeId" 
146
			name="dataone.memberNodeId"> 	             		    	    	           		    	             			
147
			<%= request.getAttribute("dataone.memberNodeId") %></span> 
146
			name="dataone.memberNodeId" 	             		    	    	           		    	             			
147
			value="<%= request.getAttribute("dataone.memberNodeId") %>"/>
148 148
	</div>
149 149
	<div class="form-row">
150 150
		<img class="question-mark" src="style/images/question-mark.gif" 
src/edu/ucsb/nceas/metacat/admin/D1Admin.java
126 126
                String numReplicas = PropertyService.getProperty("dataone.replicationpolicy.default.numreplicas");
127 127
                String preferredNodeList = PropertyService.getProperty("dataone.replicationpolicy.default.preferredNodeList");
128 128
                String blockedNodeList = PropertyService.getProperty("dataone.replicationpolicy.default.blockedNodeList");
129

  
130
				/**
131
				dataone.nodeSynchronization.schedule.year=*
132
				dataone.nodeSynchronization.schedule.mon=*
133
				dataone.nodeSynchronization.schedule.mday=*
134
				dataone.nodeSynchronization.schedule.wday=?
135
				dataone.nodeSynchronization.schedule.hour=*
136
				dataone.nodeSynchronization.schedule.min=0/3
137
				dataone.nodeSynchronization.schedule.sec=10
138
				**/
139 129
				
140 130
				boolean synchronize = false;
141 131
				if (nodeSynchronize != null) {
......
324 314

  
325 315
                    // services
326 316
					PropertyService.setPropertyNoPersist("dataone.mn.services.enabled", Boolean.toString(servicesEnabled));
327
                    
317
					
318
					// process a memberNodeId update
319
					String existingMemberNodeId = PropertyService.getProperty("dataone.memberNodeId");
320
					if (!existingMemberNodeId.equals(memberNodeId)) {
321
						// update all existing system Metadata for this node id
322
						IdentifierManager.getInstance().updateAuthoritativeMemberNodeId(existingMemberNodeId, memberNodeId);
323
					}
324
		            PropertyService.setPropertyNoPersist("dataone.memberNodeId", memberNodeId);
325
					
328 326
					PropertyService.persistProperties();
329 327
					
330 328
			        // Register/update as a DataONE Member Node					
......
434 432
            boolean result = cn.updateNodeCapabilities(session, node.getIdentifier(), node);
435 433
        } else {
436 434
            logMetacat.debug("Registering node with DataONE. " + cn.getNodeBaseServiceUrl());
437
            NodeReference mnodeRef = cn.register(session, node);
438
            
439
            String memberNodeId = mnodeRef.getValue();
440
            String existingMemberNodeId = PropertyService.getProperty("dataone.memberNodeId");
441
			if (!existingMemberNodeId.equals(memberNodeId)) {
442
				// update all existing system Metadata for this node id
443
				IdentifierManager.getInstance().updateAuthoritativeMemberNodeId(existingMemberNodeId, memberNodeId);
444
			}
435
            NodeReference mnodeRef = cn.register(session, node);            
445 436
			
446 437
			// save that we submitted registration
447 438
			PropertyService.setPropertyNoPersist("dataone.mn.registration.submitted", Boolean.TRUE.toString());
448
			
449
            // save this assigned node id
450
            PropertyService.setPropertyNoPersist("dataone.memberNodeId", memberNodeId);
451 439
            
452 440
            // persist the properties
453 441
            PropertyService.persistProperties();

Also available in: Unified diff