/** * Returns the ddm structure with the primary key. * * @param structureId the primary key of the ddm structure * @return the ddm structure * @throws PortalException if a ddm structure with the primary key could not be found */ @Override public com.liferay.dynamic.data.mapping.model.DDMStructure getDDMStructure( long structureId) throws com.liferay.portal.kernel.exception.PortalException { return _ddmStructureLocalService.getDDMStructure(structureId); }
/** * Returns the ddm structure with the primary key. * * @param structureId the primary key of the ddm structure * @return the ddm structure * @throws PortalException if a ddm structure with the primary key could not be found */ public static com.liferay.dynamic.data.mapping.model.DDMStructure getDDMStructure( long structureId) throws com.liferay.portal.kernel.exception.PortalException { return getService().getDDMStructure(structureId); }
@Override public boolean contains( PermissionChecker permissionChecker, long primaryKey, String actionId) throws PortalException { DDMStructure structure = _ddmStructureLocalService.getDDMStructure( primaryKey); return contains(permissionChecker, structure, actionId); }
@Override public void check( PermissionChecker permissionChecker, long primaryKey, String actionId) throws PortalException { DDMStructure structure = _ddmStructureLocalService.getDDMStructure( primaryKey); check(permissionChecker, structure, actionId); }
@Override public void updateStructureKey(long structureId, String structureKey) throws PortalException { com.liferay.dynamic.data.mapping.model.DDMStructure ddmStructure = _ddmStructureLocalService.getDDMStructure(structureId); ddmStructure.setStructureKey(structureKey); _ddmStructureLocalService.updateDDMStructure(ddmStructure); }
protected Locale getDDMFormDefaultLocale(long ddmStructureId) throws PortalException { DDMStructure ddmStructure = ddmStructureLocalService.getDDMStructure( ddmStructureId); DDMForm ddmForm = ddmStructure.getDDMForm(); return ddmForm.getDefaultLocale(); }
@Override public void updateStructureDefinition(long structureId, String definition) throws PortalException { try { com.liferay.dynamic.data.mapping.model.DDMStructure ddmStructure = _ddmStructureLocalService.getDDMStructure(structureId); ddmStructure.setDefinition(definition); _ddmStructureLocalService.updateDDMStructure(ddmStructure); } catch (PortalException pe) { throw translate(pe); } }
protected StorageAdapter getStructureStorageAdapter(long ddmStructureId) throws StorageException { try { DDMStructure ddmStructure = _ddmStructureLocalService.getDDMStructure(ddmStructureId); return getStorageAdapter(ddmStructure.getStorageType()); } catch (NoSuchStructureException nsse) { return _storageAdapterRegistry.getDefaultStorageAdapter(); } catch (StorageException se) { throw se; } catch (Exception e) { throw new StorageException(e); } }
@Override public long doCreate( long companyId, long ddmStructureId, DDMFormValues ddmFormValues, ServiceContext serviceContext) throws Exception { validate(ddmFormValues, serviceContext); long classNameId = _portal.getClassNameId(DDMContent.class.getName()); String serializedDDMFormValues = _ddmFormValuesJSONSerializer.serialize( ddmFormValues); DDMContent ddmContent = _ddmContentLocalService.addContent( serviceContext.getUserId(), serviceContext.getScopeGroupId(), DDMStorageLink.class.getName(), null, serializedDDMFormValues, serviceContext); DDMStructure ddmStructure = _ddmStructureLocalService.getDDMStructure( ddmStructureId); DDMStructureVersion ddmStructureVersion = ddmStructure.getLatestStructureVersion(); _ddmStorageLinkLocalService.addStorageLink( classNameId, ddmContent.getPrimaryKey(), ddmStructureVersion.getStructureVersionId(), serviceContext); return ddmContent.getPrimaryKey(); }
_ddmStructureLocalService.getDDMStructure(ddmStructureId);