public class GreetingServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements GreetingService
| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_MANAGER_LABEL
The Constant DATA_MANAGER_LABEL.
|
static String |
INFRA_MANAGER_LABEL
The Constant INFRA_MANAGER_LABEL.
|
static Integer |
MAX_NUM_RANDOM
The Constant MAX_NUM_RANDOM.
|
static Integer |
MIN_NUM_RANDOM
The Constant MIN_NUM_RANDOM.
|
static String |
TakeSurveyPortlet_PLUGIN_ID_PREFIX
The Constant Is needed to automatic creation of the page hosting the portlet to take surveys
|
static String |
VO_ADMIN_LABEL
The Constant VO_ADMIN_LABEL.
|
static String |
VRE_DESIGNER_LABEL
The Constant VRE_DESIGNER_LABEL.
|
static String |
VRE_MANAGER_LABEL
The Constant VRE_MANAGER_LABEL.
|
| Constructor and Description |
|---|
GreetingServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDBisCreated()
Check Database is created.
|
Long |
createFolder()
Create a folder in order to insert images.
|
void |
deleteOldImage(int idSurvey,
long idTmpFolder,
String image2Delete)
delete an image from repository
idTmpFolder id folder
image2Delete.
|
void |
deleteSurvey(SurveyModel surveyModel)
Delete survey.
|
void |
exportToCSVFile(String titleSurvey,
boolean isAnonymous,
List<UserDTO> userDTOList,
List<SurveyUserAnswerModel> surveyUserAnswerModelList,
List<SurveyQuestionModel> surveyQuestionModelList)
Export to CSV file.
|
List<SurveyUserAnswerModel> |
getAnswersSurvey(int idSurvey)
Gets the answers survey.
|
static String |
getCATEGORY_NAME()
Gets the category name.
|
int |
getCompanyId()
Gets the company id.
|
String |
getDBName()
Gets the DB name.
|
String |
getDBURL()
Gets the dburl.
|
com.liferay.portal.kernel.repository.model.Folder |
getDlFolder()
Gets the dl folder.
|
long |
getFolderID()
Gets the folder ID.
|
javax.persistence.EntityManagerFactory |
getManagerFactory()
Gets the manager factory.
|
Map<String,String> |
getPersistenceMap()
Gets the persistence map.
|
String |
getPwd()
Gets the pwd.
|
List<SurveyQuestionModel> |
getQuestionsSurvey(int idSurvey)
Gets the questions survey.
|
com.liferay.portal.service.ServiceContext |
getServiceContext()
Gets the service context.
|
SurveyModel |
getSurvey(int idSurvey)
Gets the survey.
|
String |
getSurveyInvitationLink(Integer surveyId,
boolean isAnonymous) |
List<SurveyModel> |
getSurveyList(UserDTO userDTO)
Gets the survey list.
|
SurveyQuestionModel |
getSurveyQuestionModelTemp()
Gets the survey question model temp.
|
String |
getuName()
Gets the u name.
|
UserDTO |
getUser()
Gets the user.
|
List<UserDTO> |
getUserAnsweredSurvey(int idSurveySelected)
Gets the user answered survey.
|
void |
init() |
void |
insertSurvey(SurveyModel surveyModel)
Insert survey.
|
void |
insertSurveyQuestion(SurveyQuestionModel surveyQuestionModel,
int idSurvey)
Insert survey question.
|
static boolean |
isWithinPortal() |
void |
saveAllSurvey(long idUser,
SurveyModel surveyModel,
long idTempFolder,
List<SurveyQuestionModel> surveyQuestionModelList)
save survey to db
idUser user ID
surveyModel view survey in the client
idTempFolder image folder
surveyQuestionModelList List of questions.
|
static void |
setCATEGORY_NAME(String cATEGORY_NAME)
Sets the category name.
|
void |
setCompanyId(int companyId)
Sets the company id.
|
void |
setDBName(String dBName)
Sets the DB name.
|
void |
setDBPropertyConnection()
Sets the DB property connection.
|
void |
setDBURL(String dBURL)
Sets the dburl.
|
void |
setDlFolder(com.liferay.portal.kernel.repository.model.Folder dlFolder)
Sets the dl folder.
|
void |
setFolderID(long folderID)
Sets the folder ID.
|
void |
setManagerFactory(javax.persistence.EntityManagerFactory managerFactory)
Sets the manager factory.
|
void |
setPersistenceMap(Map<String,String> persistenceMap)
Sets the persistence map.
|
void |
setPwd(String pwd)
Sets the pwd.
|
void |
setServiceContext(com.liferay.portal.service.ServiceContext serviceContext)
Sets the service context.
|
void |
setSurveyQuestionModelTemp(SurveyQuestionModel surveyQuestionModelTemp)
Sets the survey question model temp.
|
void |
setuName(String uName)
Sets the u name.
|
void |
updateSurvey(long idUser,
SurveyModel surveyModel,
List<SurveyQuestionModel> surveyQuestionModelList)
Update survey.
|
List<Integer> |
usersAnsweredSurvey()
Users answered survey.
|
checkPermutationStrongName, doGetSerializationPolicy, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponsedoPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic static final String TakeSurveyPortlet_PLUGIN_ID_PREFIX
public static final Integer MIN_NUM_RANDOM
public static final Integer MAX_NUM_RANDOM
public static final String VRE_MANAGER_LABEL
public static final String VRE_DESIGNER_LABEL
public static final String VO_ADMIN_LABEL
public static final String INFRA_MANAGER_LABEL
public static final String DATA_MANAGER_LABEL
public void init()
init in class javax.servlet.GenericServletpublic void saveAllSurvey(long idUser,
SurveyModel surveyModel,
long idTempFolder,
List<SurveyQuestionModel> surveyQuestionModelList)
saveAllSurvey in interface GreetingServiceidUser - the id usersurveyModel - the survey modelidTempFolder - the id temp foldersurveyQuestionModelList - the survey question model listpublic Long createFolder()
createFolder in interface GreetingServicepublic void deleteOldImage(int idSurvey,
long idTmpFolder,
String image2Delete)
deleteOldImage in interface GreetingServiceidSurvey - the id surveyidTmpFolder - the id tmp folderimage2Delete - the image 2 deletepublic void insertSurveyQuestion(SurveyQuestionModel surveyQuestionModel, int idSurvey)
insertSurveyQuestion in interface GreetingServicesurveyQuestionModel - the survey question modelidSurvey - the id surveypublic void insertSurvey(SurveyModel surveyModel)
insertSurvey in interface GreetingServicesurveyModel - the survey modelpublic List<UserDTO> getUserAnsweredSurvey(int idSurveySelected)
getUserAnsweredSurvey in interface GreetingServiceidSurveySelected - the id survey selectedpublic List<Integer> usersAnsweredSurvey()
usersAnsweredSurvey in interface GreetingServicepublic static boolean isWithinPortal()
public UserDTO getUser()
getUser in interface GreetingServicepublic SurveyModel getSurvey(int idSurvey)
getSurvey in interface GreetingServiceidSurvey - the id surveypublic List<SurveyModel> getSurveyList(UserDTO userDTO)
getSurveyList in interface GreetingServiceuserDTO - the user DTOpublic void deleteSurvey(SurveyModel surveyModel)
deleteSurvey in interface GreetingServicesurveyModel - the survey modelpublic void updateSurvey(long idUser,
SurveyModel surveyModel,
List<SurveyQuestionModel> surveyQuestionModelList)
updateSurvey in interface GreetingServiceidUser - the id usersurveyModel - the survey modelsurveyQuestionModelList - the survey question model listpublic List<SurveyQuestionModel> getQuestionsSurvey(int idSurvey)
getQuestionsSurvey in interface GreetingServiceidSurvey - the id surveypublic List<SurveyUserAnswerModel> getAnswersSurvey(int idSurvey)
getAnswersSurvey in interface GreetingServiceidSurvey - the id surveypublic void checkDBisCreated()
checkDBisCreated in interface GreetingServicepublic void exportToCSVFile(String titleSurvey, boolean isAnonymous, List<UserDTO> userDTOList, List<SurveyUserAnswerModel> surveyUserAnswerModelList, List<SurveyQuestionModel> surveyQuestionModelList)
exportToCSVFile in interface GreetingServicetitleSurvey - the title surveyisAnonymous - the is anonymoususerDTOList - the user DTO listsurveyUserAnswerModelList - the survey user answer model listsurveyQuestionModelList - the survey question model listpublic void setDBPropertyConnection()
public SurveyQuestionModel getSurveyQuestionModelTemp()
public void setSurveyQuestionModelTemp(SurveyQuestionModel surveyQuestionModelTemp)
surveyQuestionModelTemp - the new survey question model temppublic long getFolderID()
public void setFolderID(long folderID)
folderID - the new folder IDpublic com.liferay.portal.kernel.repository.model.Folder getDlFolder()
public void setDlFolder(com.liferay.portal.kernel.repository.model.Folder dlFolder)
dlFolder - the new dl folderpublic com.liferay.portal.service.ServiceContext getServiceContext()
public void setServiceContext(com.liferay.portal.service.ServiceContext serviceContext)
serviceContext - the new service contextpublic int getCompanyId()
public void setCompanyId(int companyId)
companyId - the new company idpublic Map<String,String> getPersistenceMap()
public void setPersistenceMap(Map<String,String> persistenceMap)
persistenceMap - the persistence mappublic javax.persistence.EntityManagerFactory getManagerFactory()
public void setManagerFactory(javax.persistence.EntityManagerFactory managerFactory)
managerFactory - the new manager factorypublic String getDBURL()
public void setDBURL(String dBURL)
dBURL - the new dburlpublic String getDBName()
public void setDBName(String dBName)
dBName - the new DB namepublic String getuName()
public void setuName(String uName)
uName - the new u namepublic String getPwd()
public void setPwd(String pwd)
pwd - the new pwdpublic static String getCATEGORY_NAME()
public static void setCATEGORY_NAME(String cATEGORY_NAME)
cATEGORY_NAME - the new category namepublic String getSurveyInvitationLink(Integer surveyId, boolean isAnonymous)
getSurveyInvitationLink in interface GreetingServiceCopyright © 2018. All Rights Reserved.