Package io.meeds.deeds.common.service
Class HubService
java.lang.Object
io.meeds.deeds.common.service.HubService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidautoConnectHubToWom(String hubAddress, long deedId) protected voidio.meeds.wom.api.model.WomConnectionResponseconnectToWom(io.meeds.wom.api.model.WomConnectionRequest hubConnectionRequest) disconnectFromWom(io.meeds.wom.api.model.WomDisconnectionRequest hubDisconnectionRequest) generateToken(String clientIp) io.meeds.wom.api.model.Hubio.meeds.wom.api.model.Hubio.meeds.wom.api.model.HubgetHubAvatar(String hubAddress) org.springframework.data.domain.Page<io.meeds.wom.api.model.Hub> getHubs(long rewardId, org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<io.meeds.wom.api.model.Hub> getHubs(org.springframework.data.domain.Pageable pageable) getManagedDeeds(String address) voidinit()voidrefreshClaimableAmount(String address) io.meeds.wom.api.model.HubrefreshHubFromWom(String hubAddress) voidrefreshHubUemProperties(String hubAddress) voidsaveHubAvatar(String hubAddress, String signedMessage, String rawMessage, String token, org.springframework.web.multipart.MultipartFile file) voidtransferDeedManager(long deedId, String previousManager, String newManager) voidtransferDeedOwner(long deedId, String previousOwner, String newOwner) booleanupdateDeedOnWom(long deedId) booleanupdateDeedOnWom(long deedId, boolean forceRefresh) voidupdateHub(io.meeds.wom.api.model.HubUpdateRequest hubUpdateRequest)
-
Field Details
-
HUB_SAVED
- See Also:
-
HUB_CONNECTED
- See Also:
-
HUB_DISCONNECTED
- See Also:
-
HUB_STATUS_CHANGED
- See Also:
-
WOM_INVALID_SIGNED_MESSAGE
- See Also:
-
-
Constructor Details
-
HubService
public HubService()
-
-
Method Details
-
init
@PostConstruct public void init() -
getHubs
public org.springframework.data.domain.Page<io.meeds.wom.api.model.Hub> getHubs(org.springframework.data.domain.Pageable pageable) -
getHubs
public org.springframework.data.domain.Page<io.meeds.wom.api.model.Hub> getHubs(long rewardId, org.springframework.data.domain.Pageable pageable) -
getHub
-
getHub
-
getHub
-
refreshHubFromWom
-
refreshClaimableAmount
-
generateToken
-
connectToWom
public io.meeds.wom.api.model.WomConnectionResponse connectToWom(io.meeds.wom.api.model.WomConnectionRequest hubConnectionRequest) throws io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.WomException
-
disconnectFromWom
public String disconnectFromWom(io.meeds.wom.api.model.WomDisconnectionRequest hubDisconnectionRequest) throws io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.WomException
-
updateHub
public void updateHub(io.meeds.wom.api.model.HubUpdateRequest hubUpdateRequest) throws io.meeds.wom.api.constant.WomException, io.meeds.wom.api.constant.ObjectNotFoundException - Throws:
io.meeds.wom.api.constant.WomExceptionio.meeds.wom.api.constant.ObjectNotFoundException
-
saveHubAvatar
public void saveHubAvatar(String hubAddress, String signedMessage, String rawMessage, String token, org.springframework.web.multipart.MultipartFile file) throws io.meeds.wom.api.constant.ObjectNotFoundException, io.meeds.wom.api.constant.WomException, IOException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionio.meeds.wom.api.constant.WomExceptionIOException
-
getHubAvatar
-
refreshHubUemProperties
-
getManagedDeeds
-
updateDeedOnWom
public boolean updateDeedOnWom(long deedId) throws io.meeds.wom.api.constant.ObjectNotFoundException, io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionio.meeds.wom.api.constant.WomException
-
updateDeedOnWom
public boolean updateDeedOnWom(long deedId, boolean forceRefresh) throws io.meeds.wom.api.constant.ObjectNotFoundException, io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionio.meeds.wom.api.constant.WomException
-
autoConnectHubToWom
public void autoConnectHubToWom(String hubAddress, long deedId) throws io.meeds.wom.api.constant.ObjectNotFoundException, io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionio.meeds.wom.api.constant.WomException
-
transferDeedOwner
public void transferDeedOwner(long deedId, String previousOwner, String newOwner) throws io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.WomException
-
transferDeedManager
public void transferDeedManager(long deedId, String previousManager, String newManager) throws io.meeds.wom.api.constant.WomException - Throws:
io.meeds.wom.api.constant.WomException
-
cleanTokens
protected void cleanTokens()
-