当前位置: 首页>>代码示例>>Java>>正文


Java IndexableType类代码示例

本文整理汇总了Java中com.liferay.portal.kernel.search.IndexableType的典型用法代码示例。如果您正苦于以下问题:Java IndexableType类的具体用法?Java IndexableType怎么用?Java IndexableType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IndexableType类属于com.liferay.portal.kernel.search包,在下文中一共展示了IndexableType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateFormData

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type=IndexableType.REINDEX)
public Deliverable updateFormData(long groupId, long id, String formData,ServiceContext serviceContext) throws NoSuchDeliverableException {
	long userId = serviceContext.getUserId();

	Date now = new Date();

	Deliverable object = null;
	object = deliverablePersistence.findByG_DID(groupId, id);
	
	/// Add audit fields
	object.setGroupId(groupId);
	object.setModifiedDate(now);
	object.setUserId(userId);

	// Add other fields
	object.setFormData(formData);

	return deliverablePersistence.update(object);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:20,代码来源:DeliverableLocalServiceImpl.java

示例2: deleteMeasurement

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.DELETE)
@Override
@SystemEvent(type = SystemEventConstants.TYPE_DELETE)
public Measurement deleteMeasurement(Measurement measurement)
        throws PortalException {

    // Measurement

    measurementPersistence.remove(measurement);

    // Resources

    resourceLocalService.deleteResource(measurement.getCompanyId(),
            Measurement.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
            measurement.getMeasurementId());

    return measurement;
}
 
开发者ID:inofix,项目名称:ch-inofix-data-manager,代码行数:19,代码来源:MeasurementLocalServiceImpl.java

