Browse files

Fixed the wrong parameter name. It was misleading. Jid instead of app id

  • Loading branch information...
1 parent d66d908 commit 12da363979b5638b8258d1018be1612b48523f55 @mpermar mpermar committed Apr 11, 2012
View
4 rayo-storage/src/main/java/com/rayo/storage/GatewayStorageService.java
@@ -340,11 +340,11 @@
* Stores an address (e.g. phone number) for a given application.
*
* @param address Address that we want to store
- * @param appId Application's id
+ * @param appId Application's jid
*
* @throws DataStoreException If the address cannot be stored.
*/
- void storeAddress(String address, String appId) throws DatastoreException;
+ void storeAddress(String address, String jid) throws DatastoreException;
/**
* Stores a collection of addresses (e.g. phone numbers) for a given application.
View
12 rayo-storage/src/main/java/com/rayo/storage/cassandra/CassandraDatastore.java
@@ -527,19 +527,19 @@ public Application getApplication(String jid) {
}
@Override
- public Application removeApplication(String id) throws DatastoreException {
+ public Application removeApplication(String jid) throws DatastoreException {
- log.debug("Removing application with id: [%s]", id);
- Application application = getApplication(id);
+ log.debug("Removing application with id: [%s]", jid);
+ Application application = getApplication(jid);
if (application != null) {
RowDeletor deletor = Pelops.createRowDeletor(schemaName);
- deletor.deleteRow("applications", id, ConsistencyLevel.ONE);
+ deletor.deleteRow("applications", jid, ConsistencyLevel.ONE);
- List<String> addresses = getAddressesForApplication(id);
+ List<String> addresses = getAddressesForApplication(jid);
removeAddresses(addresses);
} else {
- log.debug("No application found with id: [%s]", id);
+ log.debug("No application found with jid: [%s]", jid);
throw new ApplicationNotFoundException();
}
return application;

0 comments on commit 12da363

Please sign in to comment.