if(inProviderURN == null || inProviderURN.parentOf(moduleURI)) { urns.add(moduleURI);
/** * Throws an exception with the supplied message if the supplied URN * is not a strategy module URN. * * @param inURN the URN to test. * @param inFailureMessage the message to use in the exception. * * @throws I18NException if the supplied URN is not a strategy URN. */ private static void failIfNotStrategy(ModuleURN inURN, I18NMessage1P inFailureMessage) throws I18NException { if(!STRATEGY_PROVIDER.parentOf(inURN)) { throw new I18NException(new I18NBoundMessage1P( inFailureMessage, inURN)); } } /**
/** * Validates that the module instance with the specified URN is * from the provider with the specified provider URN. * * @param inInstanceURN the instance URN * @param inProviderURN the provider URN * * @throws InvalidURNException if the module instance is not * from the specified provider URN */ private static void validateInstanceOf(ModuleURN inInstanceURN, ModuleURN inProviderURN) throws InvalidURNException { if(!inProviderURN.parentOf(inInstanceURN)) { throw new InvalidURNException(new I18NBoundMessage2P( Messages.INSTANCE_PROVIDER_URN_MISMATCH, inInstanceURN.toString(), inProviderURN.toString())); } }