/** * Deletes the structure and its resources. * * <p> * Before deleting the structure, this method verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param structure the structure to be deleted */ @Override public void deleteStructure( com.liferay.dynamic.data.mapping.model.DDMStructure structure) throws com.liferay.portal.kernel.exception.PortalException { _ddmStructureLocalService.deleteStructure(structure); }
/** * Deletes the structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param structureId the primary key of the structure to be deleted */ @Override public void deleteStructure(long structureId) throws com.liferay.portal.kernel.exception.PortalException { _ddmStructureLocalService.deleteStructure(structureId); }
/** * Deletes the matching structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure */ @Override public void deleteStructure(long groupId, long classNameId, String structureKey) throws com.liferay.portal.kernel.exception.PortalException { _ddmStructureLocalService.deleteStructure(groupId, classNameId, structureKey); }
@Override public void deleteStructure(long structureId) throws PortalException { try { _ddmStructureLocalService.deleteStructure(structureId); } catch (PortalException pe) { throw translate(pe); } }
protected void deleteDDMStructures(Set<Long> ddmStructureIds) throws PortalException { for (Long ddmStructureId : ddmStructureIds) { if (_ddmStructureLocalService.fetchDDMStructure(ddmStructureId) != null) { _ddmStructureLocalService.deleteStructure(ddmStructureId); } } }
/** * Deletes the structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param structureId the primary key of the structure to be deleted */ public static void deleteStructure(long structureId) throws com.liferay.portal.kernel.exception.PortalException { getService().deleteStructure(structureId); }
/** * Deletes the structure and its resources. * * <p> * Before deleting the structure, this method verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param structure the structure to be deleted */ public static void deleteStructure( com.liferay.dynamic.data.mapping.model.DDMStructure structure) throws com.liferay.portal.kernel.exception.PortalException { getService().deleteStructure(structure); }
/** * Deletes the structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param structureId the primary key of the structure to be deleted */ @Override public void deleteStructure(long structureId) throws PortalException { DDMStructure structure = ddmStructurePersistence.findByPrimaryKey( structureId); ddmStructureLocalService.deleteStructure(structure); }
/** * Deletes the matching structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure */ public static void deleteStructure(long groupId, long classNameId, String structureKey) throws com.liferay.portal.kernel.exception.PortalException { getService().deleteStructure(groupId, classNameId, structureKey); }
/** * Deletes the structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param structureId the primary key of the structure to be deleted */ @Override public void deleteStructure(long structureId) throws PortalException { _ddmStructureModelResourcePermission.check( getPermissionChecker(), structureId, ActionKeys.DELETE); ddmStructureLocalService.deleteStructure(structureId); }
/** * Deletes the matching structure and its resources. * * <p> * Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. * </p> * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's * related model * @param structureKey the unique string identifying the structure */ @Override public void deleteStructure( long groupId, long classNameId, String structureKey) throws PortalException { structureKey = getStructureKey(structureKey); DDMStructure structure = ddmStructurePersistence.findByG_C_S( groupId, classNameId, structureKey); ddmStructureLocalService.deleteStructure(structure); }
protected Set<Long> deleteStructures(List<DDMStructure> structures) throws PortalException { if (ListUtil.isEmpty(structures)) { return Collections.emptySet(); } Set<Long> deletedStructureIds = new HashSet<>(); for (DDMStructure structure : structures) { if (deletedStructureIds.contains(structure.getStructureId())) { continue; } if (!GroupThreadLocal.isDeleteInProcess()) { List<DDMStructure> childDDMStructures = ddmStructurePersistence.findByParentStructureId( structure.getStructureId()); deletedStructureIds.addAll( deleteStructures(childDDMStructures)); } ddmStructureLocalService.deleteStructure(structure); deletedStructureIds.add(structure.getStructureId()); } return deletedStructureIds; }
@Override @SystemEvent( action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE ) public void deleteFormInstance(DDMFormInstance ddmFormInstance) throws PortalException { deleteDDMFormInstance(ddmFormInstance); resourceLocalService.deleteResource( ddmFormInstance.getCompanyId(), DDMFormInstance.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, ddmFormInstance.getFormInstanceId()); ddmFormInstanceRecordLocalService.deleteFormInstanceRecords( ddmFormInstance.getFormInstanceId()); ddmFormInstanceVersionLocalService.deleteByFormInstanceId( ddmFormInstance.getFormInstanceId()); long structureId = ddmFormInstance.getStructureId(); if (ddmStructureLocalService.fetchDDMStructure(structureId) != null) { ddmStructureLocalService.deleteStructure(structureId); } workflowDefinitionLinkLocalService.deleteWorkflowDefinitionLink( ddmFormInstance.getCompanyId(), ddmFormInstance.getGroupId(), DDMFormInstance.class.getName(), ddmFormInstance.getFormInstanceId(), 0); }