當前位置: 首頁>>代碼示例>>Java>>正文


Java PortalException.printStackTrace方法代碼示例

本文整理匯總了Java中com.liferay.portal.kernel.exception.PortalException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java PortalException.printStackTrace方法的具體用法?Java PortalException.printStackTrace怎麽用?Java PortalException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.liferay.portal.kernel.exception.PortalException的用法示例。


在下文中一共展示了PortalException.printStackTrace方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createPaymentFile

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的package包/類
/**
 * Create PaymentFile of DossierId
 * 
 * @param form
 *            params
 * @return PaymentFile
 */
@Override
public PaymentFile createPaymentFile(long userId, long groupId, long dossierId, String referenceUid,
		String govAgencyCode, String govAgencyName, String applicantName, String applicantIdNo, String paymentFee,
		long paymentAmount, String paymentNote, String epaymentProfile, String bankInfo,
		ServiceContext serviceContext) throws PortalException {
	_log.info("boom boom");
	if (Validator.isNull(referenceUid)) {
		referenceUid = PortalUUIDUtil.generate();
	}

	try {

		PaymentFile result = PaymentFileLocalServiceUtil.createPaymentFiles(userId, groupId, dossierId,
				referenceUid, govAgencyCode, govAgencyName, applicantName, applicantIdNo, paymentFee, paymentAmount,
				paymentNote, epaymentProfile, bankInfo, serviceContext);

		return result;

	} catch (PortalException e) {
		// TODO Auto-generated catch block
		_log.info("boom boom");
		_log.info(e);
		e.printStackTrace();
		throw new PortalException();
	}

}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:35,代碼來源:PaymentFileActionsImpl.java

示例2: getFileEntry

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的package包/類
@Override
public FileEntry getFileEntry(long id, ServiceContext serviceContext) {
	FileEntry fileEntry = null;
	
	OfficeSite officeSite = OfficeSiteLocalServiceUtil.fetchOfficeSite(id);
	
	try {
		fileEntry = DLAppLocalServiceUtil.getFileEntry(officeSite.getLogoFileEntryId());
	} catch (PortalException e) {
		e.printStackTrace();
	}
	
	return fileEntry;
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:15,代碼來源:OfficeSiteActions.java

示例3: getCheckpass

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的package包/類
@Override
public boolean getCheckpass(long groupId, long companyId, long id, String password, ServiceContext serviceContext) {
	boolean flag = false;

	try {
		flag = PasswordTrackerLocalServiceUtil.isSameAsCurrentPassword(id, password);
	} catch (PortalException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	return flag;
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:14,代碼來源:UserActions.java

示例4: getFileEntry

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的package包/類
@Override
public FileEntry getFileEntry(long id, ServiceContext serviceContext) {
	FileEntry fileEntry = null;

	WorkingUnit workingUnit = WorkingUnitLocalServiceUtil.fetchWorkingUnit(id);

	try {
		fileEntry = DLAppLocalServiceUtil.getFileEntry(workingUnit.getLogoFileEntryId());
	} catch (PortalException e) {
		e.printStackTrace();
	}

	return fileEntry;
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:15,代碼來源:WorkingUnitActions.java

示例5: getForgot

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的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;
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:49,代碼來源:UserActions.java

示例6: getForgotConfirm

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的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;
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:58,代碼來源:UserActions.java

示例7: getSites

import com.liferay.portal.kernel.exception.PortalException; //導入方法依賴的package包/類
@Override
public JSONObject getSites(long id, long groupId, ServiceContext serviceContext) {
	JSONObject result = JSONFactoryUtil.createJSONObject();

	try {
		List<Group> listGroup = GroupLocalServiceUtil.getUserSitesGroups(id);

		List<Document> list = new ArrayList<>();

		for (Group group : listGroup) {

			Document document = new DocumentImpl();

			OfficeSite officeSite = OfficeSiteLocalServiceUtil.fetchF_groupId_siteGroupId(groupId,
					group.getGroupId());

			if(Validator.isNotNull(officeSite)){
				
				document.addNumberSortable("entryClassPK", officeSite.getOfficeSiteId());
				document.addTextSortable("siteName", officeSite.getName());
				
			} else {
				
				document.addNumberSortable("entryClassPK", 0);
				document.addTextSortable("siteName", group.getName(locale));
				
			}
			
			document.addNumberSortable("siteGroupId", group.getGroupId());
			
			boolean isCurrent = false;

			if (group.getGroupId() == groupId) {

				isCurrent = true;

			}
			document.addTextSortable("currentSite", String.valueOf(isCurrent));

			list.add(document);

		}

		result.put("data", list);

		long total = listGroup.size();

		result.put("total", total);

	} catch (PortalException e) {
		e.printStackTrace();
	}

	return result;

}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:57,代碼來源:UserActions.java


注:本文中的com.liferay.portal.kernel.exception.PortalException.printStackTrace方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。