protected static Set getVersions(SSOToken token, String serviceName) throws SMSException, SSOException { CachedSubEntries sVersions = (CachedSubEntries) serviceVersions.get(serviceName); if (sVersions == null) { sVersions = CachedSubEntries.getInstance(token, getServiceNameDN(serviceName)); if (sVersions == null || sVersions.getSMSEntry().isNewEntry() || sVersions.getSubEntries(token).isEmpty()) { String[] msgs = {serviceName}; throw (new ServiceNotFoundException( IUMSConstants.UMS_BUNDLE_NAME, IUMSConstants.SMS_service_does_not_exist, msgs)); } serviceVersions.put(serviceName, sVersions); } return (sVersions.getSubEntries(token)); }
/** * Returns all the service names that have been registered. * * @return the set of names of services that have been registered * @throws SMSException if an error occurred while performing the operation * @supported.api */ public Set getServiceNames() throws SMSException { try { if (serviceNames == null) { serviceNames = CachedSubEntries.getInstance(token, serviceDN); } return (serviceNames.getSubEntries(token)); } catch (SSOException s) { debug.error("ServiceManager: Unable to get service names", s); throw (new SMSException(s, "sms-service-not-found")); } }