本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例11: deletePermanentDossierFile
@Indexable(type = IndexableType.DELETE)
public DossierFile deletePermanentDossierFile(DossierFile dossierFile) {
return dossierFilePersistence.remove(dossierFile);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}