本文整理汇总了Java中com.liferay.portal.kernel.model.User.getUserId方法的典型用法代码示例。如果您正苦于以下问题:Java User.getUserId方法的具体用法?Java User.getUserId怎么用?Java User.getUserId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.model.User
的用法示例。
在下文中一共展示了User.getUserId方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initDossierActionUser
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public void initDossierActionUser(long dossierActionId, long userId, long groupId, long assignUserId)
throws PortalException {
// Get DossierAction
DossierAction dossierAction = DossierActionLocalServiceUtil.getDossierAction(dossierActionId);
String actionCode = dossierAction.getActionCode();
long serviceProcessId = dossierAction.getServiceProcessId();
// Get ProcessAction
ProcessAction processAction = ProcessActionLocalServiceUtil.fetchBySPID_AC(serviceProcessId, actionCode);
String stepCode = processAction.getPostStepCode();
// Get ProcessStep
ProcessStep processStep = ProcessStepLocalServiceUtil.fetchBySC_GID(stepCode, groupId, serviceProcessId);
long processStepId = processStep.getProcessStepId();
// Get List ProcessStepRole
List<ProcessStepRole> listProcessStepRole = ProcessStepRoleLocalServiceUtil.findByP_S_ID(processStepId);
for (ProcessStepRole processStepRole : listProcessStepRole) {
long roleId = processStepRole.getRoleId();
boolean moderator = processStepRole.getModerator();
int mod = 0;
if (moderator) {
mod = 1;
}
// Get list user
List<User> users = UserLocalServiceUtil.getRoleUsers(roleId);
for (User user : users) {
boolean assigned = user.getUserId() == assignUserId ? true : false;
org.opencps.dossiermgt.model.DossierActionUser model = new org.opencps.dossiermgt.model.impl.DossierActionUserImpl();
model.setUserId(user.getUserId());
model.setDossierActionId(dossierActionId);
model.setModerator(mod);
model.setAssigned(assigned);
model.setVisited(false);
// Add User
DossierActionUserLocalServiceUtil.addDossierActionUser(model);
}
}
}
示例2: updateDossierAction
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public DossierAction updateDossierAction(long groupId, long dossierActionId, long dossierId, long serviceProcessId,
long previousActionId, String actionCode, String actionUser, String actionName, String actionNote,
int actionOverdue, String syncActionCode, boolean pending, boolean rollbackable, String stepCode,
String stepName, Date dueDate, long nextActionId, String payload, String stepInstruction,
ServiceContext context) throws PortalException {
validateUpdateAction(groupId, dossierActionId, dossierId, serviceProcessId, previousActionId, actionCode,
actionUser, actionName, actionNote, actionOverdue, syncActionCode, pending, rollbackable, stepCode,
stepName, dueDate, nextActionId, payload, stepInstruction);
DossierAction object = null;
long userId = 0l;
String fullName = StringPool.BLANK;
Date now = new Date();
if (context.getUserId() > 0) {
User userAction = userLocalService.getUser(context.getUserId());
userId = userAction.getUserId();
fullName = userAction.getFullName();
}
if (dossierActionId == 0) {
dossierActionId = counterLocalService.increment(DossierAction.class.getName());
object = dossierActionPersistence.create(dossierActionId);
// Add audit fields
object.setCompanyId(context.getCompanyId());
object.setGroupId(groupId);
object.setCreateDate(now);
object.setModifiedDate(now);
object.setUserId(userId);
object.setUserName(fullName);
object.setDossierId(dossierId);
object.setServiceProcessId(serviceProcessId);
object.setPreviousActionId(previousActionId);
object.setActionCode(actionCode);
object.setActionUser(actionUser);
object.setActionName(actionName);
object.setActionNote(actionNote);
object.setActionOverdue(actionOverdue);
object.setSyncActionCode(syncActionCode);
object.setPending(pending);
object.setRollbackable(rollbackable);
object.setStepCode(stepCode);
object.setStepName(stepName);
object.setDueDate(dueDate);
object.setNextActionId(nextActionId);
object.setPayload(payload);
object.setStepInstruction(stepInstruction);
// Add DossierActionId to Dossier
// TODO add Indexer for Dossier after update DossierAction
Dossier dossier = dossierPersistence.fetchByPrimaryKey(dossierId);
dossier.setDossierActionId(dossierActionId);
dossierPersistence.update(dossier);
Indexer<Dossier> indexer = IndexerRegistryUtil.nullSafeGetIndexer(Dossier.class);
try {
indexer.reindex(dossier);
} catch (SearchException e) {
e.printStackTrace();
}
} else {
}
dossierActionPersistence.update(object);
return object;
}
示例3: getApplicantDetail
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Response getApplicantDetail(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext, long id) {
ApplicantActions actions = new ApplicantActionsImpl();
ApplicantModel results = new ApplicantModel();
BackendAuth auth = new BackendAuthImpl();
Applicant applicant = null;
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
User requestUser = ApplicantUtils.getUser(id);
boolean isAllowed = false;
if (auth.hasResource(serviceContext, Applicant.class.getName(), ActionKeys.ADD_ENTRY)) {
isAllowed = true;
} else {
if (Validator.isNull(requestUser)) {
throw new NoSuchUserException();
} else {
// check userLogin is equal userRequest get detail
if (requestUser.getUserId() == user.getUserId()) {
isAllowed = true;
}
}
}
if (isAllowed) {
applicant = actions.getApplicantDetail(serviceContext, id);
results = ApplicantUtils.mappingToApplicantModel(applicant);
return Response.status(200).entity(results).build();
} else {
throw new UnauthorizationException();
}
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
if (e instanceof UnauthenticationException) {
error.setMessage("Non-Authoritative Information.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Non-Authoritative Information.");
return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(error).build();
} else {
if (e instanceof UnauthorizationException) {
error.setMessage("Unauthorized.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Unauthorized.");
return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(error).build();
} else {
if (e instanceof NoSuchUserException) {
error.setMessage("Not Found");
error.setCode(HttpURLConnection.HTTP_NOT_FOUND);
error.setDescription("Not Found");
return Response.status(HttpURLConnection.HTTP_NOT_FOUND).entity(error).build();
} else {
error.setMessage("Internal Server Error");
error.setCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
error.setDescription(e.getMessage());
return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity(error).build();
}
}
}
}
}
示例4: updateApplicant
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Response updateApplicant(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext, long id, ApplicantInputUpdateModel input) {
ApplicantActions actions = new ApplicantActionsImpl();
ApplicantModel results = new ApplicantModel();
BackendAuth auth = new BackendAuthImpl();
Applicant applicant = null;
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
User requestUser = ApplicantUtils.getUser(id);
boolean isAllowed = false;
if (auth.hasResource(serviceContext, Applicant.class.getName(), ActionKeys.ADD_ENTRY)) {
isAllowed = true;
} else {
if (Validator.isNull(requestUser)) {
throw new NoSuchUserException();
} else {
// check userLogin is equal userRequest get detail
if (requestUser.getUserId() == user.getUserId()) {
isAllowed = true;
}
}
}
if (isAllowed) {
applicant = actions.updateApplicant(serviceContext,groupId, id, input.getApplicantName(), input.getAddress(), input.getCityCode(),
input.getCityName(), input.getDistrictCode(), input.getDistrictName(), input.getWardCode(),
input.getWardName(), input.getContactName(), input.getContactTelNo(), input.getContactEmail());
results = ApplicantUtils.mappingToApplicantModel(applicant);
return Response.status(200).entity(results).build();
} else {
throw new UnauthorizationException();
}
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
if (e instanceof UnauthenticationException) {
error.setMessage("Non-Authoritative Information.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Non-Authoritative Information.");
return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(error).build();
} else {
if (e instanceof UnauthorizationException) {
error.setMessage("Unauthorized.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Unauthorized.");
return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(error).build();
} else {
if (e instanceof NoSuchUserException) {
error.setMessage("Not Found");
error.setCode(HttpURLConnection.HTTP_NOT_FOUND);
error.setDescription("Not Found");
return Response.status(HttpURLConnection.HTTP_NOT_FOUND).entity(error).build();
} else {
error.setMessage("Internal Server Error");
error.setCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
error.setDescription(e.getMessage());
return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity(error).build();
}
}
}
}
}
示例5: getApplicantProfile
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Response getApplicantProfile(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext, long id) {
ApplicantActions actions = new ApplicantActionsImpl();
BackendAuth auth = new BackendAuthImpl();
Applicant applicant = null;
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
User requestUser = ApplicantUtils.getUser(id);
boolean isAllowed = false;
if (auth.hasResource(serviceContext, Applicant.class.getName(), ActionKeys.ADD_ENTRY)) {
isAllowed = true;
} else {
if (Validator.isNull(requestUser)) {
throw new NoSuchUserException();
} else {
// check userLogin is equal userRequest get detail
if (requestUser.getUserId() == user.getUserId()) {
isAllowed = true;
}
}
}
if (isAllowed) {
applicant = actions.getApplicantDetail (serviceContext, id);
JSONObject result = JSONFactoryUtil.createJSONObject(applicant.getProfile());
return Response.status(200).entity(JSONFactoryUtil.looseSerialize(result)).build();
} else {
throw new UnauthorizationException();
}
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
if (e instanceof UnauthenticationException) {
error.setMessage("Non-Authoritative Information.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Non-Authoritative Information.");
return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(error).build();
} else {
if (e instanceof UnauthorizationException) {
error.setMessage("Unauthorized.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Unauthorized.");
return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(error).build();
} else {
if (e instanceof NoSuchUserException) {
error.setMessage("Not Found");
error.setCode(HttpURLConnection.HTTP_NOT_FOUND);
error.setDescription("Not Found");
return Response.status(HttpURLConnection.HTTP_NOT_FOUND).entity(error).build();
} else {
error.setMessage("Internal Server Error");
error.setCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
error.setDescription(e.getMessage());
return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity(error).build();
}
}
}
}
}
示例6: addApplicantProfile
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Response addApplicantProfile(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext, long id, ProfileInputModel input) {
ApplicantActions actions = new ApplicantActionsImpl();
BackendAuth auth = new BackendAuthImpl();
Applicant applicant = null;
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
User requestUser = ApplicantUtils.getUser(id);
boolean isAllowed = false;
if (auth.hasResource(serviceContext, Applicant.class.getName(), ActionKeys.ADD_ENTRY)) {
isAllowed = true;
} else {
if (Validator.isNull(requestUser)) {
throw new NoSuchUserException();
} else {
// check userLogin is equal userRequest get detail
if (requestUser.getUserId() == user.getUserId()) {
isAllowed = true;
}
}
}
if (isAllowed) {
applicant = actions.updateProfile(serviceContext,groupId, id, input.getValue());
JSONObject result = JSONFactoryUtil.createJSONObject(applicant.getProfile());
return Response.status(200).entity(JSONFactoryUtil.looseSerialize(result)).build();
} else {
throw new UnauthorizationException();
}
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
if (e instanceof UnauthenticationException) {
error.setMessage("Non-Authoritative Information.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Non-Authoritative Information.");
return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(error).build();
} else {
if (e instanceof UnauthorizationException) {
error.setMessage("Unauthorized.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Unauthorized.");
return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(error).build();
} else {
if (e instanceof NoSuchUserException) {
error.setMessage("Not Found");
error.setCode(HttpURLConnection.HTTP_NOT_FOUND);
error.setDescription("Not Found");
return Response.status(HttpURLConnection.HTTP_NOT_FOUND).entity(error).build();
} else {
error.setMessage("Internal Server Error.");
error.setCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
error.setDescription(e.getMessage());
return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity(error).build();
}
}
}
}
}
示例7: lockApplicant
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Response lockApplicant(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext, long id) {
ApplicantActions actions = new ApplicantActionsImpl();
BackendAuth auth = new BackendAuthImpl();
ApplicantModel results = new ApplicantModel();
Applicant applicant = null;
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
User requestUser = ApplicantUtils.getUser(id);
boolean isAllowed = false;
if (auth.hasResource(serviceContext, Applicant.class.getName(), ActionKeys.ADD_ENTRY)) {
isAllowed = true;
} else {
if (Validator.isNull(requestUser)) {
throw new NoSuchUserException();
} else {
// check userLogin is equal userRequest get detail
if (requestUser.getUserId() == user.getUserId()) {
isAllowed = true;
}
}
}
if (isAllowed) {
applicant = actions.lockApplicant(serviceContext, id);
results = ApplicantUtils.mappingToApplicantModel(applicant);
return Response.status(200).entity(results).build();
} else {
throw new UnauthorizationException();
}
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
if (e instanceof UnauthenticationException) {
error.setMessage("Non-Authoritative Information.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Non-Authoritative Information.");
return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(error).build();
} else {
if (e instanceof UnauthorizationException) {
error.setMessage("Unauthorized.");
error.setCode(HttpURLConnection.HTTP_NOT_AUTHORITATIVE);
error.setDescription("Unauthorized.");
return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(error).build();
} else {
if (e instanceof NoSuchUserException) {
error.setMessage("Not Found");
error.setCode(HttpURLConnection.HTTP_NOT_FOUND);
error.setDescription("Not Found");
return Response.status(HttpURLConnection.HTTP_NOT_FOUND).entity(error).build();
} else {
error.setMessage("Internal Server Error");
error.setCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
error.setDescription(e.getMessage());
return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity(error).build();
}
}
}
}
}
示例8: delete
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
public boolean delete(long userId, long groupId, long companyId, String className, String classPK, String email,
ServiceContext serviceContext)
throws NotFoundException, UnauthenticationException, UnauthorizationException {
boolean flag = false;
// getUserId from email
User user = UserLocalServiceUtil.fetchUserByEmailAddress(companyId, email);
long toUserId = Validator.isNotNull(user) ? user.getUserId() : 0;
ResourceUser resourceUser = ResourceUserLocalServiceUtil.fetchByF_className_classPK_toUserId(groupId, className,
classPK, toUserId);
if (Validator.isNotNull(resourceUser)) {
ResourceUserLocalServiceUtil.deleteResourceUser(resourceUser.getResourceUserId(), serviceContext);
flag = true;
}
return flag;
}
示例9: getForgot
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Document getForgot(long groupId, long companyId, String screenname_email, ServiceContext serviceContext) {
Document document = new DocumentImpl();
User user = UserLocalServiceUtil.fetchUserByEmailAddress(companyId, screenname_email);
if(Validator.isNull(user)){
user = UserLocalServiceUtil.fetchUserByScreenName(companyId, screenname_email);
}
long mappingUserId = Validator.isNotNull(user)?user.getUserId():0;
String userName = Validator.isNotNull(user)?user.getFullName():StringPool.BLANK;
Employee employee = EmployeeLocalServiceUtil.fetchByF_mappingUserId(groupId, mappingUserId);
document.addTextSortable("userId", String.valueOf(mappingUserId));
document.addTextSortable("userName", Validator.isNotNull(employee)?employee.getFullName():userName);
document.addTextSortable("contactEmail", Validator.isNotNull(employee)?employee.getEmail():StringPool.BLANK);
document.addTextSortable("contactTelNo", Validator.isNotNull(employee)?employee.getTelNo():StringPool.BLANK);
//changePassWord
String passWord = PwdGenerator.getPassword();
try {
user.setDigest(passWord);
user = UserLocalServiceUtil.updateUser(user);
JSONObject payLoad = JSONFactoryUtil.createJSONObject();
payLoad.put("USERNAME", user.getScreenName());
payLoad.put("USEREMAIL", user.getEmailAddress());
payLoad.put("PASSWORD_CODE", passWord);
NotificationQueueLocalServiceUtil.addNotificationQueue(user.getUserId(), groupId, Constants.USER_03,
User.class.getName(), String.valueOf(user.getUserId()),
payLoad.toJSONString(), "SYSTEM", employee.getFullName(),
employee.getMappingUserId(), employee.getEmail(), employee.getTelNo(), new Date(),
null, serviceContext);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return document;
}
示例10: getForgotConfirm
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Document getForgotConfirm(long groupId, long companyId, String screenname_email, String code,
ServiceContext serviceContext) throws DigestException {
Document document = new DocumentImpl();
User user = UserLocalServiceUtil.fetchUserByEmailAddress(companyId, screenname_email);
if(Validator.isNull(user)){
user = UserLocalServiceUtil.fetchUserByScreenName(companyId, screenname_email);
}
long mappingUserId = Validator.isNotNull(user)?user.getUserId():0;
String userName = Validator.isNotNull(user)?user.getFullName():StringPool.BLANK;
//changePassWord
String passWord = PwdGenerator.getPassword();
try {
if(user.getDigest().equals(code)){
user = UserLocalServiceUtil.updatePassword(user.getUserId(), passWord, passWord, Boolean.TRUE);
user.setDigest(passWord + System.currentTimeMillis());
UserLocalServiceUtil.updateUser(user);
} else {
throw new DigestException();
}
Employee employee = EmployeeLocalServiceUtil.fetchByF_mappingUserId(groupId, mappingUserId);
document.addTextSortable("userId", String.valueOf(mappingUserId));
document.addTextSortable("userName", Validator.isNotNull(employee)?employee.getFullName():userName);
document.addTextSortable("contactEmail", Validator.isNotNull(employee)?employee.getEmail():StringPool.BLANK);
document.addTextSortable("contactTelNo", Validator.isNotNull(employee)?employee.getTelNo():StringPool.BLANK);
JSONObject payLoad = JSONFactoryUtil.createJSONObject();
payLoad.put("USERNAME", user.getScreenName());
payLoad.put("USEREMAIL", user.getEmailAddress());
payLoad.put("PASSWORD", passWord);
NotificationQueueLocalServiceUtil.addNotificationQueue(user.getUserId(), groupId, Constants.USER_04,
User.class.getName(), String.valueOf(user.getUserId()),
payLoad.toJSONString(), "SYSTEM", employee.getFullName(),
employee.getMappingUserId(), employee.getEmail(), employee.getTelNo(), new Date(),
null, serviceContext);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return document;
}
示例11: getUserId
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
/**
* Returns the current user's ID.
*
* @return the current user's ID.
*/
public default long getUserId() {
User user = getUser();
return user.getUserId();
}
示例12: getProcessOptions
import com.liferay.portal.kernel.model.User; //导入方法依赖的package包/类
@Override
public Response getProcessOptions(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext, long id, ProcessOptionSearchModel query) {
ServiceConfigActions actions = new ServiceConfigActionImpl();
ProcessOptionResultsModel results = new ProcessOptionResultsModel();
long userId = user.getUserId();
try {
if (query.getEnd() == 0) {
query.setStart(-1);
query.setEnd(-1);
}
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();
params.put(Field.GROUP_ID, String.valueOf(groupId));
params.put(Field.KEYWORD_SEARCH, query.getKeyword());
String configId = String.valueOf(id);
String applicantType = query.getApplicant();
params.put(ProcessOptionTerm.SERVICE_CONFIG_ID, configId);
params.put(ProcessOptionTerm.APPLICATION_TYPE, applicantType);
Sort[] sorts = new Sort[] { SortFactoryUtil.create(query.getSort() + "_sortable", Sort.STRING_TYPE,
GetterUtil.getBoolean(query.getOrder())) };
JSONObject jsonData = actions.getProcessOptions(userId, serviceContext.getCompanyId(), groupId, params,
sorts, query.getStart(), query.getEnd(), serviceContext);
results.setTotal(jsonData.getInt("total"));
results.getData()
.addAll(ServiceConfigUtils.mappingToProcessOptionResults((List<Document>) jsonData.get("data")));
return Response.status(200).entity(results).build();
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
error.setMessage("not found!");
error.setCode(404);
error.setDescription("not found!");
return Response.status(404).entity(error).build();
}
}