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


Java IndexableType.DELETE属性代码示例

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


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

示例1: deleteMeasurement

@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,代码行数:18,代码来源:MeasurementLocalServiceImpl.java

示例2: deleteHoliday

/**
 * @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,代码行数:40,代码来源:HolidayLocalServiceImpl.java

示例3: deleteDossierFile

@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,代码行数:11,代码来源:DossierFileLocalServiceImpl.java

示例4: deleteNotificationTemplate

/**
 * @param dictCollectionId
 * @param serviceContext
 * @return
 */
@Indexable(type = IndexableType.DELETE)
@Override
public Notificationtemplate deleteNotificationTemplate(long notificationTemplateId, ServiceContext serviceContext)
		throws UnauthenticationException, UnauthorizationException, NotFoundException {
	// authen
	BackendAuthImpl authImpl = new BackendAuthImpl();

	boolean isAuth = authImpl.isAuth(serviceContext, StringPool.BLANK, StringPool.BLANK);

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

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

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

	Notificationtemplate notificationTemplate = null;
	try {
		notificationTemplate = notificationtemplatePersistence.remove(notificationTemplateId);
	} catch (NoSuchNotificationtemplateException e) {
		e.printStackTrace();
	}

	return notificationTemplate;

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

示例5: deleteJobPos

@Indexable(type = IndexableType.DELETE)
@Override
public JobPos deleteJobPos(long JobPosId, ServiceContext serviceContext)
		throws UnauthenticationException, UnauthorizationException, NotFoundException {
	// authen
	BackendAuthImpl authImpl = new BackendAuthImpl();

	boolean isAuth = authImpl.isAuth(serviceContext, StringPool.BLANK, StringPool.BLANK);

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

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

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

	JobPos jobPos;

	try {

		jobPos = jobPosPersistence.remove(JobPosId);

	} catch (NoSuchJobPosException e) {
		throw new NotFoundException();
	}

	return jobPos;

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

示例6: deleteContact

@Indexable(type = IndexableType.DELETE)
@Override
@SystemEvent(type = SystemEventConstants.TYPE_DELETE)
public Contact deleteContact(Contact contact) throws PortalException {

    // Contact

    contactPersistence.remove(contact);

    // Resource

    resourceLocalService.deleteResource(contact.getCompanyId(), Contact.class.getName(),
            ResourceConstants.SCOPE_INDIVIDUAL, contact.getContactId());

    // Asset

    assetEntryLocalService.deleteEntry(Contact.class.getName(), contact.getContactId());

    return contact;
}
 
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:20,代码来源:ContactLocalServiceImpl.java

示例7: deleteDictGroup

/**
 * @author binhth
 * @param dictGroupId
 * @param serviceContext
 */
@Indexable(type = IndexableType.DELETE)
@Override
public DictGroup deleteDictGroup(long dictGroupId, 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();
	}

	DictGroup dictGroup = dictGroupPersistence.fetchByPrimaryKey(dictGroupId);
	try {

		if (dictItemGroupPersistence.findByF_dictGroupId(dictGroup.getGroupId(), dictGroupId)
				.size() > 0) {
			throw new UnauthorizationException();
		} else {

			dictGroup = dictGroupPersistence.remove(dictGroupId);

		}

	} catch (NoSuchDictGroupException e) {

		throw new NotFoundException();

	}

	return dictGroup;

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

示例8: removeDossier

@Indexable(type = IndexableType.DELETE)
public Dossier removeDossier(long groupId, long dossierId, String refId) throws PortalException {
	// TODO remove dossierLog

	// TODO remove dossierFile

	// TODO remove dossierAction

	// TODO remove PaymentFile

	validateRemoveDossier(groupId, dossierId, refId);

	Dossier dossier = null;

	if (dossierId != 0) {
		dossier = dossierPersistence.fetchByPrimaryKey(dossierId);
	} else {
		dossier = dossierPersistence.findByG_REF(groupId, refId);
	}

	return dossierPersistence.remove(dossier);

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

示例9: deleteDictItemGroupNoneAuthen

@Indexable(type = IndexableType.DELETE)
@Override
public DictItemGroup deleteDictItemGroupNoneAuthen(long dictItemGroupId, ServiceContext serviceContext)
		throws UnauthenticationException, UnauthorizationException, NotFoundException {
	// authen
	DictItemGroup dictItemGroup = dictItemGroupPersistence.fetchByPrimaryKey(dictItemGroupId);
	try {

		dictItemGroup = dictItemGroupPersistence.remove(dictItemGroupId);

	} catch (NoSuchDictItemGroupException e) {

		throw new NotFoundException();

	}

	return dictItemGroup;

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

示例10: removeProcessStep

@Indexable(type = IndexableType.DELETE)
public ProcessStep removeProcessStep(long processStepId) throws PortalException {
	validateRemove(processStepId);

	List<ProcessStepRole> processStepRoles = processStepRolePersistence.findByP_S_ID(processStepId);

	for (ProcessStepRole stepRole : processStepRoles) {
		processStepRolePersistence.remove(stepRole);
	}

	ProcessStep processStep = processStepPersistence.fetchByPrimaryKey(processStepId);

	processStepPersistence.remove(processStep);

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

示例11: deletePermanentDossierFile

@Indexable(type = IndexableType.DELETE)
public DossierFile deletePermanentDossierFile(DossierFile dossierFile) {

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

示例12: deleteTaskRecord

@Indexable(type = IndexableType.DELETE)
@Override
@SystemEvent(type = SystemEventConstants.TYPE_DELETE)
public TaskRecord deleteTaskRecord(TaskRecord taskRecord) throws PortalException {

    // TaskRecord

    taskRecordPersistence.remove(taskRecord);

    // Resources

    resourceLocalService.deleteResource(taskRecord.getCompanyId(), TaskRecord.class.getName(),
            ResourceConstants.SCOPE_INDIVIDUAL, taskRecord.getTaskRecordId());

    // Asset

    assetEntryLocalService.deleteEntry(TaskRecord.class.getName(), taskRecord.getTaskRecordId());

    // Workflow

    // TODO: add workflow support
    // workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks(
    // taskRecord.getCompanyId(), taskRecord.getGroupId(),
    // TaskRecord.class.getName(), taskRecord.getTaskRecordId());

    return taskRecord;
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:27,代码来源:TaskRecordLocalServiceImpl.java

示例13: removeApplicant

@Indexable(type = IndexableType.DELETE)
public Applicant removeApplicant(long applicantId) throws PortalException, SystemException {
	Applicant applicant = applicantPersistence.fetchByPrimaryKey(applicantId);

	long mappingId = applicant.getMappingUserId();

	userPersistence.remove(mappingId);

	applicantPersistence.remove(applicant);

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

示例14: removeProcessOption

@Indexable(type = IndexableType.DELETE)
public ProcessOption removeProcessOption(long processOptionId) throws PortalException {

	validateRemove(processOptionId);

	ProcessOption option = processOptionPersistence.fetchByPrimaryKey(processOptionId);

	processOptionPersistence.remove(option);

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

示例15: deleteFileAttach

/**
 * @param dictCollectionId
 * @param serviceContext
 * @return
 * @throws Exception
 */
@Indexable(type = IndexableType.DELETE)
@Override
public FileAttach deleteFileAttach(long fileAttachId, ServiceContext serviceContext)
		throws UnauthenticationException, UnauthorizationException, NotFoundException {

	// authen
	BackendAuthImpl authImpl = new BackendAuthImpl();

	boolean isAuth = authImpl.isAuth(serviceContext);

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

	FileAttach fileAttach = fileAttachPersistence.fetchByPrimaryKey(fileAttachId);

	try {

		fileAttach = fileAttachPersistence.remove(fileAttachId);

	} catch (NoSuchFileAttachException e) {
		throw new NotFoundException();
	}

	return fileAttach;

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


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