Source:
<code>protected boolean canDoAction() { boolean retValue; Guid subscriberId = getParameters().getEventSubscriber().getsubscriber_id(); String event_name = getParameters().getEventSubscriber().getevent_up_name(); int method_id = getParameters().getEventSubscriber().getmethod_id(); List<event_subscriber> subscriptions = DbFacade.getInstance() .getEventDao().getAllForSubscriber(subscriberId); if (IsAlreadySubscribed(subscriptions, subscriberId, event_name, method_id)) { addCanDoActionMessage(VdcBllMessages.EN_ALREADY_SUBSCRIBED); retValue = false; } else { <START> List<EventNotificationMethod> event_notification_methods = (DbFacade.getInstance() <END> .getEventDao().getEventNotificationMethodsById(method_id)); if (event_notification_methods.size() > 0) { List<event_map> event_map = DbFacade.getInstance().getEventDao().getEventMapByName(event_name); if (event_map.size() > 0) { String domain = getParameters().getDomain(); DbUser user = DbFacade.getInstance().getDbUserDao().get(subscriberId); if (user == null) { try { user = UserCommandBase.initUser(new VdcUser(subscriberId, "", domain), getParameters() .getSessionId()); if (user == null) { addCanDoActionMessage(VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY); retValue = false; } else { retValue = ValidateAdd(event_notification_methods, getParameters().getEventSubscriber(), user); } } catch (VdcBLLException vdcBllException) { addCanDoActionMessage(VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY); retValue = false; } } else { retValue = ValidateAdd(event_notification_methods, getParameters().getEventSubscriber(), user); } } else { addCanDoActionMessage(VdcBllMessages.EN_UNSUPPORTED_NOTIFICATION_EVENT); retValue = false; } } else { addCanDoActionMessage(VdcBllMessages.EN_UNKNOWN_NOTIFICATION_METHOD); retValue = false; } } return retValue; }</code><technical_language>eventNotificationMethods</technical_language>

Target:
protected boolean canDoAction() { boolean retValue; Guid subscriberId = getParameters().getEventSubscriber().getsubscriber_id(); String event_name = getParameters().getEventSubscriber().getevent_up_name(); int method_id = getParameters().getEventSubscriber().getmethod_id(); List<event_subscriber> subscriptions = DbFacade.getInstance() .getEventDao().getAllForSubscriber(subscriberId); if (IsAlreadySubscribed(subscriptions, subscriberId, event_name, method_id)) { addCanDoActionMessage(VdcBllMessages.EN_ALREADY_SUBSCRIBED); retValue = false; } else { List<EventNotificationMethod> eventNotificationMethods = (DbFacade.getInstance() .getEventDao().getEventNotificationMethodsById(method_id)); if (eventNotificationMethods.size() > 0) { List<event_map> event_map = DbFacade.getInstance().getEventDao().getEventMapByName(event_name); if (event_map.size() > 0) { String domain = getParameters().getDomain(); DbUser user = DbFacade.getInstance().getDbUserDao().get(subscriberId); if (user == null) { try { user = UserCommandBase.initUser(new VdcUser(subscriberId, "", domain), getParameters() .getSessionId()); if (user == null) { addCanDoActionMessage(VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY); retValue = false; } else { retValue = ValidateAdd(eventNotificationMethods, getParameters().getEventSubscriber(), user); } } catch (VdcBLLException vdcBllException) { addCanDoActionMessage(VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY); retValue = false; } } else { retValue = ValidateAdd(eventNotificationMethods, getParameters().getEventSubscriber(), user); } } else { addCanDoActionMessage(VdcBllMessages.EN_UNSUPPORTED_NOTIFICATION_EVENT); retValue = false; } } else { addCanDoActionMessage(VdcBllMessages.EN_UNKNOWN_NOTIFICATION_METHOD); retValue = false; } } return retValue; }