示例3: removeDossierFile

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public DossierFile removeDossierFile(long dossierId, String referenceUid, ServiceContext serviceContext)
		throws PortalException {
	User user = userPersistence.findByPrimaryKey(serviceContext.getUserId());

	DossierFile dossierFile = dossierFileLocalService.getDossierFileByReferenceUid(dossierId, referenceUid);

	Date now = new Date();

	dossierFile.setUserId(user.getUserId());
	dossierFile.setModifiedDate(now);
	dossierFile.setRemoved(true);
	dossierFile.setUserName(user.getFullName());

	return dossierFileLocalService.updateDossierFile(dossierFile);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:17,代码来源:DossierFileLocalServiceImpl.java

示例4: deleteHoliday

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
/**
 * @param dictCollectionId
 * @param serviceContext
 * @return
 * @throws Exception
 */
@Indexable(type = IndexableType.DELETE)
@Override
public Holiday deleteHoliday(long holidayId, ServiceContext serviceContext)
		throws UnauthenticationException, UnauthorizationException, NotFoundException {
	// authen
	BackendAuthImpl authImpl = new BackendAuthImpl();

	boolean isAuth = authImpl.isAuth(serviceContext);

	if (!isAuth) {
		throw new UnauthenticationException();
	}

	boolean hasPermission = authImpl.hasResource(serviceContext, ModelNameKeys.WORKINGUNIT_MGT_CENTER,
			ActionKeys.EDIT_DATA);

	if (!hasPermission) {
		throw new UnauthorizationException();
	}

	Holiday holiday;

	try {

		holiday = holidayPersistence.remove(holidayId);

	} catch (NoSuchHolidayException e) {
		// TODO Auto-generated catch block
		throw new NotFoundException();
	}

	return holiday;

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:41,代码来源:HolidayLocalServiceImpl.java

示例5: addDeliverable

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
	public Deliverable addDeliverable(long groupId, String deliverableType, String deliverableCode,
			String govAgencyCode, String applicationIdNo, String applicationName, String subject,
			String issueDate, String expireDate,String revalidate, String deliverableState,
			ServiceContext serviceContext) {
		// TODO Add RegistrationForm
		long userId = serviceContext.getUserId();

		Date now = new Date();

//		User userAction = userLocalService.getUser(userId);
		
//		referenceUid = UUID.randomUUID().toString();

		long deliverableId = counterLocalService.increment(Deliverable.class.getName());

		Deliverable object = deliverablePersistence.create(deliverableId);

		/// Add audit fields
		object.setGroupId(groupId);
		object.setCreateDate(now);
		object.setModifiedDate(now);
		object.setUserId(userId);

		// Add other fields
		object.setDeliverableId(deliverableId);
		object.setDeliverableType(deliverableType);
		object.setDeliverableCode(deliverableCode);
		object.setGovAgencyCode(govAgencyCode);
		object.setApplicantIdNo(applicationIdNo);
		object.setApplicantName(applicationName);
		object.setSubject(subject);
		object.setIssueDate(APIDateTimeUtils.convertStringToDate(issueDate, APIDateTimeUtils._NORMAL_PARTTERN));
		object.setExpireDate(APIDateTimeUtils.convertStringToDate(expireDate, APIDateTimeUtils._NORMAL_PARTTERN));
		object.setRevalidate(APIDateTimeUtils.convertStringToDate(revalidate, APIDateTimeUtils._NORMAL_PARTTERN));
		object.setDeliverableState(String.valueOf(deliverableState));

		return deliverablePersistence.update(object);
	}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:40,代码来源:DeliverableLocalServiceImpl.java

示例6: updateRegistrationForm

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public RegistrationForm updateRegistrationForm(long groupId, long registrationId, String referenceUid,
		String formNo, String formName, String formData, String formScript, String formReport, long fileEntryId,
		boolean isNew, boolean removed, ServiceContext serviceContext) throws PortalException {

	Date now = new Date();

	RegistrationForm object = registrationFormPersistence.fetchByG_REGID_REFID(groupId, registrationId,
			referenceUid);

	/// Add audit fields
	object.setModifiedDate(now);

	// Add other fields
	object.setRegistrationId(registrationId);
	object.setReferenceUid(referenceUid);
	object.setFormNo(formNo);
	object.setFormName(formName);
	object.setFormData(formData);
	object.setFormScript(formScript);
	object.setFormReport(formReport);
	object.setFileEntryId(fileEntryId);
	object.setIsNew(true);
	object.setRemoved(removed);

	return registrationFormPersistence.update(object);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:28,代码来源:RegistrationFormLocalServiceImpl.java

示例7: deleteRegistrationForm

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public RegistrationForm deleteRegistrationForm(long groupId, long registrationId, String referenceUid)
		throws PortalException {

	RegistrationForm object = registrationFormPersistence.findByG_REGID_REFID(groupId, registrationId,
			referenceUid);

	object.setRemoved(true);
	object.setIsNew(true);
	object.setModifiedDate(new Date());

	return registrationFormPersistence.update(object);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:RegistrationFormLocalServiceImpl.java

示例8: deleteRegistrationForms

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public List<RegistrationForm> deleteRegistrationForms(long groupId, long registrationId) {

	List<RegistrationForm> lstRegistrationForm = registrationFormPersistence.findByG_REGID(groupId, registrationId);

	for (RegistrationForm registrationForm : lstRegistrationForm) {
		registrationForm.setRemoved(true);
		registrationForm.setIsNew(true);
		registrationFormPersistence.update(registrationForm);
	}

	return lstRegistrationForm;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:RegistrationFormLocalServiceImpl.java

示例9: updateIsNew

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public RegistrationForm updateIsNew(long groupId, long registrationId, String referenceUid, boolean isNew,
		ServiceContext serviceContext) throws PortalException, SystemException {

	RegistrationForm registrationForm = registrationFormPersistence.findByG_REGID_REFID(groupId, registrationId,
			referenceUid);

	registrationForm.setIsNew(isNew);

	return registrationFormPersistence.update(registrationForm);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:12,代码来源:RegistrationFormLocalServiceImpl.java

示例10: updateStatus

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public Dossier updateStatus(long groupId, long id, String refId, String status, String statusText, String subStatus,
		String subStatusText, ServiceContext context) throws PortalException {

	validateUpdateStatus(groupId, id, refId, status, statusText, subStatus, subStatusText);

	Date now = new Date();

	Dossier dossier = null;

	if (id != 0) {
		dossier = dossierPersistence.findByPrimaryKey(id);
	} else {
		dossier = dossierPersistence.fetchByG_REF(groupId, refId);
	}

	dossier.setModifiedDate(now);

	dossier.setDossierStatus(status);
	dossier.setDossierStatusText(statusText);
	dossier.setDossierSubStatus(subStatus);
	dossier.setDossierSubStatusText(subStatusText);

	if (status.equalsIgnoreCase(DossierStatusConstants.RECEIVING)) {
		dossier.setReceiveDate(now);
	}

	if (status.equalsIgnoreCase(DossierStatusConstants.RELEASING)) {
		dossier.setReleaseDate(now);
	}

	if (status.equalsIgnoreCase(DossierStatusConstants.DONE)) {
		dossier.setFinishDate(now);
	}

	dossierPersistence.update(dossier);

	return dossier;

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:41,代码来源:DossierLocalServiceImpl.java

示例11: updateSubmitting

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.REINDEX)
public Registration updateSubmitting(long registrationId, boolean submitting) throws PortalException {
	Registration model = registrationPersistence.findByPrimaryKey(registrationId);
	model.setSubmitting(submitting);
	model.setModifiedDate(new Date());
	return registrationPersistence.update(model);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:8,代码来源:RegistrationLocalServiceImpl.java

示例12: updateContent

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
/**
 * @param dossierPartId
 * @param contentType
 * @param input
 * @param context
 * @return
 * @throws PortalException
 */
@Indexable(type = IndexableType.REINDEX)
public String updateContent(long dossierPartId, int contentType, String input, ServiceContext context)
		throws PortalException {

	Date now = new Date();

	User userAction = userLocalService.getUser(context.getUserId());

	DossierPart object = dossierPartPersistence.fetchByPrimaryKey(dossierPartId);

	// Add audit fields
	object.setModifiedDate(now);
	object.setUserId(userAction.getUserId());
	object.setUserName(userAction.getFullName());

	if (contentType == 1) {
		object.setFormScript(input);
	}

	if (contentType == 2) {
		object.setFormReport(input);
	}

	if (contentType == 3) {
		object.setSampleData(input);
	}

	dossierPartPersistence.update(object);

	return input;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:40,代码来源:DossierPartLocalServiceImpl.java

示例13: updateFileConfirm

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
/**
 * update payment File Confirm
 * 
 * @param
 * @return PaymentFile
 */
@Indexable(type = IndexableType.REINDEX)
public PaymentFile updateFileConfirm(long groupId, long dossierId, String referenceUid, String confirmNote,
		String paymentMethod, String confirmPayload, ServiceContext serviceContext)
		throws PortalException, SystemException {

	PaymentFile paymentFile = paymentFilePersistence.fetchByD_RUID(dossierId, referenceUid);

	if (paymentFile != null) {

		Date now = new Date();

		paymentFile.setModifiedDate(now);
		paymentFile.setConfirmNote(confirmNote);
		paymentFile.setPaymentMethod(paymentMethod);
		paymentFile.setConfirmPayload(confirmPayload);
		paymentFile.setPaymentStatus(2);
		paymentFile.setIsNew(true);
	}

	// update dossier
	

	try {
		Dossier dossier = DossierLocalServiceUtil.getDossier(dossierId);

		dossier.setSubmitDate(new Date());
		dossier.setSubmitting(true);

		dossierLocalService.updateDossier(dossier);
		//dossierPersistence.update(dossier);
		
		//indexer.reindex(dossier);
	} catch (SearchException e) {
		e.printStackTrace();
	}

	return paymentFilePersistence.update(paymentFile);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:45,代码来源:PaymentFileLocalServiceImpl.java

示例14: updateFileApproval

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
/**
 * Update payment File Approval
 * 
 * @param
 * @return PaymentFile
 */

@Indexable(type = IndexableType.REINDEX)
public PaymentFile updateFileApproval(long groupId, long dossierId, String referenceUid, String approveDatetime,
		String accountUserName, String govAgencyTaxNo, String invoiceTemplateNo, String invoiceIssueNo,
		String invoiceNo, ServiceContext serviceContext)
		throws PortalException, SystemException, java.text.ParseException {

	PaymentFile paymentFile = paymentFilePersistence.fetchByD_RUID(dossierId, referenceUid);

	if (paymentFile != null) {

		Date now = new Date();

		paymentFile.setModifiedDate(now);
		// Parse String to Date
		SimpleDateFormat format = new SimpleDateFormat("DD-MM-YYYY HH:MM:SS");
		Date dateApproved = format.parse(approveDatetime);
		paymentFile.setApproveDatetime(dateApproved);
		paymentFile.setAccountUserName(accountUserName);
		paymentFile.setGovAgencyTaxNo(govAgencyTaxNo);
		paymentFile.setInvoiceTemplateNo(invoiceTemplateNo);
		paymentFile.setInvoiceIssueNo(invoiceIssueNo);
		paymentFile.setInvoiceNo(invoiceNo);
		
		paymentFile.setIsNew(true);

	}

	return paymentFilePersistence.update(paymentFile);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:37,代码来源:PaymentFileLocalServiceImpl.java

示例15: deleteDossierFile

import com.liferay.portal.kernel.search.IndexableType; //导入依赖的package包/类
@Indexable(type = IndexableType.DELETE)
public DossierFile deleteDossierFile(DossierFile dossierFile) throws PortalException {

	// TODO: validate remove delete dossier file
	validateDeleteDossierFile(dossierFile);

	dossierFile.setModifiedDate(new Date());
	dossierFile.setRemoved(true);

	return dossierFilePersistence.update(dossierFile);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:12,代码来源:DossierFileLocalServiceImpl.java


注:本文中的com.liferay.portal.kernel.search.IndexableType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。