Examples of EnmeFailOperation


Examples of org.encuestame.persistence.exception.EnmeFailOperation

       // Convert Tweetpoll or Survey to SearchBean
      } else if (typeResult.equals(TypeSearchResult.POLL)) {
        final List<PollBean> pollBeanList = getPollService().filterPollByItemsByType(null, keyword, max, start);

      } else {
        throw new EnmeFailOperation("operation not valid");
      }
      setItemResponse(jsonResponse);
    } catch (EnMeExpcetion e) {
      log.error(e);
      setError(e.getMessage(), response);
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

            log.debug("tweetpoll"+tweetPoll.getTweetPollId());
            if(!tweetPoll.getPublishTweetPoll()){
            log.debug("action ANSWER--->"+type);
            if ("add".equals(type)) {
                if ((answer.isEmpty()) || (answer == null)) {
                       throw new EnmeFailOperation("Answer can not valid");
                } else {
                     final QuestionAnswerBean answerBean = new QuestionAnswerBean(answer);
                     if (shortUrl == null || shortUrl.isEmpty()) {
                         shortUrl = EnMePlaceHolderConfigurer.getProperty("short.default");
                     }
                     answerBean.setShortUrlType(ShortUrlProvider.get(shortUrl));
                     log.debug("new answer bean:{ "+answerBean.toString());
                     final TweetPollSwitch tweetPollSwitch = getTweetPollService()
                           .createTweetPollQuestionAnswer(answerBean, tweetPoll, request);
                     log.debug("new answer bean DOMAIN "+tweetPollSwitch.toString());
                     //log.debug("action questionAnswer "+questionAnswer);
                     jsonResponse.put("newAnswer", ConvertDomainBean.convertTweetPollSwitchToBean(tweetPollSwitch, request));
                     setItemResponse(jsonResponse);
                }

            } else if("remove".equals(type)) {
                getTweetPollService().removeQuestionAnswer(getTweetPollService().getQuestionAnswerById(answerId));
                setSuccesResponse();
            } else {
                throw new EnmeFailOperation("operation not valid");
            }
            } else {
                throw new EnMeExpcetion("tweetpoll is published");
            }
        } catch (EnMeExpcetion e) {
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

                DirectorySetupOperations.getProfilesDirectory());
        if (createIfNotExist  && !rootDir.exists()) {
            boolean indexes = rootDir.mkdirs();
            if (!indexes) {
                log.error("Encuestame Directory, not able to create picture folder");
                throw new EnmeFailOperation(
                        "EnMe: not able to create index folder");
            }
        }
        return rootDir.exists();
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

                DirectorySetupOperations.getPictureDirectory());
        if (createIfNotExist && !rootDir.exists()) {
            boolean indexes = rootDir.mkdirs();
            if (!indexes) {
                log.error("Encuestame Directory, not able to create picture folder");
                throw new EnmeFailOperation(
                        "EnMe: not able to create index folder");
            }
        }
        return rootDir.exists();
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

        //if autocreate is enabled and directory not exist
        if (createIfNotExist && !indexedDir.exists()) {
            boolean indexes = indexedDir.mkdirs();
            if (!indexes) {
                log.error("Encuestame Directory, not able to create index folder");
                throw new EnmeFailOperation(
                        "EnMe: not able to create index folder");
            }
        }
        return indexedDir.exists();
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

        if (vote.equals(CommentsSocialOptions.LIKE_VOTE)) {
            this.CommentLikeVote(comment);
        } else if (vote.equals(CommentsSocialOptions.DISLIKE_VOTE)) {
            this.CommentDislikeVote(comment);
        } else {
            throw new EnmeFailOperation("Social option not found");
        }

    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

        if (poll != null) {
            poll.setCloseAfterDate(!(poll.getCloseAfterDate() == null ? false
                    : poll.getCloseAfterDate()));
            getPollDao().saveOrUpdate(poll);
        } else {
            throw new EnmeFailOperation("Fail Change Status Operation");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

        if (poll != null) {
            poll.setCloseAfterquota(!(poll.getCloseAfterquota() == null ? false
                    : poll.getCloseAfterquota()));
            getPollDao().saveOrUpdate(poll);
        } else {
            throw new EnmeFailOperation("Fail Change Status Operation");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

        if (poll != null) {
            poll.setIpRestriction(!(poll.getIpRestriction() == null ? false
                    : poll.getIpRestriction()));
            getPollDao().saveOrUpdate(poll);
        } else {
            throw new EnmeFailOperation("Fail Change Status Operation");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnmeFailOperation

        if (poll != null) {
            poll.setNotifications(!(poll.getNotifications() == null ? false
                    : poll.getNotifications()));
            getPollDao().saveOrUpdate(poll);
        } else {
            throw new EnmeFailOperation("Fail Change Status Operation");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.