-
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.
Intermediate checkin of (broken) code
- Loading branch information
Showing
37 changed files
with
339 additions
and
264 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
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
48 changes: 46 additions & 2 deletions
48
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeValue.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,10 +1,54 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import org.opensaml.core.xml.util.AttributeMap; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
import javax.persistence.ElementCollection; | ||
import javax.persistence.Entity; | ||
import javax.persistence.PostLoad; | ||
import javax.persistence.PrePersist; | ||
import javax.persistence.Transient; | ||
import javax.xml.namespace.QName; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* Since Java doesn't support multiple inheritance, this is based on a copy of previously written code - AbstractAttributeExtensibleXMLObject | ||
*/ | ||
@Entity | ||
@EqualsAndHashCode(callSuper = true) | ||
public class AttributeValue extends AbstractXMLObject implements org.opensaml.saml.saml2.core.AttributeValue { | ||
} | ||
public class AttributeValue extends AbstractElementExtensibleXMLObject implements org.opensaml.saml.saml2.core.AttributeValue { | ||
private transient final AttributeMap unknownAttributes = new AttributeMap(this); | ||
private String textContent; | ||
@ElementCollection private Map<QName, String> storageAttributeMap = new HashMap<>(); | ||
|
||
@Nullable | ||
@Override | ||
public String getTextContent() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void setTextContent(@Nullable String newContent) { | ||
this.textContent = newContent; | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
@Transient | ||
public AttributeMap getUnknownAttributes() { | ||
return this.unknownAttributes; | ||
} | ||
|
||
@PrePersist | ||
void prePersist() { | ||
this.storageAttributeMap = this.unknownAttributes; | ||
} | ||
|
||
@PostLoad | ||
void postLoad() { | ||
this.unknownAttributes.putAll(this.storageAttributeMap); | ||
} | ||
} |
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
16 changes: 8 additions & 8 deletions
16
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/EmailAddress.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,25 +1,25 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import org.hibernate.envers.AuditOverride; | ||
import org.hibernate.envers.Audited; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
|
||
@Entity | ||
@EqualsAndHashCode(callSuper = true) | ||
@Audited | ||
public class EmailAddress extends AbstractXMLObject implements org.opensaml.saml.saml2.metadata.EmailAddress { | ||
|
||
private String address; | ||
@Column(name = "address") | ||
private String uri; | ||
|
||
@Override | ||
public String getAddress() { | ||
return address; | ||
public String getURI() { | ||
return uri; | ||
} | ||
|
||
@Override | ||
public void setAddress(String address) { | ||
this.address = address; | ||
public void setURI(String uri) { | ||
this.uri = uri; | ||
} | ||
} | ||
} |
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
15 changes: 8 additions & 7 deletions
15
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/GivenName.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,25 +1,26 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import org.hibernate.envers.AuditOverride; | ||
import org.hibernate.envers.Audited; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
|
||
@Entity | ||
@EqualsAndHashCode(callSuper = true) | ||
@Audited | ||
public class GivenName extends AbstractXMLObject implements org.opensaml.saml.saml2.metadata.GivenName { | ||
|
||
private String name; | ||
@Column(name = "name") | ||
private String value; | ||
|
||
@Override | ||
public String getName() { | ||
return name; | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public void setName(String name) { | ||
this.name = name; | ||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
} | ||
} |
Oops, something went wrong.