Search in sources :

Example 1 with MetaDataService

use of org.apache.shenyu.admin.service.MetaDataService in project incubator-shenyu by apache.

the class ShenyuClientRegisterSofaServiceImpl method registerMetadata.

@Override
protected void registerMetadata(final MetaDataRegisterDTO metaDataDTO) {
    MetaDataService metaDataService = getMetaDataService();
    MetaDataDO exist = metaDataService.findByServiceNameAndMethodName(metaDataDTO.getServiceName(), metaDataDTO.getMethodName());
    metaDataService.saveOrUpdateMetaData(exist, metaDataDTO);
}
Also used : MetaDataService(org.apache.shenyu.admin.service.MetaDataService) MetaDataDO(org.apache.shenyu.admin.model.entity.MetaDataDO)

Example 2 with MetaDataService

use of org.apache.shenyu.admin.service.MetaDataService in project incubator-shenyu by apache.

the class ShenyuClientRegisterSpringCloudServiceImpl method registerMetadata.

@Override
protected void registerMetadata(final MetaDataRegisterDTO metaDataDTO) {
    MetaDataService metaDataService = getMetaDataService();
    metaDataDTO.setPath(PathUtils.decoratorPath(metaDataDTO.getContextPath()));
    MetaDataDO metaDataDO = metaDataService.findByPath(metaDataDTO.getPath());
    metaDataService.saveOrUpdateMetaData(metaDataDO, metaDataDTO);
}
Also used : MetaDataService(org.apache.shenyu.admin.service.MetaDataService) MetaDataDO(org.apache.shenyu.admin.model.entity.MetaDataDO)

Example 3 with MetaDataService

use of org.apache.shenyu.admin.service.MetaDataService in project incubator-shenyu by apache.

the class ShenyuClientRegisterTarsServiceImpl method registerMetadata.

@Override
protected void registerMetadata(final MetaDataRegisterDTO metaDataDTO) {
    MetaDataService metaDataService = getMetaDataService();
    MetaDataDO exist = metaDataService.findByServiceNameAndMethodName(metaDataDTO.getServiceName(), metaDataDTO.getMethodName());
    metaDataService.saveOrUpdateMetaData(exist, metaDataDTO);
}
Also used : MetaDataService(org.apache.shenyu.admin.service.MetaDataService) MetaDataDO(org.apache.shenyu.admin.model.entity.MetaDataDO)

Example 4 with MetaDataService

use of org.apache.shenyu.admin.service.MetaDataService in project incubator-shenyu by apache.

the class ShenyuClientRegisterDivideServiceImpl method registerMetadata.

@Override
protected void registerMetadata(final MetaDataRegisterDTO dto) {
    if (dto.isRegisterMetaData()) {
        MetaDataService metaDataService = getMetaDataService();
        MetaDataDO exist = metaDataService.findByPath(dto.getPath());
        metaDataService.saveOrUpdateMetaData(exist, dto);
    }
}
Also used : MetaDataService(org.apache.shenyu.admin.service.MetaDataService) MetaDataDO(org.apache.shenyu.admin.model.entity.MetaDataDO)

Example 5 with MetaDataService

use of org.apache.shenyu.admin.service.MetaDataService in project incubator-shenyu by apache.

the class ShenyuClientRegisterDubboServiceImpl method registerMetadata.

@Override
protected void registerMetadata(final MetaDataRegisterDTO metaDataDTO) {
    MetaDataService metaDataService = getMetaDataService();
    MetaDataDO exist = metaDataService.findByPath(metaDataDTO.getPath());
    metaDataService.saveOrUpdateMetaData(exist, metaDataDTO);
}
Also used : MetaDataService(org.apache.shenyu.admin.service.MetaDataService) MetaDataDO(org.apache.shenyu.admin.model.entity.MetaDataDO)

Aggregations

MetaDataService (org.apache.shenyu.admin.service.MetaDataService)8 MetaDataDO (org.apache.shenyu.admin.model.entity.MetaDataDO)7 Field (java.lang.reflect.Field)1 AppAuthService (org.apache.shenyu.admin.service.AppAuthService)1 PluginService (org.apache.shenyu.admin.service.PluginService)1 RuleService (org.apache.shenyu.admin.service.RuleService)1 SelectorService (org.apache.shenyu.admin.service.SelectorService)1 AppAuthData (org.apache.shenyu.common.dto.AppAuthData)1 MetaData (org.apache.shenyu.common.dto.MetaData)1 PluginData (org.apache.shenyu.common.dto.PluginData)1 RuleData (org.apache.shenyu.common.dto.RuleData)1 SelectorData (org.apache.shenyu.common.dto.SelectorData)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1