Revision 6345
Added by Chris Jones over 13 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
670 | 670 |
String mnStorageServiceVersion = null; |
671 | 671 |
String mnReplicationServiceVersion = null; |
672 | 672 |
|
673 |
boolean mnCoreServiceAvailable = false; |
|
674 |
boolean mnReadServiceAvailable = false; |
|
675 |
boolean mnAuthorizationServiceAvailable = false; |
|
676 |
boolean mnStorageServiceAvailable = false; |
|
677 |
boolean mnReplicationServiceAvailable = false; |
|
678 |
|
|
673 | 679 |
try |
674 | 680 |
{ |
675 |
nodeId = PropertyService.getProperty("dataone.memberNodeId"); |
|
676 |
nodeName = PropertyService.getProperty("dataone.nodeName"); |
|
677 |
nodeUrl = SystemUtil.getContextURL() + "/d1/"; |
|
678 |
nodeDesc = PropertyService.getProperty("dataone.nodeDescription"); |
|
679 |
nodeType = PropertyService.getProperty("dataone.nodeType"); |
|
680 |
mnCoreServiceVersion = |
|
681 |
PropertyService.getProperty("dataone.mncore.serviceVersion"); |
|
682 |
mnReadServiceVersion = |
|
683 |
PropertyService.getProperty("dataone.mnread.serviceVersion"); |
|
684 |
mnAuthorizationServiceVersion = |
|
685 |
PropertyService.getProperty("dataone.mnauthorization.serviceVersion"); |
|
686 |
mnStorageServiceVersion = |
|
687 |
PropertyService.getProperty("dataone.mnstorage.serviceVersion"); |
|
688 |
mnReplicationServiceVersion = |
|
689 |
PropertyService.getProperty("dataone.mnreplication.serviceVersion"); |
|
690 |
|
|
681 |
nodeId = PropertyService.getProperty("dataone.memberNodeId"); |
|
682 |
nodeName = PropertyService.getProperty("dataone.nodeName"); |
|
683 |
nodeUrl = SystemUtil.getContextURL() + "/d1/"; |
|
684 |
nodeDesc = PropertyService.getProperty("dataone.nodeDescription"); |
|
685 |
nodeType = PropertyService.getProperty("dataone.nodeType"); |
|
686 |
mnCoreServiceVersion = |
|
687 |
PropertyService.getProperty("dataone.mncore.serviceVersion"); |
|
688 |
mnReadServiceVersion = |
|
689 |
PropertyService.getProperty("dataone.mnread.serviceVersion"); |
|
690 |
mnAuthorizationServiceVersion = |
|
691 |
PropertyService.getProperty("dataone.mnauthorization.serviceVersion"); |
|
692 |
mnStorageServiceVersion = |
|
693 |
PropertyService.getProperty("dataone.mnstorage.serviceVersion"); |
|
694 |
mnReplicationServiceVersion = |
|
695 |
PropertyService.getProperty("dataone.mnreplication.serviceVersion"); |
|
696 |
|
|
697 |
mnCoreServiceAvailable = new Boolean( |
|
698 |
PropertyService.getProperty("dataone.mncore.serviceAvailable")).booleanValue(); |
|
699 |
mnReadServiceAvailable = new Boolean( |
|
700 |
PropertyService.getProperty( |
|
701 |
"dataone.mnread.serviceAvailable")).booleanValue(); |
|
702 |
mnAuthorizationServiceAvailable = new Boolean( |
|
703 |
PropertyService.getProperty( |
|
704 |
"dataone.mnauthorization.serviceAvailable")).booleanValue(); |
|
705 |
mnStorageServiceAvailable = new Boolean( |
|
706 |
PropertyService.getProperty( |
|
707 |
"dataone.mnstorage.serviceAvailable")).booleanValue(); |
|
708 |
mnReplicationServiceAvailable = new Boolean( |
|
709 |
PropertyService.getProperty( |
|
710 |
"dataone.mnreplication.serviceAvailable")).booleanValue(); |
|
711 |
|
|
691 | 712 |
} catch(PropertyNotFoundException pnfe) { |
692 | 713 |
logMetacat.error("MNodeService.getCapabilities(): " + |
693 | 714 |
"property not found: " + pnfe.getMessage()); |
... | ... | |
710 | 731 |
Service sMNRead = new Service(); |
711 | 732 |
sMNRead.setName("MNRead"); |
712 | 733 |
sMNRead.setVersion(mnReadServiceVersion); |
734 |
sMNRead.setAvailable(mnReadServiceAvailable); |
|
713 | 735 |
Service sMNCore = new Service(); |
714 | 736 |
sMNCore.setName("MNCore"); |
715 | 737 |
sMNCore.setVersion(mnCoreServiceVersion); |
738 |
sMNCore.setAvailable(mnCoreServiceAvailable); |
|
716 | 739 |
Service sMNAuthorization = new Service(); |
717 | 740 |
sMNAuthorization.setName("MNAuthorization"); |
718 | 741 |
sMNAuthorization.setVersion(mnAuthorizationServiceVersion); |
742 |
sMNAuthorization.setAvailable(mnAuthorizationServiceAvailable); |
|
719 | 743 |
Service sMNStorage = new Service(); |
720 | 744 |
sMNStorage.setName("MNStorage"); |
721 | 745 |
sMNStorage.setVersion(mnStorageServiceVersion); |
746 |
sMNStorage.setAvailable(mnStorageServiceAvailable); |
|
722 | 747 |
Service sMNReplication = new Service(); |
723 | 748 |
sMNReplication.setName("MNReplication"); |
724 | 749 |
sMNReplication.setVersion(mnReplicationServiceVersion); |
750 |
sMNReplication.setAvailable(mnReplicationServiceAvailable); |
|
725 | 751 |
services.addService(sMNRead); |
726 | 752 |
services.addService(sMNCore); |
727 | 753 |
services.addService(sMNAuthorization); |
Also available in: Unified diff
In MNodeService.getCapabilities(), set the serviceAvailable for each service supported.