-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
569 additions
and
122 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
23 changes: 23 additions & 0 deletions
23
.../edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/MetadataQueryProtocolScheme.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,23 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain.resolvers; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import javax.persistence.Entity; | ||
|
||
/** | ||
* @author Bill Smith (wsmith@unicon.net) | ||
*/ | ||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
public class MetadataQueryProtocolScheme extends MetadataRequestURLConstructionScheme { | ||
|
||
public MetadataQueryProtocolScheme() { | ||
type = "MetadataQueryProtocol"; | ||
} | ||
|
||
private String transformRef; | ||
} |
61 changes: 61 additions & 0 deletions
61
...rnet2/tier/shibboleth/admin/ui/domain/resolvers/MetadataRequestURLConstructionScheme.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,61 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain.resolvers; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import edu.internet2.tier.shibboleth.admin.ui.domain.AbstractAuditable; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author Bill Smith (wsmith@unicon.net) | ||
*/ | ||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "@type", visible = true) | ||
@JsonSubTypes({@JsonSubTypes.Type(value=MetadataQueryProtocolScheme.class, name="MetadataQueryProtocol"), | ||
@JsonSubTypes.Type(value=TemplateScheme.class, name="Template"), | ||
@JsonSubTypes.Type(value=RegexScheme.class, name="Regex")}) | ||
public abstract class MetadataRequestURLConstructionScheme extends AbstractAuditable { | ||
public enum SchemeType { | ||
METADATA_QUERY_PROTOCOL("MetadataQueryProtocol"), | ||
TEMPLATE("Template"), | ||
REGEX("Regex"); | ||
|
||
private String schemeType; | ||
private static final Map<String, SchemeType> lookup = new HashMap<>(); | ||
|
||
static { | ||
for (SchemeType schemeType : SchemeType.values()) { | ||
lookup.put(schemeType.toString(), schemeType); | ||
} | ||
} | ||
|
||
SchemeType(String schemeType) { | ||
this.schemeType = schemeType; | ||
} | ||
|
||
public static SchemeType get(String schemeType) { | ||
return lookup.get(schemeType); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return schemeType; | ||
} | ||
} | ||
|
||
@JsonProperty("@type") | ||
@Transient | ||
String type; | ||
|
||
String content; | ||
} |
25 changes: 25 additions & 0 deletions
25
...nd/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/RegexScheme.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,25 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain.resolvers; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import javax.persistence.Entity; | ||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author Bill Smith (wsmith@unicon.net) | ||
*/ | ||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
public class RegexScheme extends MetadataRequestURLConstructionScheme { | ||
|
||
public RegexScheme() { | ||
type = "Regex"; | ||
} | ||
|
||
@NotNull | ||
private String match; | ||
} |
31 changes: 31 additions & 0 deletions
31
...src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/TemplateScheme.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,31 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain.resolvers; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import javax.persistence.Entity; | ||
|
||
/** | ||
* @author Bill Smith (wsmith@unicon.net) | ||
*/ | ||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
public class TemplateScheme extends MetadataRequestURLConstructionScheme { | ||
|
||
public TemplateScheme () { | ||
type = "Template"; | ||
} | ||
|
||
public enum EncodingStyle { | ||
NONE, FORM, PATH, FRAGMENT | ||
} | ||
|
||
private EncodingStyle encodingStyle = EncodingStyle.FORM; | ||
|
||
private String transformRef; | ||
|
||
private String velocityEngine = "shibboleth.VelocityEngine"; | ||
} |
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
Oops, something went wrong.