-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(jans-keycloak-link): setup changes for keycloak migration review #5330 * chore: use only annotated beans * chore: use only annotated beans * chore: add fake beans producers * chore: resolve dependency issues * chore: reuse shared configuration in link and keycloack * refactor(jans-keycloak-link): refactor the code to increase reusability * refactor(jans-keycloak-link): refactor the code to increase reusability * refactor(jans-keycloak-link): refactor the code to increase reusability * Delete jans-config-api/docs/jans-config-api-swagger.yaml * chore: update swagger docs files * Revert "Delete jans-config-api/docs/jans-config-api-swagger.yaml" This reverts commit e424397. * refactor(jans-keycloak-link): refactor the pom version --------- Co-authored-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
- Loading branch information
Showing
76 changed files
with
5,718 additions
and
1,629 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<parent> | ||
<artifactId>jans-keycloak-link-parent</artifactId> | ||
<groupId>io.jans</groupId> | ||
<version>1.0.19-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>jans-keycloak-link-model</artifactId> | ||
<name>jans-keycloak-link-model</name> | ||
<url>http://maven.apache.org</url> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.jans</groupId> | ||
<artifactId>jans-link-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
91 changes: 91 additions & 0 deletions
91
jans-keycloak-link/model/src/main/java/io/jans/keycloak/link/model/CacheCompoundKey.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,91 @@ | ||
/* | ||
* oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. | ||
* | ||
* Copyright (c) 2014, Gluu | ||
*/ | ||
|
||
package io.jans.keycloak.link.model; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Compound key with String[] array | ||
* | ||
* @author Yuriy Movchan Date: 07.21.2011 | ||
*/ | ||
public class CacheCompoundKey implements Serializable { | ||
|
||
private static final long serialVersionUID = -3366537601347036591L; | ||
|
||
private String primaryKeyValues; | ||
private String secondaryKeyValues; | ||
private String tertiaryKeyValues; | ||
|
||
public CacheCompoundKey(String primaryKeyValues, String secondaryKeyValues, String tertiaryKeyValues) { | ||
this.primaryKeyValues = primaryKeyValues; | ||
this.secondaryKeyValues = secondaryKeyValues; | ||
this.tertiaryKeyValues = tertiaryKeyValues; | ||
} | ||
|
||
public CacheCompoundKey(String[] keyValues) { | ||
if (keyValues.length > 0) { | ||
primaryKeyValues = keyValues[0]; | ||
} | ||
if (keyValues.length > 1) { | ||
secondaryKeyValues = keyValues[1]; | ||
} | ||
if (keyValues.length > 2) { | ||
tertiaryKeyValues = keyValues[2]; | ||
} | ||
} | ||
|
||
public String getPrimaryKeyValues() { | ||
return primaryKeyValues; | ||
} | ||
|
||
public String getSecondaryKeyValues() { | ||
return secondaryKeyValues; | ||
} | ||
|
||
public String getTertiaryKeyValues() { | ||
return tertiaryKeyValues; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + (null == primaryKeyValues ? 0 : primaryKeyValues.hashCode()); | ||
result = prime * result + (null == secondaryKeyValues ? 0 : secondaryKeyValues.hashCode()); | ||
result = prime * result + (null == tertiaryKeyValues? 0 : tertiaryKeyValues.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
CacheCompoundKey other = (CacheCompoundKey) obj; | ||
if (null != primaryKeyValues && !primaryKeyValues.equalsIgnoreCase(other.primaryKeyValues)) | ||
return false; | ||
if (null != secondaryKeyValues && !secondaryKeyValues.equalsIgnoreCase(other.secondaryKeyValues)) | ||
return false; | ||
if (null != tertiaryKeyValues && !tertiaryKeyValues.equalsIgnoreCase(other.tertiaryKeyValues)) | ||
return false; | ||
return true; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder builder = new StringBuilder(); | ||
builder.append("CacheCompoundKey [primaryKeyValues=").append(primaryKeyValues).append(", secondaryKeyValues=") | ||
.append(secondaryKeyValues).append(", tertiaryKeyValues=").append(tertiaryKeyValues) | ||
.append("]"); | ||
return builder.toString(); | ||
} | ||
|
||
} |
126 changes: 126 additions & 0 deletions
126
jans-keycloak-link/model/src/main/java/io/jans/keycloak/link/model/JansInumMap.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,126 @@ | ||
/* | ||
* oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. | ||
* | ||
* Copyright (c) 2014, Gluu | ||
*/ | ||
|
||
package io.jans.keycloak.link.model; | ||
|
||
import io.jans.model.GluuStatus; | ||
import io.jans.orm.annotation.AttributeName; | ||
import io.jans.orm.annotation.DataEntry; | ||
import io.jans.orm.annotation.ObjectClass; | ||
import io.jans.orm.model.base.Entry; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* GluuInumMap | ||
* | ||
* @author Yuriy Movchan Date: 07.13.2011 | ||
*/ | ||
@DataEntry(sortBy = { "inum" }) | ||
@ObjectClass(value = "jansInumMap") | ||
public class JansInumMap extends Entry implements Serializable { | ||
|
||
private static final long serialVersionUID = -2190480357430436503L; | ||
|
||
@AttributeName(ignoreDuringUpdate = true) | ||
private String inum; | ||
|
||
@AttributeName(name = "jansPrimaryKeyAttrName") | ||
private String primaryKeyAttrName; | ||
|
||
@AttributeName(name = "jansPrimaryKeyValue") | ||
private String primaryKeyValues; | ||
|
||
@AttributeName(name = "jansSecondaryKeyAttrName") | ||
private String secondaryKeyAttrName; | ||
|
||
@AttributeName(name = "jansSecondaryKeyValue") | ||
private String secondaryKeyValues; | ||
|
||
@AttributeName(name = "jansTertiaryKeyAttrName") | ||
private String tertiaryKeyAttrName; | ||
|
||
@AttributeName(name = "tertiaryKeyValue") | ||
private String tertiaryKeyValues; | ||
|
||
@AttributeName(name = "jansStatus") | ||
private GluuStatus status; | ||
|
||
public String getInum() { | ||
return inum; | ||
} | ||
|
||
public void setInum(String inum) { | ||
this.inum = inum; | ||
} | ||
|
||
public String getPrimaryKeyAttrName() { | ||
return primaryKeyAttrName; | ||
} | ||
|
||
public void setPrimaryKeyAttrName(String primaryKeyAttrName) { | ||
this.primaryKeyAttrName = primaryKeyAttrName; | ||
} | ||
|
||
public String getPrimaryKeyValues() { | ||
return primaryKeyValues; | ||
} | ||
|
||
public void setPrimaryKeyValues(String primaryKeyValues) { | ||
this.primaryKeyValues = primaryKeyValues; | ||
} | ||
|
||
public String getSecondaryKeyAttrName() { | ||
return secondaryKeyAttrName; | ||
} | ||
|
||
public void setSecondaryKeyAttrName(String secondaryKeyAttrName) { | ||
this.secondaryKeyAttrName = secondaryKeyAttrName; | ||
} | ||
|
||
public String getSecondaryKeyValues() { | ||
return secondaryKeyValues; | ||
} | ||
|
||
public void setSecondaryKeyValues(String secondaryKeyValues) { | ||
this.secondaryKeyValues = secondaryKeyValues; | ||
} | ||
|
||
public String getTertiaryKeyAttrName() { | ||
return tertiaryKeyAttrName; | ||
} | ||
|
||
public void setTertiaryKeyAttrName(String tertiaryKeyAttrName) { | ||
this.tertiaryKeyAttrName = tertiaryKeyAttrName; | ||
} | ||
|
||
public String getTertiaryKeyValues() { | ||
return tertiaryKeyValues; | ||
} | ||
|
||
public void setTertiaryKeyValues(String tertiaryKeyValues) { | ||
this.tertiaryKeyValues = tertiaryKeyValues; | ||
} | ||
|
||
public GluuStatus getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(GluuStatus status) { | ||
this.status = status; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder builder = new StringBuilder(); | ||
builder.append("GluuInumMap [inum=").append(inum).append(", primaryKeyAttrName=").append(primaryKeyAttrName) | ||
.append(", primaryKeyValues=").append(primaryKeyValues).append(", secondaryKeyAttrName=") | ||
.append(secondaryKeyAttrName).append(", secondaryKeyValues=").append(secondaryKeyValues) | ||
.append(", tertiaryKeyAttrName=").append(tertiaryKeyAttrName).append(", tertiaryKeyValues=") | ||
.append(tertiaryKeyValues).append(", status=").append(status).append("]"); | ||
return builder.toString(); | ||
} | ||
} |
Oops, something went wrong.