Beispiel #1
0
 @Override
 public Collection<Address> getAvailableAddresses(
     AddressManager manager, AddressType type, Location requester) {
   if (!type.equals(DNS_ADDRESS)) {
     return null;
   }
   List<Location> locations = manager.getFeatureManager().getLocationsForEnabledFeature(FEATURE);
   return Location.toAddresses(DNS_ADDRESS, locations);
 }
Beispiel #2
0
 public boolean requestToAddMyAssistantToRoster(String userName) {
   Address imbotRestAddress = m_addressManager.getSingleAddress(ImBot.REST_API);
   try {
     m_restTemplate.put(ADD_TO_ROSTER_URL, null, imbotRestAddress.toString(), userName);
   } catch (RestClientException ex) {
     return false;
   }
   return true;
 }
Beispiel #3
0
 @Override
 public Collection<Address> getAvailableAddresses(
     AddressManager manager, AddressType type, Location requester) {
   if (!type.equalsAnyOf(ADDRESS_ID)) {
     return null;
   }
   Collection<Location> locations =
       manager.getFeatureManager().getLocationsForEnabledFeature(FEATURE_ID);
   Collection<Address> addresses = new ArrayList<Address>(locations.size());
   for (Location location : locations) {
     addresses.add(new Address(ADDRESS_ID, location.getAddress(), MongoSettings.SERVER_PORT));
   }
   return addresses;
 }