use of org.codice.alliance.nsili.common.GIAS.LibraryDescription in project alliance by codice.
the class SampleNsiliClient method getManagerTypes.
private String[] getManagerTypes() throws Exception {
LibraryDescription libraryDescription = library.get_library_description();
LOGGER.info("NAME : {} \n DESCRIPTION : {} \n VERSION : {}", libraryDescription.library_name, libraryDescription.library_description, libraryDescription.library_version_number);
String[] types = library.get_manager_types();
LOGGER.info("Got Manager Types from {} : ", libraryDescription.library_name);
for (String type : types) {
LOGGER.info(TAB_LOG_MSG, type);
}
return types;
}
use of org.codice.alliance.nsili.common.GIAS.LibraryDescription in project alliance by codice.
the class NsiliSource method setSourceDescription.
/**
* Obtains the sourceDescription of the source from the Library interface.
*
* @return a sourceDescription of the source
*/
private void setSourceDescription() {
StringBuilder stringBuilder = new StringBuilder();
try {
LibraryDescription libraryDescription = library.get_library_description();
stringBuilder.append(libraryDescription.library_name + " : ");
stringBuilder.append(libraryDescription.library_description);
} catch (ProcessingFault | SystemFault e) {
LOGGER.debug("{} : Unable to retrieve source sourceDescription.", sourceId, e);
}
String description = stringBuilder.toString();
if (StringUtils.isBlank(description)) {
LOGGER.debug("{} : Unable to retrieve source sourceDescription.", getId());
}
this.sourceDescription = description;
}
use of org.codice.alliance.nsili.common.GIAS.LibraryDescription in project alliance by codice.
the class NsiliLibraryImplTest method testLibraryDescription.
@Test
public void testLibraryDescription() throws ProcessingFault, SystemFault {
LibraryDescription libraryDescription = library.get_library_description();
assertThat(libraryDescription.library_name, is(TEST_HOSTNAME));
assertThat(libraryDescription.library_description, containsString(TEST_ORGANIZATION));
assertThat(libraryDescription.library_version_number, containsString(TEST_VERSION));
}
Aggregations