Skip to content

Commit

Permalink
refactored the gatewaySessionCtx
Browse files Browse the repository at this point in the history
  • Loading branch information
VikashSingh94 committed Jan 15, 2019
1 parent 1434a00 commit b26e2bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public class DefaultMailService implements MailService {
public static final String MAIL_PROP = "mail.";
public static final String TARGET_EMAIL = "targetEmail";
public static final String UTF_8 = "UTF-8";
private static final String DEVICE_NAME = "deviceName";
private static final String ASSET_NAME = "assetName";
public static final String DEVICE_NAME = "deviceName";
public static final String ASSET_NAME = "assetName";
@Autowired
private MessageSource messages;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package mail;
package com.hashmapinc.server.dao.mail;

import com.hashmapinc.server.common.data.User;
import com.hashmapinc.server.common.data.exception.TempusException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ else if (savedParentAssetAttribute.isEmpty())
}


private void sendParentAssetMissingEmail(String deviceName , TenantId tenantId) throws TempusException {
private void sendParentAssetMissingEmail(String deviceName , TenantId tenantId) {
try {
mailService.sendAttributeMissingMail(deviceName,tenantId);
}catch (TempusException tempusException) {
log.warn(tempusException.getMessage());
log.warn("Failed to send the parentAssetMissingEmail of deviceName: [{}]",deviceName);
}
}

Expand All @@ -314,8 +314,7 @@ private void createParentAssetRelationWithDevice(Device device,String assetName)
if(asset.isEmpty()){
try {
sendAssetNotPresentEmail(device.getName(),assetName, gateway.getTenantId());
}catch (Exception ex){
//Need to lod the exception exception
}catch (TempusException tempsuException){
log.warn("Failed to send the parentAssetAttributeMissingEmail of deviceName: [{}]",device.getName()) ;
}
}
Expand Down

0 comments on commit b26e2bf

Please sign in to comment.