-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace LinkUserTemplate#of with LinkUser#of
- Loading branch information
Showing
7 changed files
with
44 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
api/src/main/java/com/bivashy/auth/api/link/user/LinkUserTemplate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +0,0 @@ | ||
package com.bivashy.auth.api.link.user; | ||
|
||
import com.bivashy.auth.api.account.Account; | ||
import com.bivashy.auth.api.link.LinkType; | ||
import com.bivashy.auth.api.link.user.info.LinkUserInfo; | ||
|
||
public abstract class LinkUserTemplate implements LinkUser { | ||
protected final LinkType linkType; | ||
protected final Account account; | ||
|
||
public LinkUserTemplate(LinkType linkType, Account account) { | ||
this.linkType = linkType; | ||
this.account = account; | ||
} | ||
|
||
public static LinkUser of(LinkType linkType, Account account, LinkUserInfo linkUserInfo) { | ||
return new LinkUserTemplate(linkType, account) { | ||
@Override | ||
public LinkUserInfo getLinkUserInfo() { | ||
return linkUserInfo; | ||
} | ||
}; | ||
} | ||
|
||
@Override | ||
public LinkType getLinkType() { | ||
return linkType; | ||
} | ||
|
||
@Override | ||
public Account getAccount() { | ||
return account; | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters