/** * Returns the ddm data provider instance matching the UUID and group. * * @param uuid the ddm data provider instance's UUID * @param groupId the primary key of the group * @return the matching ddm data provider instance, or <code>null</code> if a matching ddm data provider instance could not be found */ @Override public com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance fetchDDMDataProviderInstanceByUuidAndGroupId( String uuid, long groupId) { return _ddmDataProviderInstanceLocalService.fetchDDMDataProviderInstanceByUuidAndGroupId(uuid, groupId); }
/** * Returns the ddm data provider instance matching the UUID and group. * * @param uuid the ddm data provider instance's UUID * @param groupId the primary key of the group * @return the matching ddm data provider instance, or <code>null</code> if a matching ddm data provider instance could not be found */ public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance fetchDDMDataProviderInstanceByUuidAndGroupId( String uuid, long groupId) { return getService() .fetchDDMDataProviderInstanceByUuidAndGroupId(uuid, groupId); }
protected Set<Long> getDataProviderInstanceIds( long groupId, DDMFormRule ddmFormRule) { List<String> actions = ddmFormRule.getActions(); if (ListUtil.isEmpty(actions)) { return Collections.emptySet(); } Set<Long> dataProviderInstanceIds = new HashSet<>(actions.size()); for (String action : actions) { Matcher matcher = _callFunctionPattern.matcher(action); while (matcher.find()) { String dataProviderUuid = matcher.group(1); DDMDataProviderInstance dataProviderInstance = ddmDataProviderInstanceLocalService. fetchDDMDataProviderInstanceByUuidAndGroupId( dataProviderUuid, groupId); if (dataProviderInstance != null) { dataProviderInstanceIds.add( dataProviderInstance.getDataProviderInstanceId()); } } } return dataProviderInstanceIds; }