-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update token model and db to support github token format
- Loading branch information
Showing
7 changed files
with
140 additions
and
3 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.mskcc.cbio.oncokb.domain; | ||
|
||
import java.io.Serializable; | ||
|
||
import org.mskcc.cbio.oncokb.domain.enumeration.TokenType; | ||
|
||
public class TokenKey implements Serializable { | ||
public static int TOKEN_CHAR_LENGTH = 30; | ||
|
||
public static int CHECKSUM_CHAR_LENGTH = 6; | ||
|
||
private TokenType tokenType; | ||
|
||
private String token; | ||
|
||
private String checksum; | ||
|
||
public TokenType getTokenType() { | ||
return tokenType; | ||
} | ||
|
||
public void setTokenType(TokenType tokenType) { | ||
this.tokenType = tokenType; | ||
} | ||
|
||
public String getToken() { | ||
return token; | ||
} | ||
|
||
public void setToken(String token) { | ||
this.token = token; | ||
} | ||
|
||
public String getChecksum() { | ||
return checksum; | ||
} | ||
|
||
public void setChecksum(String checksum) { | ||
this.checksum = checksum; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/mskcc/cbio/oncokb/domain/enumeration/TokenType.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.mskcc.cbio.oncokb.domain.enumeration; | ||
|
||
public enum TokenType { | ||
USER("ocku"), | ||
SERVICE("okbs"); | ||
|
||
String type; | ||
|
||
TokenType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getType() { | ||
return this.type; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ain/resources/config/liquibase/changelog/20241118184124_added_field_newToken_to_Token.xml
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.1" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.9.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd"> | ||
<changeSet author="preiserb (generated)" id="1731955350576-1"> | ||
<addColumn tableName="token"> | ||
<column name="new_token" type="varchar(255)"/> | ||
</addColumn> | ||
</changeSet> | ||
</databaseChangeLog> |
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