class NotificationSubscriptionContextFactory {

    Long getSourceIdFrom(String data) {
        // TODO: Remove hardcoded path
        String FOLDERS_PREFIX = "foldernodes";
        if (data.indexOf(FOLDERS_PREFIX) > 0) {
            data = data.substring(data.indexOf(FOLDERS_PREFIX) + FOLDERS_PREFIX.length() + 1);
        }
        return Long.valueOf(data);
    }

}