/** * Sets whether problems during initialization should cause the provider to fail or go on without metadata. The * assumption being that in most cases a provider will recover at some point in the future. * * @param failFast whether problems during initialization should cause the provider to fail */ public void setFailFastInitialization(boolean failFast) { if (isInitialized()) { return; } failFastInitialization = failFast; }
/** {@inheritDoc} */ public XMLObject getMetadata() throws MetadataProviderException { if (!isInitialized()) { throw new MetadataProviderException("Metadata provider has not been initialized"); } XMLObject metadata = doGetMetadata(); if (metadata == null) { log.debug("Metadata provider does not currently contain any metadata"); } if (!isValid(metadata)) { log.debug("Metadata document exists, but it is no longer valid"); return null; } return metadata; }
if (!isInitialized()) { throw new MetadataProviderException("Metadata provider has not been initialized");
/** {@inheritDoc} */ public EntitiesDescriptor getEntitiesDescriptor(String name) throws MetadataProviderException { if (!isInitialized()) { throw new MetadataProviderException("Metadata provider has not been initialized"); } if (DatatypeHelper.isEmpty(name)) { log.debug("EntitiesDescriptor name was null or empty, skipping search for it"); return null; } EntitiesDescriptor descriptor = doGetEntitiesDescriptor(name); if (descriptor == null) { log.debug("Metadata document does not contain an EntitiesDescriptor with the name {}", name); return null; } else if (!isValid(descriptor)) { log.debug("Metadata document contained an EntitiesDescriptor with the name {}, but it was no longer valid", name); return null; } return descriptor; }
/** {@inheritDoc} */ public EntityDescriptor getEntityDescriptor(String entityID) throws MetadataProviderException { if (!isInitialized()) { throw new MetadataProviderException("Metadata provider has not been initialized"); } if (DatatypeHelper.isEmpty(entityID)) { log.debug("EntityDescriptor entityID was null or empty, skipping search for it"); return null; } EntityDescriptor descriptor = doGetEntityDescriptor(entityID); if (descriptor == null) { log.debug("Metadata document does not contain an EntityDescriptor with the ID {}", entityID); return null; } else if (!isValid(descriptor)) { log.debug("Metadata document contained an EntityDescriptor with the ID {}, but it was no longer valid", entityID); return null; } return descriptor; }
if (!isInitialized()) { throw new MetadataProviderException("Metadata provider has not been initialized");